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

DFU resets back to app after setting DFU params

This is somewhat a long story. I have an app that I've written in mbed compiler (online version). I would like to have DFU. At the moment, it seems like mbed OS5 does not support DFU, so I am using the previous version (I believe it is mbed lib). Everything works fine if I do updates from the nrf toolbox. However, I am now trying to implement DFU update from my mobile app (written in C# Xamarin). I'm using a custom library written by Adrian Eggenberger (see devzone.nordicsemi.com/.../). It's implemented here: bitbucket.org/.../arendi_nordicdfu.git I've modified the code to allow open source bluetooth instead of the arendi library. At the moment, that library only supports DFU revision 0 and 5-8. This is unfortunate, since it seems like the DFU revision implemented in the mbed online compiler is 4.

I am able to switch to the bootloader and I see DfuTarg. I can connect to it and see the three characteristics. However, trouble start when I try to set the DFU parameters. As soon as I write the value "2" (initialize DFU parameters, see devzone.nordicsemi.com/.../group__dfu__ble__service__spec.html), the bootloader resets the device (I'm working with NRF51822AC) and goes back to the app.

Questions:

  1. What is the proper way to set the parameters for DFU revision 4?
  2. [mbed question] - how can I upgrade to DFU revision 5 in mbed online compiler?
Related