Problem updating the bootloader on RAK4631

Hi,

I have a new RAK4630 and I had try the get started process, but I could not upload the Arduino_led_breathing sample due to an error.

After that I had try to update the firmware version by following the official docs. At first I try the USB update, but I could not due to an error (it saids the port was not open, maybe due not being in DFU mode). After that I try by using the BLE update method with an Android phone. After updating the firmware the device is still on the DFU mode and I can not upload the sample project. The error thrown is the following:

2023-09-20 23:16:31,471 Using board at serial port: /dev/ttyACM0
2023-09-20 23:16:31,473 Sending Application image.
2023-09-20 23:16:34,982 Serial: Unexpected Executed OP_CODE.
Expected: 0x09 Received: 0x0D
2023-09-20 23:16:34,983 Serial: Set Packet Receipt Notification 0
2023-09-20 23:16:34,983 Sending init packet...
2023-09-20 23:16:34,984 Serial: Selecting Object: type:1
2023-09-20 23:16:34,984 Serial: Object selected:  max_size:512 offset:0 crc:0
2023-09-20 23:16:34,985 Serial: Streaming Data: len:141 offset:0 crc:0x00000000
Traceback (most recent call last):
  File "nordicsemi/__main__.py", line 1545, in <module>
  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 1063, in serial
  File "nordicsemi/__main__.py", line 980, in do_serial
  File "nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
  File "nordicsemi/dfu/dfu.py", line 95, in _dfu_send_image
  File "nordicsemi/dfu/dfu_transport_serial.py", line 256, in send_init_packet
  File "nordicsemi/dfu/dfu_transport_serial.py", line 421, in __execute
  File "nordicsemi/dfu/dfu_transport_serial.py", line 502, in __get_response
pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.
[25072] Failed to execute script '__main__' due to unhandled exception!
CompletedProcess(args=['/home/javi/.arduino15/packages/rak_rui/tools/pc-nrfutil/v6.1.3/nrfutil', '-v', '-v', '-v', 'dfu', 'serial', '--package', '/tmp/arduino_build_395582/Arduino_Led_Breathing.ino.zip', '-p', '/dev/ttyACM0', '-b', '115200'], returncode=1)

Also if I try to send commands such as AT+VER=? I got no answer from the board. After all of this I have try to update again the firmware using the USB method but I got the following error:

adafruit-nrfutil --verbose dfu serial --package wiscore_rak4631_board_bootloader-0.4.3_s140_6.1.1\ \(1\).zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200 
Upgrading target on /dev/ttyACM0 with DFU package /home/javi/Descargas/wiscore_rak4631_board_bootloader-0.4.3_s140_6.1.1 (1).zip. Flow control is disabled, Single bank, Touch 1200
Touched serial port /dev/ttyACM0
Opened serial port /dev/ttyACM0
Starting DFU upgrade of type 3, SoftDevice size: 151016, bootloader size: 39000, application size: 0
Sending DFU start packet
Timed out waiting for acknowledgement from device.
Sending DFU init packet

Failed to upgrade target. Error is: Attempting to use a port that is not open
Traceback (most recent call last):
  File "/home/javi/.local/lib/python3.9/site-packages/nordicsemi/__main__.py", line 296, in serial
    dfu.dfu_send_images()
  File "/home/javi/.local/lib/python3.9/site-packages/nordicsemi/dfu/dfu.py", line 226, in dfu_send_images
    self._dfu_send_image(HexType.SD_BL, self.manifest.softdevice_bootloader)
  File "/home/javi/.local/lib/python3.9/site-packages/nordicsemi/dfu/dfu.py", line 203, in _dfu_send_image
    self.dfu_transport.send_init_packet(init_packet)
  File "/home/javi/.local/lib/python3.9/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 155, in send_init_packet
    self.send_packet(packet)
  File "/home/javi/.local/lib/python3.9/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 241, in send_packet
    self.serial_port.write(bytearray(pkt.data))
  File "/home/javi/.local/lib/python3.9/site-packages/serial/serialposix.py", line 615, in write
    raise PortNotOpenError()
serial.serialutil.PortNotOpenError: Attempting to use a port that is not open

Possible causes:
- Selected Bootloader version does not match the one on Bluefruit device.
    Please upgrade the Bootloader or select correct version in Tools->Bootloader.
- Baud rate must be 115200, Flow control must be off.
- Target is not in DFU mode. Ground DFU pin and RESET and release both to enter DFU mode.

Any idea of what is going on?

Hello @jjavims , welcome to the forum

Do you have a RAK4630 or a RAK4631?

If there is no response to AT+VER, you have mostlikely a RAK4631.

The WisDuo RAK4630 stamp module comes with a bootloader for RUI3 (the BSP you are trying to use, looking into your logs).
The WisBlock RAK4631 Core module comes with a bootloader for the open source Arduino BSP. If you have RAK4631, you need to use the open source Arduino BSP ==> Installation instructions

You can switch the bootloader of both devices to the BSP you want to use Change Bootloader ff

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.