Have you heard of LoRaWAN, but terms like “gateway,” “uplink,” “downlink, ” or “spreading factor” still seem confusing? Don’t worry: you don’t need to be a radio expert to understand how a LoRaWAN network works.
Just imagine a temperature sensor installed in a utility room or a meeting room. This sensor needs to send its readings regularly to a monitoring system, without a communication cable and without having to replace its battery every six months. This is exactly the kind of need that the LoRaWAN protocol addresses.
In this article, we'll take a step-by-step look at:
- What is LoRaWAN?
- How Data Flows
- What are sensors, gateways, and the LoRaWAN server used for?
- What "uplink" and "downlink" mean
- How Classes A, B, and C Work
- How LoRaWAN Handles Range, Battery Life, and Security
- How to choose between a private LoRaWAN network and a managed network.
By the end of this article, you will understand the fundamentals of LoRaWAN and the role of each component in the network.
What is LoRaWAN?
About
LoRaWAN is a radio communication protocol designed for connected devices. It belongs to the LPWAN family, which stands for Low Power Wide Area Network. In French, this refers to a low-power wide-area network.
The LoRaWAN protocol is particularly well-suited for devices that need to:
- run on battery power for several years
- send their data wirelessly
- to travel a long distance
- to pass through several walls or floors
- send short messages at regular intervals.
In a building, a LoRaWAN sensor can, for example, measure:
- a temperature
- a humidity level
- a CO₂ concentration
- water, gas, or electricity usage
- opening a door or window
- the condition of a piece of equipment
- a water leak
- the position of a valve.
LoRaWAN is therefore widely used in the fields of smart buildings, BMS, industry, agriculture, logistics, and connected cities.
What is LoRaWAN not intended for?
LoRaWAN is designed to transmit small amounts of data: a temperature, a status, a reading, or an alarm. It is not suitable for sending:
- of a video
- continuous sound
- large files
- hundreds of measurements per second.
A sensor that sends a temperature reading every ten minutes is perfectly suited for LoRaWAN. A camera that streams live video is not.
What is the difference between LoRa and LoRaWAN?
The terms “LoRa” and “LoRaWAN” are often used as if they meant the same thing. However, they refer to two different concepts.
LoRa: The Radio Signal
LoRa refers to the modulation technology used to transmit a message over the air. It is the “radio” component of the communication. In particular, it enables a long range with low power consumption.
LoRaWAN: Network Rules
LoRaWAN is the protocol that governs communications. In particular, it defines:
- How an object joins the network
- when he can send a message
- when he can accept an order
- How Transactions Are Secured
- how the network manages the various objects.
Here’s a simple analogy: LoRa is the route the message takes. LoRaWAN is like the traffic code, road signs, and traffic rules. The two are complementary. LoRa carries the signal, while LoRaWAN organizes the network.
How does a LoRaWAN network work?
A LoRaWAN network may seem complex when you look at a technical diagram. However, its architecture is based on four easily identifiable components:
- the sensor or the connected device
- the LoRaWAN gateway
- the LoRa Network Server
- the business application or the BMS
1. The LoRaWAN sensor measures and transmits
The sensor is the source of the data. For example, it measures a temperature of 21.4 °C and then converts that measurement into a short digital message. It then transmits that message via radio.
2. The LoRaWAN gateway receives the message
The LoRaWAN gateway listens for messages sent by sensors within its coverage area. It receives radio frames and forwards them to the server responsible for managing the network. The gateway therefore acts as a relay. It does not independently determine the meaning of the data.
3. The LNS organizes the network
The LoRa Network Server, often abbreviated as LNS, is the brain of the LoRaWAN network.
In particular, it manages:
- sensors authorized to join the network
- sensor authentication
- certain radio settings
- sending messages to the sensors
- Deleting messages received multiple times
The LNS can be:
- directly integrated into a gateway
- installed on a local server
- hosted in the cloud
4. The app uses the data
Once the message has been processed, the data must be made understandable and usable. It can be sent to:
- a BMS
- a vending machine
- supervision
- an IoT platform
- energy monitoring software
- a business application.
In a building, for example, a gateway with an embedded LNS can make data available to a PLC using protocols such as Modbus or BACnet.
The Complete Process of a Measurement
Let's go back to our temperature sensor:
- The sensor reads 21.4 °C
- It sends a LoRaWAN frame
- A gateway receives this frame
- The LNS verifies and formats the message
- the data is decoded
Uplink and downlink: In which direction does data flow?
In a LoRaWAN network, messages can travel in both directions. These are referred to asthe uplink and the downlink.
What is a LoRaWAN uplink?
An uplink is a message sent by the sensor to the network. It is an "upward-bound" message. An uplink may contain information such as:
- a temperature
- a CO₂ level
- a meter reading
- an alarm
- the status of an entry
- the sensor's battery level.
The path is as follows:
Sensor → Gateway → LNS → Application or BMS
To remember this term, just think of the English word " up," which means "toward the top."
What is a LoRaWAN downlink?
A downlink travels in the opposite direction. It is a message sent from the network to the sensor. It can be used to:
- Change the transmission frequency of a sensor
- change an alarm threshold
- issue new instructions
- open or close a relay
- change the position of a valve.
The path then becomes:
Application or BMS LNS → Gateway → Object
Example using a thermostatic valve
A valve measures the temperature in a room and sends the reading via uplink. The BMS the reading and decides to reduce the heating. It then sends a new setpoint via downlink. The valve receives this setpoint and slightly closes its actuator.
LoRaWAN therefore allows users to both collect data and control certain devices.
Downlinks, however, remain more constrained than uplinks. A battery-powered device does not necessarily listen to the network continuously. The time at which it can receive a command depends, in particular, on its LoRaWAN class.
LoRaWAN Classes A, B, and C Explained Simply
A LoRaWAN sensor's class defines its radio behavior.
It answers three questions:
- When does the object send its data?
- When does it monitor the network?
- When can he receive an order?
There are three main classes: A, B, and C.
| Class | How It Works | Consumption | Common uses |
|---|---|---|---|
| A | Listen briefly after sending data | Very low | Battery-powered sensors |
| B | Scheduled Listening Sessions | Intermediate | Specific Applications |
| C | Listens almost constantly | High | Powered Actuators |
Class A: The LoRaWAN sensor is in sleep mode most of the time
Class A is the most commonly used.
It works simply:
- the sensor wakes up
- he takes a measurement
- It sends an uplink
- He opens two short reception windows
- It may receive a downlink
- It goes back to sleep.
The sensor therefore spends most of its time in sleep mode. That's what allows it to run on battery power for several years.
Class A is particularly suitable for:
- temperature sensors
- humidity sensors
- meters
- opening sensors
- air quality sensors.
Its main limitation concerns downlink commands. To send a downlink, the network generally has to wait until the sensor has transmitted an uplink and opened its reception windows.
Class A therefore promotes autonomy, but not immediate response.
Class B: The LoRaWAN sensor wakes up at specific times
In Class B, the sensor opens scheduled listening windows.
The network and the device synchronize using messages called beacons. This allows the sensor to know when to listen for a potential command.
You can compare this process to someone who checks their mailbox at set times.
Class B represents a compromise between autonomy and availability, but it remains relatively uncommon in typical BMS applications.
Class C: The device remains in listening mode at all times
In Class C, the object listens to the network almost continuously, except when it is transmitting.
He can therefore receive an order at virtually any time.
This class is suitable for equipment that needs to respond quickly:
- relay
- actuators
- powered valves
- thermostats
- flight control systems.
This constant listening consumes a lot of power. Class C devices are therefore generally connected to an external power supply.
What frequencies does LoRaWAN use?
The LoRaWAN protocol does not use exactly the same radio band everywhere in the world.
Frequencies depend on local regulations.
In Europe, and therefore in France, LoRaWAN primarily uses the EU868 band, centered around 868 MHz.
In the United States, the US915 band is primarily used. In Australia, the band used is called AU915.
This means that a sensor designed for the U.S. market is not automatically compatible with a European network.
Before a deployment, you must verify that:
- The sensor is using the correct frequency
- The gateway uses the same frequency plan
- The equipment is authorized in the country in question.
LoRaWAN bands are generally considered “unlicensed” bands. You do not need to purchase a radio license to use them.
The LoRa Alliance specifies the frequencies that can be used in each country in this document.
Spreading Factor, ADR, and Duty Cycle: Three Radio Concepts You Should Know
These three terms may sound technical. The concept behind them, however, is quite simple.
The Spreading Factor: Go Fast or Go Far
The Spreading Factor, abbreviated as SF, affects the duration and robustness of a radio message. It typically ranges from SF7 to SF12.
Imagine you need to convey a sentence to someone who is far away from you. When they are close by, you can speak quickly. When they are very far away, you have to speak more slowly and enunciate each word clearly to be understood. With LoRaWAN, the principle is similar.
With a low SF, such as SF7
The message is sent quickly.
This allows you to:
- to use less energy
- to occupy the frequency for a shorter period of time
- to increase the network's overall capacity.
This mode works well when the sensor is close to the gateway and the radio connection is good.
With a high SF, such as SF12
The message stays in the air longer. It becomes easier to detect when the signal is weak, but:
- Shipping takes longer
- The sensor uses more power
- The radio channel remains occupied for a longer period of time.
A high SF is therefore not always better. The goal is to use the lowest SF that still allows for reliable communication.
ADR: Automatic Network Adjustment
ADR stands for Adaptive Data Rate. This feature allows the network to automatically adjust certain radio parameters of the sensor. The LNS analyzes the quality of the received messages.
If a sensor is using SF12 even though it is receiving signals very well, the network may instruct it to use a lower SF setting. The message will be sent more quickly, and battery consumption will be reduced. Conversely, if the connection is poor, the network may choose more robust settings.
ADR therefore acts as an automatic adjustment mechanism that seeks the best balance between:
- scope
- reliability
- consumption
- radio transmission time.
This feature is particularly well-suited for fixed sensors installed in a building.
The Duty Cycle: Everyone Must Wait Their Turn
The duty cycle limits the amount of time a device can transmit. Why does this rule exist? Because radio frequencies are shared. If all sensors were transmitting constantly, the network would quickly become unusable. The duty cycle therefore imposes a maximum transmission time.
For example, a duty cycle of 1% represents, in simple terms, a maximum of 36 seconds of transmission per hour on the relevant subband.
This rule encourages users to send:
- short messages
- only the relevant data
- at a frequency consistent with the need.
The higher the Spreading Factor, the longer the message remains in the air and the faster it uses up that available time. This is why LoRaWAN is not designed to send data continuously.
How are LoRaWAN communications secured?
A radio transmission can potentially be intercepted. Security is therefore built into the operation of the LoRaWAN protocol.
To understand how an object is activated, you need to know three key pieces of information.
| Information | Role | Simple Comparison |
|---|---|---|
| DevEUI | Uniquely identifies the object | Serial Number |
| JoinEUI or AppEUI | Identifies the registration service | Ticket Office Address |
| AppKey | Secret used to authenticate the object | Confidential Password |
The DevEUI
The DevEUI is the sensor's unique identifier.
No two devices may have the same DevEUI. It allows the network to know exactly which device is attempting to communicate.
The AppEUI
The AppEUI specifies which activation service the object wishes to contact.
It can be compared to the address of the counter where the sensor must register.
The AppKey
The AppKey is a secret key.
It is identified by the object and by the infrastructure responsible for authenticating it. It must never be published or disclosed without protection.
The AppKey can be thought of as the sensor's master password.
How does OTAA activation work?
The most common activation method is called OTAA, which stands for Over-the-Air Activation.
When it starts up:
- The sensor sends a connection request called a " Join Request"
- The network verifies that the sensor is authorized
- The network returns a " Join Accept" response
- session keys are created
- The sensor can begin transmitting its data.
LoRaWAN uses AES-128 encryption to secure communications.
The data is encrypted and the messages are authenticated. Therefore, someone who intercepts a radio frame would not be able to simply read its contents.
Private LoRaWAN network or public network: What's the difference?
There are two main ways to set up a LoRaWAN network.
The Private LoRaWAN Network
In a private network, the company deploys and operates its own infrastructure.
She installs:
- its sensors
- one or more gateways
- its LNS, whether local or remote
- interfaces to the BMS the business application.
In a building, a gateway can be installed in an electrical cabinet. It receives data from sensors and can then transmit it to a PLC via Modbus or BACnet.
The main advantages are:
- infrastructure management
- local data storage
- Direct integration with the BMS
- the absence of a carrier subscription per sensor, excluding any services
- roofing tailored specifically to the building.
In return, the operator must install, configure, and maintain its network.
The public or operator-run LoRaWAN network
In a public network, the infrastructure is deployed by an operator. Users can connect their sensors to the existing network, provided that:
- that the area is covered
- that the sensors are compatible
- to sign up for the necessary services (subscriptions, etc.)
Data is typically sent to the operator's cloud environment and then retrieved by a business application via an API or a connector.
This solution is useful when objects are spread across multiple sites or a large geographic area.
| Private network | Public or operated network |
|---|---|
| Gateways Installed by the Company | Gateways Installed by an Operator |
| Locally Managed Coverage | Coverage Varies by Carrier |
| Data that can be easily integrated into a BMS | Data that is generally accessible from a remote platform |
| No carrier subscription per sensor | Subscription or service generally required |
| Maintenance to be performed by the operator | Operator-managed radio infrastructure |
For a building equipped with a BMS , a private network is often particularly suitable. For equipment spread across multiple cities, a managed network may be easier to use.
Why is LoRaWAN interoperable?
LoRaWAN is an open protocol defined by the LoRa Alliance. Its interoperability is comparable to that of Bluetooth. A smartphone and a speaker from two different brands can communicate because they adhere to the same standard.
The principle is similar in LoRaWAN.
A network can include:
- sensors from various brands
- several types of measures
- gateways from different manufacturers
- various business applications.
Provided, of course, that the devices comply with LoRaWAN specifications and use the same frequency plan. This flexibility allows the integrator to choose the product best suited to each need, without having to purchase all equipment from a single manufacturer.
An important distinction: "compatible" does not automatically mean "decoded"
The gateway can receive a frame from a sensor without knowing the meaning of its contents.
Let's imagine that a sensor sends the following value: 00D6
To determine that this value corresponds to a temperature of 21.4 °C, the application must apply the decoding rules provided by the manufacturer.
To fully integrate a new sensor, you must therefore have:
- its credentials and keys
- from its documentation
- of its data format
- its codec or decoding table.
LoRaWAN provides radio and network interoperability. Interpreting the data for business purposes sometimes requires additional integration.