# An Efficient Adaptive Data-Link-Layer Architecture for LoRa Networks
## 2 Related Work  
The efficient implementation of LLNs and other IoT networks and technologies requires the contribution of several research topics. Among them, data aggregation mechanisms are important to avoid data duplication and increase the sensors' measurement precision, especially when they are vulnerable to environmental factors (e.g., radiation, temperature, pressure variations, potential mobility, etc.) [4]. Likewise, security mechanisms are important to mitigate different types of attacks (e.g., eavesdropping, denial of service, data integrity attacks, etc.) [5]. Although these aspects are highly relevant, they are out of the scope of this paper. Several works have addressed the application scenarios of LLNs [6; 7]. Among the works making contributions to LoRa, some propose alternative implementations [8] and improvements [9; 10] to the physical layer. Other works step up in the protocol stack and propose improvements to the LoRaWAN architecture [11; 12]. Many works have explored the LoRa physical layer as a means to communicate. However, unlike our paper, most of these works merely apply the technology with fixed parameters for each end node [13; 14], trying to maximize the range of communication while maintaining a reasonable throughput. These and other more closely related works are analyzed next. In [13], an agricultural field monitoring application with irrigation control was developed. It consists of a network of end nodes for sensing or irrigation and a gateway node to connect the application to the Internet. Both the end nodes and gateway employ the LoRa physical layer to communicate by using the same single-channel link. Each sensor node sends its data every five minutes, and every data packet receives a downlink acknowledgment (ACK). In [14], a wireless sensor network (WSN) is used to collect environmental data used to optimize irrigation timings. The network uses the LoRa physical layer between sensor nodes and an aggregating node with a single-channel transceiver. The sensor nodes send environmental data every 10 min. The aggregator node is capable of sustaining a network of up to 250 nodes, configuring them automatically at boot, and all messages are encrypted. Since there are no ACK packets, there is no way of easily detecting a lossy link. Like in the previous work, the LoRa parameters are fixed, so the use of the resources from the network and nodes is not optimized. In [15] the capabilities of a LoRa single-channel device are enhanced by enabling it to receive packets coming with different and unknown spreading factors. This is achieved by performing channel activity detection (CAD) on each SF and detecting the preamble of incoming packets, taking into consideration the probability of adjacent SF detection. The developed adaptive spreading factor selection (ASFS) algorithm can serve as a basis for having end nodes with different SF configurations in the same network. Although there is no mention of how the preamble length is calculated for each SF, it is indicated that it should be long enough so that the receiver can successfully receive the packets. Since there are no ACKs, a similar version to the ADR algorithm cannot be applied, so in this work, the SF is kept fixed for each node. In [16], the authors propose a data-link-layer protocol to improve the communication reliability (packet delivery ratio) and energy efficiency for indoor LoRaWAN networks. The approach is the introduction of booster nodes, which may be a subset of the LoRA end nodes. These nodes perform two tasks: (i) repeat the same physical layer frame that was not acknowledged by the gateway in synchronization (within time constraints) with the transmitting nodes and, on the same channel, improving the RSSI (received signal strength indicator) at the gateway and (ii) re-send downlink ACKs that were not received (originated by a retransmission) by the recipient end node. This approach increases the energy efficiency of LoRaWAN networks since it reduces the number of possible packet retransmissions.