# A Resilient LoRa-Based Solution to Support Pervasive Sensing
## 1 Introduction  
The Internet of Things (IoT), characterized by interconnected devices capable of sensing, actuating, and communicating, has emerged as a transformative force in our digital age. Its escalating growth reflects its potential to redefine how we interact with our physical and digital worlds. In urban development, IoT plays an instrumental role in creating smart cities, enabling efficient resource utilization, and improving service delivery, thereby enhancing the overall quality of life. Similarly, IoT underpins the shift to smart factories in the industrial sector, transforming manufacturing through pervasive sensing and automation, thus catalyzing Industry 4.0. Beyond cities and factories, IoT has begun influencing broader national strategies, facilitating the management of resources and services at a national level. However, as IoT evolves, network connectivity, security, and privacy challenges become prominent. Given IoT's potential to generate massive volumes of data, it is critical to develop networks that can support reliable, secure, and efficient data exchange [1; 2; 3]. IoT is the required backbone to create and foster an environment where cities can improve and become smart cities [4; 5; 6]. To develop this backbone, infrastructure and communication technology are required. Since the urban environment can span over an extensive area, the positions of the sensors and actuators can vary greatly, and running cables everywhere is not always feasible; the obvious choice is wireless LPWAN technologies. Among these, the one with a rapidly increasing adoption rate is LoRa (from Long Range), a technology created and developed by the French company Cycleo, now acquired by Semtech, which still maintains it. In addition to its long transmission range (up to about 15 km) and low power consumption (as little as 25 mW to send a message), the characteristic that made LoRa one of the most popular LPWAN technologies is the fact that it is open source, the only requirement being owning a LoRa-capable device [7; 8; 9]. Other similar technologies, such as SigFox and LTE-M, are also used in the IoT environment. While they might be better in some characteristics, for example, LTE-M provides the highestthroughput and lowest latency, and SigFox has, among the three, the highest maximum range, they both follow an infrastructure-as-a-service model, requiring their users to pay to send messages [10]. Additionally, since using LTE-M and SigFox relies on an existing network, they may not be available everywhere. Overall, the current state-of-the-art presents challenges and limitations that must be addressed [11; 12]. One major limitation is the focus on LoRaWAN-based networks, which may have constraints imposed by the LoRaWAN standard. Another challenge arises in achieving scalability in peer-to-peer communication, particularly in larger networks. Additionally, optimizing energy consumption requires the development of complex hierarchical routing protocols and efficient implementation strategies. The inaccurate selection of parent nodes due to inconsistent received signal strength indicator (RSSI) values further complicates the network's performance. Also, neglecting end nodes and the absence of spreading factor modulation impacts scalability and connection robustness. Furthermore, the assumption of static signal strength values and the complexity of comparing RSSI values from different devices hinder accurate evaluation in practical scenarios. To enhance the performance, scalability, energy efficiency, and practicality of LoRa mesh networks, we need to address these challenges and issues. Our proposed solution focuses on creating a mesh network using LoRa technology to support pervasive sensing. The solution involves a series of steps and actions performed by the nodes in the network. Upon device power-up, it reads a configuration file defining its behavior. The device can connect to sensor devices, disable unnecessary features like LED lights and Wi-Fi to save power, and initialize communication with a mesh network.