Hi,
I’m developing an application using the SDK V16 , the nRF52DK (52832) as central, and a couple of Sparkfun nRF52832 breakout boards as peripherals (both peripherals behave the same way).
I have right now a central system that deletes bonds at the start of the program and scans for my Custom Service UUID. The other boards are peripherals advertising the custom service and waiting for connection.
When a connection is stablished the devices bond, the devices exchange some information, the central disconnect, and following the central starts scanning applying a whitelist.
I want to have a “pairing mode” where I can disable the whitelist and scan using the Custom UUID filter for other peripherals, but I want to avoid connecting to devices that I have already bonded with.
My question is:
- Is it possible to set up a paring mode that can scan for devices with a filter for my Custom Service UUID but avoid any connection that is already whitelisted/bonded? If so, are there parameter to look for only non-bonded devices or do I have to disconnect at some point during the scan, db discovery and connection process?
I though I could stop scan mid connection process when I receive the NRF_BLE_SCAN_EVT_FILTER_MATCH event if the peer address is already whitelisted, but that did not have any good outcome. Something similar to this question https://devzone.nordicsemi.com/f/nordic-q-a/21453/how-to-temporarily-disable-the-already-bonded-peers-but-allow-new-peer-to-bond but as is a post from 3 years ago, has it been implemented a better way to do this?
My bonding part of my project is based on hrs example. Any extra information or specific code please let me know.
Thanks,