This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Repair/Bond when bonds erased from peripheral

Hello

I have 2 custom boards both with nRF82532. One is central and the other a peripheral. I use LESC. When no bonding information is stored in either of the devices, pairing and bonding is executed  whithout problem. When I erase the bonding information from the peripheral I can not make it to repair/bond. I allways get a disconnection error event. Secure connection is triggered by central with pm_conn_secure(p_evt->conn_handle,false); function. Erasing the bond from the peripheral by the user is mantatory for our product.

Please advice  

  • Hi

    This is because the cantral still thinks it is bonded to the peripheral, but the peripheral does not have this data anymore, resulting in a failure.

    So if you erase the bonding information from the peripheral you should make sure that the central erases its bonding information as well, either manually or whenever the peripheral disconnects or signals it somehow.

    Best regards,

    Simon

  • Hi Simonr

    As I wrote in my message I am aware of that. The cuestion is if there is a way to force repair when bonding information is lost from peripharal side. The secure connection is initiated from central side

    Dimitris

  • Hi Dimitris

    No, unfortunately not, after the bonding information has been removed from one side it's not possible for the devices to just repair like that, as devices need to be bonded to one another in order to repair correctly.

    Best regards,

    Simon

  • Hi Simon

    Thanks for your answer. As a workaround for this I propose the following prosedure

    1. If the the bonds are lost from peripheral side then the PM_EVT_BONDED_PEER_CONNECTED still occures
    2. When the previus hapens and you want to force pair avoid calling the pm_handler_disconnect_on_sec_failure(p_evt) function in the pm_evt_handler and instead call the pm_conn_secure(p_gap_evt->conn_handle,true)
    3. That will force a repair between central and peripheral

    Best regards

    Dimitris

Related