Cost-Effective Distributed IoT Sensing Architecture Using LoRa P2P and LoRaWAN with Custom Gateways and Cloud Integration

S. Eriberto
Sonoma State University,
United States

Keywords: LoRa, IoT, LoRaWAN, LoRaP2P, ESP8266, RAK3172, Smart Agriculture, Cloud Integration, PHP/MySQL Integration, Environmental Monitoring

Summary:

This project presents a cost-effective and adaptable IoT sensing system designed for deployment in remote or infrastructure-limited environments. Using RAK 3172 and 3272S breakout boards, the system supports both LoRa peer-to-peer (P2P) and LoRaWAN communication to enable scalable, low-power, and reliable sensor networks. In the peer-to-peer configuration, sensor nodes transmit data directly to a central gateway based on the ESP8266 microcontroller. This gateway is integrated with a PHP-based web server and MySQL database, allowing for real-time data storage, visualization, and management without relying on commercial LoRa gateways. To increase communication range and network reliability, a repeater node was added to extend signal coverage across larger distances. Alongside the P2P system, a LoRaWAN setup was implemented using over-the-air activation (OTAA) to securely connect sensor nodes to The Things Network (TTN). This system features payload decoding, cloud integration, and Python-based scripts for extracting and processing data, enabling seamless cloud connectivity when network infrastructure is available. This approach enables a flexible sensing architecture suitable for a range of applications, including environmental monitoring, infrastructure health assessment, and smart agriculture. By leveraging open-source tools, affordable components, and edge-to-cloud communication strategies, the project demonstrates how reliable, field-ready IoT solutions can be built without the need for expensive commercial infrastructure. Overall, this system showcases a modular and practical framework for distributed sensing, emphasizing scalability, energy efficiency, and ease of deployment in real-world conditions.