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?

    Is this base64 encoded? I tried to decode the data in base64 which results in:

    Trying to unhexlify results in error like:
    TypeError: Odd-length string

    Sorry if this is a basic question.

  • Thank you, that was really helpful. The online decoder works perfectly.

    When I searched for Lorawan decoder I got also some really useful links.

Log in to reply

Pycom on Twitter