BLE Whitelisting
My BLE (BlueNRG-MS) application has to offer the following functions and I'm not sure what's the correct approach
- I need to have a pairing mode where a central device can connect. I think this is achieved by using aci_gap_set_discoverable() with NO_WHITE_LIST_USE, this seems to work
- When the application is not in the pairing mode, only devices which have been paired already should be able to connect. This is where I thought I can use whitelist by change the aci_gap_set_discoverable() with WHITE_LIST_FOR_ALL. Is this assumption correct and can I switch between the two discoverability modes without losing an already established connection?
- To be able to use the WHITE_LIST_FOR_ALL, I add devices which connect while in pairing mode to the whitelist using hci_le_add_device_to_white_list(0x01, cc->peer_bdaddr) - is this how it should be done? If yes, what do I have to do in order to save the whitelist persistently, because it seems that after a reboot, I don't see the BLE device anymore when discoverability mode is WHITE_LIST_FOR_ALL.
- Is there a way to figure out whether a certain Central device is already on the whitelist?
Any help is much appreciated and if further information is needed I'm more than happy to provide it!
Update:
Seems like as soon as the central device changes it's mac address the whitelist approach doesn't work anymore. What do I have to do in order to be able to resolve random addresses from the same central device?
