Skip to content

Firmware Update

Firmware Update allows over-the-air firmware upgrades to be issued and downloaded to devices in the field via the cloud. Firmware update allows to fix bugs and introduce new features to deployed devices.

Meshtech BLE devices support one or more of the following methods for upgrading; Download, Broadcast, Nordic DFU and BLE SMP.

Download

During Download device continue to operate as normal while device downloads firmware update in the background. It requires device to be in range of a Meshtech BLE network. Only a short downtime is needed to reboot to apply the new version once it is fully received. Download is the preferred method for upgrading single/few devices and devices operating in unconnected mode. Different device types can perform firmware Download at the same time.

In order to perform a firmware Download, property 0x8121 - Start Firmware Update must be written as a command to the device to be upgraded. Device will then perform download while operating normally. Depending on Type specified in 0x8121 - Start Firmware Update request, device will either reboot with new firmware immediately after download, or require 0x8122 - Firmware Update Control command to apply/abort. Device will send status/progress updates on 0x8120 - Firmware Update State while downloading. It is expected to take some time to complete, typically 10-15min when upgrading a single device. Time to completion is impacted by how many others on the same BLE link is performing download at the same time, and link quality of all devices involved in transferring the data.

Broadcast

Broadcast greatly increase efficiency and speed when upgrading many devices at the same time. It requires devices to be in connected mode, and only one firmware image can be broadcast at a time.

Firmware broadcast is started by writing property 0x8124 - Start Firmware Broadcast to gateway. The gateway will then start broadcasting firmware to all devices in it's BLE network. Only one firmware broadcast job can be ongoing in each gateway at the same time. The progress of the firmware broadcast can be monitored via property 0x8125 - Firmware Broadcast State. A firmware broadcast can be controlled by writing property 0x8126 - Firmware Broadcast Control to the gateway with a value for the desired action.

Nordic DFU

Most Meshtech BLE devices support Nordic DFU, but only gateway supports being a Nordic DFU host. Nordic DFU requires the device to switch to DFU mode. During Nordic DFU, the device being upgraded must be concidered offline since it will not perform its normal operation in this period. The device's name is changed to a DFU advertisement name during the update process. Devices with nRF52 chipset will advertise with MAC + 1 in DFU mode. It is important to remember this when using gateway as Nordic DFU host and supply the correct MAC in 0x8131 - Start Nordic DFU command.

A host device doing the DFU transfer is required to do Nordic DFU. That can be MT MeshConnect 2011 or a phone.

Note

Nordic DFU is the only upgrade method supported in MT MotionDetector 311 and MT PocketClip 231. Other devices support both Nordic DFU and Download/Broadcast firmware update. Nordic DFU host is not implemented in network extender. Only gateway has Nordic DFU host implemented.

In order to update a device using Nordic DFU, it has to be in range of the host performing Nordic DFU.

Upgrading a device with Nordic DFU involves switching the device to DFU mode first, then initiating the upgrade from the host. To perform Nordic DFU using MT MeshConnect 2011 as host, follow this procedure:

  1. Switch device to DFU mode. For most devices this is achieved by writing 0x8110 - Device Mode with mode "dfu" (0x01). For old/legacy devices where 0x8110 is not supported, write 0x8111 - Legacy Device Mode Switch to MT MeshConnect 2011 to make it switch mode of legacy device.
  2. When device starts reporting in DFU mode, write command 0x8131 - Start Nordic DFU to MT MeshConnect 2011 to start the upgrade.
  3. Status/progress can be monitored via a property 0x8130 - Nordic DFU State reported by the host performing Nordic DFU.

Once in DFU mode, the devices change their names to DFU advertisement names. These DFU names are bullet-listed on the devices' pages.

Example

MT MultiTracker 11x's DFU name is DFU_ND. Such DFU advertisement name of the device can be found on MT MultiTracker 11x DFU Advertisement Name: DFU_ND at the top of the page in a bullet-list.

Device will stay in DFU mode for a limited time before it times out and switches back to it's previous mode if no connection is made from a DFU host. When a connection is made from a Nordic DFU host, the device remains in DFU mode for as long as the firmware update is happening.

BLE SMP

Meshtech devices utilizing Nordic's nRF Connect SDK (NCS) use BLE SMP protocol instead of Nordic DFU. This eliminates the need to switch them to a seperate mode to perform upgrade. Simply connect with the BLE SMP host and send the upgrade.