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

Buttonless DFU Example broken

Hi there,

I know you guys are very busy and I appreciate your quick response on Devzone.

I'd like to make a request for a more polished example of Buttonless DFU using SDK 12.1 with nRF52.

We are nearing production and if there's anything I'd like to get in concrete, it's a reliable way to upgrade firmware in the field.

The current example is not working out of the box, and the documentation doesn't offer a complete start to finish of how to upgrade. For example, what should we do after we send a 0x01 to the characteristic?

Thanks, Paul

  • The example in Vidar nRF5_SDK_12.1.0_buttonless_dfu.zip with the following instructions does not work; SD_BL_APP_APP_VALID.hex consists of Bootloader, softdevice, application, and the bootlaoder settings with the app marked as valid.

    Steps to test buttonless DFU:

    • erase chip: nrfjprog -e -f nrf52
    • program merged .hex : nrfjprog --program SD_BL_APP_APP_VALID.hex -f nrf52
    • Reset board : nrfjprog -r -f nrf52
    • Use nrf connect app on android or ios and connect to "Nordic_Template"
    • Enable notifications on the control point, and write 0x01 to enter DFU mode.
    • Go back to discovery mode, and connect to "DfuTarg"
    • Perform DFU with one of the test images. E.g., \nRF5_SDK_12.1.0\examples\dfu\ble_dfu_send_hex\test_images_update_nrf52\dfu_test_app_hrm_s132.zip With my iPhone, I see the same as Daniel77; Nordic_Template and the services he mentioned. When I use Master Control Panel from my computer I see "Nordic_Template" with a write/notify Characteristic. I write 01 00 to the value and rescan, but the Board does not go to bootloader.
  • @Kevin: If you update the firmware with a normal application (not an buttonless DFU application) then you should not expect that you can enter DFU after that. You need to implement Buttonless DFU service in the application.

    Please refer to the experimental_ble_app_buttonless_dfu, check the services_init() function.

  • @Hung: Maybe you misunderstood my previous comment; I have used the experimental_ble_app_buttonless_dfu project, modified by Vidar in the zip file link above. It does not go to the DFU mode as mentioned by daniel77 and me above. "With my iPhone, I see the same as Daniel77; Nordic_Template and the services he mentioned. When I use Master Control Panel from my computer I see "Nordic_Template" with a write/notify Characteristic. I write 01 00 to the value and rescan, but the Board does not go to bootloader."

  • Hi Kevin,

    Sorry for misunderstanding. It's most likely the phone cached the ATT table so that you can't find the DFU control point characteristic you should write. What was the "a write/notify Characteristic" you used ? What was the UUID ? The UUID for the DFU buttonless char is 50-EA-DA-30-88-83-B8-9F-60-4F-15-F3-01-00-40-8E. You should try to turn off and on bluetooth on the phone, then use nRFConnect to connect and service discovery.

  • @Hung: OK, I was able to get Vidar's modified code going to bootloader mode by turning off the bluetooth and leaving it off for a couple of minutes. Then turning it back on; I guess since I'm using the same dev board and phone, there was some cached information prohibiting the service from running. I have also verified Vidar's code works for an Andriod tablet and an Ipad Air2. Although it does not work immediately; sometimes I must have to send the command to go to bootloader multiple times. Also, the Andriod tablet shows the name of the service (Experimental Buttonless DFU Service") whereas the apple products show the service as "Unknown Service".

Related