10 LoRaWAN Device Firmware-Over-The-Air Upgrade (FUOTA)
The IMX93-GW8016 gateway supports FUOTA (Firmware Update Over-The-Air), enabling remote firmware updates for LoRaWAN devices without any on-site intervention.
10.1 FUOTA Technical Principles
FUOTA is based on the LoRa Alliance LoRaWAN Fragmented Data Block Transport Specification, using the LDPC (Low Density Parity Check) forward error correction algorithm to achieve reliable large-block data transfer over LoRaWAN's low-rate, lossy wireless channel.
10.1.1 Core Technical Features
- Forward Error Correction: LDPC algorithm adds redundant encoding; the complete firmware can be recovered even if some packets are lost
- Fragment Transmission: Split the firmware file into fixed-size data blocks (fragments) and deliver them one by one
- No Retransmission: In ideal conditions, delivery relies only on one-way downlink broadcasts, reducing network airtime load
- High Fault Tolerance: Supports 20–30% packet loss rate while still successfully recovering the firmware
10.2 FUOTA Architecture Diagram
10.3 LDPC Algorithm Principle
10.3.1 Encoding Process
steps:
- Divide the firmware file into M equal-sized data blocks, each containing
FragSizebytes - Raw data matrix:[B1, B2, B3, ..., Bm] - Generate N-M redundancy data blocks using the LDPC algorithm (N > M) - Redundancy data:
[Bm+1, Bm+2, ..., BN] - Each redundancy block
Bxis generated from the original data blocks via XOR operations: -Bx = Cx1·B1 ⊕ Cx2·B2 ⊕ ... ⊕ Cxm·Bm- whereCxis a pseudorandom boolean vector generated by thematrix_line(x-m, M)function
Example:
- Firmware size: 50 KB, fragment size: 200 bytes
- Raw data blocks: M = 256 blocks
- Encoded blocks:N = 320 (redundancy 25%)
- Theoretically tolerable packet loss: 64 blocks (20%)
10.3.2 Decoding Process
The gateway uses Algorithm 2 (Semtech optimized implementation), which has lower memory usage compared to the standard Algorithm 1:
Algorithm 1 (Protocol Standard):
- Memory usage:
M × M + 2 × M - Use Case: General-purpose, no memory restrictions
Algorithm 2 (Semtech Implementation):
- Memory usage:
T × T + 2 × T + 2 × M - where
Tis the maximum number of allowed packet losses (T ≤ M) - Advantage: Optimized for low packet-loss rate scenarios, significantly reducing memory requirements
Decoding Steps:
- Device receives blocks and records the packet loss bitmap
- After receiving the encoded blocks, attempt to recover the missing original data blocks
- When the number of valid received data blocks ≥ M, start decoding
- Recover all original data blocks through matrix operations (Gaussian elimination)
- Perform CRC32/SHA256 verification on the recovered firmware
- After checksum verification passes, write to Flash storage and restart to apply the upgrade
10.4 Technical Advantages
- High Reliability: LDPC forward error correction adapts to the high packet-loss environment of LoRaWAN
- Low Network Load: No uplink acknowledgement required, reducing airtime usage
- Batch Upgrade: Supports multicast, enabling simultaneous upgrades of hundreds of devices
- Resume After Restart: Devices can continue receiving remaining fragments after a power cycle restart
- Strong compatibility: Based on LoRa Alliance standard protocols, compatible with multiple device types
10.5 Supported Device Types
The IMX93-GW8016 gateway is fully compatible with Shenzhen UniTalk Technology's proprietary LoRaWAN devices (e.g., the Sensor Box series) and supports FUOTA for the following devices:
- Multi-feature sensor box
- Industrial-grade I/O controllers