How to decode the data in the Nanogateway example?
-
I have setup a nanogateway to TTN like the example. Everything seems to work well and the data is processed by TTN. The next step is of course to modify the code for my own needs. I am trying to figure were and which data is send/received in the code.
A basic output from the gateway is this:
[ 896.973] Received packet: {"rxpk": [{"data": "QCkuASYAWAACa/U72jXPDrOglQ==", "time": "2017-11-26T13:06:00.63490Z", "chan": 0, "tmst": 882754716, "stat": 1, "modu": "LORA", "lsnr": 6.0, "rssi": -54, "rfch": 0, "codr": "4/5", "freq": 868.1, "datr": "SF7BW125", "size": 19}]}How do I manually decode the data part?
QCkuASYAWAACa/U72jXPDrOglQ==Is this base64 encoded? I tried to decode the data in base64 which results in:
base64.b64decode(data)
'@).\x01&\x00X\x00\x02k\xf5;\xda5\xcf\x0e\xb3\xa0\x95'Trying to unhexlify results in error like:
TypeError: Odd-length stringSorry if this is a basic question.
-
@rvandam
Paste it in the LoRaWAN decoder https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/?data= -
Thank you, that was really helpful. The online decoder works perfectly.
When I searched for Lorawan decoder I got also some really useful links.
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