Rak 4631 won't boot. 2 quick green LED when reset. DFU mode works, pls help

Please include the following information, in order for us to help you as effectively as possible.

  • What product do you wish to discuss? RAK4631, RAK3372, RAK11200, RAK11310, RAK11722?

RAK4631

  • What firmware are you using? (RUI3 or Arduino BSP or other IDE (e.g. STM32CubeIDE)?

RUI3?

  • What firmware version? Can it be obtained with AT+VER=?

firmware-rak4631-2.6.11.60ec05e

  • Computer OS? (MacOS, Linux, Windows)

Windows

  • What Computer OS version?

Win11

  • How often does the problem happen?

this condition is persistent

  • How can we replicate the problem?

not sure

  • Provide source code if custom firmware is used or link to example if RAKwireless example code is used.

this is what the cli gives me:
COM7 failed to connect: write timeout

edit: i flashed it with beegee’s meshtastic test firmware and all the lights lit which gives me hope. but i still cant quite get it to boot yet…

edit: flashed the bootloader with adafruit-nrfutil and reflashed the firmware. will try to reseat the module now.

trying every cable, meshtastic firmware and configuration i can think of. daplink on the way. ive set up over a dozen rak stations up in the mountains of new mexico and have been really excited about this technology. out of about 20 this is the third rak that has entered this unresponsive condition with the green led flashing twice when reset. If i am able to resolve this issue i will be able to continue the hobby and that will make me happy.

Welcome to the forum @sdr

When the hardware tester app works, the module should work with Meshtastic.

Did you try to flash an older version of Meshtastic first?

We do not develop or maintain Meshtastic firmware, so it is difficult for us to help in such cases.

greetings, thank you. im glad to have your expert advice. Initially i tried the latest stable version (2.6.11). when that didnt work i did try some older versions (2.5.18 and 2.5.20)

edit: i will try to add some relevant info. two raks went out during operation, just stopped transmitting and when i went to reset them the double green flash from there on out. the third did go out while i was administering it and i noticed a few things. first of all it took the 2.6.11 update but was still saying the latest stable was 2.5.xx which was peculiar. i decided to pull the temp mod (shtc3) and although i was connected through bluetooth i was unable to enter the radio configuration settings (it was not in managed mode). I disconnected bluetooth and reconnected a few times and the problem persisted. I left it to hopefully recover (because i didnt want to take down the 12ft post i set up with a huge pile of rocks) well i did end up having to tear it down and it gave me 2 green blinks on reset and i was sad. im tempted to think this issue is caused by the temp mods maybe because there was one in this condition and it rebooted automatically when the temp mod was removed and came back. im thinking about trying one of modules on a working base board to see if i can isolate the problem anywhere.

edit: i am unable to connect to these raks through putty or cli. ‘meshtastic --port com7 --info’ returns a timeout error. they do appear to take the firmware flash, and i can comfirm it is taking the new bootloader. I have a working rak that i am able to connect to and pull information from with cli.

edit: ok switched the rak module onto a working baseboard and it does the same thing. and the working rak module works on the other base board. so it does seem to be the rak module that is malfunctioning.

so i was able to get one of them into another condition with this line:

C:\Users\sdrr0> adafruit-nrfutil --verbose dfu serial --package C:\Users\sdrr0\Downloads\rui3_nrf52840_bootloader_latest.zip -p COM14 -b 115200 --singlebank --touch 1200
Upgrading target on COM14 with DFU package C:\Users\sdrr0\Downloads\rui3_nrf52840_bootloader_latest.zip. Flow control is disabled, Single bank, Touch 1200
Touched serial port COM14
Opened serial port COM14
Starting DFU upgrade of type 2, SoftDevice size: 0, bootloader size: 36184, application size: 0
Sending DFU start packet
Sending DFU init packet
Sending firmware file
########################################
###############################
Activating new firmware

DFU upgrade took 2.6884958744049072s
Device programmed.

unfortunately that condition seems to be even more broken as now the green light wont come on at all and resetting gives me disconnect sound on win11. Also the double pressing the reset no longer puts it into DFU modes. but it still feels like progress.

edit: im unable to get this one back into DFU mode. when trying to enter DFU through web flasher i notice the serial port option panel says ‘Open DFU Loader (COM16) - Paired’ while the working one says ‘TinyUSB Serial (COM15)’.

edit: with the daplink i was able to flash the bootloader and get one into the less broken state as the others. i tried both bootloader version 4.2 (Dec 2021) and 4.3 (May 2023) with meshtastic firmware versions 5.18, 5.20 and 6.11. all combinations same results.

C:\Users\sdrr0\Downloads>adafruit-nrfutil --verbose dfu serial --package C:\Users\sdrr0\Downloads\wiscore_rak4631_board_bootloader-0.4.3_s140_6.1.1.zip -p COM8 -b 115200 --singlebank --touch 1200
Upgrading target on COM8 with DFU package C:\Users\sdrr0\Downloads\wiscore_rak4631_board_bootloader-0.4.3_s140_6.1.1.zip. Flow control is disabled, Single bank, Touch 1200
Touched serial port COM8
Opened serial port COM8
Starting DFU upgrade of type 3, SoftDevice size: 151016, bootloader size: 39000, application size: 0
Sending DFU start packet
Sending DFU init packet
Sending firmware file
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
########################################
############
Activating new firmware

DFU upgrade took 22.19916081428528s
Device programmed.

C:\Users\sdrr0\Downloads>pyocd flash -t nrf52840 .\WisCore_RAK4631_Board_Bootloader.hex
0002358 I Loading C:\Users\sdrr0\Downloads\WisCore_RAK4631_Board_Bootloader.hex [load_cmd]
[==================================================] 100%
0016321 I Erased 1024 bytes (1 sector), programmed 1024 bytes (1 page), skipped 192512 bytes (47 pages) at 13.72 kB/s [loader]

not sure what im missing here. or if there is anything im doing right.

edit: tried reflashing with every meshtastic version on the website including the alphas. same behavior.

You flashed our AT command firmware based on RUI3. That is not compatible with Meshtastic. And it doesn’t support double push reset.

Use the RAKDAP1 to flash this firmware. It is an Arduino based application that includes bootloader.

From there your device should be Meshtastic compatible and have everything that is needed to flash the Meshtastic firmware.

WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex (2.4 MB)

I eventually realized that and got it back to arduino with a daplink. Im really stoked about trying this new one you have for me. here’s what its given me so far:

C:\Users\sdrr0\Downloads>pyocd flash -t nrf52840 .\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex
0001108 I Loading C:\Users\sdrr0\Downloads\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex [load_cmd]
0001814 W Failed to add data chunk: no memory region defined for address 0x10001400 [file_programmer]
[======== ] 17%0527090 C Error: read error [main]

C:\Users\sdrr0\Downloads>
C:\Users\sdrr0\Downloads>
C:\Users\sdrr0\Downloads>pyocd flash -t nrf52840 .\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex
0001096 I Loading C:\Users\sdrr0\Downloads\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex [load_cmd]
0001802 W Failed to add data chunk: no memory region defined for address 0x10001400 [file_programmer]
[=============================== ] 62%0117024 C Error: read error [main]

C:\Users\sdrr0\Downloads>pyocd flash -t nrf52840 .\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex
0001119 I Loading C:\Users\sdrr0\Downloads\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex [load_cmd]
0001833 W Failed to add data chunk: no memory region defined for address 0x10001400 [file_programmer]
[===== ] 11%

for some reason it keeps freezing at random points. Maybe wrong usages in my command? I will keep trying to see if i get lucky.

edit: ok finally got lucky…

C:\Users\sdrr0\Downloads>pyocd flash -t nrf52840 .\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex
0001080 I Loading C:\Users\sdrr0\Downloads\WisBlock_Comfort_V1.1.0_24.02.21_11.54+bootloader.hex [load_cmd]
0001772 W Failed to add data chunk: no memory region defined for address 0x10001400 [file_programmer]
[==================================================] 100%
0083616 I Erased 193536 bytes (48 sectors), programmed 193536 bytes (48 pages), skipped 856064 bytes (209 pages) at 12.53 kB/s [loader]

unfortunately after taking this new bootloader and reflashing the rak still exhibits the same behavior.

When connecting to a rak with the meshtastic python package heres what i get with a working one:

C:\Users\sdrr0\Downloads>meshtastic --port COM15 --info
Connected to radio

Owner: Meshtastic 5cdf (5cdf)
My info: { “myNodeNum”: 4151336159, “minAppVersion”: 30200, “deviceId”: “vMig/gRjaOXfXHD35n8uDg==”, “pioEnv”: “rak4631”, “rebootCount”: 0 }
Metadata: { “firmwareVersion”: “2.6.11.60ec05e”, “deviceStateVersion”: 24, “canShutdown”: true, “hasBluetooth”: true, “hasEthernet”: true, “positionFlags”: 811, “hwModel”: “RAK4631”, “hasPKC”: true, “excludedModules”: 4480, “hasWifi”: false, “role”: “CLIENT”, “hasRemoteHardware”: false } […]

and here is what i get with the non booting ones:

C:\Users\sdrr0\Downloads>meshtastic --port COM7 --info
Traceback (most recent call last):
File “”, line 198, in run_module_as_main
File “”, line 88, in run_code
File "C:\Users\sdrr0\AppData\Local\Programs\Python\Python313\Scripts\meshtastic.exe_main
.py", line 7, in
sys.exit(main())
~~~~^^
File "C:\Users\sdrr0\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic_main
.py", line 2113, in main
common()
~~~~~~^^
File “C:\Users\sdrr0\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic_main_.py”, line 1312, in common
client = meshtastic.serial_interface.SerialInterface(
args.port,
…<2 lines>…
noNodes=args.no_nodes,
)
File “C:\Users\sdrr0\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\serial_interface.py”, line 65, in init
StreamInterface.init(
~~~~~~~~~~~~~~~~~~~~~~~~^
self, debugOut=debugOut, noProto=noProto, connectNow=connectNow, noNodes=noNodes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File “C:\Users\sdrr0\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\stream_interface.py”, line 55, in init
self.connect()
~~~~~~~~~~~~^^
File “C:\Users\sdrr0\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\stream_interface.py”, line 79, in connect
self._waitConnected()
~~~~~~~~~~~~~~~~~~~^^
File “C:\Users\sdrr0\AppData\Local\Programs\Python\Python313\Lib\site-packages\meshtastic\mesh_interface.py”, line 1085, in _waitConnected
raise MeshInterface.MeshInterfaceError(
“Timed out waiting for connection completion”
)
meshtastic.mesh_interface.MeshInterface.MeshInterfaceError: Timed out waiting for connection completion