Hello,
I have the following issue. I am developing an application very similar to the "ble app hids keyboard" example. SDK 15.0, S132 V6.0.0, nrf52832.
I would like to implement a function where the user can hold a button, and cause the device to do the following: disconnect (if connected), stop advertising, delete bonds, and start advertising again. When I do the following steps: turn on device (now advertising w/o whitelist), connect and bond with phone, turn off Bluetooth on phone to disconnect it (device then starts advertising w/ whitelist), press button to delete bonds (device stops advertising, calls pm_peers_delete, then starts advertising when pm event received indicating success); the application clears all bonds and goes into fast advertising w/o whitelist mode, but when the packets are checked on nrf Connect, the flag for LE General Discoverable Mode is not set, meaning any other new device cannot see the advertising. checking the whitelist, as well as the advertising parameters when calling ble_advertising_start all verify that advertising should be w/o whitelist, and the advertising event handler reports that the device is fast advertising w/o whitelist, however it is not actually doing so according to the nrf Connect app. Interestingly, if advertising is restarted with ble_advertising_restart_without_whitelist, the advertising becomes general discoverable, but having to do this is unexpected.
I have put together an example that demonstrates the issue using the SDK 15.0 "ble app hids keyboard" example, modifying only main.c (attached). In here, I set a timer at startup that, after 30s, stops advertising, deletes bonds, then starts advertising again. If the user powers the dev kit running the application, pairs with a phone then disconnects it from the phone (ex. by turning off phone bluetooth) before 30s is over from power on, the device will advertise w/ whitelist until 30s is up, then it will delete bonds and advertise w/o whitelist, however on nrf Connect the LE General Discoverable Mode flag will not be set and the device cannot be seen on any other phone.
Any insight into this issue is appreciated, thank you,
J