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

how to let nRF51822 ble_app_uart never sleep?

As title, im using nRF51822 as a ble uart.(ble_app_uart)

But it will sleep when No connect for some time.

how can i turn off the sleep mode?

I want it be a "always on BLE UART" and wait for connect.

i did this

for (;;)
{
    //power_manage();
}

or this

case BSP_EVENT_SLEEP:
            //sleep_mode_enter();
            break;

but it doesnt work at all.

Parents
  • Hi, you can restart advertising after timeout elapses by adding the related function call in BLE_ADV_EVT_IDLE case as below:

    case BLE_ADV_EVT_IDLE: { /* start advertising again */ ret_code_t err_code = ble_advertising_start(BLE_ADV_MODE_FAST); APP_ERROR_CHECK(err_code); }

    I hope this helps. Thanks.

  • This solution is so great! Its helpful, thank you!

Reply Children
No Data