Clear the BLE whitelist

pmckeon
Posts: 9
Joined: Sat Aug 18, 2018 9:18 am

Clear the BLE whitelist

Postby pmckeon » Sat Aug 18, 2018 10:57 am

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?

pmckeon
Posts: 9
Joined: Sat Aug 18, 2018 9:18 am

Re: Clear the BLE whitelist

Postby pmckeon » Tue Aug 21, 2018 8:44 am

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?

pmckeon
Posts: 9
Joined: Sat Aug 18, 2018 9:18 am

Re: Clear the BLE whitelist

Postby pmckeon » Wed Aug 29, 2018 12:18 pm

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?

pmckeon
Posts: 9
Joined: Sat Aug 18, 2018 9:18 am

Re: Clear the BLE whitelist

Postby pmckeon » Tue Sep 04, 2018 12:21 pm

Sorry to bump this again but it's been buried under the other threads and I'm keen to get some insight.

pmckeon
Posts: 9
Joined: Sat Aug 18, 2018 9:18 am

Re: Clear the BLE whitelist

Postby pmckeon » Sat Sep 15, 2018 10:53 am

I'm not ready to give up on this yet :)

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

jkhax0r
Posts: 7
Joined: Mon Jan 23, 2017 6:54 am

Re: Clear the BLE whitelist

Postby jkhax0r » Wed Oct 31, 2018 8:03 pm

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.

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: Clear the BLE whitelist

Postby chegewara » Wed Oct 31, 2018 10:38 pm

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

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 259 guests