Updating a repeater

From NodeNet
(Redirected from To update a note)
Jump to navigationJump to search

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

Preperation

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 receive a firmware upgrade over Bluetooth directly from your phone.

Flash new firmware

  • 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".

Retry the Upgrade

Mostly, the first attempt fails... When you try again, it works

  • 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.

Why do we need to do what?

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 `adafruit-nrfutil` on your computer.

To install this 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.

It is currently available here:

https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX/releases

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

Flash the bootloader

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/
ls /dev/cu.usb*

Note the number of the USB connection.

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 of the USB connection (for me it is always 1011).

adafruit-nrfutil --verbose dfu serial --package sensecap_solar_p1_bootloader-0.9.2-OTAFIX2.2-BP1.3_s140_7.3.0.zip -p /dev/cu.usbmodemXXXX -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.

Flash fresh firmware

  • 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)