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

dfu_buttonless dosen't work

nRF5_SDK_12.3.0_d7731ad

s132_nrf52_3.1.0_softdevice

PCA10040V1.1.1

HI team. I use experimental_ble_app_buttonless_dfu example to do test. But it doesn't work after I write 0x01 to develop board. It will disconnect with LightBlue , but it never go to the DFU mode, because I can't search any device named "nrf_dfu". And the LED3 doesn't work neither. I have read much answers about this problem. As they say that start_bootloard() function will be called after receive the value of 0x01. But I can't search this function anywhere.

Here is some original code from experimental_ble_app_buttonless_dfu:

static void ble_dfu_evt_handler(ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt)
{
    switch (p_evt->type)
    {
        case BLE_DFU_EVT_INDICATION_DISABLED:
            NRF_LOG_INFO("Indication for BLE_DFU is disabled\r\n");
            break;

        case BLE_DFU_EVT_INDICATION_ENABLED:
            NRF_LOG_INFO("Indication for BLE_DFU is enabled\r\n");
            break;

        case BLE_DFU_EVT_ENTERING_BOOTLOADER:
            NRF_LOG_INFO("Device is entering bootloader mode!\r\n");
            break;
        default:
            NRF_LOG_INFO("Unknown event from ble_dfu\r\n");
            break;
    }
}

static void enter_bootloader(ble_dfu_t * p_dfu)
{
    if (p_dfu->evt_handler != NULL)
    {
        ble_dfu_evt_t evt;

        evt.type = BLE_DFU_EVT_ENTERING_BOOTLOADER;

        p_dfu->evt_handler(p_dfu, &evt);
    }

    s_dfu_settings.enter_buttonless_dfu = true;

    (void)nrf_dfu_settings_write(flash_callback);

    /*
    TODO:
     - Save bond data
    */
}
Related