(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
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