RAK7205 to chirpstack -- unable to decode data

I successfully managed to via AT commands tell the unit to send the data to chirpstack on the RAK7244C
The packets are being received but I am unable to base64 decode the data

Every 12 mins or so, I get 4 packets for the RAK7205. Can you tell me why the chirpstack fails to base64 decode them properly – AYgGXvjyji4AY+I= , CAIBbQdoVwZzJn8= , AmcArwQCBq8= , A3EABv///BI= are all gibberish when I try to base64 decode them

Instead of the RAK7205 when I use a ESP32 with lorawan.ino arduino code, I get data of SGVsbG8gV29ybGQh which nicely base64 decodes to “Hello World!”

Why is the data field garbage from the RAK7205 and why am I receiving 4 distinct messages instead of one. Is the data too large to fit in one LORAWAN frame?

Using the RAK serial port tool, the bme680 sensor data and ublox gps data look fine/normal.

Thanks in advance for any insight into this matter.

3/4/2020, 8:19:35 AMnode: 1487122d.98051eapplication/3/device/60c5a8fffe75fec8/rx : msg.payload : string[420]

“{“applicationID”:“3”,“applicationName”:“RAK7205”,“deviceName”:“Rak7205Horseguards”,“devEUI”:“60c5a8fffe75fec8”,“rxInfo”:[{“gatewayID”:“dca632fffe0ca8f4”,“uplinkID”:“b40724d7-f4a2-4e82-8db8-3f7fd3721afe”,“name”:“rak_gateway”,“rssi”:-22,“loRaSNR”:11.8,“location”:{“latitude”:41.75287,“longitude”:-88.11011,“altitude”:241}}],“txInfo”:{“frequency”:905300000,“dr”:0},“adr”:true,“fCnt”:473,“fPort”:8,“data”:“AYgGXvjyji4AY+I=”}”

3/4/2020, 8:19:37 AMnode: 1487122d.98051eapplication/3/device/60c5a8fffe75fec8/rx : msg.payload : string[420]

“{“applicationID”:“3”,“applicationName”:“RAK7205”,“deviceName”:“Rak7205Horseguards”,“devEUI”:“60c5a8fffe75fec8”,“rxInfo”:[{“gatewayID”:“dca632fffe0ca8f4”,“uplinkID”:“173589ed-5ecb-42cc-a61d-ff4a810b86fd”,“name”:“rak_gateway”,“rssi”:-24,“loRaSNR”:14.2,“location”:{“latitude”:41.75287,“longitude”:-88.11011,“altitude”:241}}],“txInfo”:{“frequency”:903900000,“dr”:0},“adr”:true,“fCnt”:474,“fPort”:8,“data”:“CAIBbQdoVwZzJn8=”}”

3/4/2020, 8:19:38 AMnode: 1487122d.98051eapplication/3/device/60c5a8fffe75fec8/rx : msg.payload : string[416]

“{“applicationID”:“3”,“applicationName”:“RAK7205”,“deviceName”:“Rak7205Horseguards”,“devEUI”:“60c5a8fffe75fec8”,“rxInfo”:[{“gatewayID”:“dca632fffe0ca8f4”,“uplinkID”:“b4b75ae5-39a0-4198-a261-a329e496a38f”,“name”:“rak_gateway”,“rssi”:-19,“loRaSNR”:12.5,“location”:{“latitude”:41.75287,“longitude”:-88.11011,“altitude”:241}}],“txInfo”:{“frequency”:904500000,“dr”:0},“adr”:true,“fCnt”:475,“fPort”:8,“data”:“AmcArwQCBq8=”}”

3/4/2020, 8:19:40 AMnode: 1487122d.98051eapplication/3/device/60c5a8fffe75fec8/rx : msg.payload : string[414]

“{“applicationID”:“3”,“applicationName”:“RAK7205”,“deviceName”:“Rak7205Horseguards”,“devEUI”:“60c5a8fffe75fec8”,“rxInfo”:[{“gatewayID”:“dca632fffe0ca8f4”,“uplinkID”:“74cd0706-caf7-431c-9461-bae72ebfc712”,“name”:“rak_gateway”,“rssi”:-22,“loRaSNR”:12,“location”:{“latitude”:41.75287,“longitude”:-88.11011,“altitude”:241}}],“txInfo”:{“frequency”:905100000,“dr”:0},“adr”:true,“fCnt”:476,“fPort”:8,“data”:“A3EABv///BI=”}”

3/4/2020, 8:20:07 AMnode: 1487122d.98051eapplication/2/device/00066b5341291472/rx : msg.payload : string[428]

“{“applicationID”:“2”,“applicationName”:“ESP32_Lorawan”,“deviceName”:“ESP_LoraABP_Device04”,“devEUI”:“00066b5341291472”,“rxInfo”:[{“gatewayID”:“dca632fffe0ca8f4”,“uplinkID”:“f35b13e1-653c-4dc6-907d-4cedce0def0c”,“name”:“rak_gateway”,“rssi”:-30,“loRaSNR”:10.2,“location”:{“latitude”:41.75287,“longitude”:-88.11011,“altitude”:241}}],“txInfo”:{“frequency”:904500000,“dr”:1},“adr”:true,“fCnt”:650,“fPort”:1,“data”:“SGVsbG8gV29ybGQh”}”


Here is a source of the parsing script, you need to follow the diagram operation to add the script to the diagram location and save, you can carry on the data parsing.

Nicholas,
Thanks for that snippet of code. I am now able to successfully decode the data correctly in chirpstack

  • data:“AYgGXwDyjjAAZFA=”

  • objectJSON:"{“DecodeDataHex”:“0188065f00f28e30006450”,“DecodeDataObj”:{“gps”:{“altitude”:“256.8m”,“latitude”:“41.7536°”,“longitude”:“1589.6112°”}}}"

  • data:“CAIBbQdoSgZzJr4=”

  • objectJSON:"{“DecodeDataHex”:“0802016d07684a067326be”,“DecodeDataObj”:{“battery”:“3.65V”,“environment”:{“barometer”:“991.80hPa”,“humidity”:“37.0% RH”}}}"

  • data:“AmcA0gQCB68=”

  • objectJSON:"{“DecodeDataHex”:“026700d2040207af”,“DecodeDataObj”:{“environment”:{“gasResistance”:“19.67KΩ”,“temperature”:“21.00°C”}}}"

  • data:“A3EAHf/9/B0=”

  • objectJSON:"{“DecodeDataHex”:“0371001dfffdfc1d”,“DecodeDataObj”:{“acceleration”:{“x”:“0.029g”,“y”:"-0.003g",“z”:"-0.995g"}}}"

I’m glad to have solved the problem for you. :upside_down_face: :upside_down_face: :upside_down_face:

Nicholas,

Why is the longitude not a negative number and such a large positive number?

My lat long is supposed to be something like this {“latitude”:41.75287,“longitude”:-88.11011,“altitude”:241}

But 7205 is reporting {“gps”:{“altitude”:“256.8m”,“latitude”:“41.7536°”,“longitude”:“1589.6112°”}}

Is there a conversion from positive longitude format to the negative longitude format?

Thanks

Where did you get this GPS data? Is it the true value of the node log or the location?

Anand,

Thank you for telling us about this bug.I have fixed the bug, please download the newest script from github.

Has anyone else had an issue where the “Ω” in the air/gas resistance causes thingsboard to ignore the payload? If I remove the “Ω” from “KΩ” then the payload is received. If it’s there then it doesn’t work.

taylor,
Confirmed that your fix works
{“gps”:{“altitude”:“224.5m”,“latitude”:“41.7528°”,“longitude”:"-88.1099°"}}}

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

1.Is there any problem with other data with units, such as temperature and humidity?
2.Check if unit must be defined in thingsboard.
3.Check if thingsboard defines its own JSON format.

Please reply according to the above questions. Meanwhile, I will test thingsboard flatform.

OK,Thanks for your support of RAK products. :grinning: