Closed ChrSchultz closed 2 years ago
Thanks for reporting this. It is a bug in the TTN payload decoder, and is now fixed. The fix does not affect the paxcounter software, but the TTN decoder. Thus, it is not necessary to rebuild the software, but we need to fix the TTN decoder in TTNv3 to make this working. @Drasek can you help here?
I opened PR at TheThingsNetwork for this: https://github.com/TheThingsNetwork/lorawan-devices/pull/371
I closed the PR for the decoder again. It does not solve the issue. Needs to be analyzed again.
The bytes found in the console
05 0e 00 00 1e 00 32 08 1e a8 a1 33 2e 30 2e 33 00 00 00 00 00
are correct.
a8
is flag mask.
a1
is payload mask as was set by remote command.
@ChrSchultz i can't reproduce this. Could you please provide more data how to reproduce this isse?
"decoded_payload": { "blescantime": 2, "bytes": [ 5, 14, 0, 0, 30, 50, 2, 30, 168, 134, 51, 46, 49, 46, 48, 0, 0, 0, 0, 0 ], "flags": { "adr": 1, "antenna": 0, "blescan": 1, "countermode": 0, "reserved": 0, "screen": 1, "screensaver": 0 }, "loradr": 5, "payloadmask": { "battery": 1, "bme": 1, "counter": 0, "gps": 0, "reserved": 1, "sensor1": 0, "sensor2": 0, "sensor3": 0 }, "port": 3, "rgblum": 30, "rssilimit": 0, "sendcycle": 30, "txpower": 14, "version": "3.1.0", "wifichancycle": 50 },
I fixed the issue, I included in payload for configdata SLEEPCYCLE but forget to include that in the decoder-arrays... :-) after this all works fine
Please don't open issue, if you modified the code. Use discussions tab.
14 86
on fPort2 in ttnv3 console.80
on fPort2 ttnv305 0e 00 00 1e 00 32 08 1e a8 **a1** 33 2e 30 2e 33 00 00 00 00 00
If I let return the bytes for the version-string, eg:
var version = function(bytes){ return bytes};
these bytes are returned: for version 3.0.3:161 51 46 48 46 51 0 0 0
but 161 (A1) belongs to the payloadmask. I tried many variations of code but I didn't find out how i can fix the bug...