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

BLE_DFU_EVT_BOOTLOADER_ENTER_FAILED with ble_dfu_bonded.c

I'm trying to get DFU OTA working with SDK 14.2.0, SD 132, on the nRF52832. I'm using the bonded implementation. My DFU event handler is getting passed 

BLE_DFU_EVT_BOOTLOADER_ENTER_FAILED.

Here are my firmware logs at the time I kick off DFU (the function name logging is added by me to the SDK):

I app Received indication state 1

D app ble_dfu_buttonless_on_sys_evt()

D app ble_dfu_buttonless_on_sys_evt()

D app ble_dfu_buttonless_on_sys_evt()

D app ble_dfu_buttonless_on_sys_evt()

D ble_periph PM_EVT_PEER_DATA_UPDATE_SUCCEEDED

D app pm_evt_handler()

D app ble_dfu_buttonless_on_sys_evt()

D app ble_dfu_buttonless_on_ctrl_pt_write()

I app Writing peer data to the bootloader

I app ---------------system attribute table: 8--------------

E ble_periph Request to enter bootloader mode failed asynchronously.

Here's the relevant bits of my app_config.h:

#define BLE_DFU_ENABLED 1
#define NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS 1

I've made only minor changes to the bootloader from the SDK, but in any case, we're not getting to the point of resetting into the bootloader yet AFAICT.

How do I debug this?

[Edit]

This is happening because sd_ble_gatts_sys_attr_get() is returning NRF_ERROR_NOT_FOUND in retrieve_peer_data() in ble_dfu_bonded.c.

There are various posts on the devzone about this but none of the answers have fixed my problem. I have the service changed characteristic set in the BLE stack config like this:

ble_cfg.gatts_cfg.service_changed.service_changed = 1;

I have this define in the application:

#define IS_SRVC_CHANGED_CHARACT_PRESENT 1
And I have this one in the bootloader:
#define NRF_DFU_BLE_REQUIRES_BONDS 1

I will add the code in Case ID: 216745

Parents Reply Children
No Data
Related