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

About Peer Manager (Erase bond, limit bond devices, Service)

Hi Nordic,

I am using SDK 12.3.0 and S130 2.0.1. I would like to ask some questions about Peer Manager.

1. I want to erase all bond when I press a button. Do I just need to put pm_peers_delete() in button event handler? What is the proper procedure to delete all bond information when device is connected? Does the device need to be disconnected first? Do we need to call peer_manager_init() again?

2. I would like to limit the number of bond using pm_peer_count(). For example, when the number of bond reach 2, I would like my central would only pair with new peripheral instead of pairing + bonding. Where do I need to set this condition? pm_conn_secure() is the function to start bonding and I put it in case DISCOVERY_COMPLETE of service event handler. Do I need to call other function if I just need pairing?

3. Can Peer Manager save the bonded service in order to skip service discovery if connect to previous bonded device? How to implement this feature?

Thank you for your patience.

Related