I have followed up this example and compiled successfully but the NFC pairing is not working at all.
I use my smartphone (Google Pixel 2) to touch the NFC antenna and nothing happened on the screen, even in the terminal.
After that, I went to check whether the hardware of NFC functions works by running the example of the record txt NFC, which is working well.
Moreover, I read the guideline of example and it says "This example requires the following SoftDevice: S132"
So does that mean this functionality doesn't support S140 (nRF52840)? Or are there any necessary steps that should take up?
I use Keli with SDK 16.0, CMSIS 4.5.0 and Pack 8.27.1 to compile them.
Thanks in advance.
Glad you got the devices to pair! As for the reconnection issue you're seeing, you can try to delete the bonding information on the nRF side upon disconnection (or upon startup, this is up to you). Please check out the pm_peers_delete() function in peer_manager.c. By default, the example is set to delete peers upon the press of a button on the DK, but you can set it to trigger every time the device disconnects for example instead.
Thank you so much ! Adding pm_peers_delete() fixes the issue of reconnection, thank you again!
And as you said, I just check if this function would be called after pressed the button (default as button 0) and realized that it didn't. I'm not sure it's a bug or other factors.
Besides, I found out that when I connected to the phone successfully. But after around 10 sec, it will pop up a message shown "Could not connect Nordic_NFC_PAIR_REF" at the end of the screen.
However, there are no errors or warning messages on the terminal, does that indicate both devices still connected? Am I able to send data via Bluetooth in this situation? Just like to confirm with you before implementations.
Very appreciated your help