In this post, we try to talk about the fundamentals of LoRaWAN.
LoRa is a wireless modulation technique. It is a physical layer implementation. This is derived from Chirp Spread Spectrum (CSS) technology. It encodes information on radio waves using chirp pulses. This is similar to the way that bats and dolphins communicate. This makes the modulated transmission resilient to disturbances and travel great distances. This makes it resilient to background disturbances.
LoRa appliances use the ALOHA protocol, which means that they can wake up when needed
LoRa is ideal for applications that transmit small chunks of data with low bit rates. Data can be transmitted at a longer range compared to technologies like WiFi, Bluetooth, or ZigBee. These features make LoRa well-suited for sensors and actuators that operate in low-power mode.
Internationally there are frequencies reserved for Industrial, Scientific, and Medical purposes called ISM Bands. It can also operate on the sub gigahertz, license-free spectrum, and 2.4GHZ
LoRaWAN is a MAC (Media Access Control layer) protocol built on top of LoRa modulation. It defines how the devices use the LoRa hardware when they transmit and format messages.
LoRaWAN is suitable for transmitting small-size payloads over large distances. They provide a significant communication range with low bandwidths over large distances.
LoRaWAN is pretty useful because
- Ultra-low power – LoRaWAN end devices are optimized to operate in low power mode and can last up to 10 years on a single coin cell battery.
- Long range – LoRaWAN gateways can transmit and receive signals over a distance of over 10 kilometers in rural areas and up to 3 kilometers in dense urban areas.
- Deep indoor penetration – LoRaWAN networks can provide deep indoor coverage, and easily cover multi-floor buildings.
- License-free spectrum – You don’t have to pay expensive frequency spectrum license fees to deploy a LoRaWAN network.
- Geolocation– A LoRaWAN network can determine the location of end devices using triangulation without the need for GPS. A LoRa end device can be located if at least three gateways pick up its signal.
- High capacity – LoRaWAN Network Servers handle millions of messages from thousands of gateways.
- Public and private deployments – It is easy to deploy public and private LoRaWAN networks using the same hardware (gateways, end devices, antennas) and software (UDP packet forwarders, Basic Station software, LoRaWAN stacks for end devices).
- End-to-end security– LoRaWAN ensures secure communication between the end device and the application server using AES-128 encryption.
- Firmware updates over the air – You can remotely update firmware (applications and the LoRaWAN stack) for a single-end device or group of end devices.
- Roaming– LoRaWAN end devices can perform seamless handovers from one network to another.
- Low cost – Minimal infrastructure, low-cost end nodes, and open-source software.
- Certification program– The LoRa Alliance certification program certifies end devices and provides end-users with confidence that the devices are reliable and compliant with the LoRaWAN specification.
- Ecosystem– LoRaWAN has a very large ecosystem of device makers, gateway makers, antenna makers, network service providers, and application developers.
There are multiple use cases that can be constructed with LoRaWAN, these include
- Vaccine cold chain monitoring – LoRaWAN sensors are used to ensure vaccines are kept at appropriate temperatures in transit.
- Animal conservation – Tracking sensors manage endangered species such as Black Rhinos and Amur Leopards.
- Dementia patients – Wristband sensors provide fall detection and medication tracking.
- Smart farms– Real-time insights into crop soil moisture and optimized irrigation schedules reduce water use by up to 30%.
- Water conservation– Identification and faster repair of leaks in a city’s water network.
- Food safety– Temperature monitoring ensures food quality maintenance.
- Smart waste bins – Waste bin level alerts are sent to staff to optimize the pickup schedule.
- Smart bikes– Bike trackers track bikes in remote areas and dense buildings.
- Airport tracking – GPS-free tracking monitors vehicles, personnel, and luggage.
- Efficient workspaces – Room occupancy, temperature, energy usage, and parking availability monitoring.
- Cattle health – Sensors monitor cattle health, detect diseases, and forecast calf’s delivery time.
- LoRa in space – Satellites to provide LoRaWAN-based coverage worldwide.
Certification provided by LoRaWAN alliance – The LoRa Alliance provides LoRaWAN certification for end devices. Certified end devices provide users with confidence that the end device is reliable and compliant with the LoRaWAN specification.
The LoRaWAN network is deployed in a star-of-stars topology. See below
It typically consists of the elements that will be found in any IoT architecture i.e. end devices, gateways, application services, and the network.
- End Devices – sensors or actuators send LoRa-modulated wireless messages (called uplink messages) to the gateways or receive messages wirelessly back from the gateways. These can be a sensor, an actuator, or both. Sensors and actuators often work in tandem, but they are essentially opposite devices. A sensor monitors conditions and signals when changes occur. An actuator receives a signal and acts, often in the form of movement in a mechanical machine. These are battery-operated and connect with the gateways using LoRa Radio Frequency modulation
- Gateways – receive messages from end devices and forward them to the Network Server. Each gateway is registered to the LoRaWAN network server. A gateway is connected to the network using either cellular (3G, 4G, 5G) or WiFi or Ethernet, fiber-optic or 2.4GHz links. The gateways can be internal or external. Internal has a lower range, is cost-effective, and can provide deeper indoor locations. Outdoors have a larger range and provide coverage in rural and urban settings, they usually have an external antenna connected with a coaxial cable
- Network Server – a piece of software running on a server that manages the entire network.
- A typical LoRaWAN Network Server has the following features.
- Establishing secure 128-bit AES connections for the transport of messages between end devices and the Application Server (end-to-end security).
- Validating the authenticity of end devices and integrity of messages.
- Deduplicating uplink messages.
- Selecting the best gateway for routing downlink messages.
- Sending ADR commands to optimize the data rate of devices.
- Device address checking.
- Providing acknowledgments of confirmed uplink data messages.
- Forwarding uplink application payloads to the appropriate application servers
- Routing uplink application payloads to the appropriate Application Server.
- Forwarding Join-request and Join-accept messages between the devices and the join server
- Responding to all MAC layer commands.
- Application servers – a piece of software running on a server that is responsible for securely processing application data. It is also responsible for sending the downlink payloads to the end devices through the network server. The collected data can be interpreted by applying techniques like machine learning and artificial intelligence to solve business problems.
LoRaWAN networks use an ALOHA-based protocol, so end devices don’t need to peer with specific gateways. Messages sent from end devices travel through all gateways within range. These messages are received by the Network Server. If the Network Server has received multiple copies of the same message, it keeps a single copy of the message and discards others. This is known as message deduplication.