Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    How Decrypt LoRa data

    Scheduled Pinned Locked Moved LoPy
    lopymicropythondecrypt
    4 Posts 3 Posters 2.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      Mario
      last edited by

      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

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @Mario
        last edited by

        @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?

        1 Reply Last reply Reply Quote 0
        • rcolisteteR Offline
          rcolistete
          last edited by rcolistete

          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.

          My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

          M 1 Reply Last reply Reply Quote 3
          • M Offline
            Mario @rcolistete
            last edited by

            @rcolistete Thank you for your time and explanation

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom