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

BLE OOB Pairing over NFC - Automatic connection without re-bound attempt

My goal is to establish a BLE connection between the DK and the smartphone, using NFC for the OOB pairing. I am using the nRF52 DK and the nRF5 SDK, v.16.0.0.

The intended behavior is the following. A user must scan the NFC tag, bond their smartphone with the DK and then (and only then, since this will be the only bonding method accepted), the DK can accept the connection. If a user was not previously bonded, after bonding the DK and smartphone should pair. If the user has already bonded, to initiate a connection we must scan the NFC tag again, which will trigger the BLE to start advertise and allow the smartphone to connect.

I tried using the ble_app_hrs_nfc_pairing and the ble_nfc_pairing_reference to make a quick prototype, but I am experiencing two issues:
1. After a successful bond, the DK BLE disconnects from the smartphone and I am unable to reconnect;
2. If I attempt to re-bound, I got the error 0x85 (BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP). I am aware that the Peer Manager blocks the re-bound of already bonded peers and a workaround which allows re-bonding is detailed here, but that is not what I want. My goal is to detect that the smartphone was already previously bonded and when a new bond request happens, use the previously bonded information.

Can anyone suggest how to solve these or point me to some links on the documentation that may help developing these features? 

Thank you in advance!

Pedro

Related