RAK4630 qestions

@beegee any progress with DFU mode triggering?

Hi Dimitrii,

Please check our Device Firmware Upgrade Guide.

You need to force bootloader mode by sending AT+BOOT to the device.
Then you can use nrfutil to send the new firmware to the device.

Links and detailed step-by-step instructions are in the guide. Just instead of RAK4631_latest_dfu_package.zip you use the .ZIP package created by Arduino IDE.

As I understand AT+BOOT is handled only by RUI firmware. Is any other option compatible with Meshtastic?

Please give me more details, you are confusing me.

You are talking about RAK4630, which is a stamp module that comes with RUI3 firmware.
Do you mean the RAK4630 stamp module or the RAK4631 WisBlock Core module?

The RAK4631 and Meshtastic is based on the open source Arduino BSP,

If you want to use Meshtastic, you can use the tools mentioned in this guide to flash a new firmware. The tool used in this guide will flash the new firmware without the need to force it going into bootloader mode before you start flashing.

So, I’m developing PCB based on the RAK4630 module without IPEX connectors for Meshtastic.
For use inside PC/Routers/Laptops. It’s not to easy every time when user wanna update firmware press the RST button. Especially if we talking about nodes located inside routers/embedded/remote managable devices.
Forget about RAK4631 =)

How is the USB of the RAK4630 connected to the laptop/router/PC if it is inside?
Firmware update only works over the USB and you don’t need to push the reset button.
The adafruit-nrfutil tool is connecting to the RAK4630, putting it into bootloader mode and then flashes the new firmware.

may you provide a command line example for adafruit-nrfutil, for me, it’s not working somehow. I guess I do something wrong around this tool =)

The example is in the guide I gave you the link:

You have to replace the ZIP file with your firmware and change the COM port to the port the RAK4631 is connected to

adafruit-nrfutil.exe --verbose dfu serial --package YOUR_FILE_NAME --port YOUR COM PORT -b 115200 --singlebank --touch 1200

My version of adafruit-nrfutil don’t know about touch and singlebank param :thinking:

root@msc-gw-pcie-qa:~/fw# adafruit-nrfutil --verbose dfu serial --package firmware-rak4631-2.0.13.7e27729-ota.zip --port /dev/ttyACM0 -b 115200 
Traceback (most recent call last):
  File "/usr/bin/adafruit-nrfutil", line 8, in <module>
    sys.exit(cli())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/nordicsemi/__main__.py", line 1041, in serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, True,
  File "/usr/lib/python3.10/site-packages/nordicsemi/__main__.py", line 950, in do_serial
    dfu = Dfu(zip_file_path = package, dfu_transport = serial_backend, connect_delay = connect_delay)
  File "/usr/lib/python3.10/site-packages/nordicsemi/dfu/dfu.py", line 71, in __init__
    self.manifest           = Package.unpack_package(zip_file_path, self.unpacked_zip_path)
  File "/usr/lib/python3.10/site-packages/nordicsemi/dfu/package.py", line 645, in unpack_package
    return Manifest.from_json(_json)
  File "/usr/lib/python3.10/site-packages/nordicsemi/dfu/manifest.py", line 202, in from_json
    return Manifest(**kwargs['manifest'])
TypeError: Manifest.__init__() got an unexpected keyword argument 'dfu_version'
root@msc-gw-pcie-qa:~/fw# pip show adafruit-nrfutil
Name: adafruit-nrfutil
Version: 0.5.3.post16
Summary: Python 3 version of Nordic Semiconductor nrfutil utility and Python library (modified by Adafruit)
Home-page: https://github.com/adafruit/Adafruit_nRF52_nrfutil
Author: Nordic Semiconductor ASA (modified by Adafruit Industries LLC)
Author-email: [email protected]
License: Nordic Semicondictor proprietary license
Location: /usr/lib/python3.10/site-packages
Requires: click, ecdsa, pyserial
Required-by: 

Try the one that is bundled with our BSP package ==> RAK-nRF52-Arduino/tools/adafruit-nrfutil at master · RAKWireless/RAK-nRF52-Arduino · GitHub

No version for ANY Linux distro and archeticture, how I can build it myself?

Try this one ==> GitHub - adafruit/Adafruit_nRF52_Arduino: Adafruit code for the Nordic nRF52 BLE SoC on Arduino

we have the same info in our repo ==> GitHub - RAKWireless/RAK-nRF52-Arduino: Arduino BSP for RAKwireless WisBlock RAK46xx Core modules.

I’m already using this version installed via pip:

pip show adafruit-nrfutil
Name: adafruit-nrfutil
Version: 0.5.3.post16
Summary: Python 3 version of Nordic Semiconductor nrfutil utility and Python library (modified by Adafruit)
Home-page: https://github.com/adafruit/Adafruit_nRF52_nrfutil
Author: Nordic Semiconductor ASA (modified by Adafruit Industries LLC)
Author-email: [email protected]
License: Nordic Semicondictor proprietary license
Location: /usr/lib/python3.10/site-packages
Requires: click, ecdsa, pyserial
Required-by: 

Not sure, it works for me in my VM Ubuntu:

May you show the output of commands:

pip show adafruit-nrfutil || pip3 show adafruit-nrfutil
which adafruit-nrfutil

@beegee I need to know which version of tools you are using. May you execute commands and post the output?

It is the same version that you say you have installed.

I have no python 2 or pip on my machine.

1 Like

Something is wrong with dependency pining for adafruit-nrfutil
This will resolve the issue:

pip3 install adafruit-nrfutil click==7.0 ecdsa==0.13.0

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