LoRaWAN Decoder
Parse and build LoRaWAN protocol packets
Paste PHYPayload captured from gateway, network server, or packet forwarder logs
Example Packets
Decoded Result
Enter packet data and click Decode to see results
Byte Viewer
Encoded Result
Configure parameters and click Build Packet to generate
Byte Viewer
Airtime Result
Symbol Time
-
Preamble Time
-
Payload Symbols
-
Payload Time
-
Total Airtime
-
Effective Data Rate
-
LoRaWAN Protocol Documentation
LoRaWAN Protocol Overview
LoRaWAN (Long Range Wide Area Network) is a media access control (MAC) protocol for wide area networks designed for low-power devices. Built on top of LoRa physical layer modulation, it enables long-range communication with minimal power consumption. The protocol is standardized by the LoRa Alliance and widely deployed in smart cities, agriculture monitoring, industrial IoT, and utility metering applications.
PHYPayload Structure
Every LoRaWAN packet (PHYPayload) consists of three main parts: a 1-byte MAC Header (MHDR), a variable-length MAC Payload, and a 4-byte Message Integrity Code (MIC). The MHDR defines the message type and protocol version, while the MIC provides authentication and integrity verification.
1 byte
4 bytes
1 byte
2 bytes
0-15 bytes
0-1 byte
N bytes
4 bytes
Message Types
LoRaWAN supports several message types for different purposes. Join Request and Join Accept handle device activation (OTAA). Data messages carry application payloads and can be confirmed (requiring acknowledgment) or unconfirmed. Proprietary messages allow vendor-specific 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 Format
For data messages, the MAC Payload contains a Frame Header (FHDR), an optional Frame Port (FPort), and the encrypted Frame Payload (FRMPayload). The FHDR includes the device address, frame control byte, frame counter, and optional MAC commands (FOpts).
Security Model
LoRaWAN employs AES-128 encryption with two session keys: NwkSKey for network-level security (MIC calculation, MAC command encryption) and AppSKey for application-level payload encryption. This dual-key architecture ensures network operators cannot access application data.
Time-on-Air Calculation
Airtime represents the actual RF transmission duration. It depends on spreading factor (SF), bandwidth (BW), coding rate (CR), payload size, and header configuration. Accurate airtime calculation is essential for duty cycle compliance in ISM bands and network capacity planning.
Regional Parameters
LoRaWAN operates on different frequencies across regions. EU868 uses 868 MHz with 1% duty cycle, US915 uses 902-928 MHz with frequency hopping, AS923 serves Asia-Pacific markets, and AU915 covers Australia. Each region specifies mandatory channels, data rates, and regulatory constraints.
Related Tools
MQTT Codec
Encode and decode MQTT protocol packets with detailed field breakdown, hex viewer, and packet builder
CBOR Codec
Encode and decode CBOR binary format with JSON conversion, hex viewer, and semantic tag support for IoT development
MessagePack Codec
Encode and decode MessagePack binary format - compact, fast, cross-language serialization for efficient data exchange
Base Converter
Convert between binary, octal, decimal, and hexadecimal number systems with custom base support (2-36)