Updating a repeater: Difference between revisions

From NodeNet
Jump to navigationJump to search
No edit summary
Line 5: Line 5:


== Over the Air update ==
== Over the Air update ==
''The node needs to have the Adafruit_nRF52_Bootloader_OTAFIX in order to do this. If that is not yet flashed, scroll down for an how-to''
Prepare the node to receive the new firmware by bringing it into DFU mode. For this you have to connect your companion node to the repeater node.
* Open meshcore client (phone)
* Connect companion device
* Select in the device list the solar node (if not in the list, you need to add it first)
* Open "Remote Managment"
* go to "Command Line"
* on the prompt type: <pre>Start ota</pre>
Now the solar node is ready to recive a firmware upgrade over Bluetooth directly from your phone.
* Download the [https://flasher.meshcore.dev/releases/download/repeater-v1.14.0/SenseCap_Solar_repeater-v1.14.0-9f1a3ea.zip latest firmware] to your phone. (currently 1.14.0)
* Open the "Nordic Semiconductor DFU" app.
* Select the ZIP file containing the firmware you want to update.
* Select the device.
* Bluetooth will be turned on.
* Select the Solar P1 (check if the MAC address corresponds with the MAC address you got from the Remote Management command).
* Press "Start".
* Mostly, the first attempt fails... When you try again, it works
=== Retry the Upgrade ===
* Open the DFU app again.
* Select the device (which is now called "XIAO-DFU").
* Press "Start".
* Wait and monitor the progress until it says "Completed".
* The node will reboot into the freshly installed firmware.
== Preparing a Solar P1 Node for OTA ==


=== Stuff you'll need to do this: ===
=== Stuff you'll need to do this: ===
Line 115: Line 148:
* The device will reboot.
* The device will reboot.


Go to the [config settings](https://config.meshcore.dev/) of your newly flashed node and give it a nice name, make a copy of it's public key and make sure the radio settings are the same as on your companion node (in our case: EU/UK Narrow)
Go to the [https://config.meshcore.dev/ config settings] of your newly flashed node and give it a nice name, make a copy of it's public key and make sure the radio settings are the same as on your companion node (in our case: EU/UK Narrow)


Then click on the large 'Start OTA' button.
Then click on the large 'Start OTA' button.
Line 121: Line 154:


Now we move to your phone and your companion app.
Now we move to your phone and your companion app.
== OTA (Over the Air - Using Bluetooth to Upgrade Firmware) ==
Prepare the node to receive the new firmware by bringing it into DFU mode. For this you have to connect your companion node to the repeater node.
* Open meshcore client (phone)
* Connect companion device
* Select in the device list the solar node (if not in the list, you need to add it first)
* Open "Remote Managment"
* go to "Command Line"
* on the prompt type: <pre>Start ota</pre>
Now the solar node is ready to recive a firmware upgrade over Bluetooth directly from your phone.
* Download the [https://flasher.meshcore.dev/releases/download/repeater-v1.14.0/SenseCap_Solar_repeater-v1.14.0-9f1a3ea.zip latest firmware] to your phone. (currently 1.14.0)
* Open the "Nordic Semiconductor DFU" app.
* Select the ZIP file containing the firmware you want to update.
* Select the device.
* Bluetooth will be turned on.
* Select the Solar P1 (check if the MAC address corresponds with the MAC address you got from the Remote Management command).
* Press "Start".
* Mostly, the first attempt fails... When you try again, it works
=== Retry the Upgrade ===
* Open the DFU app again.
* Select the device (which is now called "XIAO-DFU").
* Press "Start".
* Wait and monitor the progress until it says "Completed".
* The node will reboot into the freshly installed firmware.

Revision as of 15:30, 18 March 2026

How to update your node =

Physical update

Connect to your computer and update using the flasher

Over the Air update

The node needs to have the Adafruit_nRF52_Bootloader_OTAFIX in order to do this. If that is not yet flashed, scroll down for an how-to

Prepare the node to receive the new firmware by bringing it into DFU mode. For this you have to connect your companion node to the repeater node.

  • Open meshcore client (phone)
  • Connect companion device
  • Select in the device list the solar node (if not in the list, you need to add it first)
  • Open "Remote Managment"
  • go to "Command Line"
  • on the prompt type:
    Start ota

Now the solar node is ready to recive a firmware upgrade over Bluetooth directly from your phone.

  • Download the latest firmware to your phone. (currently 1.14.0)
  • Open the "Nordic Semiconductor DFU" app.
  • Select the ZIP file containing the firmware you want to update.
  • Select the device.
  • Bluetooth will be turned on.
  • Select the Solar P1 (check if the MAC address corresponds with the MAC address you got from the Remote Management command).
  • Press "Start".
  • Mostly, the first attempt fails... When you try again, it works

Retry the Upgrade

  • Open the DFU app again.
  • Select the device (which is now called "XIAO-DFU").
  • Press "Start".
  • Wait and monitor the progress until it says "Completed".
  • The node will reboot into the freshly installed firmware.

Preparing a Solar P1 Node for OTA

Stuff you'll need to do this:

  • A computer running MacOS (linux and windows how to not yet complete)
  • A phone with the Meshcore app and the Nordic Semiconductor DFU app installed
  • A Meshcore node that you want to use as repeater.
  • A Meshcore node that you use as companion.

How to

With Over The Air (OTA) updates you can flash the lates MeshCore firmware to your node using Bluetooth.

Unfortunately, you probably first need to flash your node with different bootloader firmware. In this case we do this for the Sensecap Solar P1. But you can find this firmware for other nodes in the Adafruit Bootloader Repository on Github.

Install adafruit-nrfutil

In order to install the firmware, you first need to install the `adafruit-nrfutil` on your computer.

To install the utility, run the following command:

pip3 install adafruit-nrfutil

IF all is fine you should see:

Successfully installed adafruit-nrfutil-0.5.3.post16 ecdsa-0.19.1

Download the Firmware

After that you need to download the firmware for the Solar P1.

Note: the file is named: Seeed Studio XIAO nRF52840 BLE (and Seeed SenseCAP Solar Node).

It is currently available here:

(https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX/releases/download/0.9.2-OTAFIX2.1-BP1.2/xiao_nrf52840_ble_bootloader-0.9.2-OTAFIX2.1-BP1.2_s140_7.3.0.zip)

After downloading, you don't need to unzip it. Navigate your terminal to the folder where you saved the firmware using cd.

For example

$ cd ./Downloads/

Make sure that the node is in DFU mode.

For Mac

You can do this by - Connecting the node over USB to your Mac - opening a Chrome browser and navigating to the flasher app - selecting your device from the list - choose any mode (like repeater) - press the big purple button that says DFU.

The browser then asks you to connect to your node. And the purple button should change to "DFU MODE ACTIVE".

You can now return to the terminal and check which port the node is connected to using

ls /dev/cu.usb*

Now run the following command to flash the firmware:

NOTE! Make sure that the file name of the zip is identical to the one you downloaded and replace the XXXX string of the usbmodem with the number you found in the previous step.

adafruit-nrfutil --verbose dfu serial --package xiao_nrf52840_ble_bootloader-0.9.2-OTAFIX2.1-BP1.2_s140_7.3.0.zip -p /dev/cu.usbmodemXXXX -b 115200 --singlebank --touch 1200

On Linux

_needs to be added_

On Windows

_needs to be added_

Run the following command to flash the firmware:

adafruit-nrfutil --verbose dfu serial --package [write_the_actualname_of_the_file_you_downloaded_here.zip] -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200

If all is correct you should see this:

Upgrading target on /dev/cu.usbmodem101 with DFU package /Users/douwe/Downloads/xiao_nrf52840_ble_bootloader-0.9.2-OTAFIX2.1-BP1.2_s140_7.3.0.zip. Flow control is disabled, Single bank, Touch 1200
Touched serial port /dev/cu.usbmodem101
Opened serial port /dev/cu.usbmodem101
Starting DFU upgrade of type 3, SoftDevice size: 152728, bootloader size: 39000, application size: 0
Sending DFU start packet
Sending DFU init packet
Sending firmware file
########################################
###############
Activating new firmware

DFU upgrade took 20.776023864746094s
Device programmed.

NOTE: If the device no longer shows up on your Computer, quickly tap the RST button twice on the node.

Flashing Steps

  • Open Meshcore Flasher.
  • Select the "Sensecap Solar P1".
  • Put the Solar P1 in DFU mode.
  • ERASE FLASH (Unfortunately, settings and history are lost).
  • Flash the (pre-last, not the newest) Meshcore firmware.
  • The device will reboot.

Go to the config settings of your newly flashed node and give it a nice name, make a copy of it's public key and make sure the radio settings are the same as on your companion node (in our case: EU/UK Narrow)

Then click on the large 'Start OTA' button.

  • It will respond: OK - mac: xx:xx:xx:xx:xx:xx.

Now we move to your phone and your companion app.