Hi,
How to automatically delete the bond between a central and a peripheral after disconnection? I'm using zephyr.
Thanks
Hi,
How to automatically delete the bond between a central and a peripheral after disconnection? I'm using zephyr.
Thanks
Hi Reginaldo,
Based on the samples that do have bonding. on the peripheral and central side you need to ensure that you are not using settings to store the bonding information, so please make sure you are not activating the following configs:
#Enable to Save BLE Settings CONFIG_BT_SETTINGS=y
If you are also not using settings for other contexts and not using flash for other purposes, please also remove:
CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_NVS=y CONFIG_SETTINGS=y
Please, also make sure that you are not calling setting_load() in your applications not using any settings context.
Additionally, on the central side you need to add the following config:
CONFIG_BT_BONDABLE=n
Hi
If you never want to store the bonding information I agree with João that there is no need to bond in the first place. The sole purpose of bonding is to store the encryption information, so you don't have to redo the pairing and service discovery each time you connect.
Then the follow up question would be why you don't want to store the bonding data?
For many applications it is very inconvenient to have to pair every time you connect (it is also a potential security risk depending on how you do the pairing).
Best regards
Torbjørn
Thanks Joao, it worked as expected.
Hi,
My application always requires pairing, it is a necessary feature of the product, thank you.
Hi
Then you should make sure that you perform pairing using LESC (LE Secure Connection) with passkey or OOB, otherwise you will be vulnerable to attacks each time you connect and pair.
Best regards
Torbjørn