LoRa Network - Gateway Architecture

date
Jun 8, 2024
type
Post
AI summary
slug
lora-master-architecture
status
Published
tags
ESP32
LoRa
summary
Explain how the master node performs scheduled tasks such as polling data, time synchronization, and configuration verification. Additionally, it handles web API commands triggered by a flag. The main control loop checks the current time and executes tasks at specified intervals, ensuring efficient coordination and communication within the network. The implementation includes a flow chart for clarity and detailed steps for setting up time synchronization and task scheduling.

Master Node Architecture for LoRa Network

In this post, we are going to design an architecture for a master node in a LoRa network consisting of one master and multiple slave nodes. The master node will perform the following tasks:
  1. Scheduled Polling for Data
  1. Scheduled Time Synchronization
  1. Scheduled Slave Configuration Settings Verification
  1. Relay Web API Control to Slaves
We will implement a control loop in the master node that checks and executes these tasks at scheduled intervals, ensuring efficient coordination in the LoRa network. The flow chart for this control loop is shown below:

Implementation Example

We are not going to discuss all functions in this article, but we can use time sync as an example to show case how this control loop works.
  1. Define the time_sync_message Structure:
    1. Modify the get_current_time Function to return the time as a time_sync_message structure:
      1. Send the Time Sync Message:
        1. Integrate the Time Sync in gateway_control:
          1. Create a Task for gateway_control:
            By structuring the control loop to handle these tasks at scheduled intervals, the master node efficiently manages communication and control within the LoRa network. This ensures orderly communication, synchronization, and configuration verification, making the system robust and scalable.

            About Me

            Hi, I'm Qiwei Mao, a geotechnical engineer with a passion for IoT systems. I'm exploring low-power microcontrollers and LoRa communication systems to enable both hobbyist remote monitoring solutions and industrial-grade monitoring or control systems.
            Qiwei Mao
            Qiwei Mao

            © Qiwei Mao 2024