Good to see you changed that text into a 2 bytes binary encoded payload. But there’s still something left in your code:
Above, sizeof(payload)-1
will make LMIC send 1 byte, not 2. Simply remove that -1
.
The -1
part is probably a leftover of the test that used text? Even a fixed-length char array has a terminating null-character. That does not need to be included in the LoRaWAN packet, as the receiver already knows how long a LoRaWAN packet it. So, for text you’ll often see sizeof(...) - 1
.
LoRaWAN examples using text are just evil.