I'm running the HID Keyboard example from SDK 12.2.0 on nRF51-DK with SD 130.
When I long push Button1, it disconnects for a moment and connects again immediately.
Events in the function bsp_event_handler(bsp_event_t event) are generated only from button presses and holding Button1 during connetion generates BSP_EVENT_DISCONNECT. So I can add
sleep_mode_enter();
in the event case to eventually enter in sleep mode. But the device enters sleep mode only while I'm holding Button1. When I release it, it starts direct advertising and connects immediately again with the last bond (my laptop).
-
How can I made it enter in sleep mode with long pressing Button 1?
-
After waking from sleep mode, I want the device to start fast advertising without whitelist, how can I do that?
Thank you!