Error="decode fOpts to mac-commands error: lorawan: not enough remaining bytes"

Hi,

We have several Adeunis ARF8200AA transceivers which send data to our loraserver every ten minutes via several multitech gw. On each gateways is the LoRa Gatewy Bridge installed.
Regardless of how long they have sent data before, we got the error message described in the topic.
For example the excerpts for two devices from the loraserver logfile.
Somebody an idea what the reason for this behavior is?

BR Peter

Please post the message and the triggering packet clearly, as text and not as a screenshot image.

Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“gateway/mqtt: uplink frame received”
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“rx info sent to network-controller” dev_eui=0018b2200000027e
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“device gateway rx-info meta-data saved” dev_eui=0018b2200000027e
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“device-session saved” dev_addr=0655c0a1 dev_eui=0018b2200000027e
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=19.284 span.kind=client system=grpc
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“requesting device-status” dev_eui=0018b2200000027e
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“pending mac-command block set” cid=DevStatusReq commands=1 dev_eui=0018b2200000027e
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“gateway/mqtt: publishing downlink frame” qos=0 topic=gateway/00800000a0001b8f/tx
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“device-session saved” dev_addr=0655c0a1 dev_eui=0018b2200000027e
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“downlink-frames saved” dev_eui=0018b2200000027e token=29238
Apr 18 06:05:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:05:40Z” level=info msg=“backend/gateway: downlink tx acknowledgement received” gateway_id=00800000a0001b8f
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“gateway/mqtt: uplink frame received”
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“rx info sent to network-controller” dev_eui=0018b2200000027e
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“pending mac-command deleted” cid=DevStatusReq dev_eui=0018b2200000027e
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“dev_status_ans answer received” battery=195 dev_eui=0018b2200000027e margin=5
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“device gateway rx-info meta-data saved” dev_eui=0018b2200000027e
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“device-session saved” dev_addr=0655c0a1 dev_eui=0018b2200000027e
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=SetDeviceStatus grpc.service=as.ApplicationServerService grpc.time_ms=10.001 span.kind=client system=grpc
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=23.779 span.kind=client system=grpc
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“requesting device-status” dev_eui=0018b2200000027e
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“pending mac-command block set” cid=DevStatusReq commands=1 dev_eui=0018b2200000027e
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“gateway/mqtt: publishing downlink frame” qos=0 topic=gateway/00800000a0001b8f/tx
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“device-session saved” dev_addr=0655c0a1 dev_eui=0018b2200000027e
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“downlink-frames saved” dev_eui=0018b2200000027e token=65289
Apr 18 06:15:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:15:40Z” level=info msg=“backend/gateway: downlink tx acknowledgement received” gateway_id=00800000a0001b8f
Apr 18 06:25:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:25:40Z” level=info msg=“gateway/mqtt: uplink frame received”
Apr 18 06:25:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:25:40Z” level=error msg=“processing uplink frame error” data_base64=“QKHAVQaDzAMFwwcBmMOEcwii4zZ1LZC0ZkA=” error=“decode fOpts to mac-commands error: lorawan: not enough remaining bytes”
Apr 18 06:35:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:35:40Z” level=info msg=“gateway/mqtt: uplink frame received”
Apr 18 06:35:40 zaloranb1 loraserver[27927]: time=“2019-04-18T06:35:40Z” level=error msg=“processing uplink frame error” data_base64=“QKHAVQaDzQMFwwcB86PGdcKLs+ADszseZC8=” error=“decode fOpts to mac-commands error: lorawan: not enough remaining bytes”
Assuming base64-encoded packet
"QKHAVQaDzAMFwwcBmMOEcwii4zZ1LZC0ZkA

Message Type = Data
PHYPayload = 40A1C0550683CC0305C3070198C3847308A2E336752D90B46640

( PHYPayload = MHDR[1] | MACPayload[…] | MIC[4] )
MHDR = 40
MACPayload = A1C0550683CC0305C3070198C3847308A2E336752D
MIC = 90B46640 (from packet)
= 90B46640 (expected, assuming 32 bits frame counter with MSB 0000)

( MACPayload = FHDR | FPort | FRMPayload )
FHDR = A1C0550683CC0305C307
FPort = 01
FRMPayload = 98C3847308A2E336752D (from packet, encrypted)
= 4260120E286F2213246D (decrypted)

  ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
 DevAddr = 0655C0A1 (Big Endian)
   FCtrl = 83
    FCnt = 03CC (Big Endian)
   FOpts = 05C307

Message Type = Unconfirmed Data Up
Direction = up
FCnt = 972 (from packet, 16 bits)
= 972 (32 bits, assuming MSB 0x0000)
FCtrl.ACK = false
FCtrl.ADR = true

Assuming base64-encoded packet
QKHAVQaDzQMFwwcB86PGdcKLs+ADszseZC8=

Message Type = Data
PHYPayload = 40A1C0550683CD0305C30701F3A3C675C28BB3E003B33B1E642F

( PHYPayload = MHDR[1] | MACPayload[…] | MIC[4] )
MHDR = 40
MACPayload = A1C0550683CD0305C30701F3A3C675C28BB3E003B3
MIC = 3B1E642F (from packet)
= 3B1E642F (expected, assuming 32 bits frame counter with MSB 0000)

( MACPayload = FHDR | FPort | FRMPayload )
FHDR = A1C0550683CD0305C307
FPort = 01
FRMPayload = F3A3C675C28BB3E003B3 (from packet, encrypted)
= 4280120E05352213302B (decrypted)

  ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
 DevAddr = 0655C0A1 (Big Endian)
   FCtrl = 83
    FCnt = 03CD (Big Endian)
   FOpts = 05C307

Message Type = Unconfirmed Data Up
Direction = up
FCnt = 973 (from packet, 16 bits)
= 973 (32 bits, assuming MSB 0x0000)
FCtrl.ACK = false
FCtrl.ADR = true

May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“rx info sent to network-controller” dev_eui=0018b2200000035c
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“pending mac-command deleted” cid=DevStatusReq dev_eui=0018b2200000035c
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“dev_status_ans answer received” battery=193 dev_eui=0018b2200000035c margin=6
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“device gateway rx-info meta-data saved” dev_eui=0018b2200000035c
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=SetDeviceStatus grpc.service=as.ApplicationServerService grpc.time_ms=15.838 span.kind=client system=grpc
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=25.475 span.kind=client system=grpc
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“requesting device-status” dev_eui=0018b2200000035c
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“pending mac-command block set” cid=DevStatusReq commands=1 dev_eui=0018b2200000035c
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“gateway/mqtt: publishing downlink frame” qos=0 topic=gateway/00800000a0002b21/tx
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“downlink-frames saved” dev_eui=0018b2200000035c token=60941
May 07 17:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:29:00Z” level=info msg=“backend/gateway: downlink tx acknowledgement received” gateway_id=00800000a0002b21
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“rx info sent to network-controller” dev_eui=0018b2200000035c
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“pending mac-command deleted” cid=DevStatusReq dev_eui=0018b2200000035c
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“dev_status_ans answer received” battery=193 dev_eui=0018b2200000035c margin=6
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“device gateway rx-info meta-data saved” dev_eui=0018b2200000035c
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=SetDeviceStatus grpc.service=as.ApplicationServerService grpc.time_ms=9.139 span.kind=client system=grpc
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=11.044 span.kind=client system=grpc
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“requesting device-status” dev_eui=0018b2200000035c
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“pending mac-command block set” cid=DevStatusReq commands=1 dev_eui=0018b2200000035c
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“gateway/mqtt: publishing downlink frame” qos=0 topic=gateway/00800000a0002b21/tx
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“downlink-frames saved” dev_eui=0018b2200000035c token=27512
May 07 17:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:39:00Z” level=info msg=“backend/gateway: downlink tx acknowledgement received” gateway_id=00800000a0002b21
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“rx info sent to network-controller” dev_eui=0018b2200000035c
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“pending mac-command deleted” cid=DevStatusReq dev_eui=0018b2200000035c
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“dev_status_ans answer received” battery=193 dev_eui=0018b2200000035c margin=6
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“device gateway rx-info meta-data saved” dev_eui=0018b2200000035c
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=SetDeviceStatus grpc.service=as.ApplicationServerService grpc.time_ms=10.665 span.kind=client system=grpc
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=19.673 span.kind=client system=grpc
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“requesting device-status” dev_eui=0018b2200000035c
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“pending mac-command block set” cid=DevStatusReq commands=1 dev_eui=0018b2200000035c
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“gateway/mqtt: publishing downlink frame” qos=0 topic=gateway/00800000a0002b21/tx
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“downlink-frames saved” dev_eui=0018b2200000035c token=6434
May 07 17:49:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:49:00Z” level=info msg=“backend/gateway: downlink tx acknowledgement received” gateway_id=00800000a0002b21
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“rx info sent to network-controller” dev_eui=0018b2200000035c
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“pending mac-command deleted” cid=DevStatusReq dev_eui=0018b2200000035c
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“dev_status_ans answer received” battery=193 dev_eui=0018b2200000035c margin=6
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“device gateway rx-info meta-data saved” dev_eui=0018b2200000035c
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=SetDeviceStatus grpc.service=as.ApplicationServerService grpc.time_ms=12.451 span.kind=client system=grpc
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=21.09 span.kind=client system=grpc
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“requesting device-status” dev_eui=0018b2200000035c
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“pending mac-command block set” cid=DevStatusReq commands=1 dev_eui=0018b2200000035c
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“gateway/mqtt: publishing downlink frame” qos=0 topic=gateway/00800000a0002b21/tx
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“downlink-frames saved” dev_eui=0018b2200000035c token=24309
May 07 17:59:00 zaloranb1 loraserver[27927]: time=“2019-05-07T17:59:00Z” level=info msg=“backend/gateway: downlink tx acknowledgement received” gateway_id=00800000a0002b21
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“rx info sent to network-controller” dev_eui=0018b2200000035c
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“pending mac-command deleted” cid=DevStatusReq dev_eui=0018b2200000035c
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“dev_status_ans answer received” battery=194 dev_eui=0018b2200000035c margin=6
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“device gateway rx-info meta-data saved” dev_eui=0018b2200000035c
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=21.206 span.kind=client system=grpc
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“finished client unary call” grpc.code=OK grpc.method=SetDeviceStatus grpc.service=as.ApplicationServerService grpc.time_ms=21.773 span.kind=client system=grpc
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“requesting device-status” dev_eui=0018b2200000035c
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“pending mac-command block set” cid=DevStatusReq commands=1 dev_eui=0018b2200000035c
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“gateway/mqtt: publishing downlink frame” qos=0 topic=gateway/00800000a0002b21/tx
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“device-session saved” dev_addr=06759be1 dev_eui=0018b2200000035c
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“downlink-frames saved” dev_eui=0018b2200000035c token=64391
May 07 18:09:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:09:00Z” level=info msg=“backend/gateway: downlink tx acknowledgement received” gateway_id=00800000a0002b21
May 07 18:29:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:29:00Z” level=error msg=“processing uplink frame error” data_base64=“QOGbdQaDRgAFwQYB4yhBy0tSUXW/1I94Eb8=” error=“decode fOpts to mac-commands error: lorawan: not enough remaining bytes”
May 07 18:39:00 zaloranb1 loraserver[27927]: time=“2019-05-07T18:39:00Z” level=error msg=“processing uplink frame error” data_base64=“QOGbdQaDRwAFwQYBXvfiIR3/B0Ix2YtOKIQ=” error=“decode fOpts to mac-commands error: lorawan: not enough remaining bytes”

Assuming base64-encoded packet
QOGbdQaDRwAFwQYBXvfiIR3/B0Ix2YtOKIQ=

Message Type = Data
PHYPayload = 40E19B750683470005C106015EF7E2211DFF074231D98B4E2884

( PHYPayload = MHDR[1] | MACPayload[…] | MIC[4] )
MHDR = 40
MACPayload = E19B750683470005C106015EF7E2211DFF074231D9
MIC = 8B4E2884 (from packet)
= 8B4E2884 (expected, assuming 32 bits frame counter with MSB 0000)

( MACPayload = FHDR | FPort | FRMPayload )
FHDR = E19B750683470005C106
FPort = 01
FRMPayload = 5EF7E2211DFF074231D9 (from packet, encrypted)
= 42C01210215A221063E4 (decrypted)

  ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
 DevAddr = 06759BE1 (Big Endian)
   FCtrl = 83
    FCnt = 0047 (Big Endian)
   FOpts = 05C106

Message Type = Unconfirmed Data Up
Direction = up
FCnt = 71 (from packet, 16 bits)
= 71 (32 bits, assuming MSB 0x0000)
FCtrl.ACK = false
FCtrl.ADR = true

Assuming base64-encoded packet
QOGbdQaDRwAFwQYBXvfiIR3/B0Ix2YtOKIQ=

Message Type = Data
PHYPayload = 40E19B750683470005C106015EF7E2211DFF074231D98B4E2884

( PHYPayload = MHDR[1] | MACPayload[…] | MIC[4] )
MHDR = 40
MACPayload = E19B750683470005C106015EF7E2211DFF074231D9
MIC = 8B4E2884 (from packet)
= 8B4E2884 (expected, assuming 32 bits frame counter with MSB 0000)

( MACPayload = FHDR | FPort | FRMPayload )
FHDR = E19B750683470005C106
FPort = 01
FRMPayload = 5EF7E2211DFF074231D9 (from packet, encrypted)
= 42C01210215A221063E4 (decrypted)

  ( FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15] )
 DevAddr = 06759BE1 (Big Endian)
   FCtrl = 83
    FCnt = 0047 (Big Endian)
   FOpts = 05C106

Message Type = Unconfirmed Data Up
Direction = up
FCnt = 71 (from packet, 16 bits)
= 71 (32 bits, assuming MSB 0x0000)
FCtrl.ACK = false
FCtrl.ADR = true

That looks like you have 0x05 which is

The RXParamSetupAns command is used by the end-device to acknowledge the reception of RXParamSetupReq command. The payload contains a single status byte.

With its required status byte, followed by 0x06

If a DevStatusReq is received by an end-device, it responds with a DevStatusAns command.

Which is missing the two bytes (battery and link margin) required by the spec, making the error complaint seem appropriate

This is perhaps buggy node firmware?

1 Like

Hello Chris!

Thank you very much for your analysis. After your answer, I opened a case by Adeunis.
You were right about your analysis. There is a problem with the firmware.
Here is the answer to my request at Adeunis.

The behavior you describe is a problem with our devices responding to this Mac command.
This behavior will be solved by upgrading the FW of the devices to make them compliant with the LoRaWAN 1.0.2 RevB specifications.

BR Peter