Mesh networking

Mesh networking vs LoRaWAN

LoRaWAN is not a mesh. The LoRa Alliance describes it as a star-of-stars network in which end devices make single-hop radio links to gateways, and the gateways relay messages over IP to a central network server. In a mesh, the devices themselves forward traffic for each other, so messages can travel several hops and reach other devices without any server.

Learning objectives

After reading this article you will be able to:

  • Explain why LoRaWAN is a star-of-stars network rather than a mesh
  • Compare LoRaWAN and a mesh on who forwards traffic and what infrastructure they need
  • Choose between LoRaWAN and a mesh for collecting data or device-to-device messaging

Two different shapes

People often put LoRaWAN and mesh networking side by side because both are used for wireless devices far from Wi-Fi and cell coverage. They answer the question “how does a message get from here to there” in opposite ways.

LoRaWAN is built around infrastructure. Devices talk to gateways, gateways talk to servers, and the servers run the network. A mesh network is built around the devices. Each one connects to the devices near it and forwards traffic for the others, and there may be no server at all.

How LoRaWAN works

It helps to separate two names. LoRa is the radio: Semtech describes it as a spread spectrum modulation derived from chirp spread spectrum. LoRaWAN is the network protocol on top, defined by the LoRa Alliance at the MAC layer. It decides how devices join, how data rates are managed, and how traffic is secured.

The LoRa Alliance describes the LoRaWAN architecture as a star-of-stars topology:

  • End devices are sensors and actuators, often battery powered. They send radio messages over single-hop links to whichever gateways are in range.
  • Gateways receive those messages, convert the radio packets to IP packets, and forward them over an ordinary IP connection such as cellular, Wi-Fi or Ethernet.
  • The network server manages the network. It authenticates devices, checks message integrity, picks the best gateway for messages going back down to a device, and passes data on.
  • Application servers process the data for each application, and a join server handles device activation and session keys.

Because devices do not pair with a specific gateway, a single uplink can be heard by several gateways. The Things Network explains that the network server keeps one copy and discards the rest, a form of message deduplication.

The specification also has a relay feature. The LoRa Alliance’s relay specification describes a mechanism for carrying frames between an end device and the gateway and network server. Traffic still converges on the network server, so the architecture stays centred on it.

How a mesh works

In a mesh, there is no network server that every message must reach. A device that receives a message meant for someone else can forward it, and the message moves hop by hop until it arrives or runs out of hops.

Meshtastic is a useful example because it uses the same LoRa radios as LoRaWAN but builds a mesh instead. Its documentation describes managed flooding: a node that receives a packet with a hop limit above zero decrements the limit and rebroadcasts it, but first listens briefly to see whether another node has already rebroadcast it, and stays quiet if so. The project describes this as decentralised communication with no dedicated router required. The radio is the same as in LoRaWAN; the network design is not.

Where they differ

LoRaWANMesh network
ShapeStar of stars: devices to gateways to a central serverWeb of device-to-device links
Who forwardsGateways and serversThe devices themselves
Hops from device to infrastructureA single radio hop to a gatewaySeveral hops between devices, as needed
Needs infrastructureGateways with IP backhaul and a network serverOnly the participating devices
Device to deviceThrough the serversDirectly or through neighbours
Where data ends upApplication serversWherever the recipient is
Who manages itA network operator, central configurationShared among devices, protocol rules

The table hides a real trade-off. LoRaWAN devices spend their energy on their own messages and leave the heavy lifting to gateways, which suits battery sensors that report a reading now and then. Mesh devices spend battery and airtime relaying other devices’ traffic, in exchange for not depending on any fixed equipment. If a LoRaWAN gateway’s backhaul fails, devices in its range lose their route to the server unless another gateway hears them. If a mesh node fails, traffic can often go around it, as long as another path exists.

Which one fits

LoRaWAN fits when the goal is to collect data from many devices into a backend that someone operates. The LoRa Alliance describes deployments on private, public, community and satellite networks, so you can run your own gateways or use an operator’s. Metering, agriculture, building management and asset tracking are the typical examples it gives.

A mesh fits when devices need to talk to each other, or when no infrastructure can be assumed: a crowd without signal, a disaster area, a convoy, a team underground. It also fits phones, which can form a mesh over the radios they already have, such as Bluetooth LE. To use LoRa, a phone needs separate hardware: Meshtastic, for example, pairs a phone with its own LoRa radio.

The two are not mutually exclusive. A mesh can reach the internet through a gateway: Meshtastic, for example, can use MQTT to connect a node to the internet and to link separate meshes. And a LoRaWAN deployment can sit alongside a local mesh, each carrying the traffic it suits.

Frequently asked questions

Is LoRa the same as LoRaWAN?

No. LoRa is the radio modulation, the physical layer. LoRaWAN is the network protocol and architecture built on top of it. Other systems, such as Meshtastic, use LoRa radios without LoRaWAN.

Can a LoRaWAN device send a message straight to another LoRaWAN device?

Not in the standard architecture. End devices talk to gateways, gateways forward to the network server, and downlinks to devices come from the application server through the network server. Device-to-device traffic goes through the servers.

Sources

Build it with Offline Protocol

The platforms page lists the transports the Offline Protocol mesh SDK supports on each surface, from Bluetooth LE between phones to an internet relay, and what each path needs before you can rely on it.

Read the platforms and transports page