LoRaWAN Encode/Decode
Online LoRaWAN encode/decode tool with PHYPayload parsing, uplink/downlink frame building, and airtime calculation for LPWAN debugging, protocol study, and link optimization.
Paste PHYPayload captured from gateways, network servers, or packet forwarder logs
Example Packets
Decoded Result
Enter packet data to decode LoRaWAN frame automatically
LoRaWAN Protocol Guide
Overview
LoRaWAN is a MAC protocol for low-power wide-area networks. It builds on LoRa modulation to provide long-range and low-power communication for smart city, agriculture, industrial IoT, and utility metering scenarios.
PHYPayload Structure
Each LoRaWAN packet contains MHDR, MACPayload, and MIC. MHDR defines message type and protocol version, while MIC protects integrity and authenticity.
Message Types
Join Request and Join Accept are used for OTAA activation. Data frames carry application payloads and can be confirmed or unconfirmed. Proprietary frames support vendor extensions.
| MType | Binary | Description |
|---|---|---|
| 000 | 0x00 | Join Request |
| 001 | 0x20 | Join Accept |
| 010 | 0x40 | Unconfirmed Data Up |
| 011 | 0x60 | Unconfirmed Data Down |
| 100 | 0x80 | Confirmed Data Up |
| 101 | 0xA0 | Confirmed Data Down |
| 110 | 0xC0 | Rejoin Request |
| 111 | 0xE0 | Proprietary |
MAC Payload
For data frames, MACPayload includes FHDR, optional FPort, and FRMPayload. FHDR contains DevAddr, FCtrl, FCnt, and optional FOpts.
Security Model
LoRaWAN uses AES-128 with two session keys: NwkSKey for network security (MIC and MAC commands) and AppSKey for application payload encryption.
Airtime Calculation
Airtime depends on SF, BW, CR, payload size, and header mode. Accurate airtime helps duty-cycle compliance, link budgeting, and network capacity planning.
Regional Parameters
LoRaWAN regional plans such as EU868, US915, AS923, and AU915 define channels, data rates, and regulatory limits. Always follow local specifications in deployment.