Different FRMPayload in every message node sends


I send two bytes from my node [0x41, 0x41]. I then use this to decode it. But every time I send a message frmPayload changes (or the bytes in it to be more exact).

I expect to see [0x41, 0x41] when I print pl.Bytes, is this correct or am I thinking wrong?

Please note that you need to decode and decrypt it with the correct AppSKey. You also need to resolve the 16bit FCnt value back into the 32bit frame-counter before decryption.

Hm… You mean decode it on my node? I’m using PyCom, so it might be something I need to look up there I guess?

In your decoding logic, you need to make sure you’re using the full-frame counter, as only the 16 least-significant bits of the FCnt are emitted. The 16 most-significant bits you have to derive yourself by observing the previous messages (https://lora-alliance.org/lorawan-for-developers).

When the uplink-frame counter is 65539 at the device (32 bit), the received LoRaWAN frame by the gateway will contain frame-counter 3 (as 65539 % 2^16 = 3). However, you need to set it back to 65539 to validate the MIC and decrypt it.

I have the same problem, I send (e.g. Hello) but in the device see other information (e.g. Hdiks), the received data isn’t the same data I sent, so, I don’t know how I should send the data for received ok, I need your help.