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

hrs example -> buttonless dfu infinite loop

Rudimentary question about DFU; thanks for your patience.

I'm developing an app for a "headless" (no buttons, no led's) ble application which will have a companion mobile app with which, among other things, the user will be allowed to do app DFU's.

Before I can even get going in testing my own app, I wanted to make sure I saw and fully understood the flow of a successful DFU.

  1. I built and loaded the HRS app with DFU enabled
  2. I tried the iPhone nRF toolbox, which exhibited the behavior below whenever I tried to update the device by selecting one of the application files hard-wired into the toolbox - i.e. hrs_s110_5.hex - selecting of course to update the Application only.
  3. Just so I could see the console, etc., I built the nRF toolbox iOS app and did it again.
  4. Result: At the toolbox UI, it appears to be in an infinite loop "Starting DFU..." and "Enabling DFU Bootloader...". The console output is attached in log.pdf

I am using the bootloader that came on the device. Perhaps I have a fundamental misunderstanding and I need to build and download a bootloader for the device before I do this ota app update. However, I don't see how I can even do that given that the example bootloader code requires at least one button and one led.

Guidance appreciated; thanks.

Attachments: log.pdf

  • In case it is relevant I should perhaps add that I built the HRS sample application using GCC, with SDK 10.

    I found an odd comment in this post: devzone.nordicsemi.com/.../

    "Side note: If you use SDK v7.x and want to test buttonless example with gcc compiler, it may not work. The assembly code to branch from application to bootloader was made for KEIL only."

    Could this be true? Meaning, could it be true that buttonless DFU apps cannot be built natively on a Mac using GCC? Does development of buttonless DFU apps require KEIL+Windows?

  • Could this be true? Meaning, could it be true that buttonless DFU apps cannot be built natively on a Mac using GCC? Does development of buttonless DFU apps require KEIL+Windows?

    It was true up to the 8.1.0 release where GCC support added. In other words, SDK 8.1.0 and later should work out-of-the-box with GCC.

    I tried the iPhone nRF toolbox, which exhibited the behavior below whenever I tried to update the device by selecting one of the application files hard-wired into the toolbox - i.e. hrs_s110_5.hex - selecting of course to update the Application only.

    The bootloader from SDK 7 and later requires an "init" file as an extra safety measurement. More on that here and instructions on how to create it here. You can also test with the pre-made .zip files found in the SDK to verify that the bootloader is working: "\nRF51_SDK_10.0.0\examples\dfu\ble_dfu_send_hex\test_images_update_nrf51\dfu_test_app_hrm_s110.zip"

Related