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

Unbonded event to peripheral

Hello,

I am working on nRF51822 S110 softdevice 8.0 and SDK9.0. I am creating paired and unpaired states and the system will goto unpaired only if it is unpaired from the central.

I need to know, can softdevice give the unbonded event after disconnection? or connection has to be there to send unbonded event? And I also want to know the event for unbonded? what does BLE_BONDMNGR_EVT_CONN_TO_BONDED_CENTRAL indicates?

Regards, Sowmya

Parents
  • Maybe I'm misunderstanding you, but if the peripheral and central are disconnected, they are not connected, there is no commincation between them, so the central can't tell the peripheral that it has deleted it's bond.

    There are ways of checking if the central has deleted the bond, but then you need to reconnect first.

    Then you have two scenarioes.

    That the central initiates the procedures. The central can do this whenever it wants, or when it does service discovery and tries to read an characteristic value or descriptor that requires encryption. If the central has a bond it will send an encryption request, and the peripheral application will receive the BLE_GAP_EVT_SEC_INFO_REQUEST event, see this for more information. If the central doesn't have a bond it will send an pairing request, and the peripheral application will receive the BLE_GAP_EVT_SEC_PARAMS_REQUEST event, see this for more information. If BLE_GAP_EVT_SEC_PARAMS_REQUEST is received the peripheral can check its list of bonded devices and delete the appropriate bond.

    The second is that the peripheral initiates the procedures. It can call sd_ble_gap_authenticate() and then you get into the same situation as above, and then you can take the appropriate action depending if you receive BLE_GAP_EVT_SEC_INFO_REQUEST or BLE_GAP_EVT_SEC_PARAMS_REQUEST.

Reply
  • Maybe I'm misunderstanding you, but if the peripheral and central are disconnected, they are not connected, there is no commincation between them, so the central can't tell the peripheral that it has deleted it's bond.

    There are ways of checking if the central has deleted the bond, but then you need to reconnect first.

    Then you have two scenarioes.

    That the central initiates the procedures. The central can do this whenever it wants, or when it does service discovery and tries to read an characteristic value or descriptor that requires encryption. If the central has a bond it will send an encryption request, and the peripheral application will receive the BLE_GAP_EVT_SEC_INFO_REQUEST event, see this for more information. If the central doesn't have a bond it will send an pairing request, and the peripheral application will receive the BLE_GAP_EVT_SEC_PARAMS_REQUEST event, see this for more information. If BLE_GAP_EVT_SEC_PARAMS_REQUEST is received the peripheral can check its list of bonded devices and delete the appropriate bond.

    The second is that the peripheral initiates the procedures. It can call sd_ble_gap_authenticate() and then you get into the same situation as above, and then you can take the appropriate action depending if you receive BLE_GAP_EVT_SEC_INFO_REQUEST or BLE_GAP_EVT_SEC_PARAMS_REQUEST.

Children
No Data
Related