How Decrypt LoRa data
-
Hi, i'm looking for a function to decrypt Lora data(payload) under Micropython because I'd like to read data and manage directly in my nano gateway, could you help me? Thank you
-
@rcolistete Thank you for your time and explanation
-
AFAIK, there is no MicroPython module to decore LoRaWan payload at the moment.
There is in :
- Javascript :
lora-packet - A pure node.js library to decode and encode packets for LoRa/LoRaWANTM radio communication :
https://www.npmjs.com/package/lora-packet
https://github.com/anthonykirby/lora-packet
Example :
https://runkit.com/avbentem/lorawan-packet-decoder
Online LoRaWAN packet decoder, using :
https://www.thethingsnetwork.org/forum/t/online-lorawan-packet-decoder/5095
https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/
lora-decrypt - Node container for decrypting LoRaWan payloads (FRMpayload) from Thingpark/Actility platform :
https://www.npmjs.com/package/lora-decrypt - Python :
LoraDecoder - Python library for decoding LoraWAN 1.0. protocol messages :
https://github.com/Timvandervoord/LoraDecoder
python-lora - Decrypt LoRa payloads in Python :
https://github.com/jieter/python-lora - Go :
LoRaWAN (Go) used by the LoRa Server project :
https://godoc.org/github.com/brocaar/lorawan#EncryptFRMPayload
https://godoc.org/github.com/brocaar/lorawan#example-PHYPayload--Decode
I'm also interested to have Pycom nanogateway software capable of decoding LoRaWan payload, even only using ABP (knowing the keys). It would be useful to have decoded payload of the packets received by the LoRaWan nodes to :
- debug;
- datalog;
- take actions depending on the content of the payload;
- send payload content to IoT Cloud in parallel to LoRaWan server.
I think the community could contribute to improve the 'nanogateway.py' from Pycom.
- Javascript :
-
@mario If you don't need to connect to a network (LNS), then you probably don't need to use LoRaWAN and a LoRaWAN gateway, raw LoRA may be more suited to your use case.
If you do connect to an LNS (e.g. you are connected to TTN), then IIRC the gateway does not have the keys necessary to decrypt the payload. Others may be able to confirm that.
What is it you're trying to achieve, ultimately?