CoderTools

LoRaWAN Decoder

Parse and build LoRaWAN protocol packets

🔒 100% Local ProcessingYour input data is processed entirely in your browser. It is not uploaded to any server.

Paste PHYPayload captured from gateway, network server, or packet forwarder logs

Example Packets

Decoded Result

Enter packet data and click Decode to see results

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.

MHDR
1 byte
|
DevAddr
4 bytes
|
FCtrl
1 byte
|
FCnt
2 bytes
|
FOpts
0-15 bytes
|
FPort
0-1 byte
|
FRMPayload
N bytes
|
MIC
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
0000x00Join Request
0010x20Join Accept
0100x40Unconfirmed Data Up
0110x60Unconfirmed Data Down
1000x80Confirmed Data Up
1010xA0Confirmed Data Down
1100xC0Rejoin Request
1110xE0Proprietary

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.

Quick Menu

No recent tools