This article is an introduction to LoRaWAN wireless networks, and is based on the LoRaWAN 1.0.2 specification.

Introduction to LoRaWAN
A typical
wireless network LoRaWAN is a collection of
gateways (gateways) that send messages between
end devices (end-devices) and the
central server (Network Server, NS) , and is characterized by a “star-of-the-stars” topology.

Gateways are also called
hubs (concentrators) and
base stations (base stations) . Terminal devices are often called
motes .
')
Communication between the gateways and the central server takes place via standard IP connections, and between gateways and end devices through wireless connections using
broadband modulation LoRa or FSK. LoRa modulation was developed by Semtech and is designed for low-speed wireless data transmission over distances up to several kilometers in unlicensed frequency bands (Europe - 433 and 868 MHz).
The communication between the gateways and the terminal devices is two-way, but it is assumed that the bulk of the data is transferred from the terminal devices to the gateways. LoRa technology provides
a transmission rate in the wireless channel from 0.3 to 50 kbit / s . For channel separation, both a set of frequency channels and data rates are used.
To optimize the system, an
adaptive data rate change
(ADR) (adaptive data rate) is used . The network server evaluates the quality of the signal received from the terminal device and can control both the transmission rate and the transmitter power of this device.
The terminal can transmit data on any available channel and any transmission rate, considering the following:
- Each time a message is transmitted, the frequency channel is randomly selected by the terminal from the list of available channels.
- Before transmitting, the terminal device must ensure that the channel is free (Listen Before Talk, LBT). A channel is considered free if the measured instantaneous RSSI value is less than RSSI_FREE_TH. If the channel is busy, the device switches to another channel and repeats the LBT procedure.
- The terminal device must take into account the limitations of local regulatory authorities regarding the percentage of time during which the device may occupy the frequency channel.
Main advantages of LoRaWAN networks
The main advantages of LoRaWAN wireless networks are due to the use of wideband modulation of LoRa and unlicensed frequency bands. LoRaWAN networks:
- compatible with existing wireless data networks / technologies;
- have high noise immunity;
- capable of serving tens and hundreds of thousands of devices;
- provide a large coverage area and low power consumption of terminal devices.
Applications for wireless networks LoRaWAN
A few words about possible applications:
- reading of gas meters, water, electricity;
- Smart Grid (monitoring of new generation electrical networks;
- monitoring of vehicles and cargo in a certain area (location determination, information on the status of vehicles and cargo);
- monitoring the state of containers / containers in production (petrochemical production, containers for waste production, containers with hazardous substances);
- monitoring of production equipment (reduction of downtime, control parameters, ensuring the safety of personnel);
- smart parking (monitoring the availability of parking spaces);
- garbage can monitoring (optimization of waste recycling processes);
- smart street and other lighting (remote control, condition monitoring);
- weather monitoring;
- control of the state of the hatches (prevention of unauthorized entry);
- control of the presence of harmful substances in the atmosphere;
- collecting data on the state of the environment (pollution, noise, rain, wind, etc.);
- fire alarm;
- building automation (temperature, humidity, gate control, blinds).
LoRaWAN Endpoint Classes
Let us return to the LoRaWAN specification and see what devices there are. At the end of 2016, the specification defines 3 classes of LoRaWAN terminals: A, B, and C, which differ from each other in reception modes. The devices of these classes are bidirectional. Class A is basic and must be supported by all devices.
Class A (required for all)
Class A devices after each transmission open two short time windows for reception (denoted as RX1 and RX2).

The intervals from the end of the transmission to the opening of the first and second time windows can be configured, but must be the same for all devices on this network (RECEIVE_DELAY1, RECEIVE_DELAY2). For the European 868 MHz band, the recommended RECEIVE_DELAY1 is 1 second. The value of RECEIVE_DELAY2 should be (RECEIVE_DELAY1 + 1) second.
Frequency channels used and transmission rates for RX1 and RX2 intervals may vary. Recommended values ​​are given in a separate document - “LoRaWAN Regional Parameters”, available on the
LoRa Alliance website.
Class A devices are the lowest consuming, but to transfer a message from the server to the terminal device, you must wait for the next outgoing message from this device.
Class B (Beacon)
In addition to reception windows defined for class A devices, class B devices open additional reception windows on a schedule. To synchronize the opening time of additional receiving windows, gateways emit beacons. All gateways that are part of the same network must emit beacons simultaneously. The beacon contains a network identifier and a time stamp (UTC).
The use of class B ensures that when polling end devices, the response delay will not exceed a certain amount determined by the beacon period.
Class C (Continuous)
Class C devices are in receive mode almost all the time except for the gaps when they transmit messages. With the exception of the RX1 time window, the terminal uses the RX2 receive parameters.

Class C can be used where it is not necessary to save energy with all the forces (electricity meters) or where it is necessary to interrogate terminal devices at arbitrary points in time.
So, the basics of LoRaWAN and the classes of devices are sorted out a bit - in the next article we will discuss how to activate end devices.
LPWAN related links: