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

How to delete the previous bonding information from central?

Hello Nordic Experts,

I have One central device and and 4 peripheral devices. At this point of time I am trying HRS example on it, the example is running fine with single peripheral. Then I try the same central but different peripheral but its not connecting to that peripheral.

Again, when I tried the same peripheral I observed I am getting below log "app: Connected to a previously bonded device." from below snippet

switch (p_evt->evt_id)
{
    case PM_EVT_BONDED_PEER_CONNECTED:
    {
        NRF_LOG_INFO("Connected to a previously bonded device.");
    } break;

Now my questions are :

  1. How can I delete the previous bonding information?

  2. How can I add these four peripheral device to the Whitelist?

Best Regards, Hrushi

Parents
  • You can delete a peer/bond with pm_peer_delete(). You delete all peers/bonds with pm_peers_delete().

    You are probably not connecting because you are scanning with a whitelist with the first device. If you want to connect to another, scan without whitelist.

    If you want all devices in the whitelist you can scan without whitelist until all have bonded, then scan with whitelist.

    You can also create a whitelist that is not based on bond information. Then you will have to hard code in the addresses of the devices you want in there. There are some questions in here on how to do that.

  • Thanks Petter for your reply. can you please provide any sample application which is scanning without whitelist. or else give some clue to scann without whitelist in HRS central code

    Regards, Hrushi

Reply Children
No Data
Related