# Secure LoRa Firmware Update with Adaptive Data Rate Techniques +
###### Abstract  
Internet of Things (IoT) devices rely upon remote firmware updates to fix bugs, update embedded algorithms, and make security enhancements. Remote firmware updates are a significant burden to wireless IoT devices that operate using low-power wide-area network (LPWAN) technologies due to slow data rates. One LPWAN technology, Long Range (LoRa), has the ability to increase the data rate at the expense of range and noise immunity. The optimization of communications for maximum speed is known as adaptive data rate (ADR) techniques, which can be applied to accelerate the firmware update process for any LoRa-enabled IoT device. In this paper, we investigate ADR techniques in an application that provides remote monitoring of cattle using small, battery-powered devices that transmit data on cattle location and health using LoRa. In addition to issues related to firmware update speed, there are significant concerns regarding reliability and security when updating firmware on mobile, energy-constrained devices. A malicious actor could attempt to steal the firmware to gain access to embedded algorithms or enable faulty behavior by injecting their own code into the device. A firmware update could be subverted due to cattle moving out of the LPWAN range or the device battery not being sufficiently charged to complete the update process. To address these concerns, we propose a secure and reliable firmware update process using ADR techniques that is applicable to any mobile or energy-constrained LoRa device. The proposed system is simulated and then implemented to evaluate its performance and security properties. c 2021 21 2284 202  
protocol that uses chirped spread spectrum to enable long range communications while sacrificing data rates. LoRa has many configurable parameters, such as bandwidth, spreading factor (SF), preamble size, and error correcting rates, enabling the device to communicate at different data rates depending on the range required. This research is motivated by the development of a battery-powered LoRa device from Roper Solutions used to track the location and health of free-range cattle, as shown in Figure 1[4]. This device is comprised of a global positioning system (GPS) module, accelerometer, LoRa communications module, microcontroller, solar panel, and battery. The device periodically collects location and activity data and then transmits it to a custom base station. While this system uses LoRa, it is unable to use LoRaWAN since none of the three classes support the requisite energy efficiency and complex bi-directional communication operations, such as mesh networking and firmware updates. LoRaWAN Class C supports complex communication operations but also requires that devices operate with their receivers always powered on. This requirement represents an unacceptable energy consumption burden because Roper devices are highly size- and weight-constrained and thus use a small, low-capacity battery. The work presented in this paper focuses on the firmware update process. The time to complete a firmware transfer of a 128 kB image is given in Table 1, presented as a function of the LoRa speeding factor (LoRa SF) and various frequency shift keying (FSK) data rates. The 128 kB firmware image requires 2000 data transfers with a 64-byte data packet size. Table 1 shows that this firmware update process takes an unacceptably long period of time at SF = 12, takes a reasonable amount of time at SF = 6, and is fastest when using FSK. An objective of this work is to devise energy efficient methods that achieve high communication data rates with a reasonable bit-error rate using adaptive data rate (ADR) techniques. While our emphasis is on firmware updates, these ADR techniques are applicable to any large data exchange between LoRa-enabled devices. Other examples of large data exchanges include sensor updates from high resolution sources, such as camera images, Lidar, or audio.