I have a question regarding BLE HCI API documentation on STM32WB
https://www.st.com/resource/en/application_note/an5270-stm32wb-bluetooth-low-energy-wireless-interface-stmicroelectronics.pdf
There are 4 functions described:
Adds new device to the whitelist
hci_le_add_device_to_white_list()
Removes device from the whitelist
hci_le_remove_device_from_white_list()
Gets max number of devices in whitelist
hci_le_read_white_list_size()
Clears all devices in whitelist
hci_le_clear_white_list()
I am trying to implement whitelisting functionality in my application, so only whitelisted devices could connect to my STM.
My question is, how does one get a list of all devices already in the whitelist, so I can check if new connected device must actually be added or it's already in there. There is no mention of such function in the documentation.
The HCI protocol has no such functionality. The solution is that the host keeps track of it, i.e. has a copy of the list reflecting the state of the controller. That should not be an issue because the host knows the commands it has sent to the controller. The list in the controller is cleared upon reset.