# Efficient Runtime Firmware Update Mechanism for LoRaWAN Class A Devices
## 2 Related Work  
Several notable studies are analyzed concerning the optimization of firmware update, with particular focus on update management mechanisms in LoRaWAN networks (update file transmission) and firmware update processes at the IoT device microcontroller level. In the domain of optimizing firmware image transmission mechanisms in LoRaWAN networks, [PERSON] et al. [3] address the concept of Firmware Update Over The Air (FUOTA) and present the limitations of LoRaWAN networks to perform mass data transfer associated with the full firmware image. The study also references the specifications defined by the LoRa Alliance (Fremont, CA, USA), essential for FUOTA implementation in LoRaWAN, through the implementation of a FUOTA simulator to quantify and/or evaluate various FUOTA parameters in terms of firmware update efficiency and device energy consumption. From the analysis, the authors note that the lifespan of an IoT device is too long, making it important to develop mechanisms that allow downlink data transmission without the need for uplink transmissions to be sent first, thus making the update process more efficient. The study also introduces innovative concepts such as the collaborative FUOTA concept using multiple gateways, where the underlying idea involves continuous stream of data distributed across several gateways. [PERSON], [PERSON] et al. [4] discuss the importance of regular firmware updates in Low-Power Wide Area Networks (LPWANs) to ensure system security and stability. The authors recognize that implementing firmware updates in large-scale networks presents a crucial challenge for environments with a large number of IoT devices. The article analyzes the behavior of advanced protocols under adverse conditions, classifying network performance and quality. The study provides a detailed view of how an LPWAN system behaves during a large-scale firmware update, depending on the type of protocol implemented. From the analysis, the study concludes that adopting protocols such as Atomic and Synchronous Flooding can significantly improve the effectiveness of firmware updates in large-scale LPWAN networks and that precise configuration adjustments are essential to optimize performance in different deployment contexts compared to traditional protocols like CSMA-CA. [PERSON] et al. [5] propose a methodology for evaluating the firmware update process using multiple gateways depending on the number of gateways in the system, the size of the firmware to be transferred, and the characteristics of the communication used. The study concludes that gateways play a significant role in the FUOTA process, as they reduce the transmission range, thus improving system performance. The study also shows that as the distance is reduced and a greater number of gateways are used, there is a substantial decrease in the energy required and the times associated with updates, thereby increasing update efficiency. In the domain of firmware update management mechanisms in LoRaWAN networks, several significant studies stand out. [PERSON] [6] notes that the main firmware update management model is based on a centralized architecture, where each IoT device is responsible for data transactions related to firmware updates which are concentrated on a single server. This centralized architecture, however, can imply the existence of a single point of failure and potential delays in updating critical packets in mass update scenarios. The study presents a solution based on a distributed ledger (Blockchain) to overcome the aforementioned vulnerabilities. The study also proposes two solutions for distributing firmware updates: the first is direct updating by the manufacturer's server, and the second is peer-to-peer updating, thereby avoiding the vulnerabilities associated with a single point of failure and increasing the availability of firmware updates. STMicroelectronics [7], in its application note AN5554, describes the FUOTA process applied to Class C IoT devices.