Hi , Am using NRF52 ,S132 SoftDevice I have a simple Question, How can I know is any device already bonded or not to my peripheral ??
I need to show an option "Delete Bonds", in my Display if any device Already Bonded to my peripheral.
Thanks,
Hi , Am using NRF52 ,S132 SoftDevice I have a simple Question, How can I know is any device already bonded or not to my peripheral ??
I need to show an option "Delete Bonds", in my Display if any device Already Bonded to my peripheral.
Thanks,
Could you please describe the flow of what you want to do? For instance, when do you want the option to delete a device?
When your device connects to a device it is already bonded to, the event PM_EVT_BONDED_PEER_CONNECTED will occur right after being connected.
Note: If you are doing development, I would recommend you to use the Peer Manager module for handling security/bonding and the latest version of the SDK.
Hi Thanks Kristin, Am using SDK 11.0.0.2 alpha and device manager in that SDK .. This is my requirement
1)One device bonded --> Added to whitelist No other device can connect to it ..
I would recommend you to switch to SDK 11 and peer manager. The reason is that peer manager will be continued to be maintained, while the device manager will not.
In the device manager, the event DM_EVT_LINK_SECURED will indicate that the link is secured. From its documentation: " Indicates that link with the peer is secured. For bonded devices, subsequent reconnections with bonded peer will result only in this event when the link is secured and setup procedures will not occur unless the bonding information is either lost or deleted on either or both sides. " From what I can see in that phrase, it means that for bonded devices, the events DM_EVT_SECURITY_SETUP and DM_EVT_SECURITY_SETUP_COMPLETE should not occur for bonded devices.
In order to get the total number of bonded devices, you should use dm_whitelist_create(). If it doesn't work, you can try @Andys suggestion in this thread.