Professional Documents
Culture Documents
2 - LoRaWAN™ Advanced Presentation - 20211119
2 - LoRaWAN™ Advanced Presentation - 20211119
2 - LoRaWAN™ Advanced Presentation - 20211119
Advanced Presentation
1
LoRaWAN back-end MAC Commands
2
LoRaWAN back-end
Modifiez le style du titre
The Join Server (JS) manages the Over-the-Air (OTA) End-Device activation process.
There may be several Join Servers connected to a Network Server, and a Join Server
3
may also connect to several Network Servers. The End-Device indicates which Join
Server should be interrogated thanks to the JoinEUI field in the Join-request message.
Each Join Server is identified by a unique JoinEUI value.
Note that AppEUI field of the Join-request in LoRaWAN 1.0/1.0.2 [LW10, LW102] is
renamed to JoinEUI field.
The Join Server knows the End-Device’s Home Network Server identifier and provides
this information to the other Network Servers when required by the roaming
procedures.
The Join Server contains the required information to process uplink Join-request
frames and generate the downlink Join-accept frames. It also performs the network
and application session key derivations. It communicates the Network Session Key of
the End-Device to the Network Server, and the Application Session Key to the
corresponding Application Server.
The Application Server (AS) handles all the application layer payloads of the
associated End-Devices and provides the application-level service to the end-user. It
also generates all the application layer downlink payloads towards the connected
End-Devices.
3
Message format
Modifiez le style du titre
The frame port is optional and used only when there is a payload; it indicates what is
the frame contents:
• A value of 0 indicates MAC commands only
• Values 1-223 are application specific
• Values 224-255 are reserved for future use
The MAC commands are control commands used to setup the physical layer
parameters:
• Link Check commands
• Link ADR commands
• End-Device Transmit Duty Cycle
• Receive Windows Parameters
4
• End-Device Status
• Creation/Modification of a channel
• Setting delay between TX and RX
These commands control the LoRa features. ADR stands for Adaptive Data Rate,
which means that the LoRa communication is automatically controlled depending on
the radio conditions, to maximize speed while keeping a sufficient SNR.
Each end-device has two frame counters to keep track of the number of data frames
sent uplink to the network server (FCntUp) and the number of frame received by the
end-device downlink from the network server (FCntDown).
Fcountup is incremented by the end-device and FCountDown is incremented by the
network server.
The network server tracks the uplink frame counter and generates the downlink
counter for each end-device. After a join accept, the frame counters on the end-
device and the frame counters on the network server for that end-device are reset to
0.
Subsequently, FCntUp and FCntDown are incremented at the sender side by 1 for
each data frame sent in the respective direction. At the receiver side, the
corresponding counter is kept in sync with the received value. The received value is
compared to the current counter value and is less than the value specified by
MAX_FCNT_GAP 1 after considering counter rollovers. If this difference is greater
than the value of MAX_FCNT_GAP then too many data frames have been lost then
subsequent will be discarded.
4
Regional Parameters
Modifiez le style du titre
LoRaWAN operates in unlicensed radio spectrum. This means that anyone can
use the radio frequencies.
LoRaWAN has official regional specifications, called Regional Parameters, that
you can download from the LoRa Alliance website.
5
• JOIN_ACCEPT_DELAY1
• JOIN_ACCEPT_DELAY2
• MAX_FCNT_GAP
• ADR_ACK_LIMIT
• ADR_ACK_DELAY
• ACK_TIMEOUT
5
DUTY
Modifiez le CYCLE
style du titre
• The European regulations require that a LoRa Device does not transmit more than 1% of the
time in a defined sub-band
• Example
• The transmission time of a frame is called Time On Air
• Sending a 20 bytes message in LoRaWAN in SF7 gives a Time On Air of 72ms
• For a Time On Air of 72ms and a duty cycle of 1%, the LoRa end-device:
• Can transmit during 3600s x1%=36s i.e. 36/0.072 = 500 messages per hour
• Can’t transmit during 3600x99%= 3564s per hour
The Duty Cycle indicates the fraction of time a resource is busy. Indeed, the
European regulations require that a LoRa end-device does not transmit more than
1% of the time in a defined sub-band.
Let’s take an example. The transmission time of a frame is called the Time On Air.
Sending a 20 bytes message in LoRaWAN in SF7 gives a Time On Air of 72ms.
For a Time On Air of 72ms and a duty cycle of 1%, the LoRa end-device can transmit
during 36s i.e. 500 messages per hour. It can’t so transmit during 3564s per hour
6
Listen Before
Modifiez le style du titre Talk (LBT)
Overview
• Several techniques are used worldwide to share the spectrum of unlicensed bands between users:
➢ Frequency hopping
➢ Duty Cycle
➢ LBT
• LBT consists in checking a channel is not used by another user before transmitting on this channel to avoid a sent packet whereas
another transmission is in progress in the air:
➢ This mechanism uses a sx1272 chip to monitor in continuous the RF link through an FPGA.
➢ When the HAL wants to send a RF packet, the FPGA knows if the LBT requirement is satisfied or not.
• LBT is optional in many EMEA countries (ETSI regulation) but mandatory in Korea and Japan:
➢ LBT is also known as “carrier sense” in Korea and Japan
➢ In Japan, LBT is used simultaneously with Duty Cycle and Maximum Transmission Time constraints
Parameters
• Frequencies: the monitored channels that would be used for the transmission
• Scan time: the duration of the scan
• Threshold (RSSI): level from which the channel is considered busy
• Maximum transmit time (depending on the applicable regulation)
• Duty cycle (depending on the applicable regulation)
Several techniques are used worldwide to share the spectrum of unlicensed bands
between users. We’ve just seen Duty Cycle in Europe. Now let’s have a look on LBT.
LBT means Listen Before Talk. It is optional in many EMEA countries (ETSI regulation)
but mandatory in Korea and Japan.
LBT consists in checking a channel is not used by another user before transmitting on
this channel to avoid a sent packet whereas another transmission is in progress in the
air. This mechanism uses a sx1272 chip to monitor in continuous the RF link through
an FPGA. When the HAL wants to send a RF packet, the FPGA knows if the LBT
requirement is satisfied or not.
7
MAC
Modifiez leCommands
style du titre
• Used for network administration (Link Check, ADR, Transmit Duty Cycle, Receive Windows Parameters, …)
• MAC layer commands are never visible to the application server or application on end-device
• Can be sent:
• In the FOpts of a frame header (Must not exceed 15 octets, not cyphered)
• In the FRMPayload field with the FPort field being set to 0 (cyphered)
The MAC commands are used for network administration. They are exchanged
between the Network Server and the end-device.
They can be sent in the FOpts of a frame header (Must not exceed 15 octets, not
cyphered) or in the FRMPayload field with the FPort field being set to 0 (cyphered)
8
Example:
Modifiez le style dunew
titre channel request
The channel index (ChIndex) is the index of the channel being created or modified.
Depending on the region and frequency band used, in certain regions ([PHY]) the
LoRaWAN specification imposes default channels which must be common to all
devices and cannot be modified by the NewChannelReq command. If the number of
default channels is N, the default channels go from 0 to N-1, and the acceptable
range for ChIndex is N to 15. A device must be able to handle at least 16 different
channel definitions. In certain regions the device may have to store more than 16
channel definitions.
The frequency (Freq) field is a 24 bits unsigned integer. The actual channel frequency
in Hz is 100 x Freq whereby values representing frequencies below 100 MHz are
reserved for future use. It allows to set the frequency of a channel anywhere
between 100 MHz to 1.67 GHz in 100 Hz steps. A Freq value of 0 disables the
9
channel. The end-device MUST check that the frequency is allowed by its radio
hardware and return an error otherwise.
The data-rate range (DrRange) field specifies the uplink data-rate range
allowed for this channel. The field is split in two 4-bit indexes.
The minimum data rate (MinDR) subfield designates the lowest uplink data
rate allowed on this channel.
The maximum data rate (MaxDR) subfield designates the highest uplink data
rate allowed on this channel.
9
Example:
Modifiez le style dunew
titre channel answer
10
Adaptative Data Rate - ADR
Modifiez le style du titre
Adaptive Data Rate (ADR) is a mechanism for optimizing data rates, airtime and
energy consumption in the network.
The ADR mechanism controls the following transmission parameters of an end
device.
• Spreading factor
• Bandwidth
• Transmission power
ADR can optimize device power consumption while ensuring that messages
are still received at gateways. When ADR is in use, the network server will
indicate to the end device that it should reduce transmission power or increase
data rate. End devices which are close to gateways should use a lower
spreading factor and higher data rate, while devices further away should use a
high spreading factor because they need a higher link budget.
11
CFLIST : Channel
Modifiez le style du titre Frequency list
• List of 5 channel frequencies for the channels 3 to 7
• Each frequency is encoded as a 24 bits unsigned integer (three octets)
• LoRaWAN implements this CFList of 16 bytes in the JoinAccept message
• The format of the CFList is region dependent and is defined in [PHY]
• CFList contains either a list of frequencies or a ChMask fields
• The MAC layer parameters (except RXdelay1, RX2 data rate, and RX1 DR Offset that are
transported by the join-accept message) SHALL all be reset to their default values
The CFList is a list used to specify to the LoRa end-devices the 5 customizable
channels available for this network in addition to the 3 mandatory channels 0 to 2
(which cannot be changed).
Each frequency is encoded as a 24 bits unsigned integer (three octets)
LoRaWAN implements this CFList of 16 bytes in the JoinAccept message
The format of the CFList is region dependent and is defined in [PHY]
CFList contains either a list of frequencies or a ChMask fields
12
CFLIST : examples
Modifiez le style du titre
Here is the example of the join accept frame allowing to share the CFList with the
end-devices.
We can see that the format of the CFList is region-dependent.
13
CRC
Modifiezand MIC
le style du titre
The CRC checks that the RF transmission is correct. It is done by the radio transceiver.
The MIC checks that packets are not corrupted. It is AES and NwkSIntKey dependent.
It protects from Man In the Middle attacks.
14
Thank you
15