Trouble flashing meshtastic firmware

I have two RAK4631 devices, one of them I was able to flash the Meshtastic firmware on there and everything worked great. The other one is giving me a lot of trouble… This one is a real head scratcher.

I bought the model that had the Arduino bootloader. I was having trouble getting to the mode where I can upload UF2 files when I double clicked the reset button. It was very similar to this post (hxxps://forum.rakwireless.com/t/difficulty-entering-dfu-mode-during-firmware-update/13513), and I tried reflashing the bootloader (following the instructions here: Convert RAK4631-R to RAK4631 | Meshtastic )

After putting that firmware on there, it reboots and goes into the UF2 upload mode (reliably). Here’s the INFO_UF2.TXT file:

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 6.1.1

So it’s an awkward way to get into this mode, but it’s a reliable way to do so. I flashed the latest meshtastic image (2.5.20) using their UF2 file using the instructions here:

After doing this the green LED flickers as its being copied, and when it’s done the computer shows that the device is removed and the green light goes off. I then see the /dev/ttyACM0 device come back. This all seems reasonable so far.

When I try to connect to the device view bluetooth, I don’t see anything to pair with. When I try to connect using the web client (hxxps://client.meshtastic.org) it sees /dev/ttyACM0 and attempts to connect to it, but then it never loads any messages or settings and says the device is unknown.

The green light never turns on (it should be getting a heartbeat with the default settings of the meshtastic firmware).

I also tried repeating this process with v2.5.18 of meshtastic with the same results. I repeated the process using another computer. Same results.

Both my computers are Linux (Debian 12).

This is 100% repeatable.

I don’t know of any way for others to replicate the problem. The other device I have worked fine. I’m very much afraid to go through this process with my working board because I don’t want to have two useless devices, but I’m also to do so to see if I get the same behavior over there.

I also tried resetting the flash storage as described here: hxxps://meshtastic.org/docs/getting-started/flashing-firmware/nrf52/nrf52-erase/ and again using the .ino file from this thread: hxxps://forum.rakwireless.com/t/rak4631-meshtastic-kit-not-booting/6492

No matter what I do, I get the same results. It’s maddening because everything went so smoothly on the other, identical device.

It doesn’t seem like bad software since that same uf2 file worked on the other device. At the same time, it doesn’t seem like bad hardware because I can flash the bootloader, upload an Arduino sketch, and when I get into the mode where I can upload uf2 files, that part appears to work fine.

So what am I missing here? What additional tests can I run to try to figure out what is going wrong? Should I try to put meshtastic 2.5.20 onto my other device (which is currently running 2.5.18) and risk getting that into this same wonky state?

Side note: I was able to get the troublesome device into the mode where UF2 files can be uploaded once by double tapping the reset button. I don’t know if it was some wicked difficult timing thing or what, but I don’t remember the other device having any trouble with this.

Welcome to the forum @DrHax

Reading your problems, it looks for me as if the device with problems was actually flashed with an RUI3 bootloader, not with an Arduino bootloader.

For your other problems, we are not maintaining or developing the Meshtastic firmware, so we can give only limited support.

Try to flash the attached WisBlock HW Test firmware, it will run some tests on the hardware, enable BLE and advertise as “RAK-TEST” device.
In addition, it removes all Meshtastic settings. Test results are shown as debug output through the USB interface.

If the HW test runs well and you can see the device advertising on BLE, try to flash the Meshtastic firmware again.

WB_HW_Test_V1.1.8.uf2.zip (186.4 KB)

Thanks for the quick reply and pointing to where I should look. That’s exactly the type of reply I was hoping for. :slightly_smiling_face:

I put the HW Test uf2 on there and was able to see the RAK-TEST-… bluetooth device. The green and blue LEDs are flashing back and forth, which I suspect is the expected behavior. This is additional evidence that the hardware is not defective, and since the same .uf2 meshtastic image worked on another RAK4630, I can be pretty sure that’s not the issue. Which, as far as I know, only leaves the bootloader, just like you said.

The part I don’t understand is that I was able to reliably upload an .ino file onto the device using the Ardiuno IDE. Would that be possible if I had the RUI3 bootloader?

And either way, wouldn’t the process to get the Arduino bootloader onto the board be this?

Since I can’t get into the mode where I can flash UF2 files on there without using those instructions, I used adafruit-nrfutil to put WisCore_RAK4631_Board_Bootloader.zip on there again to get into that mode, then put the meshtastic UF2 file on there only to get the same results. No heartbeat LED, no bluetooth device visible.

Just to make sure I haven’t gone crazy, I grabbed the other RAK4630 board that worked fine, put on the RAK1902 board on there so I’d have a USB port and it shows up as /dev/ttyACM0 and I can connect to it just fine from https://client.meshtastic.org/ to see channels, messages and so forth.

If people here can help me get my RAK board to the point where I can get into the UF2 upload mode with a double click of the reset button, I can take my problem over to the meshtastic community and see if they have any ideas. I’m doing my best to bring the problems to the appropriate community. I know it’s hard when there are things you don’t control (the meshtastic image), and the same is true of Meshtastic (the bootloader image).

Try to flash the WisBlock HW Test firmware, then flash the Meshtastic firmware.

I flashed the HW Test firmware and then the Meshtastic firmware and I got the same results, including double tapping reset not working as expected.

Could be the RESET button itself is not working well.

Does switching the Core module to another Base Board change anything.

Good question. I have tried 3 different power blocks and none of them got me into UF2 mode. I can see they do reset the board with a single press because the blinky lights pattern for the HW test goes away when I press reset.

I’m starting to think I might have a defective RAK4631. Some slight defect that does not make the device completely unusable, but enough that it can’t go into UF2 mode. At this point it doesn’t even show up as an ACM0 nor block device anymore.

To provide closure to anyone DuckDuckGoing for answers eho might come across this thread, RAK Wireless replaced this unit for me snd the replacement flashed just fine on the first try.

So it seems like the suspicion that it was faulty hardware was correct. If you are having issues and have already tried everything in this thread, I’d suggest reaching out to support or sales. They were very reasonable in taking care of the situation without a lot of hassle.