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

NRF51 Bootloader Advertising Timeout

Hi,

I am working on bootloader_secure example on SDK_12.1.0 and set APP_ADV_TIMEOUT_IN_SECONDS to 180 to stop the advertising after 3 mins.

All looks fine and device stops advertising 3 mins later but advertising LED still stays ON. Is there a way to make it OFF once the advertising stops?

Parents
  • I believe you might need to handler the BLE_GAP_EVT_TIMEOUT event inside the on_ble_evt function in nrf_ble_dfu.c file.

    Add to the switch statement

    case BLE_GAP_EVT_TIMEOUT: nrf_gpio_pin_set(ADVERTISING_LED_PIN_NO); break;

    Or you can simply call advertising_stop function

    case BLE_GAP_EVT_TIMEOUT: advertising_stop(); break;

    Using advertising stop is probably the best method just in case there is clean up or flags to be cleared.

Reply
  • I believe you might need to handler the BLE_GAP_EVT_TIMEOUT event inside the on_ble_evt function in nrf_ble_dfu.c file.

    Add to the switch statement

    case BLE_GAP_EVT_TIMEOUT: nrf_gpio_pin_set(ADVERTISING_LED_PIN_NO); break;

    Or you can simply call advertising_stop function

    case BLE_GAP_EVT_TIMEOUT: advertising_stop(); break;

    Using advertising stop is probably the best method just in case there is clean up or flags to be cleared.

Children
Related