This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to delete WHITELIST data?

Hi,

I need to delete all centrals using ble_bondmngr_bonded_centrals_delete ble_bondmngr.c function. It is working but it is not cleaning the whitelist.

So, when I do:


 err_code = ble_bondmngr_whitelist_get(&whitelist);
 APP_ERROR_CHECK(err_code);

if ((whitelist.addr_count != 0) || (whitelist.irk_count != 0)) {..}

The whitelist still returns bonded centrals, which are not anymore valid.

I have found a subject talking about that : devzone.nordicsemi.com/.../ble_bondmngr_bonded_centrals_delete,-does-not-clean-the-whitelist

but the workaround is not working because void update_whitelist(void) ble_bondmngr.c function update the whitelist according to the number of existing bonded master, which is 0 after ble_bondmngr_bonded_centrals_delete ble_bondmngr.c function call.

So, my question is : how to delete all whitelist information?

Related