DFU update fails with Espruino firmware

Hi!
I installed the Espruino firmware to my RuuviTag for some quick testing and after I was done I wanted to update the my firmware back to the latest Ruuvi firmware. I followed the instructions (RuuviLab | Firmware Update) and did as instructed. My tag was seen with the name “DfuTarg” as I started the DFU-update process with NRF-connect and as soon as it started I got a disconnected notification and the DFU-update stopped at 0 %. I tried it a few times again and also with different phones and the result was the same. Does Espruino firmware prevent the DFU-update or am I just doing something wrong here?

  • Joonas

Hello,

It sounds like your bootloader would have changed at some point, the bootloader should be “RuuviBoot” instead of “DfuTarg”. Which Espruino firmware you installed?

nRF5_SDK_12.3.0_d7731ad/components/libraries/bootloader/ble_dfu/nrf_ble_dfu.c includes
#define DEVICE_NAME “DfuTarg”

Yes, but RuuviTags ship with customized bootloader

@otso Exactly.
I mentioned this because I (unintentionally ) ended up with that boot loader once upon a time.
Did Joonas install of Espruino firmware end up with Nordics boot loader?
@joonas95 You may need to get the Ruuvi and Nordic Development boards
Check out https://lab.ruuvi.com/devshield/

Hi all and sorry for answering so late. I used Espruino 2.04. I also agree that the bootloader might be the cause of my issues like you guys said in previous comments. I have the dev shield available. How can I set my bootloader back to the official Ruuvi bootloader since the DFU-packages don’t seem to work? Using nrfjprog -tool perhaps?
-Joonas

Download factory hex and run

nrfjprog --eraseall
nrfjrpog --program ruuvi_firmware_full_2.5.9.hex
nrfjprog --reset

Be sure to power cycle the tag after programming to ensure that the debug section of MCU will get turned off, otherwise you’ll drain your battery in a few weeks. Removing and reinserting the battery after a few seconds does the trick.

@otso That worked perfectly. Thank you!