LoRa Protocol Stack: Exploring the Physical Layer
Advertisement
The LoRa protocol stack, distinguished by its unique physical layer, is engineered to facilitate long-range, low-power wireless communication. The LoRa physical layer leverages Chirp Spread Spectrum (CSS) modulation to ensure robust communication, even in challenging environments. A thorough understanding of the LoRa physical layer’s characteristics is essential for maximizing the LoRa protocol’s potential, thus enabling dependable data transmission across extended distances.
LoRa Physical layers for different country wide ISM bands and LoRa MAC Layer including different MAC message formats and MAC commands have been explained. As shown in the figure-1 below, LoRa protocol stack consists of following protocol layers:
- LoRa Application Layer
- LoRa MAC Layer
- LoRa PHY Layer
- LoRa RF Layer
LoRa protocol stack
LoRa frames encompass both uplink and downlink messages. The LoRa system supports three classes of devices, and the LoRa frame structure is influenced by these classes.
Uplink messages are transmitted from end devices to the server through one or more gateways. Downlink messages, conversely, are transmitted from the server to only one LoRa end device, via a single gateway connected to the network server.
Read documentation on different LoRaWAN classes for a more in-depth look at the types of frames supported in the LoRa system.
LoRa message formats
Functions of the LoRa Physical Layer (PHY)
The LoRa Physical Layer (PHY) performs the following key functions:
- The PHY constructs the frame to transmit the payload from the MAC layer over an RF link.
- It adds PHDR, PHDR_CRC, a preamble, and CRC fields for the entire frame. Note that the CRC field is present only in uplink messages.
- Specific constant sync words are used as a preamble, contingent on the modulation technique employed (LoRa, GFSK, or FSK). This preamble aids in synchronization at the receiver, as it is known in advance.
- The PHY layer utilizes specific RF bands tailored to each country’s requirements.
LoRa MAC Layer
The following MAC messages are used in LoRa for establishing communication between end device and server.
- Join request (From End device to Server)
- Join accept (from network server to End device)
- Beacon frame (from gateway to End device) for scheduling slot for reception by End devices.
- Confirmed Data Up/Down (This messages are to be acknowledged by LoRa receiver)
- Unconfirmed Data Up/Down (This messages do not require any ack).
Here Up stands for uplink transmission and Down stands for downlink transmission.
The following table describes the LoRa MAC message fields, as illustrated in Figure 2 above.
LoRa MAC message field | Description |
---|---|
MHDR | MAC Header, Single octet long |
MAC Payload | Data from upper layer |
MIC | Message Integrity Code, 4 octet long |
FHDR | Frame Header |
FPort | Optional port field |
FRMPayload | Optional Frame Payload field |
Devaddr | Device address |
FCtrl | Frame Control Octet |
FCnt | Frame Counter, 2 octets long |
FOpts | Frame Options used to transport MAC commands, 15 octets long |
Note: Information provided on this page is derived from LoRaWAN Specification V1.0 released on Jan.2015 by LoRa™ Alliance. Read latest specifications published by LoRa Alliance (https://www.lora-alliance.org).
Conclusion
The LoRa physical layer serves as the bedrock of the LoRa protocol stack, providing critical modulation techniques and channel characteristics that define its performance. By carefully adjusting parameters such as spreading factors and bandwidth, users can optimize their LoRa-based applications for enhanced efficiency and coverage. A solid grasp of the LoRa physical layer is paramount for the successful deployment of IoT solutions using LoRa technology.