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

Bond deletion notification

Hi, My nRf51422 based device holds bonding with single central device and once it bonded it will do whitelist advertising at connection lost (whitelist has one address). If device in the range the central will connect and establish secure link with LTK. Now I want to erase bond information from peer central device. Ok, it delete bond on central and do disconnect. On nRF I receive BLE_GAP_EVT_DISCONNECTED with ble_evt->evt.gap_evt.params.disconnected.reason == BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION But device knows nothing about bond lost, it catches disconnect and start whitelist advertising with previously bonded device address. I tested on Nexus7 and Windows 8.1. Nexus see this advertisement and able to connect and create new bond. The Win8.1 doesn't see. (I checked - adress remains the same all time on both central devices). I need to notify in some way the peripheral about bond deletion to make it clear the whitelist. I found this thread https://devzone.nordicsemi.com/question/5735/problem-when-deleted-bonded-master-keeps-bond/ but think that my situation is different. Please help.

Parents
  • I don't think there is any built in procedure in the Bluetooth specification for doing this. Yes, you could trigger a bond deletion when you get the BLE_GAP_EVT_DISCONNECTED with BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION, but this doesn't really tell you if the bond on the central side is deleted or not.

    If this is a feature you need I think you need to build it into the application space and make the central use GATT to tell the peripheral that it should delete the bond.

    Edit 02.10.2015: I gave this some more thought. 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 applicaiton 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.

  • Ow, in Core 4.2 [Vol 2, Part D], 2.19 REMOTE USER TERMINATED CONNECTION (0x13) "The Remote User Terminated Connection error code indicates that the user on the remote device terminated the connection." This is "very" strict description when remote user allowed to post this message at disconnection.)))

Reply Children
No Data
Related