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

Bonding and reconnecting to a single central

Hi, 

I'm trying to implement the following use case:

On the first button push a sensor advertise and bonds with a smartphone. I do it the following way and it works fine

pm_sec_params_set(&sec_param); 
pm_conn_secure(m_conn_handle, false);

Now on the next push of the button I would like to establish a secured connection only with the bonded smartphone and reject any other connection attempt.

I've tried to use the following as described in the documentation , unfortunately other smartphones do succeed to establish an unsecured connection with the sensor

pm_sec_params_set(NULL); 
pm_conn_secure(m_conn_handle, false);

Is there a way to reject a secured link request from an 'unwanted' peer ?

Thanks

Related