📜 ⬆️ ⬇️

LoRaWAN specification. Endpoint Activation

Continued. Specification LoRaWAN 1.0.2.
Start: LoRaWAN Specification. Introduction Endpoint Concepts and Classes


To join the LoRaWAN network, the end device must go through the End-Device Activation procedure. The specification provides two options for activating devices:


After activation, the device must contain the following values:



Air Activation - Over-The-Air Activation


When OTAA is activated, the terminal device must go through the procedure of joining the network each time when session information (local address DevAddr, keys NwkSKey, AppSKey) is absent or irrelevant in the device. Before the attachment procedure, the device should record:
')

Attachment Procedure with OTAA Activation


The join procedure is always initiated by the terminal device and consists of two messages exchanged between the terminal device and the network server: join request (device → server) and join accept (server → device).

The join request message contains AppEUI, DevEUI, and a random number DevNonce:
Join Request
8 bytes8 bytes2 bytes
AppEUIDevEUIDevnonce

For each endpoint device, the network server remembers the DevNonce values ​​that were used before and ignores queries containing duplicate DevNonce values.
In response to the join request, the server sends a message to accept accept.
Join Accept
3 bytes3 bytes4 bytes1 byte1 byte16 bytes
AppnonceNetidDevaddrDlsettingsRxdelayCFList

Where:

AppNonce is a random number.
NetID - network identifier.
DevAddr — device address on the network.
DLSettings - parameters used for downstream messages (server -> device).
RxDelay is the delay between the end of the transfer of a terminal device and the beginning of the Rx1 receive window (what a receive window is - see the LoRaWAN Specification. Introduction. Basic concepts and classes of end devices ).
CFList - a list of additional frequency channels that can be used by the terminal device.

The DLSettings [8 bit] field has the following format:
Dlsettings
7th bitbits 6 ... 4bits 3 ... 0
RFURX1DRoffsetRX2 Data rate

Where:

RFU - Reserved for Future Use, not used.
RX1DRoffset is the difference between the data rates on the uplink and downlink, used for the first Rx1 receive window. The default is 0.
RX2 Data rate - the rate used for the second receive window Rx2.

DevNonce and AppNonce random numbers are used in the calculation of the NwkSKey and AppSKey session keys.

Activation by Personalization - Activation By Personalization


“Activation by personalization” means that DevAddr , NwkSKey and AppSKey values ​​are directly written to the device (the device is being personalized). According to the specification, each device must contain unique values ​​for the NwkSKey and AppSKey session keys, so that the compromise of these values ​​contained in one device does not lead to the compromise of other devices on the network.

With this method of activation, the terminal device does not need to go through the procedure of joining the network, immediately after switching on the device is ready for data transfer.

Related Links:

Source: https://habr.com/ru/post/317218/


All Articles