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 Reply Children
  • 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

  • On which line does this error occur?
    Do you mean that you create a new bond every time you connect? e.g. delete the bone on iOS? I'm not sure I understand what you do to trigger this error. Note that Bond info can be retained so you don't have to create a new bond all the time.

  • Line 446 in ANCS example.

    No, I mean the device paired with the phone before OTA, and I want it still to pair with the phone automatically after OTA. But it just cannot after that, always toggled between "connected" and "disconnected".

Related