Research on MAC Layer Protocol Based on LoRa Standard

Sun Man, Zhang Naiqian, Jin Libiao, Yu Shaobo


Keywords: LoRa; ultra-narrow band; Internet of Things; low power; long distance

In recent years, the Internet of Things (IoT) has gained widespread attention and has made significant progress. However, there is still a lack of dedicated network protocols for connecting IoT devices. As the name suggests, the IoT aims to connect physical objects, enabling them to communicate and exchange data. While both mobile internet and IoT rely on wireless connections, they differ fundamentally in their purpose. Mobile internet connects people, while IoT focuses on linking objects and facilitating information exchange between them. The frequency of connection differs significantly—mobile devices are usually always online, whereas IoT devices only connect when necessary, often remaining in a low-power or inactive state otherwise. During this "waiting" phase, IoT devices can release spectrum resources and avoid unnecessary energy consumption, making traditional wireless networks unsuitable for IoT applications. This has led to the development of specialized networks that activate only when needed, with ultra-narrowband modulation being an ideal solution. Such technology can support millions of devices with minimal infrastructure. To meet the requirements of low power consumption and wide coverage, the concept of Low-Power Wide Area Networks (LPWAN) was introduced. Several technologies, including LoRa, Sigfox, LTE-M, and NWave, are applicable to LPWAN.


Among these, Sigfox is a commercialized LPWAN technology that uses ultra-narrowband communication to create a low-cost, low-power private IoT network. It operates on a 160 Hz sub-channel within a 200 kHz bandwidth, achieving a data rate of 160 bit/s. LTE-M, developed by 3GPP in Release 13, offers low power consumption, low data rates, and high coverage, making it suitable for IoT. It can reduce transmission power by 20 dBm and supports uplink speeds of 150 Mbps and downlink speeds of 300 Mbps. NWave, based on the Weightless-N protocol, uses 200 Hz sub-channels and virtualized hubs for data transmission.


LoRa, known for its long-range, low-power, and low-data-rate capabilities, has a mature industrial ecosystem and is widely used in large-scale IoT deployments. It uses spread-spectrum modulation, allowing reliable communication even at signal-to-noise ratios below 20 dB. The LoRaWAN protocol, built on top of LoRa, employs a single-hop star topology, reducing power consumption and enabling multiple applications. Compared to other LPWAN technologies, LoRa does not require trade-offs in range or power for data rate, nor does it need additional signal amplification like LTE-M. It also avoids complex data classification like NWave, making it simple and efficient. These advantages have led to its global adoption. This paper explores the LoRaWAN MAC layer protocol in depth.


1 LoRaWAN Protocol

LoRaWAN is a network protocol designed for battery-powered IoT devices, enabling regional, national, or global connectivity. It allows secure two-way communication, mobility, and local services without complex configuration, offering users, developers, and enterprises flexible IoT solutions.


1.1 Network Architecture


The LoRaWAN network follows a star topology, where gateways act as transparent relays between end devices and the central server. End devices communicate with one or more gateways using a single hop via LoRa or FSK. The gateway communicates with the server through standard IP protocols. All nodes are bidirectional, but uplink communication dominates.



Figure 1 LoRaWAN network architecture

Communication between devices and gateways can use various data rates and channel frequencies. Choosing a data rate involves balancing communication range and delay. Different data rates on the same channel do not interfere. To maximize battery life and network capacity, LoRa networks employ ADR (Data Rate Adaptation) to control transmission rates and RF output.


1.2 LoRaWAN Data Frame Structure


Uplink data from the device is relayed by gateways and received by the network server. The frame includes a preamble, PHDR, PHDR_CRC, payload, and CRC. Downlink frames lack one CRC. The MAC frame structure is shown in the following figure.



Figure 2 Uplink physical frame structure


Figure 3 Downlink physical frame structure


Figure 4 MAC layer information frame structure

1.3 Information Transmission Mode


LoRaWAN supports three transmission modes: Class A, B, and C. All devices must support Class A. Class A devices consume the least power and allow two-way communication. After sending an uplink, they open two receive windows to listen for downlinks. Class B adds scheduled receive windows called "Ping Slots," requiring synchronization with a beacon. Class C devices keep the receive window open except during transmission, making them suitable for applications with sufficient power.



Figure 5 Receiving window


Figure 6 Beacon Receive and Ping Slot


Figure 7 Class C receive time slots

2 Implementation of LoRaWAN MAC Layer Protocol

2.1 General Communication Process


The communication process includes terminal activation, joining the network, and data transmission. There are two activation methods: Over-The-Air Activation (OTAA) and Activation By Personalization (ABP). After activation, the device stores DevAddr, AppEUI, NwkSKey, and AppSKey. The device sends a Join Request, and if accepted, receives a Join Accept. If successful, it performs a link check. Data transmission involves setting channels, data rates, and receiving windows. If confirmation is required, the receiver sends a response.



Figure 8 General communication process

For example, when a device sends two confirmed messages, it transmits Data0, increments the counter, and waits for a response. If no reply is received, it retransmits after a timeout.



Fig. 9 Flow chart of two pending confirmation messages

2.2 Data Rate Adaptive Control (ADR)


ADR optimizes data rates, extends battery life, and increases network capacity. When enabled, the server periodically checks for uplink reception. If no downlink response is received, the device requests a rate adjustment. If a response is received, the counter resets; otherwise, the data rate is reduced for the next transmission.


3 Summary

Since the rise of IoT, it has evolved toward large-scale, multi-node, and wide-area applications. LoRa has attracted significant attention due to its ultra-low power consumption, long-range transmission, and support for many nodes. This makes it crucial for promoting IoT in China. This paper analyzes the LoRaWAN MAC layer protocol, discusses communication processes, and summarizes communication modes. It provides valuable insights into LoRa’s application in China’s IoT landscape.


Currently, Actility, a French company, is commercializing LoRaWAN for low-power, long-distance IoT. Its ThingPark platform is the first end-to-end LoRaWAN interoperability solution, supporting various IoT applications. Bouygues Telecom in France began building an IoT network in 2015, aiming to cover 300 towns by year-end. In China, companies like Augek and Nanjing August Smart Technology have launched LoRa modules, applying them in maritime communications, wireless sensor networks, and more. As more Chinese firms join the LoRa alliance, the technology is expected to gain broader adoption in China's IoT ecosystem.

ND Series Alternator Catalogue

Alternator Catalogue 12v 120a Ford, Toyota Alternator Catalogue,Mazda Alternator Catalogue, Ford Alternator Brushes

YIWU JINGHONG AUTO PARTS CO.,LTD , https://en.jhauto.ru