Page 1 of 1

Clear the BLE whitelist

Posted: Sat Aug 18, 2018 10:57 am
by pmckeon
I am trying to figure out how one can clear the whitelist if the old device address is unknown.

esp_ble_gap_update_whitelist(bool add_remove, esp_bd_addr_tremote_bda)

Will allow you to add/remove devices, but in the scenario you want to clear the whitelist and revoke any previously added devices the previous address may not have been recorded or known and there is not a function either to get an array of whitelisted devices.

I can see that the bluedroid stack has a function for this void btm_ble_clear_white_list (void):
https://github.com/espressif/esp-idf/bl ... e_bgconn.c

Is this just something that was overlooked during implementation or is there another way that people normally do this?

Re: Clear the BLE whitelist

Posted: Tue Aug 21, 2018 8:44 am
by pmckeon
As an example scenario, say I have whitelisted a device and have the filter policy set to ADV_FILTER_ALLOW_SCAN_ANY_CON_WLST allowing connection from only whitelisted devices then later want to remove the device from the whitelist without knowing what it's address was is there any way to simply clear all addresses from the whitelist or will I need to manage my own list of whitelisted devices and save it NVRAM?

Re: Clear the BLE whitelist

Posted: Wed Aug 29, 2018 12:18 pm
by pmckeon
Any chance of some insight on this from Espressif?
How is the whitelist managed if you can only add or remove but not view or delete (clear) the whitelist?

Re: Clear the BLE whitelist

Posted: Tue Sep 04, 2018 12:21 pm
by pmckeon
Sorry to bump this again but it's been buried under the other threads and I'm keen to get some insight.

Re: Clear the BLE whitelist

Posted: Sat Sep 15, 2018 10:53 am
by pmckeon
I'm not ready to give up on this yet :)

Surely there must be someone familiar with the BLE stack in the IDF?

Re: Clear the BLE whitelist

Posted: Wed Oct 31, 2018 8:03 pm
by jkhax0r
Did you have any luck?

I'm more curious if you were able to even get whitelisting to work at all? I'm trying to allow connections only from a specific phone and no luck as of yet.

Re: Clear the BLE whitelist

Posted: Wed Oct 31, 2018 10:38 pm
by chegewara
Sorry guys, i've missed this topic. We have nice esp-idf example how to do it, the only problem is that we still are having some issue with whitelist:
https://github.com/espressif/esp-idf/bl ... #L279-L290