Sending 3 Bytes as test, receiving 16 Bytes instead


#1

I’m sending three bytes to The Things Network as a test, yesterday I got them exactly as I sent them, now… I get gibberish… Do note that I’m connected to a different Gateway, I tried resetting it, but it didn’t seem to matter.

Hardware is a Pycom LoPy on a PyTrack Board.

I’m using:

s.send(bytes([0x01, 0x02, 0x03]))

And I receive on TTN lines like the following:

40 83 10 01 26 00 08 00 02 5B A1 C4 45 38 26 2D

The start of that line is mostly the same, but the rest is random, it also doesn’t seem to translate to anything.

Anyone any idea what could be going wrong?

Edit: I was looking in the Gateway area, had to look in Applications… Can’t delete the topic, though. Anyway, problem solved.


(Arjan) #2

Indeed. So just FYI:

Most of the full LoRaWAN message that you were seeing is not encrypted; only the 3 bytes application payload is encrypted (using the secret AppSKey), and the MIC is calculated using the secret NwkSKey. A decoder can show you that the first bytes hold things such as the message type, DevAddr (LSB, so backwards) and frame counter.