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

HID Keyboard Example - how to create new bond without deleting old bond

I'm learning whitelisting with the HID Keyboard Example nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_hids_keyboard\

Question - is there a way to create a new bond without deleting an old one?

Using the vanilla example, if I bond it to my laptop, then tell my laptop to remove device, then try reconnecting, then press button 2 to turn off the whitelist advertising, my laptop sees it and attempts to connect but the app throws a bonding error (peer_manager_handler: Connection security failed:) and disconnects.

To reconnect, I have to delete old bonds first (hold button 2 while reset).

How would I best modify this example so it will accept a new bonding without deleting the old one?

nRF52840, SDK_17.0.2, SES, s140_nrf52_7.2.0_softdevice

Many thanks

Related