RAK19010/RAK4631 OTA failed Application flashing

We have 10 RAK19010 baseboards each with a RAK4631 (Arduino version). We initially successfully flashed them all using the DAP1 tool. These boards were then built into enclosures and we intended to use the OTA functionality to update them. We updated our application software and upgraded the units using the nRF DFU tool. We first tried the iOS tool and it worked 100% the first time on the first unit. We had to make another change to our application and tried to upload it again using the nRF DFU tool on iOS. This time the upload failed and it stopped at 40%. Aborting the process does nothing. We shut down the application on the iPad and reset the RAK19010. The RAK19010 started up with a rapidly flashing green LED and no blue LED. We then changed to the Android nRF DFU tool and successfully upgraded 2 units whereafter the third unit exhibited the exact same behaviour stopping halfway through the update. We again had to close the application and reset the RAK19010. After resetting the RAK19010 it also started up with a rapidly flashing green LED and no blue LED. We managed to successfully update 7 out of the 10 units, with 3 failing. We then used the DAP1 tool on a Windows 10 PC to flash the exact same application (just in HEX format) to the RAK4631. However the units again started up with a rapidly blinking green LED and no blue LED. We flashed the latest RAK4631 boot loader firmware to units but they still restart with a rapidly blinking green LED and no blue LED. We also reloaded the application software, but no change. Pushing the reset button twice in short succession does nothing (though it looks as if the blue LED flashed faintly) and the units do not enter boot loader mode. Is there anything else we can try to resurrect the units?

The RAK19010 is powered via the RAK19016 Powerslot module

Updating over BLE is not the safest method. If it fails, the device is left with the bootloader only, no application and no BLE for updating.

That it fails in the Arduino version of nRF Tool app is because nRF changed something in their Android nRF Tool app. This forced us to update the bootloader. Updated bootloader is available in our WisBlock repo. Discussed in RAK 4631 over the air update

For the problem that the devices are not responsive after updating, you say the devices are flashing the green LED. If the bootloader is working and the device is in bootloader mode, it would be more a dimming on/off of the green LED.
A fast flashing LED is showing when the device is still in upload mode. Do you get the same when you complete power cycle the devices?

If nothing helps, try to flash the bootloader, softdevice and an application as shown in this tutorial.

The files are in our Download Center
Flash in this sequence:
(1) rak4631_factory_bootloader.zip
(2) rak4631_factory_softdevice.zip
(3) rak4631_factory_application.zip

Thanks for the fast response Bernd.

“Do you get the same when you complete power cycle the devices?”
Yes I am still getting the fast blinking green LED

I will try and flash the bootloader, softdevice and an application

I tried flashing the unit, however I am unable to get the device in boot mode via the DAP1 tool. Double pushing the reset button has no effect. Is there another way to get the unit in Boot mode? The Tera Term VT software link in “timing out”. I tried using Putty, but it does not seem to work via the DAP1 as it cannot open the port.

Sorry, I think I missed something.

You are trying to update the firmware over UART1 or UART2 with the RAKDAP1?
That does not work. Firmware update is only possible over USB (that you don’t have with RAK19016) or over BLE (if your firmware supports it).
Only way to update the firmware with the RAKDAP1 is to use the SWD port on the RAK4631 module or to get a another power module with USB, like the RAK19012 to flash the firmware.

For using the SWD interface, please check the RAKDAP1 tutorial.
You can find the firmware HEX file required to flash your firmware in the compile output folder of ArduinoIDE.

We were not using the UART, only the DAP1 tool as per the tutorials. Our problem is that we are unable to get the RAK4631 into boot mode. Regardless of double pressing reset button or power cycling the green LED just continuous to blink fast.

To use the SWD interface you do not need to put the device into bootloader mode. You just use the RAKDAP1 commands to flash over SWD.
The console output should be similar to this:

PS D:\#Github\Solutions\Low-Power-PIO\Generated> pyocd flash -t nrf52840 WisBlock_LowPower_V1.0.0_2023.10.23.15.34.11.hex
0000851 I Loading D:\#Github\Solutions\Low-Power-PIO\Generated\WisBlock_LowPower_V1.0.0_2023.10.23.15.34.11.hex [load_cmd]
[==================================================] 100%
0015755 I Erased 225280 bytes (55 sectors), programmed 225280 bytes (55 pages), skipped 0 bytes (0 pages) at 14.88 kB/s [loader]

Thank you for your response.
Where do I get hold of this file WisBlock_LowPower_V1.0.0_2023.10.23.15.34.11.hex ?

That is just an example code that I wrote. You should replace it with your own application hex file.

We managed to flash our application to the device, now no LED lights up. Is it possible to flash the rak4631_factory_softdevice via the DAP1 tool? If so, where can one get the hex file?

Usually a default firmware including bootloader and softdevice are flashed in our factory. I do not have the softdevice as a separate hex file.
This file should contain the latest bootloader and softdevice.
RAK4630_bootloader-0.4.1.hex (504.9 KB)

Thanks Bernd, now we are back with the fast flashing green LED!

We installed the RAK4631 on a RAK5005-O and were able to load our application. Everything is working now. Thanks