Using LoRaWAN for firmware over-the-air upgrades (FOTA) is quite challenging. Currently, the LoRa Alliance has not mentioned much on this topic, although it can be implemented in Class B and Class C devices.
The reasons why firmware over-the-air upgrades using LoRaWAN are difficult include:
1. The communication of the base station cannot occur simultaneously. This means that when the base station sends downlink data, it cannot receive uplink messages. In other words, nodes in the LoRaWAN network are unaware that the base station cannot receive their messages at that time, so no matter what messages the nodes send, the base station will not receive them.
2. For Class A nodes, there is no concept of a MAC layer that allows them to receive multicast frames. In Class B and C, multicast frames can be added to achieve control functionality, but not for firmware upgrades. This means that battery-powered LoRaWAN devices cannot perform FOTA, as they cannot receive multicast frames.
3. The working cycle of LoRaWAN base stations is limited. The communication time of LoRaWAN base stations only occupies 1% of the time (as specified by the European Telecommunications Standards Institute), so during this time, all downlink messages and MAC layer control messages must be processed. Therefore, there is very little time left for FOTA multicast frames. In the United States, there is no 1% time cycle limit; the network operates based on the theory mentioned in point one.
Here, a mechanism is provided to achieve over-the-air upgrades, allowing downlink data from an access point (base station) to terminal nodes (or node groups) to reach 256 KB. The access point sets the Infrastructure Beacon (IB) time to a larger value, which enhances downlink transmission capability, so that uplink transmission can occur simultaneously during FOTA. Once the transmission is complete, the access point returns to the previously set IB value.

Figure 1: Over-the-Air Upgrade Data Transmission: Initialization completes all data fragment transmissions

Figure 2: Over-the-Air Upgrade Data Transmission: Example of data fragment retransmission
Over-the-Air Upgrade Data Transmission Initialization
To increase the throughput of data transmission, multiple fragments are added to each downlink frame from the base station. This is different from other downlink packets, where there is only one message per node for each downlink frame from a single access point, or one broadcast message per frame. Compared to each node receiving only one downlink from the base station in a specified frame, the nodes receive all files in one designated frame. Once a base station is ready to send downlink, it will immediately send all data and then pause.
In Figure 1, all data fragments are transmitted at once, after which the time series stops. At this point, all nodes participating in the data transmission will send the data fragments they failed to receive, and the base station will prepare a retransmission of data fragments based on each node’s request. Of course, nodes can also request the base station to retransmit all data. The base station will continue to retransmit data until all nodes have successfully received it.
Figure 2 is an example of data retransmission and successful reception by nodes. Once a node reports to its base station that it has successfully received the data, it will remain awake until the base station sends it an execution command. In Figure 2, the last command from the base station is the execution command.
Conclusion
The method of over-the-air upgrade data transmission can be used to transmit application software, scripts, environments, keys, database information, etc. It can be considered a powerful tool.