I have a problem using ble_advertising_restart_without_whitelist(). According to the documentation (as I understood) it should start advertising without whitelist even if a whitelist exists (hence it skips BLE_ADV_EVT_WHITELIST_REQUEST). In the next call of ble_advertising_start() advertising should use the whitelist again.
But in my application it's not the case, BLE_ADV_EVT_WHITELIST_REQUEST is skipped when calling ble_advertising_start() if ble_advertising_restart_without_whitelist() has been called once before.
So the sequence is:
Do I misunderstand the documentation or am I missing something?
My goal is to have an application that is always whitelist advertising (no timeout) for bonded peers and starts "public" advertising only on request (with a certain timeout). How can I switch easily between public and whitelist advertising? Deleting the whitelist on "public" advertising request always returns errors (BLE_ERROR_GAP_DEVICE_IDENTITIES_IN_USE & BLE_ERROR_GAP_WHITELIST_IN_USE). And what is this device identities list anyway?
m_whitelist_temporarily_disabled is set to true when you call ble_advertising_restart_without_whitelist()
and is set to false when on_disconnected() is called.
So calling ble_advertising_start() wouldn't set m_whitelist_temporarily_disabled to false.
Seems the library is missing a ble_advertising_restart_with_whitelist(), maybe you can try to implement that functionality yourself.
I didn't call on_disconnected (advertising event handler)...