Skip to content
A rural landscape with trees and a radio mast in the distance

Photo: Nikolai Kolosov / Unsplash

Connectivity & protocols · intermediate

LoRaWAN explained: long range, low power, small messages

How LoRaWAN works, from LoRa modulation and spreading factors to gateways, network servers, device classes and security, and where it fits best.

LoRaWAN is the most widely deployed technology for connecting battery-powered devices over kilometers without a mobile operator. A soil moisture probe, a water meter in a basement, a parking sensor under asphalt or a tracker on a pallet can send a few bytes several times a day to a distant gateway and run for years on a small battery. The trade is that those few bytes are all you get, and getting a message back to the device is slow and limited.

The name combines two things that are often confused. LoRa is the physical radio modulation, a proprietary chirp spread spectrum technique owned by Semtech. LoRaWAN is the open network protocol on top of it, specified by the LoRa Alliance, that defines how devices join, how messages are addressed and secured, and how gateways and servers cooperate. This guide covers both and finishes with where LoRaWAN is the right choice.

The radio: LoRa and spreading factors

LoRa transmits in unlicensed sub-GHz ISM bands, around 868 MHz in Europe and 915 MHz in North America. Sub-GHz signals travel farther and penetrate buildings better than 2.4 GHz ones, which is part of why the range is so long.

The other part is the modulation. Chirp spread spectrum spreads each symbol over a wide bandwidth, which lets a receiver decode signals well below the noise floor. The spreading factor, from SF7 to SF12, controls how much spreading is applied. A higher spreading factor means a longer, slower transmission that can be received from farther away, at the cost of more airtime, more energy per message and a smaller maximum payload. A device near a gateway can use SF7 and finish in a fraction of a second; one at the edge of coverage uses SF12 and takes over a second to send a few dozen bytes.

Transmissions at different spreading factors are nearly orthogonal, so a gateway can receive several at once on the same channel and serve thousands of devices that each transmit rarely.

The network: devices, gateways, servers

A LoRaWAN network is a star topology with a twist. Devices broadcast; every gateway in range receives the packet and forwards it over an IP backhaul to a network server. Gateways are stateless packet forwarders with a good radio and a precise clock. The network server deduplicates packets received by multiple gateways, picks the best gateway for any downlink, manages addresses and data rates, and passes the application payload to an application server.

LoRaWAN network architecture Three end devices broadcast uplinks that two gateways receive and forward over IP to a network server, which removes duplicates and manages the radio; the application server decrypts the payload and delivers it to the application. END DEVICES GATEWAYS SERVERS Soil probe SF12 Water meter SF9 Parking sensor SF7 Gateway A packet forwarder Gateway B packet forwarder same uplink, twice IP backhaul Network server Drops duplicate packets MAC: addresses, join, downlink ADR: data rate per device encrypted payload Application server Decrypts with the app key Decodes, delivers Application MQTT / HTTP A device is not tied to any gateway: adding gateways extends coverage, and a moving device needs no handover.
A LoRaWAN network: end devices broadcast, every gateway in range forwards the same uplink over IP, the network server removes the duplicates and manages the radio, and the application server decrypts the payload and hands it to the application.

The separation matters. A device is not associated with any particular gateway, so coverage improves just by adding gateways, and a moving device needs no handover. Each device has a globally unique DevEUI and, after joining, a short network address used on the air to keep frames small.

Device classes

The protocol defines three classes that set how a device listens for downlink.

Class A is the baseline and the lowest power. The device transmits whenever it has data and then opens two short receive windows. The server can only send a downlink in one of those windows, so a command reaches the device only after the device’s next uplink. For a sensor that reports hourly, that is an hour of latency.

Class B adds scheduled receive windows synchronized by a beacon from the gateway, giving bounded downlink latency at the cost of some extra energy.

Class C keeps the receiver open almost continuously, which allows downlinks at any time but requires mains power. Streetlights and actuators use Class C.

Most deployed devices are Class A, and the class choice determines whether a LoRaWAN device can be controlled remotely in a useful time frame.

Activation and security

A device joins the network in one of two ways. Over-the-air activation (OTAA) is the recommended method: the device holds a root key installed at manufacturing and performs a join handshake that derives fresh session keys. Activation by personalization (ABP) hard-codes the session keys and address into the device, which is simpler but leaves keys static for the device’s life.

LoRaWAN uses two AES-128 session keys. A network session key authenticates frames between device and network server. An application session key encrypts the payload end to end between device and application server, so a network operator cannot read the data. Frame counters protect against replay. The join server, which holds root keys, can be operated separately from the network server, which lets a device roam between networks without sharing its root key.

Getting the root key onto the device securely, ideally into a secure element, is the main practical security task.

Capacity, duty cycle and payload limits

LoRaWAN is designed for small, infrequent messages, and three constraints enforce that.

Regional regulations for unlicensed bands limit how much airtime a transmitter may use. In Europe the common sub-bands allow a transmitter on air only a small fraction of the time, which at high spreading factors means a handful of messages per hour. Gateways face the same limits, which is why downlinks are scarce.

Maximum payload depends on the data rate, from roughly fifty bytes at the slowest rates to a couple of hundred at the fastest. Application designers compress aggressively: binary fields, scaled integers, no JSON.

Adaptive data rate (ADR) lets the network server tell a stationary device to lower its spreading factor when signal quality allows, which cuts airtime, saves battery and increases network capacity. Moving devices usually disable ADR because conditions change too fast.

Firmware updates over LoRaWAN are possible but slow, so OTA update strategies for LoRaWAN fleets rely on infrequent, carefully tested releases.

Public, private and community networks

The same protocol runs in three deployment models. A private network, where an organization installs its own gateways and runs or rents a network server, suits a farm, factory, campus or utility that wants control and no per-device fees. Public operator networks sell coverage like a mobile carrier does, convenient where you have a few devices across a wide area. Community networks, built from gateways contributed by volunteers, cover many cities with no fee but no guarantee. The ability to start with three gateways and grow is what distinguishes LoRaWAN from cellular LPWAN options.

When LoRaWAN fits and when it does not

LoRaWAN is the right choice when devices are battery powered, spread across a wide area, send small amounts of data infrequently, and rarely need to receive anything. Precision agriculture, utility metering, environmental monitoring, smart parking and building sensors in large estates are typical. It is especially attractive when you can own the infrastructure.

It is the wrong choice when the device needs frequent downlinks or low-latency commands, when payloads are large, when devices move between countries with different band plans, or when you need operator-grade coverage without deploying anything. For those, NB-IoT and LTE-M are the usual alternatives, and the connectivity overview compares the full set.

Where to go next

Topics: LoRaWAN, LoRa, LPWAN, protocols, connectivity