Bluetooth unpairing after reset

Hello,

I am trying to get the peripheral_lbs example to unpair all devices (delete all bond informations) using VSCode and nrf connect sdk version 2.0.2.

I tried using bt_unpair(BT_ID_DEFAULT, NULL); 
It only works when the device is still running but when I try to delete bond information immediately after a reset, it doesn't work

I tried updating to v2.1.2 but it still doesn't work

What should I do to remove bond informations after a reset?

Thank you.

Dhafer

Parents
  • When I debug bt_unpair, I go to 

    bt_foreach_bond(id, unpair_remote, &id); (hci_core.c file)
    the unpair_remote doesn't get called because there are no keys stored in the key_pool static array (keys.c file) which is normal after a reset
    the bond informations should be stored somewhere in the flash memory.
    Is there a way to restore them, Or I am following a bad lead.
Reply
  • When I debug bt_unpair, I go to 

    bt_foreach_bond(id, unpair_remote, &id); (hci_core.c file)
    the unpair_remote doesn't get called because there are no keys stored in the key_pool static array (keys.c file) which is normal after a reset
    the bond informations should be stored somewhere in the flash memory.
    Is there a way to restore them, Or I am following a bad lead.
Children
Related