Decode Payload plug and sense

Post Reply
JoffreyFontaine
Posts: 6
Joined: Fri May 10, 2019 10:04 am
Company: EDF

Decode Payload plug and sense

Post by JoffreyFontaine » Fri May 10, 2019 10:31 am

Hi,
we just bought two lora plug and sense for testing, one 4-20mA and one smart agriculture pro.
i configure them and link them to our multitech lora gateway and we use brocaar network server and application server.
the lora join went well.
we receive data payload, but have you a javascript codec or something else to decode/decrypt the data
or tell me where i can found it :)
thanks a lot

Joffrey Fontaine

for example, i receive :
application/6/device/XXXXXXXXXXXX/rx {"applicationID":"6","applicationName":"app_Libelium","deviceName":"Libelium_4-20mA","devEUI":"0004a30b002XXXXX","rxInfo":[{"gatewayID":"00800000a0003451","name":"gw_multitech_02","rssi":-43,"loRaSNR":9.5,"location":{"latitude":0,"longitude":0,"altitude":0}}],"txInfo":{"frequency":868100000,"dr":5},"adr":true,"fCnt":1,"fPort":3,"data":"ARg0Ua954QVBsAAAAACxAAAAALIAAAAA"}

JoffreyFontaine
Posts: 6
Joined: Fri May 10, 2019 10:04 am
Company: EDF

Re: Decode Payload plug and sense

Post by JoffreyFontaine » Fri May 10, 2019 2:20 pm

For information, after convert the data (base64 to bin), the result is 01 18 34 51 af 79 e1 05 41 b0 00 00 00 00 b1 00 00 00 00 b2 00 00 00 00

JoffreyFontaine
Posts: 6
Joined: Fri May 10, 2019 10:04 am
Company: EDF

Re: Decode Payload plug and sense

Post by JoffreyFontaine » Fri May 10, 2019 3:06 pm

(sorry for triple posting)
i see in the pdf http://www.libelium.com/downloads/docum ... _guide.pdf a lot of information
i understand that in the trame, the " af 79 e1 05 41 b0 00 00 00 00 b1 00 00 00 00 b2 00 00 00 00" are the four socket wih socket id and value,
but i don't find what's the "01 18 34 51 " before.
there is a codec available somewhere ?
thanks
Joffrey

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Decode Payload plug and sense

Post by libelium-dev » Mon May 13, 2019 9:12 am

Hi,

We are sorry but we don't have a code to parse the data.

Are you sending a standard frame or tiny frame? What code did you upload to the node? Did you generate the code using the PCS?

Since the frame doesn't start with 3C 3D 3E, we suppose it is a tiny frame

01 - secuence number
18 - lenght
34 - sensor id for battery level
51 - 81% batery level

Regards

JoffreyFontaine
Posts: 6
Joined: Fri May 10, 2019 10:04 am
Company: EDF

Re: Decode Payload plug and sense

Post by JoffreyFontaine » Mon May 13, 2019 10:23 am

Hi, thanks for the answer,

yes it's a tiny frame (don't understand what's differences between ? and where to choose in PCS ?) and yes the code was generated by PCS

thanks

Joffrey

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Decode Payload plug and sense

Post by libelium-dev » Tue May 14, 2019 10:55 am

Hi,

The difference between the frames is explained in the data frame guide
http://www.libelium.com/downloads/docum ... _guide.pdf

The codes create with PCS that send data through LoRaWAN use tiny frames due to the short payload size of the protocol.

You can find more information in the Programming Cloud Service Guide
http://www.libelium.com/downloads/docum ... _guide.pdf

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest