SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
Decodingof LoRaWAN packets
The above screenshotisthe received LoRaWAN packetatthe gatewaywhichneedstobe decoded
to understandif the correctdata are beingsenttoTTN.
From the LoRaWAN packetdata (QNIfASaABAABA/uB+N3FPLnND5ufMW6z) whichis inbase 64
encodedformatisdecodedusing step(1) toobtain FRMpayload.
1. https://LoRaWAN-packet-decoder-0ta6puiniaut.runkit.sh
Thisweblinkhelpsdecodingthe base 64 data receivedatthe gateway
Assumingbase64-encoded packet
QNIfASaABAABA/uB+N3FPLnND5ufMW6z
Message Type = Data
PHYPayload = 40D21F01268004000103FB81F8DDC53CB9CD0F9B9F316EB3
( PHYPayload = MHDR[1] | MACPayload[..] | MIC[4] )
MHDR = 40
MACPayload = D21F01268004000103FB81F8DDC53CB9CD0F9B
MIC = 9F316EB3
( MACPayload = FHDR | FPort | FRMPayload )
FHDR = D21F0126800400
FPort = 01
FRMPayload = 03FB81F8DDC53CB9CD0F9B
( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
DevAddr = 26011FD2 (Big Endian)
FCtrl = 80
FCnt = 0004 (BigEndian)
FOpts =
Message Type = Unconfirmed Data Up
Direction = up
FCnt = 4
FCtrl.ACK = false
FCtrl.ADR = true
Download LoRaWAN packetdecoder
https://github.com/jieter/python-lora
https://github.com/jieter/python-lora/tree/master/tests
Thisscript hasdependencyoncryptography.cryptographyrequires cffi whichinturnrequires libffi-
dev,python-devand openssl.
$sudo apt-get install libffi-dev
$sudo apt-get install python-dev
$sudo apt-get install python3-dev
$sudo apt-get install openssl
$pip install python-lora
The FRMpayloadis thenusedinpayload_decrypt.pyalongwithsequencecounter(fcnt),dev_addrof
the node and Appskey toobtainthe decimal equivalentof the payload.
$ mkdir lora_decrypt
$ cd lora_decrypt
$ sudo nano payload_decrypt.py
Copythe FRMpayloadfrom (1) to payload, fcntto sequence_counter,andenterthe dev_addrand
Appskeyusedtoencryptthe payload.
Pressctrl+x -> y -> ENTER to save the pythonscript.
To run the script type “python payload_decrypt.py”andhitenter.
Upon executionof the payload_decrypt.pyastringof decimal valuesisobtained;thisstringisthen
decodedusingdecimal tohex converterusingonline tool.
The cryptologylibraryhasdependencyon setuptools andpythonversioninLinux andRaspbian,
whichtakesa quite a biteffort.However,ImigratedtoAnacondaIDEin windowstoexecute the
pythondecryptscript.
Assumingbase64-encoded packet
QIsbASaABQABlKmBif/36J2UWcXZ/hdK
Message Type = Data
PHYPayload = 408B1B01268005000194A98189FFF7E89D9459C5D9FE174A
( PHYPayload = MHDR[1] | MACPayload[..] | MIC[4] )
MHDR = 40
MACPayload = 8B1B01268005000194A98189FFF7E89D9459C5
MIC = D9FE174A
( MACPayload = FHDR | FPort | FRMPayload )
FHDR = 8B1B0126800500
FPort = 01
FRMPayload = 94A98189FFF7E89D9459C5
( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
DevAddr = 26011B8B(Big Endian)
FCtrl = 80
FCnt = 0005 (BigEndian)
FOpts =
Message Type = Unconfirmed Data Up
Direction = up
FCnt = 5
FCtrl.ACK = false
FCtrl.ADR = true
from lora.crypto import loramac_decrypt
payload = '94A98189FFF7E89D9459C5'
sequence_counter = 5
key = 'DF2FE61E548EF67A186ECFF15E2A09AB'
dev_addr = '26011B8B'
print(loramac_decrypt(payload, sequence_counter, key, dev_addr))
Resultobtainedbyexecutingthe payload_decrypt.py
[104, 101,108, 108, 111,32, 119, 111,114, 108, 100]
To convertthisbase 64 valuesto ASCIIValue,letususesanonline converter
https://www.branah.com/ascii-converter
Decoding LoRaWAN Packet

More Related Content

PDF
Gain Better Observability with OpenTelemetry and InfluxDB
PDF
Introducing Exactly Once Semantics in Apache Kafka with Matthias J. Sax
PDF
[A31]AWS上でOracleを利用するためのはじめの一歩!by Masatoshi Yoshida
PDF
WSO2 API Manager 2.0 - Overview
PDF
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
PPTX
OpenStack Networking
PDF
Cluster management with Kubernetes
PPTX
Introduction to the Container Network Interface (CNI)
Gain Better Observability with OpenTelemetry and InfluxDB
Introducing Exactly Once Semantics in Apache Kafka with Matthias J. Sax
[A31]AWS上でOracleを利用するためのはじめの一歩!by Masatoshi Yoshida
WSO2 API Manager 2.0 - Overview
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
OpenStack Networking
Cluster management with Kubernetes
Introduction to the Container Network Interface (CNI)

What's hot (20)

PDF
Hands-On Introduction to Kubernetes at LISA17
PPTX
Introduction to Distributed Tracing
PDF
Open shift 4 infra deep dive
PPTX
Leveraging Nexus Repository Manager at the Heart of DevOps
PDF
Integrating Automated Testing into DevOps
PDF
Ensuring Kubernetes Cost Efficiency across (many) Clusters - DevOps Gathering...
PPTX
CI/CD Best Practices for Your DevOps Journey
PPTX
Introduction to docker swarm
PDF
「さくらのクラウド」におけるVyattaの活用事例
PDF
Grafana Loki: like Prometheus, but for Logs
PDF
Docker Advanced registry usage
PPTX
Bulk Export Tool for Alfresco
PPTX
Distributed Tracing in Practice
PDF
Monitoring Kubernetes with Prometheus
PDF
Intro To Observability-March-2023.pdf
PPTX
Azure dev ops
PDF
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
PDF
[GitOps] Argo CD on GKE (v0.9.2).pdf
PDF
Kubernetes 101
PDF
JITServerTalk.pdf
Hands-On Introduction to Kubernetes at LISA17
Introduction to Distributed Tracing
Open shift 4 infra deep dive
Leveraging Nexus Repository Manager at the Heart of DevOps
Integrating Automated Testing into DevOps
Ensuring Kubernetes Cost Efficiency across (many) Clusters - DevOps Gathering...
CI/CD Best Practices for Your DevOps Journey
Introduction to docker swarm
「さくらのクラウド」におけるVyattaの活用事例
Grafana Loki: like Prometheus, but for Logs
Docker Advanced registry usage
Bulk Export Tool for Alfresco
Distributed Tracing in Practice
Monitoring Kubernetes with Prometheus
Intro To Observability-March-2023.pdf
Azure dev ops
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
[GitOps] Argo CD on GKE (v0.9.2).pdf
Kubernetes 101
JITServerTalk.pdf
Ad

More from Radiojitter Concepts Lab LLP (10)

PPTX
ES'HAIL 2/QO-100 Reception
PDF
LoRaWAN Antenna Measurement
DOCX
DTH (DVB-S2) Reception
DOCX
DVB-T2 Reception using RTL SDR
DOCX
GSM Triangulation (GPS Denied Condition)
DOCX
ADS-B Out Experiment
PPT
LoRaWAN Real Life Issues
PPTX
Software Defined Radio Workshop
PPTX
RF Experiments in Raspberry Pi
PPTX
Hamfest,Bangalore 2018 presentation
ES'HAIL 2/QO-100 Reception
LoRaWAN Antenna Measurement
DTH (DVB-S2) Reception
DVB-T2 Reception using RTL SDR
GSM Triangulation (GPS Denied Condition)
ADS-B Out Experiment
LoRaWAN Real Life Issues
Software Defined Radio Workshop
RF Experiments in Raspberry Pi
Hamfest,Bangalore 2018 presentation
Ad

Recently uploaded (20)

PPT
Project quality management in manufacturing
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Geodesy 1.pptx...............................................
PDF
Well-logging-methods_new................
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
DOCX
573137875-Attendance-Management-System-original
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
additive manufacturing of ss316l using mig welding
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
Current and future trends in Computer Vision.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
737-MAX_SRG.pdf student reference guides
Project quality management in manufacturing
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Geodesy 1.pptx...............................................
Well-logging-methods_new................
Foundation to blockchain - A guide to Blockchain Tech
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
573137875-Attendance-Management-System-original
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
additive manufacturing of ss316l using mig welding
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
Fundamentals of safety and accident prevention -final (1).pptx
Safety Seminar civil to be ensured for safe working.
R24 SURVEYING LAB MANUAL for civil enggi
Current and future trends in Computer Vision.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
737-MAX_SRG.pdf student reference guides

Decoding LoRaWAN Packet

  • 1. Decodingof LoRaWAN packets The above screenshotisthe received LoRaWAN packetatthe gatewaywhichneedstobe decoded to understandif the correctdata are beingsenttoTTN. From the LoRaWAN packetdata (QNIfASaABAABA/uB+N3FPLnND5ufMW6z) whichis inbase 64 encodedformatisdecodedusing step(1) toobtain FRMpayload. 1. https://LoRaWAN-packet-decoder-0ta6puiniaut.runkit.sh Thisweblinkhelpsdecodingthe base 64 data receivedatthe gateway Assumingbase64-encoded packet QNIfASaABAABA/uB+N3FPLnND5ufMW6z Message Type = Data PHYPayload = 40D21F01268004000103FB81F8DDC53CB9CD0F9B9F316EB3 ( PHYPayload = MHDR[1] | MACPayload[..] | MIC[4] ) MHDR = 40 MACPayload = D21F01268004000103FB81F8DDC53CB9CD0F9B MIC = 9F316EB3 ( MACPayload = FHDR | FPort | FRMPayload ) FHDR = D21F0126800400 FPort = 01 FRMPayload = 03FB81F8DDC53CB9CD0F9B ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] ) DevAddr = 26011FD2 (Big Endian) FCtrl = 80 FCnt = 0004 (BigEndian) FOpts =
  • 2. Message Type = Unconfirmed Data Up Direction = up FCnt = 4 FCtrl.ACK = false FCtrl.ADR = true Download LoRaWAN packetdecoder https://github.com/jieter/python-lora https://github.com/jieter/python-lora/tree/master/tests Thisscript hasdependencyoncryptography.cryptographyrequires cffi whichinturnrequires libffi- dev,python-devand openssl. $sudo apt-get install libffi-dev $sudo apt-get install python-dev $sudo apt-get install python3-dev $sudo apt-get install openssl $pip install python-lora The FRMpayloadis thenusedinpayload_decrypt.pyalongwithsequencecounter(fcnt),dev_addrof the node and Appskey toobtainthe decimal equivalentof the payload. $ mkdir lora_decrypt $ cd lora_decrypt $ sudo nano payload_decrypt.py
  • 3. Copythe FRMpayloadfrom (1) to payload, fcntto sequence_counter,andenterthe dev_addrand Appskeyusedtoencryptthe payload. Pressctrl+x -> y -> ENTER to save the pythonscript. To run the script type “python payload_decrypt.py”andhitenter. Upon executionof the payload_decrypt.pyastringof decimal valuesisobtained;thisstringisthen decodedusingdecimal tohex converterusingonline tool. The cryptologylibraryhasdependencyon setuptools andpythonversioninLinux andRaspbian, whichtakesa quite a biteffort.However,ImigratedtoAnacondaIDEin windowstoexecute the pythondecryptscript. Assumingbase64-encoded packet QIsbASaABQABlKmBif/36J2UWcXZ/hdK Message Type = Data PHYPayload = 408B1B01268005000194A98189FFF7E89D9459C5D9FE174A ( PHYPayload = MHDR[1] | MACPayload[..] | MIC[4] ) MHDR = 40
  • 4. MACPayload = 8B1B01268005000194A98189FFF7E89D9459C5 MIC = D9FE174A ( MACPayload = FHDR | FPort | FRMPayload ) FHDR = 8B1B0126800500 FPort = 01 FRMPayload = 94A98189FFF7E89D9459C5 ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] ) DevAddr = 26011B8B(Big Endian) FCtrl = 80 FCnt = 0005 (BigEndian) FOpts = Message Type = Unconfirmed Data Up Direction = up FCnt = 5 FCtrl.ACK = false FCtrl.ADR = true
  • 5. from lora.crypto import loramac_decrypt payload = '94A98189FFF7E89D9459C5' sequence_counter = 5 key = 'DF2FE61E548EF67A186ECFF15E2A09AB' dev_addr = '26011B8B' print(loramac_decrypt(payload, sequence_counter, key, dev_addr)) Resultobtainedbyexecutingthe payload_decrypt.py [104, 101,108, 108, 111,32, 119, 111,114, 108, 100] To convertthisbase 64 valuesto ASCIIValue,letususesanonline converter https://www.branah.com/ascii-converter