Now I tried to revert back to Meshtastic by flashing different firmware versions like firmware-rak4631-2.5.15.79da236.uf2.
As soon as the firmware transfer is complete, the green flickers quickly (almost staying on permanently) and the blue led lights up very dimly approx twice per second.
No ACM UART device / serial interface appears.
I also tried to flash a simple test sketch built with the Arduino IDE, but same result.
When I press the reset button once (not twice), the block device for flashing the firmware appears:
$ cat INFO_UF2.TXT
UF2 Bootloader 0.4.3
Model: WisBlock RAK4631 Board
Board-ID: WisBlock-RAK4631-Board
Date: May 20 2023
Ver: 0.4.3
SoftDevice: not found
When reflashing ot-cli-ftd.uf2, the RAK4631 boots up and I can connect via the USB UART / serial interface as expected.
So I assume the hardware is ok.
Did I break the bootloader? and thus the compatibility with firmwares built with the Arduino toolchain?
Thank you!
Edit: I tried erasing the flash memory by flashing Meshtastic’s nrf_erase2.uf2, but same result as described above for the Meshtastic firmware.
Edit 2: Tried to flash WB_HW_Test_V1.1.8.uf2 from Boot Looping? RAK19007 & RAK19003 - #2 by beegee. But same result as described above. No serial device appears.
In case I broke the bootloader, can I reflash it somehow via USB without a programmer?
(optional, but in your case might be required) do a chip erase
pyocd erase -t nrf52840 --chip
Flash the bootloader and softdevice. I am not sure if the HEX file in the Github repo includes both bootloader and softdevice. Usually they are flashed together using the UF2 tool. I attached a full nRF52 flash backup from one of my devices.
I do not own a programmer. Instead I tried to use openocd with interface/raspberrypi-native.cfg after connecting SWDIO, SWDCLK & ground to a raspberry pi zero but failed with:
Error: Error connecting DP: cannot read IDR
I’ll continue using that RAK4631 with non-arduino firmware (maybe some zephyr experiments).
Interestingly, flashing openthread/ot-nrf528xx’s ot-cli-ftd (built with -DOT_BOOTLOADER=USB) works.
I just tested using the nrf connect toolchain (zephyr) instead of arduino and so far everything I tested (including bluetooth low energy) works fine
So I can workaround my broken softdevice for now (except from using Meshtastic).
Maybe I can retry in the future when I get my hands on a jlink or daplink.
Thank you!