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

Bonding Information not stored in Flash memory

I am using nrf52 with SDK 14.2.0 and SD is S132.

The issue I am facing is that after Central is paired with one peripheral and bonding is done, the bonding information is not stored by central and so the next time when the already bonded peripheral tries to connect with the Central, it follows pairing and bonding procedure. Below are the peer manager events that I am getting:

1. PM_EVT_CONN_SEC_PARAMS_REQ

2. PM_EVT_CONN_SEC_SUCCEEDED

3. PM_EVT_CONN_SEC_PARAMS_REQ

4. PM_EVT_CONN_SEC_SUCCEEDED

The above events are coming for new device as well as already paired device.

Also, one issue I think is I am never getting PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event even after bonding is done. Also one more strange behavior is that my system event handler, which I registered using NRF_SDH_SOC_OBSERVER, is never called.

Can you please help me to resolve this issue?

Parents
  • Hi,

    It sounds like the devices are being paired and not bonded. Please verify that the bond flag is set to 'true' when you initialize the PM module:

    static void peer_manager_init(void)

       ...

       sec_param.bond           = SEC_PARAM_BOND;

       ...

    Then check if the peer device supports bonding as well . This will be reported through the PM_EVT_CONN_SEC_PARAMS_REQ event:

Reply
  • Hi,

    It sounds like the devices are being paired and not bonded. Please verify that the bond flag is set to 'true' when you initialize the PM module:

    static void peer_manager_init(void)

       ...

       sec_param.bond           = SEC_PARAM_BOND;

       ...

    Then check if the peer device supports bonding as well . This will be reported through the PM_EVT_CONN_SEC_PARAMS_REQ event:

Children
Related