Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Disconnect if pairing/security not completed within timeout.

I have a device that uses peer manager to pair using a key.  I have noticed that the device will connect to an app and stay connected even if the pairing procedure is not completed.  I would like to automatically disconnect after a few seconds if the pairing does not occur.  I thought that I had seen this in one of the examples, but can't locate it right now.  Anyone have an example of this or know where the best place to put the timer is?  I need to cover both new connections to the device and previously bonded connections.

Related