RAK4630 on RAK19001 won't enter DFU mode (or does, but does not provide drive)

I’m having some trouble with one of the RAK4630 modules on a RAK19001 base board. The basic problem is that there is no drive showing up to flash something.

I’m on MacOS and I’ve gone through the steps to upgrade the module as described here. What happened was that I was able to flash the most recent RAK4630_latest_dfu_package, but that did not help. What I can do is connect with serial and issue AT commands, such as

AT+VER=?
AT+VER=RUI_4.2.4_RAK4631
OK

and obviously I can issue AT+BOOT, then the serial disconnects, comes back under the same name, but there is no drive showing up to push any UF file to it.

Any hint is highly appreciated. thx

PS: just to say, when it should be in the DFU mode, I can connect the serial terminal again, but there is no sign of activity, nor do I get any feedback on issuing AT commands, so I suspect it is in DFU mode, but does not expose the drive…

PPS: I managed to flash the factory bootloader - step 6 indicated here. That made the drive appear with this info

UF2 Bootloader 0.4.2 lib/nrfx (v2.0.0) lib/tinyusb (0.10.1-293-gaf8e5a90) lib/uf2 (remotes/origin/configupdate-9-gadbb8c7)
Model: WisBlock RAK4631 Board
Board-ID: WisBlock-RAK4631-Board
Date: Dec  1 2021
SoftDevice: S140 7.2.0

but that’s again end of story. I can’t move on to flash the softdevice, and I can’t drop UF firmwares to it, as they don’t boot…

Downloads % ./nrfutil-mac.1 dfu serial -p /dev/cu.usbmodem31201 -pkg rak4631_factory_softdevice.zip 
Traceback (most recent call last):
  File "nordicsemi/__main__.py", line 1545, in <module>
  File "click/core.py", line 1137, in __call__
  File "click/core.py", line 1062, in main
  File "click/core.py", line 1668, in invoke
  File "click/core.py", line 1668, in invoke
  File "click/core.py", line 1404, in invoke
  File "click/core.py", line 763, in invoke
  File "nordicsemi/__main__.py", line 1063, in serial
  File "nordicsemi/__main__.py", line 972, in do_serial
  File "nordicsemi/dfu/dfu.py", line 69, in __init__
  File "nordicsemi/dfu/package.py", line 652, in unpack_package
  File "nordicsemi/dfu/manifest.py", line 200, in from_json
TypeError: __init__() got an unexpected keyword argument 'dfu_version'
[59822] Failed to execute script '__main__' due to unhandled exception!

… and now it’s gone… no more serial interface, no more drive…

There are two firmware/bootloader/softdevice versions available with the RAK4630/RAK4631.

Double push reset to get the external drive for flashing is not working with RUI3 bootlaoder, this is only possible with Arduino bootloader.

You had a RUI3 bootloader and now you overwrote it with a Arduino bootloader. That is a mess and cannot work.

From this point on, the only option to get the device back to work is to use JLink or DAPLink and flash over the SWD interface.
Details can be found in RAK4631-R WisBlock LoRaWAN Module Device Firmware Upgrade

1 Like

Hi Bernd,

thx a lot. Can you suggest any JLink or DAPLink device? As I have neither of those, I’d just order one on Ali or AMZ…

PS: is there a guide somewhere how to do it once I have it?

Thx
Clemens

For JLink, there is only the original Segger JLink that I can suggest and it is quite expensive.
You can find a selection on the Segger web page. The JLink Base Classic or Compact would be sufficient.

For DAPlink, we have an affordable device called RAKDAP1, but any other DAPlink device will be possible.

For instructions, it is in the link that I gave you before ==> RAK4631-R WisBlock LoRaWAN Module Device Firmware Upgrade

1 Like

I have used the RAKDAP1 USB tied to RAK4631 cores on three different baseboards to recover Arduino BSP bootloaders and RUI3 bootloaders. The recommendation I read and found helpful isn’t to disconnect any power, make connection to the four core pins (I soldered pins on all my cores), powered up the board and attached the battery. Setup instructions for Python 3.14 + pyOCD and erasing the nRF52 cores was initially hit and miss due to my use of an external USB hub. Going directly to the PC port + using a battery backup corrected multiple partial erasing and partial loading errors. But I also had success without the battery 1 out of 2 times and with a battery 2-3 out of 4 times. (I also attached the battery after powering up the board by USB, but I don’t recall if that was an essential step to flash the cores. The RAKDAP1 was a project saver for about $30 with shipping.

Hi,

thx a lot Bernd for the info. I finally fixed it, but I had to finally go the path described here using pyocd because there was no device showing up (neither drive nor serial).

pyocd flash -t nrf52840 RAK4631_latest_final.hex

AND… I took the Backup.hex that you posted some time ago here.. I think building everything (bootloader + softdevice + app) from scratch gives me the HEX file, but I don’t want to do this. Is there some public link to the RAK4631_latest_final.hex file for such “emergency” situations? That would make recovery in these cases much easier…

All RUI3 HEX files with Bootloader are available in our Download Center

amazing… for some reason I could not find it… thx

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.