How LoRaWAN Works: A Technical Deep Dive
How LoRaWAN Works: A Technical Deep Dive into LoRaWAN Protocols
LoRaWAN is more than just a radio link—it’s a full networking protocol stack designed specifically for low-power, long-range IoT applications. In this deep dive, we’ll unpack the LoRaWAN protocol, examine its layered architecture, walk through packet structure, and explain how features like Adaptive Data Rate keep your network reliable and efficient.
At its core, LoRaWAN sits on top of Semtech’s LoRa® physical layer (PHY) to provide a lightweight Medium Access Control (MAC) layer suited for battery-powered devices. Key characteristics of the LoRaWAN protocol include:
-
Star-of-stars topology: End devices → Gateways → Network Server → Application Server
-
Unlicensed ISM bands: 862–870 MHz (EU), 902–928 MHz (US)
-
Optimized for small, infrequent payloads: Uplink payloads typically < 50 bytes
LoRaWAN handles network management tasks—like device activation, downlink scheduling, and security—while offloading raw radio work to the LoRa PHY.
LoRa modulation uses a proprietary form of Chirp Spread Spectrum (CSS), which trades data rate for sensitivity and range. Important PHY parameters:
-
Spreading Factor (SF): 7–12. Higher SF → longer range, lower data rate.
-
Bandwidth (BW): Commonly 125 kHz; also 250 kHz and 500 kHz. Wider BW → higher data rate.
-
Coding Rate (CR): 4/5–4/8. Adds forward-error correction.
By adjusting SF, BW, and CR, LoRa PHY can achieve link budgets up to 157 dB—translating to several kilometers of reliable connectivity.
The LoRaWAN layers split responsibilities between the PHY and MAC. The MAC layer implements:
1. Device Activation
- OTAA (Over-The-Air Activation): Dynamic AppKey-based join procedure.
- ABP (Activation By Personalization): Static session keys.
Class | Downlink Behavior | Typical Use Case |
---|---|---|
A | Two short receive windows after uplink | Battery-critical sensors |
B | Scheduled receive slots (beacons) | Bi-directional control |
C | Almost continuous listening (minus TX) | Actuators requiring low latency |
3. Adaptive Data Rate (ADR)
ADR dynamically optimizes SF and transmit power per end device, balancing network capacity and battery life.
Every LoRaWAN packet consists of:
MHDR │ MACPayload │ MIC
-
MHDR (1 byte): Message type (JoinReq, DataUp, DataDown, etc.).
-
MACPayload:
-
FHDR: DevAddr (4 bytes), FCtrl (1 byte), FCnt (2 bytes), FOpts (0–15 bytes)
-
FPort (1 byte): Application port (0 = MAC commands).
-
FRMPayload: Encrypted sensor data or MAC commands.
-
-
MIC (4 bytes): Message integrity code for end-to-end security.
| MHDR | DevAddr | FCtrl | FCnt | FOpts | FPort | FRMPayload | MIC |
This compact structure keeps overhead to a minimum—crucial for conserving airtime and battery life.
LoRaWAN uplink data rates vary by region:
-
EU868: SF12 (0.3 kbps) → SF7 (5.5 kbps)
-
US915: SF10 (0.3 kbps) → SF7 (5 kbps)
ADR works as follows:
-
Network Server monitors uplink SNR and packet loss.
-
Calculates optimal SF and transmit power.
-
Sends LinkADRReq MAC command on downlink.
-
End device adjusts its radio settings accordingly.
By reducing SF when link quality is high, ADR boosts throughput and frees up radio capacity for other nodes.
LoRaWAN secures both the network and application layers using AES-128 encryption:
-
NwkSKey: Ensures authenticity and integrity between end device and Network Server.
-
AppSKey: Encrypts/decrypts application payload between end device and Application Server.
Keys are uniquely derived per device, and OTAA provides a secure join handshake. Always rotate your AppKey and maintain tight access controls on your Network Server to uphold security best practices.
For a high-level overview of LoRaWAN and how it powers modern IoT solutions, see our LoRaWAN Technology: The Ultimate Guide. To compare LoRaWAN against other LPWAN standards, check out LoRaWAN vs. NB-IoT & Other LPWANs. And when you’re ready to connect sensors, our Hardware Guide: Selecting Gateways & Sensors walks you through choosing the right gear.
-
Experiment with ADR: Spin up a private Network Server (e.g., ChirpStack) and test ADR tuning.
-
Decode Packets in Real Time: Use a LoRa packet sniffer to inspect MHDR, FHDR, and MIC fields.
-
Secure Your Deployment: Review our LoRaWAN Security Best Practices for production-grade setups.
With this technical foundation, you’re ready to architect robust, scalable LoRaWAN networks—and integrate them seamlessly into ioX-Connect for real-time monitoring, alerts, and analytics. Check out our plug-and-play LoRaWAN hardware.
Frequently Asked Questions about LoRaWAN Sensors
Please reach out to us at: sales@iox-connect.com if you have any additional questions that are not addressed below. You can also check out our content library for more information and content on wireless sensors and IoT.
Latest blog posts
Check out the latest from the ioX Journal
- ioX-Connect
- June 9, 2025
- Ockert Fourie
- June 2, 2025
- Ockert Fourie
- May 5, 2025