Skip to content

A MAC command to port 0 is triggering wrong MAC processing and wrong f_options_length. #20

@clavisound

Description

@clavisound
  • f_options_length causes an extra MAC command?
  • although f_options_length is masked to 0x0F (MAX value is 15, it writes 19)
    f_options_length = packet[5] & 0x0F; // p. 17
  • Since we receive in port 0 f_options_length should be 0.
  • For Null down port according to LoRaWAN 1.0.3 NEW_CHANNEL_REQ is 5 bytes for each message. Total should be 10, not 12.
MAC ENCrypted Mode
Processing MAC	: 7	f_options_length: 19
last_packet_snr_ 8bit / 4: 7
index     : 3
freqMSB   : 216
freqNewMSB: 24
freqMID   : 198
freqNewMID: 79
freqLSB   : 128
freqNewLSB: 132
Processing MAC	: 7	f_options_length: 19
last_packet_snr_ 8bit / 4: 7
index     : 4
freqMSB   : 216
freqNewMSB: 232
freqMID   : 211
freqNewMID: 86
freqLSB   : 80
freqNewLSB: 132
Processing MAC	: 7	f_options_length: 19
last_packet_snr_ 8bit / 4: 7
index     : 5
freqMSB   : 216
freqNewMSB: 184
freqMID   : 224
freqNewMID: 94
freqLSB   : 32
freqNewLSB: 132
Processing MAC	: 168	f_options_length: 19 << this is the problem
last_packet_snr_ 8bit / 4: 7
Port Down	: 0
Packet Length	: 31
Payload Length	: 19
SNR 8bit	: 30
SNR 8bit / 4	: 7
Packet decrypted HEX: MSB: 0x60XXXXXXXX809900000703184F84500704E85684500705B85E8450A8D6599D, LSB: 0x9D59D6A850845EB80507508456E8040750844F18030700009980XXXXXXXX60
Port Down	: 0
Packet Length	: 31
Payload Length	: 19
SNR 8bit	: 30
SNR 8bit / 4	: 7

MAC status	: 0	Rx counter: 80

>>>RX duration (ms): 1483

Null downPort
Processing MAC	: 7	f_options_length: 12
last_packet_snr_ 8bit / 4: 7
index     : 6
freqMSB   : 216
freqNewMSB: 136
freqMID   : 236
freqNewMID: 102
freqLSB   : 240
freqNewLSB: 132
Processing MAC	: 7	f_options_length: 12
last_packet_snr_ 8bit / 4: 7
index     : 7
freqMSB   : 216
freqNewMSB: 88
freqMID   : 249
freqNewMID: 110
freqLSB   : 176
freqNewLSB: 132

MAC status	: 1	Rx counter: 80

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions