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

How to temporarily disable the already bonded peers but allow new peer to bond?

Hi,

We are using nRF51822_QFAB (128K/16K), S110 V8.0.0 and SDK V10.0.0 for my development. We are in the need of guest (unbonded), pairing and bonded mode.

  1. Guest (un-bonded mode) - Bonding is not allowed. But allow any new peers to connect.

  2. Pairing - Allow any new peers to bond. This mode is only for bonding new peers.

  3. Bonded - Allow only the bonded peers to connect.

The guest and bonded mode is easy to implement.

But for pairing mode, the requirement is that new peers can be able to bond. But there is a situation that there might be already bonded peers and they keep trying to connect to our BLE device. It preventing the new peers to become bonded. The easy solution is to go to private place and bond the new peer or else disable the BLE in all bonded peer and try bonding the new peer. But it is not acceptable as per the requirement. I have made a solution that if a peer trying to connect is already bonded then it will be denied to connect. But if it is new peer then it will be allowed to bond. To deny the already bonded peer, I am calling the sd_ble_gap_disconnect() function inside the event BLE_GAP_EVT_SEC_INFO_REQUEST.

My question is, 1.) What I am doing is correct? 2.) This way of implementation is violating any of BLE specification (sorry that I haven't gone through the complete BLE spec)? 3.) Are there any other perfect solution?

Best Regards, Jebakumar.

Related