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

How to reject Bonding with mobile

Hello,

I studied on example\ble_peripheral\ble_app_ancs_c in SDK15.2.0 with board PCA10040.

After paring and bonding sucessfully with my iPhone, I reset PCA10040 with Button 1 pressing in order to erase the bond infomation, and i saw it worked as expected, but my iPhone ( without forgot this device in bluetooth setting ) still could connect to PCA10040. I wanted PCA10040 reject this connection and never connect, untill my iPhone forgot this device and connec again.

How could I implement this feacture, Is there any APIs could deal with this when event PM_EVT_CONN_SEC_FAILED occured?

  • Unfortunately, it is not possible to know if the iPhone has the old bond or not, until after it has connected and tried to re-establish the old bond. And even if you created a check on the connection event, I am not sure how you would know that the connection was made by a previously bonded device. iOS uses a resolvable private address, so the address changes every 15 minutes or so.

Related