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

ANCS & DFU

Hi, everyone

I add the dfu service codes to the ancs sample program, the dfu service codes comes from the heart rate sample, and download the bootloader codes to the device. The result is that I can successfully update the device sometimes, but another times it cannot work, this error hint always appears -- "failed to reopen transport backend". And then the device cannot work any more.

Now the question is How should I add the dfu service to the ancs sample, is there anything to be noticed? Or maybe the bootloader codes has some problems. Anyway, if you have some idea to make this function possible, please write it down. I need your help. Thank you all!

chip: nrf51822

sdk version: 9.0.0

softdevice: 8.0

Parents
  • A good start would be to go through the DFU tutorial. I assume you have added all the code from the HRS example that is within BLE_DFU_APP_SUPPORT #ifdef's?

  • I‘ve found out the reason why the error occurs -- the reset prepare program before dfu. I close the db discovery, disable the ancs notification, stop the adc module and stop all timers disable the gpiote in event, then it succeeds every time.

    but now there's another problem. It's about bonding. the ancs sample erase the bonds by press button, but my board has no button, and I don't need to erase the bonds, the result I want is after I update the firmware, the device can quickly pair with the phone it paired before without other operations.

    So I set initial value "false" to the boolean variable erase_bonds. And it did worked well for several times. However, it failed finally. Several times later, it cannot paired with the phone. The error information is :

    error occurs at device_manager_evt_handler --> APP_ERROR_CHECK(event_result); error code: 0x8043

Reply
  • I‘ve found out the reason why the error occurs -- the reset prepare program before dfu. I close the db discovery, disable the ancs notification, stop the adc module and stop all timers disable the gpiote in event, then it succeeds every time.

    but now there's another problem. It's about bonding. the ancs sample erase the bonds by press button, but my board has no button, and I don't need to erase the bonds, the result I want is after I update the firmware, the device can quickly pair with the phone it paired before without other operations.

    So I set initial value "false" to the boolean variable erase_bonds. And it did worked well for several times. However, it failed finally. Several times later, it cannot paired with the phone. The error information is :

    error occurs at device_manager_evt_handler --> APP_ERROR_CHECK(event_result); error code: 0x8043

Children
No Data
Related