LoRaWAN MAC layer

LoRaWAN represents the MAC that resides on top of a LoRa PHY. The LoRaWAN MAC is an open protocol while the PHY is closed. There are three MAC protocols that are part of the data link layer. These three balance latency with energy usage. Class-A is the best for energy mitigation while having the highest latency. Class-B is between Class-A and Class-C. Class-C has minimum latency but the highest energy usage. 

Class-A devices are battery based sensors and endpoints. All endpoints that join a LoRaWAN network are first associated as Class-A with the option of changing class during operation. Class-A optimizes power by setting various Receive Delays during transmission. An endpoint starts by sending a packet of data to the gateway. After the transmission, the device will enter a sleep state until the Receive Delay timer expires. When the timer expires, the endpoint wakes and opens a receive slot and awaits a transmission for a period of time and then re-enters the sleep state. The device will wake again as another timer expires. This implies that all downlink communication occurs during a short period of time after a device sends a packet uplink. That period can be an extremely long time. 

Class-B devices balance power and latency. This type of device relies on a beacon being sent by the gateway at regular intervals. The beacon synchronizes all endpoints in the network and is broadcast to the network. When a device receives a beacon, it creates a ping slot which is a short reception window. During these pin slot periods, messages can be sent and received. At all other times, the device is in a sleep state. Essentially this is a gateway-initiated session and based on a slotted communication method.

Class-C endpoints use the most power but have the shortest latency. These devices open two Class-A receive windows as well as a continuously powered receive window. Class-C devices are usually powered on and may be actuators or plug-in devices. There is no latency for the downlink transmission. Class-C devices cannot implement Class-B. 

The LoRa/LoRaWAN protocol stack can be visualized as follows:

LoRa and LoRaWAN Protocol Stack. Comparison to standard OSI model. Note: LoRa/LoRaWAN represents only layer 1 and layer 2 of the stack model.

LoRaWAN security encrypts data using the AES128 model. One difference in its security from other networks is LoRaWAn separates authentication and encryption. Authentication uses one key (NwkSKey), and user data a separate key (AppSKey). To join a LoRa network, devices will send a JOIN request. A gateway will respond with a device address and authentication token. The application and network session keys will be derived during the JOIN procedure. This process is called the Over-the-Air-Activation (OTAA). Alternatively, a LoRa-based device can use Activation by Personalization. In this case, a LoRaWAN carrier/operator preallocates 32-bit network and session keys and a client will purchase a connectivity plan and appropriate set of keys. The keys will be ordered from an endpoint manufacturer with the keys burnt into the device.

LoRaWAN is an asynchronous, ALOHA-based protocol. The pure ALOHA protocol was initially devised at the University of Hawaii in 1968 as a form of multiple access communication before technologies such as CSMA existed. In ALOHA, clients can transmit messages without knowing if other clients are in the process of transmitting simultaneously. There are no reservations or multiplexing techniques. The basic principle is the hub (or gateway in the case of LoRaWAN) immediately retransmits packets it has received. If an endpoint notices one of its packets was not acknowledged then it will wait then retransmit the packet. In LoRaWAN, collisions only occur if transmissions use the same channels and spreading frequency. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.134.29