This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

iOS application connecting in the background

I'm using SDK 15.3.0 and SoftDevice 6.1.1 running on an nRF52832.

The iOS application works correctly when it is running in the foreground.  It is able to connect and bond to the nRF.

After it has bonded, if I try to connect in the background, I'm seeing an BLE_GAP_EVT_AUTH_STATUS event.  I don't see that event during a foreground connection. The fields in the status event are saying that the remote side (src) returned a status of BLE_GAP_SEC_STATUS_UNSPECIFIED (0x88):

[00:01:24.056,976] <debug> ble_dcs: Event BLE_GAP_EVT_AUTH_STATUS (0x19)
[00:01:24.057,006] <info> app: BLE_GAP_EVT_AUTH_STATUS: status:0x88 bond:0x0 src:0x1 lesc:0x0
[00:01:24.057,037] <info> app: BLE_GAP_EVT_AUTH_STATUS: sm1:0000
[00:01:24.057,037] <info> app: BLE_GAP_EVT_AUTH_STATUS. sm2.0000
[00:01:24.057,067] <info> app: BLE_GAP_EVT_AUTH_STATUS: kdist_own: enc:0x0 id:0x0 sign:0x0 link:0x0
[00:01:24.057,067] <info> app: BLE_GAP_EVT_AUTH_STATUS: kdist_peer: enc:0x0 id:0x0 sign:0x0 link:0x0


I'm looking for any insight into the cause of this issue and what (if anything) can be done about it?

thanks,

Jeff

Parents
  • Hi Jeff, 


    We got report earlier that status BLE_GAP_SEC_STATUS_UNSPECIFIED  may come if the phone is bonded but the device doesn't store the bonding and can't encrypt the link when the phone send the encryption request using the stored TLK. You may want to check and make sure you can do bonding not just pairing. 

    Could you clarify that after you bond for the first time using foreground application, if you connect again you don't need to do bonding again and the link can be re-encrypted ? 


    sniffer trace would be very helpful to reveal what happens over the air. 

    Regarding your question about connection parameters. I don't think it would related to the issue you are having. Even though iOS device wouldn't read the Peripheral Preferred Connection Parameters, we send connection parameter request and as you already configure it with min 15ms max 75ms I don't see any big issue with that configuration. 

     



     

Reply
  • Hi Jeff, 


    We got report earlier that status BLE_GAP_SEC_STATUS_UNSPECIFIED  may come if the phone is bonded but the device doesn't store the bonding and can't encrypt the link when the phone send the encryption request using the stored TLK. You may want to check and make sure you can do bonding not just pairing. 

    Could you clarify that after you bond for the first time using foreground application, if you connect again you don't need to do bonding again and the link can be re-encrypted ? 


    sniffer trace would be very helpful to reveal what happens over the air. 

    Regarding your question about connection parameters. I don't think it would related to the issue you are having. Even though iOS device wouldn't read the Peripheral Preferred Connection Parameters, we send connection parameter request and as you already configure it with min 15ms max 75ms I don't see any big issue with that configuration. 

     



     

Children
No Data
Related