Keep only one bonded device as GATT server
Posted: Fri Nov 02, 2018 2:25 pm
Hello everyone,
I have an ESP32 set up as secure GATT server with bonding and encryption. The bonding procedure works flawlessly and from then the device remembers my smartphone for future connections.
I need to allow only one bonded device at any time: if someone else completes the bonding procedure the ESP32 should forget any previous connection. What would be the best way to do it?
For instance, I could retrieve all the bonded device with esp_ble_get_bond_device_list, but is the list ordered? If I always remove all the devices but the first (or the last), am I sure to keep the last one?
I have an ESP32 set up as secure GATT server with bonding and encryption. The bonding procedure works flawlessly and from then the device remembers my smartphone for future connections.
I need to allow only one bonded device at any time: if someone else completes the bonding procedure the ESP32 should forget any previous connection. What would be the best way to do it?
For instance, I could retrieve all the bonded device with esp_ble_get_bond_device_list, but is the list ordered? If I always remove all the devices but the first (or the last), am I sure to keep the last one?