This section contains information on using FUOTA with The Things Stack.
Firmware Update Over the Air (FUOTA) is a standard for distributing firmware updates using unicast or multicast. Its greatest benefit is delivering updates over the air to many devices at the same time in an efficient and secure manner.
The Things Stack containts the fundamental blocks for FUOTA support, though it is still in an early adoption phase.
Note:Remote Multicast Setup (RMS) and Fragmented Data Block Transport (FDBT) protocols are not supported by The Things Stack.
On a high level, a FUOTA process implies the following steps:
- Server enables class C and joins a multicast group
- Server signs the firmware update and splits it in chunks
- Server schedules each update chunk as a downlink message to the multicast group
- Server verifies that the device has received all chunks, synthesizes them and verifies the update signature
- Device applies the firmware update
- Device sends a
firmware update completeuplink message
- Server disables class C
Best Practices when Using FUOTA
There are two types of FUOTA - full firmware update and incremental firmware update. Incremental update is always preferred, but you first have to make sure that your end device supports it and that you know which firmware version your end device is running.
The preferred fragment size depends on the available data rate, which depends on the selected group of end devices. A common practice is to allow the lowest common data rate denominator to reach all devices in a multicast group. However, if for example 80% of devices are nearby and are reachable with SF7 and large fragment sizes, transmitting all data in SF12 would quickly burn those devices’ batteries.
Using multiple gateways for updating firmware on the same group of end devices is recommended because of duty cycle restrictions and to avoid packet loss. It is also recommended to use class B, which takes longer to update but it is likely better for duty cycle distribution.
A test FUOTA server compatible with The Things Stack can be found here.
For a beginners guide on using multicast and FUOTA, check out this video.
Regarding devices that implement FUOTA, we recommend you to check out our Generic Node.
See this link for an example application that implements multicast FUOTA for MBed OS 5.