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

Bonding Information/ Whitelist

Hi all,

Is there a tutorial that explain better the bonding information and whitelist? I have more doubt about that.

My first code i have pairing and bonding:

  1. If i delete bonding information from app side, connection fail i delete information on nrf52 side, too and connection is ok
  2. I delete information on nrf52, conenction fail, i delete information bonding also on phone side and connection is ok.

After i need to add a whitelist to have a connection one to one, so i have a second release of code.

The option 1 doesn't works, the connection fails always, though i delete the information on nrf52 side.(Pairing reject)

i resolve the problem setting this flag to false:

  case PM_EVT_CONN_SEC_CONFIG_REQ:
     {
     // Reject pairing request from an already bonded peer.
     pm_conn_sec_config_t conn_sec_config = {.allow_repairing = false};
     pm_conn_sec_config_reply
   }

but i would to understand why when i have added the whitelist, i haven't problem with option 1. When i use

   uint32_t err_code ;
   err_code = pm_peers_delete();
   APP_ERROR_CHECK(err_code);

i don't delete the bonding information? How the softdevice understand that the pairing is with an already bonding device, after i delete the bonding information?

thanks, Anna

Parents
  • I expect that my device have a withe list = 1( so can connection only with 1 device).

    1. First case: Device and phone are connect Pairing and bonding works correctly. OK (Behavior i expect)
    2. Second case: User delete bonding information from device side. When try to connect with phone, the connection fail and device disconnect, deleting also the information on phone side all works. OK (Behavior I expect)
    3. User delete the bonding information on phone side. Device reject the pairing, ok. User delete the bonding information on device side with delete_peer. device continues to reject the pairing. I expcet that in this case, after delete the bonding information the device and phone can connect again.
Reply
  • I expect that my device have a withe list = 1( so can connection only with 1 device).

    1. First case: Device and phone are connect Pairing and bonding works correctly. OK (Behavior i expect)
    2. Second case: User delete bonding information from device side. When try to connect with phone, the connection fail and device disconnect, deleting also the information on phone side all works. OK (Behavior I expect)
    3. User delete the bonding information on phone side. Device reject the pairing, ok. User delete the bonding information on device side with delete_peer. device continues to reject the pairing. I expcet that in this case, after delete the bonding information the device and phone can connect again.
Children
No Data
Related