What is LoRaWAN?

LoRaWAN is a communication protocol used in Low-Power-Wide-Area-Networks (LPWAN).  It can be considered the equivalent to the 2nd and 3rd layers of the OSI network model (the data-link and network layers).

Typically, LoRaWAN operates on top of LoRa which is the equivalent of OSI layer 1 (the physical layer).

If comparing this to an Ethernet/IP network, LoRa is the physical cables and LoRaWAN is the MAC & IP layers.

One thing to note is that the terminology “LoRaWAN” is normally used to refer to LoRaWAN over LoRa when in actual fact, LoRaWAN can operate over FSK radio too (but this is not commonly used).

So What is LoRa?

I’ve already said that LoRa is the physical layer but what this really means is it defines the radio modulation used for the wireless communication.  It’s how the 1s and 0s are converted to waveforms and sent over the air.

LoRa is designed to operate in the sub-Gigahertz ISM (Industrial, Scientific & Medical) frequency bands.  The frequencies used vary from country to country but in Europe this means 433MHz & 868MHz.  Sometimes these frequencies are referred to as unlicensed or unregulated bands but that is not true.  They are regulated in Europe by ETSI, it is just that they are free to use.

LoRa was developed in France and the patent is owned by a company called Semtech.  They license the technology to various chip manufacturers around the world.

It uses something called chirp spread spectrum where 0s and 1s are transmitted used sequences of fast rising and fast falling “chirps” in a similar fashion to radar systems and echo location used by bats.  This allows for very long range communication with a low power usage and very good resistance to interference.

LoRaWAN

LoRaWAN sits on top of LoRa and defines communication protocol and network architecture of the LPWAN.

A LoRaWAN network consists of numerous node devices  talking to one or more gateways/concentrators which are sending data to & from network servers which are themselves relaying the data to application servers.

LoRaWAN network architecture. Source: Semtech
LoRaWAN network architecture. Source: Semtech

The elements are:

  • node devices: typically these are small, wireless sensor devices, often battery powered, sending small amounts of data every so often
  • gateways/concentrators: these can be thought of as converters or access points.  They contain a LoRa radio module (usually multi-channel so they can receive multiple messages simultaneously) and some form of IP connection.  The IP connection may be an Ethernet cable, wifi connection, 3G/4G data connection or similar.  They receive the LoRa communication from the node devices and forward the message to a network server over their IP connection.  The idea is that a single gateway can handle thousands of nodes and provide LoRaWAN coverage over a large area (typically multiple kilometre areas)
  • network server: the gateways send the messages they receive to a network server.  The network server handles de-duplication of messages (as messages can be received by multiple gateways) and forwards the messages onto the correct application server
  • application server: The LoRaWAN messages terminate here, it handles the message encryption, data storage, network joining (node devices joining/registering to the network).

Device classes

In LoRaWAN, devices can operate in three different ways:

  • Class A: A device has it’s radio powered down for the majority of the time, it wakes up when it wants to send data.  After transmission, it briefly listens for a message coming back to it, then goes back to sleep.  This means that you can only send messages back to a device every so often.  It is designed for battery powered sensors such as a temperature monitoring device which sends the temperature every 15 minutes
  • Class B: This is similar to class A except the device will also power up it’s radio and listen for messages at scheduled times set by a scheduling beacon sent by gateways.  This is useful for devices which you need to be able to send a message to more reliably.
  • Class C: These devices have their radio powered on almost all of the time.  The only time they can’t receive is when they are transmitting a message.  It is designed for mains powered devices such as an actuator which you need to be able to control at any possible time.

Key Attributes

  • Long range: LoRa uses chirp spread spectrum modulation to provide usable communication over a long distance.  Typically 10km is quoted, much longer distances are possible, much shorter distances may be experienced in circumstances such as city centres with lots of buildings and therefore poor line of sight
  • Low power: LoRaWAN is asynchronous, devices communicate only when they have data ready to be sent.  This is known as the Aloha method.  There is no synchronisation needed when a device transmits, it simply wakes up, sends a message and goes back to sleep.  This simplicity gives LoRaWAN it’s low power characteristics.  The LoRa radio modulation helps too as large distances can be covered with low transmission power.  LoRaWAN also supports adaptive data rates meaning devices closer to gateways can reduce their transmission power even more.  The idea is that sensors running off single small batteries will last years
  • Low cost: because LoRa uses ISM frequency bands, you can operate your own LoRaWAN radio network without having to pay for air space.   You must adhere to the regulations in the area you operate.  You can purchase a gateway and a number of sensors and operate your own LPWAN for a low cost
  • Security: LoRaWAN incorporates two layers of security.  Network security layer ensures authenticity of the node in the network.  Application layer security handles encryption of data between the nodes and the application server so messages cannot be read or interfered with in transit.  AES encryption is used with a key exchange between the server and the node.  It is also possible (and some would argue desirable) to build an extra layer of application security on top of LoRaWAN in your own application, such as using TLS certification verification.
  • Low data rate: the actual data rates vary from region to region but in Europe, 250bps to 5.5kbps is typical.  Clearly this is no use for web browsing, phone calls, watching Netflix etc…  Is it designed for tiny amounts of data from simple devices such as sensors

Further reading

https://www.lora-alliance.org/sites/default/files/2018-04/what-is-lorawan.pdf

https://en.wikipedia.org/wiki/LoRa

https://www.thethingsnetwork.org/docs/lorawan/