Help with data and decode

Hi
I am new with LoraServer, and I am trying to understand how data is processed.
As you can see in the photo, when the gateway captures the node information, it looks like this, the data field is encoded in base 64(im not sure about this).

Aug 14 09:39:05 klk-wifc-0100EA local1.notice spf: JSON up: {“rxpk”:[{“tmst”:2437753524,“time”:“2019-08-14T13:39:05Z”,“chan”:6,“rfch”:1,“freq”:916.400000,“stat”:1,“modu”:“LORA”,“datr”:“SF8BW125”,“codr”:“4/5”,“lsnr”:12.2,“rssi”:-13,“size”:24,“data”:“QL2FyQHARACIZSytDcNbMyqnt5WxkOl4”}]}

To see how this information is published in the appserver I subscribed to this mosquitto address root@prueba-VirtualBox:/etc/lora-app-server# mosquitto_sub -t “application/#” -v, and received this information

application/1/device/58a0cb0000201c1f/rx {“applicationID”:“1”,“applicationName”:“olapp”,“deviceName”:“ol1f”,“devEUI”:“58a0cb0000201c1f”,“rxInfo”:[{“gatewayID”:“7276ff00450100ea”,“name”:“ifemto2”,“time”:“2019-08-14T13:39:05Z”,“rssi”:-13,“loRaSNR”:12.2,“location”:{“latitude”:-25.280154680549128,“longitude”:-57.56811261177064,“altitude”:0}}],“txInfo”:{“frequency”:916400000,“dr”:4},“adr”:true,“fCnt”:68,“fPort”:136,“data”:“CQs2AAAAAAAAAAA=”,“object”:{“HEX”:“090b360000000000000000”}}

The question is, why the information sent by the gateway and the information shown in the appserver are different, shouldn’t it be the same information?
The node I am using is a Tracknet TBOL-100 and the Gateway is a Kerlink IfemTocell.
If you need more information to response, please tell me.
Can someone help me too to decode this data, i not sure how is encoded the information send by the node so i dont know how write a javascript code to see parameters like temperature and others.
When i connect the same node with Orbiwise and Cayenne i can see this data:


But i dont understand how to reproduce this with LoraServer, when i select Cayenne LPP in the codec show me an error.
Thanks for the help.

Hi oscard1,

the information at the gateway is AES encrypted. In your case

An integrity check of the message takes place on the LoRaserver and the payload is finally decrypted on the Appserver. The result is either Base64-payload

“data”:“CQs2AAAAAAAAAAA=”

or the HEX decoded field of your provided data

“HEX”:“090b360000000000000000”

This is the information your node transmitted.

Best regards,
DeHi

2 Likes

Thanks for the answer DeHi, now I understand a little more about the data,
Now I have some more questions:
-How do you know the type of encryption ?, This is for future reference.
-How can I know if my data is decrypted correctly? I am currently using Orbiwise, and I want to move to Loraserver, in Orbiwise the decoded data look like this:
imagen
And as I see it, the final data shown is different, because when converting the data field(of LoraAppServer) into hexadecimal the numbers are very different for sensors that are in the same place and in the same environment.
-How can the data shown on the application server be changed in the parameters shown by Cayenne, such as battery voltage, temperature, GPS correction and latitude and longitude (the node is an object locator)? .
Thanks again,
Best Regards

Hi oscard1,
you are welcome!

  • The encryption is mentioned in the LoRaWAN standard. I hope I did not misunderstand your question.
  • You can create an integration which forwards your data to a dedicated application. Or you take a look in the “Live LoRaWAN Frames”. This tab can be opened for each device individually. Regardless of whether you use the application or the Live Frames: the payload will be forwarded base64 encoded.

BR/DeHi

2 Likes

Thanks for your help DeHi,
Best regards

How to decode that data when sent to 3rd party integration platform ?