LoRaLite - Gateway Architecture
date
Jun 8, 2024
type
Post
AI summary
slug
lora-master-architecture
status
Published
tags
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:
- Scheduled Polling for Data
- Scheduled Time Synchronization
- Scheduled Slave Configuration Settings Verification
- 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.
- Define the
time_sync_message
Structure:
- Modify the
get_current_time
Function to return the time as atime_sync_message
structure:
- Send the Time Sync Message:
- Integrate the Time Sync in
gateway_control
:
- 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.