RAK4631 reset and can't save settings

Good evening everyone!

I recently purchased x 2 new RAK19007 for meshtastic. I was in the process of mounting one of these new units into a new solar enclosure for testing outdoors and I connected a newly purchased battery and the unit factory reset itself unexpectedly. The unit still powers up and I am able to flash the unit or factory reset it, but I am unable to apply any changes via serial. When changes are applied via serial, the devices reboots but does not retain the changes. I am no longer able to connect to the device successfully via BLE. When I attempt to do so, I am prompted for the pairing passcode but the device just hangs after that. I suspect my RAK4631 was damaged by the battery and the BLE is malfunctioning now… I have disconnected all other sensors to rule out any bad sensors to no avail.

The battery used was purchased from Amazon here:

I had to reverse the polarity with the JST 2.0 connector prior to connecting.

I am having difficulty sourcing the MakerFocus batteries in my area and unable to ship from the US through Rockland:

At the time of powering up, the antenna connector with pigtail was connected to the LORA port without an antenna connected, I knew better, my mistake.

4631 dead? Any thoughts or ideas?

Thank you in advance for any assistance, have a wonderful evening!

Welcome to the forum @WB2024

From the picture of your battery, the voltage of the Amazon battery is reverse (as you already detected). The battery from Rokland has the correct polarity.
You might have damaged the charger/voltage regulator part on the RAK19007.
You can try if the RAK4631 is still fine by using a different RAK19007 Base Board.

Unfortunately there is no “standard” for these connectors. That’s why we mention in our documentation to check the polarity:

Thank you @beegee, much obliged sir!

Just to clarify on the reverse polarity / voltage with the Amazon battery, I reversed the polarity with the JST 2.0 connector prior to ever connecting anything.

I have swapped the RAK19007 base board as suggested (great idea, thank you!) and the same results were observed.

I can likely conclude that the RAK4631 is now malfunctioning due to connecting the Amazon battery. Now, I would like to better understand why this occurred. Does anything stand out with this battery OR is this the end result of myself not connecting an antenna to the antenna connector although the pigtail was connected to the LORA port when powering up? I am reluctant to try this new battery again on another board. Thank you in advance, have a wonderful evening!

Nothing on the Amazon site suggests that the battery is incompatible with WisBlock. All parameters given there are matching with the requirements of the Base Boards.

Using the module without LoRa antenna is not recommended, as it can damage the RF part (antenna switch or LoRa transceiver). But that will most likely only happen if you run an application and start transmitting with full TX power. (Not sure what Meshtastic firmware is doing). Same is for the BLE antenna.

If you can get the RAK4631 still into UF2 mode, (double push reset), did you try a firmware erase with Meshtastic_nRF52_factory_erase_v2.uf2 and then flash Meshtastic firmware again?

Another thing to try (if the UF2 flashing still works), is to run our hardware test firmware. It will test certain parts of the RAK4631 (flash, LoRa transceiver, GPS if available, OLED or EPD display if available)

It gives debug output over USB, BLE UART and to the display (if one is connected)

Thank you! Can you please point me to the hardware test firmware location? Can’t see to locate it. The meshtastic firmware erase works but the symptoms remain the same.

Here is the test firmware

Mesh_Test_V1.1.5.uf2.zip (186.2 KB)

Output is over USB (115200 Baud) or over BLE UART.
For BLE UART you need an app on your phone, I am using Serial Bluetooth Terminal on Android

One more thing, which Meshtastic firmware are you flashing? Don’t use firmware-rak4631_eink-2.3.15.deb7c27.xxx if you do not have an RAK14000 EPD display.
you need to use firmware-rak4631-2.3.15.deb7c27.xxx

For future wisBlock boards, you may want to add a reverse polarity protection circuit on the battery connection. I use this basic one that just needs 1 NFET on every battery based product. (I also think I have this design is in the sensorHub)

Hi @beegee – thank you again for the responses much obliged!

I am not using the “eink” firmware as I don’t have an EPD display. I have tried flashing using both:

firmware-rak4631-2.3.15.deb7c27.uf2
firmware-rak4631-2.4.0.46d7b82.uf2

Also, to add a little more context, before testing the “test firmware”, I can confirm that when connecting via Bluetooth and when the device hangs, my phone is able to successfully connect via Bluetooth prior to hanging based on the logs:

[0m [32m INFO [0m| ??:??:?? 109 [DeviceTelemetryModule] [32m Sending packet to phone
[0m [34m DEBUG [0m| ??:??:?? 124 [Power] [34m Battery: usbPower=1, isCharging=1, batMv=4242, batPct=100
[0m [34m DEBUG [0m| ??:??:?? 144 [Power] [34m Battery: usbPower=1, isCharging=1, batMv=4241, batPct=100
[0m [32m INFO [0m| ??:??:?? 151 [32m BLE Connected to iPhone
[0m [32m INFO [0m| ??:??:?? 152 [32m BLE pairing process started with passkey 625 583
[0m [32m INFO [0m| ??:??:?? 152 [32m BLE passkey pairing: match_request=0
[0m [34m DEBUG [0m| ??:??:?? 164 [Power] [34m Battery: usbPower=1, isCharging=1, batMv=4240, batPct=100
[0m [32m INFO [0m| ??:??:?? 170 [32m BLE connection secured

After the device connects via bluetooth, it would just hang.

I was successfully able to flash the test firmware. Upon reboot it was running through its diagnostics but was hung up for a while on GPS validation (due to living in a bunker like structure – no signal). After some time, I hard rebooted the device. Upon reboot, the device would no longer boot and the LED flashed with a fast red. I can still enter UF2 mode if I double click immediately upon reboot but if I try to flash the device again, it now fails… It appears the RAK4631 is dead…

For extra measure, I tested the battery with a multimeter and the polarity and voltage are correct.

What are the odds of receiving faulty hardware direct from RAKwireless?

Everything was fine until I connected the battery, but the battery appears to be ok.

I will order another board and attempt to source the recommended MakerFocus battery, but will be reluctant to proceed with my project if I lose more hardware due to the cost and time it takes to source hardware.

@brolly759 thank you for the response, much obliged! I think the NFET is a great idea for future boards, and I would require a little more assistance if I was to proceed, but I can confirm my polarity was good before connecting, so I don’t believe that was the issue. In any case, do you have any video’s or tutorials to share for a little more context?

Have a wonderful day everyone, thank you again for the asssitance!

Good day everyone! Just adding a couple of pictures that confirm correct polarity and voltage. Under what circumstances will the plate be burned? Talk soon, have a wonderful day!


As long as UF2 mode can be entered the device is usually working.

No idea what to test next.

@beegee thank you again!

Would a RAKDAP1 aid in factory resetting this device to revive it? If yes, any references to share? Can a RAK4630 be retruned for exchange?

Talk soon - have a wonderful day!

RAKDAP1 documentation

You can do a chip erase with pyocd erase -t nrf52840 --chip and then try to flash a firmware with pyocd flash -t nrf52840 RAK4631_latest_final.hex

Regarding “RAK4631 is dead”:
In 4 years working with RAK4631 I killed only one module, and that was because I ripped of the IPEX antenna connector accidentally. I had never a case with an internal hardware error.