I'm working on a project using the nRF52840 that will have a central device with an NFC reader and up to three peripheral devices with an NFC tag. The goal is to have an LED on one of the peripheral devices reflect the state of a button on the central device (on when button is pressed, off when button is released). The central will be able to switch between which of the peripherals will be notified of the button state. When the pairing button is pressed, the BLE/NFC pairing process starts, and if there are already three peripherals, one of them is disconnected. If the central is turned off or the peripherals lose connection, then on reboot, the central will scan for the previous three bonded peripherals and the peripherals will directly advertise to the central.
So far I've gotten the NFC/BLE pairing and LED/Button control working with the help of the central and peripheral NFC pairing examples, but I still can't get bonding to work. So I have a couple questions about how to proceed:
1. How can I have three peripherals and control which of the peripherals will turn on/off the LED? I'm thinking it has something to do with the connection handle.
2. How can I get bonding working? I've initialized the peer manager, but it's still not bonding.