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

nRF51-DK: Can't enter in sleep mode during connection

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).

  1. How can I made it enter in sleep mode with long pressing Button 1?

  2. After waking from sleep mode, I want the device to start fast advertising without whitelist, how can I do that?

Thank you!

Related