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 Hung,

    I've verified that the bond information is being stored and recognized on a foreground connection:

    [00:01:52.276,306] <debug> nrf_sdh_ble: BLE event: 0x10.
    [00:01:52.276,397] <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
    [00:01:52.276,428] <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
    [00:01:52.276,550] <debug> peer_manager_handler: Event PM_EVT_BONDED_PEER_CONNECTED
    [00:01:52.276,550] <debug> peer_manager_handler: Previously bonded peer connected: role: Peripheral, conn_handle: 0, peer_id: 0
    [00:01:52.276,580] <debug> peer_manager_handler: Event PM_EVT_PEER_DATA_UPDATE_SUCCEEDED
    [00:01:52.276,611] <debug> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update

    Thanks for the confirmation on the connection parameters.

    I'll see what I can do about collecting a sniffer trace of this happening.

    thanks,

    Jeff

Reply
  • Hi Hung,

    I've verified that the bond information is being stored and recognized on a foreground connection:

    [00:01:52.276,306] <debug> nrf_sdh_ble: BLE event: 0x10.
    [00:01:52.276,397] <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
    [00:01:52.276,428] <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
    [00:01:52.276,550] <debug> peer_manager_handler: Event PM_EVT_BONDED_PEER_CONNECTED
    [00:01:52.276,550] <debug> peer_manager_handler: Previously bonded peer connected: role: Peripheral, conn_handle: 0, peer_id: 0
    [00:01:52.276,580] <debug> peer_manager_handler: Event PM_EVT_PEER_DATA_UPDATE_SUCCEEDED
    [00:01:52.276,611] <debug> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update

    Thanks for the confirmation on the connection parameters.

    I'll see what I can do about collecting a sniffer trace of this happening.

    thanks,

    Jeff

Children
No Data
Related