RAK4631 Meshtastic RUI3 User Button GPIO set to pin 1 instead of pin 31

Product: RAK4630 on Base Board - RAK19007
Firmware: RUI3
Firmware version: firmware-rak4631-2.7.15.567b8ea
Computer OS: Windows 11

No longer communicates via Bluetooth, No Device Connected. Can connect other devices.
While configuring User Button, accidentally configured GPIO Pin 1 instead of Pin 31. After that, lost Bluetooth connection.
Tried to factory reset via CLI and reflashing with several versions of the firmware.

Welcome to RAK forum @ecereb ,

Have you tried to perform flash erase UF2 of Meshtastic then reupload the FW?

If nothing works on that, you might need external tool like jlink to fully erase the flash and reupload the bootloader.

I cannot even talk to the RAK4630 via the CLI serial interface. When I reboot, the device dumps out a bunch of diagnostics. But then it suddenly stops.

I tried to create a script to zero out user flash memory. But I get the impression that one cannot use the Arduino ide to program the RAK4630 – 1.

The device will allow me to load a different firmware.

firmware-rak4631-2.6.11.60ec05e.uf2 &

firmware-rak4631-2.7.15.567b8ea.uf2

But they start by showing the logo on the display and then it hangs.

I then tried to load the RAK4630 firmware RAK4631_latest_dfu_package.zip using nrfutil. But here again I failed:

Windows Command Prompt using Admin privileges.

C:\RAK4631-R Update>nrfutil.exe dfu serial -pkg RAK4631_latest_dfu_package.zip -p COM7

[------------------------------------] 0%

Traceback (most recent call last):

File “nordicsemi\dfu\dfu_transport_serial.py”, line 198, in open

File “serial\serialwin32.py”, line 33, in init

File “serial\serialutil.py”, line 244, in init

File “serial\serialwin32.py”, line 64, in open

serial.serialutil.SerialException: could not open port ‘COM7’: FileNotFoundError(2, ‘The system cannot find the file specified.’, None, 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File “nordicsemi_main_.py”, line 1555, in

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 1073, in serial

File “nordicsemi_main_.py”, line 988, in do_serial

File “nordicsemi\dfu\dfu.py”, line 127, in dfu_send_images

File “nordicsemi\dfu\dfu.py”, line 88, in _dfu_send_image

File “nordicsemi\dfu\dfu_transport_serial.py”, line 202, in open

pc_ble_driver_py.exceptions.NordicSemiException: Serial port could not be opened on COM7. Reason: None

[13812] Failed to execute script ‘main’ due to unhandled exception!

C:\RAK4631-R Update>

Thank you for your time.

Stephen Staubach

You cannot use nrfutil for that since it is not RA4631-R. Meshtastic doesn’t use RUI3.

The meshtastic method on fixing these errors is to upload the flash erase fw they provide. After cleaning the flash, you can upload the meshtastic FW. It seems you can still establish USB communication, this means the bootloader is still intact. Flash erase by meshtastic can solves the issue you describe.

I found the obscure documented Meshtastic_nRF52_factory_erase_v3_S140_6.1.0.uf2. This worked to clear the issue.

I had to first load the firmware-rak4631-2.6.11.60ec05e.uf2 to replace the firmware-rak4631-2.7.15.567b8ea.uf2 version. The 2.7.15 version requires the button to be connected to answer some prompt. I’m not sure why someone felt it necessary to respond to some prompt before one could setup the radio. Also, the prompt that has the BLE passcode is obscured by the initial prompt blocking the BLE code.

Thank you for your help.