LoRa Demo – sensor data

Home Forums Conduit: AEP Model LoRa Demo – sensor data

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16099
    Fabian Rieker
    Participant

    Hello,
    I have the Multiconnect Conduit Starter Kit, I’m trying to get the sensor data (LoRa Demo) from the mDot Box to my computer. In node-red, when I start the LoRa Demo in “debug”, I see the sensor data, but I need a Json-file or something similiar but I have no glue how to do it and no experience in node-red. Is there an easy way to get the sensor data?
    Thanks in advance!

    #16107

    Hi Fabian,

    On your PC you’d need to configure some sort of server or even a serial port to receive the sensor data. If you bring up Node-RED on your conduit, on the left you’ll see it has several output nodes that provide methods for output. Maybe look at these links to gain some familiarity.
    https://nodered.org/docs/getting-started/first-flow
    http://www.multitech.net/developer/software/lora/conduit-aep-lora-communication/
    The MQTT output in Node RED may work with a mosquitto server. You could look at:
    https://mosquitto.org/download/

    Kind regards,
    Leon

    #16178
    Capecchi Olivier
    Participant

    Hello Fabian,
    I don’t know if you managed your problem but here are two solution to your question :
    1/ Open a loriot.io account and register your gateway. It’s free and they provide you with the binary to forward the packets from your gateway to their server. Then create an app and register your mDOT (quite straigthforward). Then configure your mDOT using the NA, NwKey and DsKey supplied by Loriot. When everything is set, you should see the packets arriving from your mDOT on the Loriot server. Then use the “websocket” app from Loriot to get the websocket link that you use in Node-RED, with the input Node “websocket”. Connect this node to a debug Node and you will read your data. Be patient, since I’m no IT genius for example it took me about 20 hours to get this result… ๐Ÿ™‚
    2/ Second option is to configurate your Gateway as packet forwarder (howto on this site) and to make it forward the packets to your computer IP. Configure also the port (for example 1700). On your computer, in Node-RED, use a “UDP input” node and set it to listen to your computer port 1700. Connect it to a debug node and here your are…. Well, are you are not since you will be able to read the packet but not to understand it. The payload is 28 bytes and I don’t have any idea of what is inside it, even coming from my mDOT that I know well already… I didn’t have time to start a topic on this forum to ask Multitech how the payload is encrypted when we set the Conduit to basice packet forwarder….
    Good luck,
    Cheers,
    Lucas

    #16179
    Capecchi Olivier
    Participant

    Completing my last post :
    To read the data arriving to your PC through a UDP Port (solution nยฐ2) : the data is found in the string “data” on the debug port. This string is in Base64. To get the data decrypted is a bit tricky. The procedure is described on the LoRaWan protocol ยง4.3.3. To help understand better the procedure, read this forum post from TTN : https://www.thethingsnetwork.org/forum/t/parse-data/789/21
    Basically : you will have to create your own A bloc (using your mDot device address you put in it, at+da?) and encrypt it in AES128 using the Application Session Key you coded in your mDot box (at+dsk? to get it). You can do this through encrypting tools on the internet. Then you will have both the S bloc (A bloc encrypted) and your payload and writing both in binary format, you do “payload XOR Sbloc”. In Excel 2013 there is both HEXBIN and XOR formulaes to help you with this.
    I managed it after only 6 hours, I’m improving ๐Ÿ™‚
    Good luck and cheers,
    Lucas

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.