DEVELOPMENT OF EMBEDDED SOFTWARE FOR ESP32-BASED LORA MODULES WITH ADAPTIVE CONFIGURATION AND LINK QUALITY MONITORING

2025;
: 25-37
1
Lviv Polytechnic National University
2
Lviv Polytechnic National University

The article describes a new approach to developing embedded software for LoRa modules based on the ESP32 microcontroller. The main idea behind the work is to create universal firmware with a minimalist architecture and advanced configuration options that ensures reliable peer-to-peer data exchange. The developed system uses a simplified text command format (COMMAND;PARAM=VALUE) instead of JSON, which reduces computational costs and speeds up processing. This simplifies integration into application solutions and increases the efficiency of hardware resource utilization. The firmware integrates a delivery confirmation (ACK) mechanism with retransmission in case of packet loss, which increases the reliability of the communication channel. Additionally, the CONFIG_SYNC command is implemented for automatic synchronization of parameters between nodes, which ensures stability in dynamic conditions. The proposed approach also includes a PING/PING_ACK function, which, in addition to checking connection availability, provides diagnostic characteristics, including RSSI, SNR, TOA, DELAY, and data transfer rate. It is possible to transmit large messages using a packet segmentation and aggregation algorithm that overcomes the hardware limitations of the LoRa SX1276 chip. During the study, the firmware was experimentally tested with variations in key parameters: spreading factor, bandwidth, coding rate, transmission power, and preamble length. The results confirmed the patterns of influence of these parameters on delay, speed, RSSI, and signal-to-noise ratio, which made it possible to form practical recommendations for optimizing the system. The proposed solution combines ease of use, configuration flexibility, and communication quality assessment tools, providing a balance between performance and scalability. Further development involves the integration of artificial intelligence modules, in particular reinforcement learning, for automatic selection of optimal parameters in real time, which opens up prospects for the creation of intelligent self-configuring wireless systems.

[1]     M. A. M. Almuhaya, W. A. Jabbar, N. Sulaiman, and S. Abdulmalek, “A survey on LoRaWAN technology: Recent trends, opportunities, simulation tools and future directions,” Electronics, vol. 11, no. 1, p. 164, Jan. 2022, doi:10.3390/electronics11010164.

[2]     J. M. Solé, R. P. Centelles, F. Freitag and R. Meseguer, "Implementation of a LoRa Mesh Library," in IEEE Access, vol. 10, pp. 113158-113171, 2022, doi: 10.1109/ACCESS.2022.3217215

[3]     M. Jouhari, N. Saeed, M.-S. Alouini, and E. M. Amhoud, “A survey on scalable LoRaWAN for massive IoT: Recent advances, potentials, and challenges,” IEEE Commun. Surv. Tutor., vol. 25, no. 3, pp. 1841–1876, 2023, doi:10.1109/comst.2023.3274934.