I want to get the peripheral side of my dual-role gateway device to accept ONLY NFC (LESC) pairing from my Android phone.
I have had NFC working but it seems I keep breaking it with configurations for other things.
The issue seems to come and go, so I've gone back to the original peripheral_nfc_pairing example, but now even that fails the pairing connection. It apparently tries 3-times as the nRF Connect app shows the "NOT BONDED" text change quickly 3-times and then fails pairing. It's as if the keys don't match.
Q:How can I debug this. I can't seem to find what configuration to enable to debug the NFC/TNEP/OOB.
When it WAS working, the app was able to discover services during the time it was waiting for confirmation of whether to try pairing. Another BLE Scanner will discover and populate all the services during that same period. I had been testing where to place bt_conn_disconnect(conn, BT_HCI_ERR_AUTH_FAIL); calls to more quickly avoid that discovery. Calling it from the security_changed and the pairing_failed callbacks.
Is this correct?
Q: Is there a way to force NFC-ONLY pairing? It seems the default security level is 1 when the connect callback occurs, at which point I set_security to L4, but that still leaves the connection active for a time in low security such that it allows discovery to happen.
Q: Is there a way to force the connection to only use high-security and to allow connections if-and-only-if NFC has succeeded?