Lora-net / SWL2001

LoRa Basics Modem LoRaWAN stack
BSD 3-Clause Clear License
104 stars 60 forks source link

FCntUp does not reset to 0 after join accept is processed by LoRa Basics Modem #29

Closed atektelic closed 9 months ago

atektelic commented 9 months ago

According to LoRaWAN v1.0.4 specification, section 4.3.1.5 (line 685-686):

Whenever an OTAA end-device successfully processes a Join-Accept frame, the frame counters on the end-device (FCntUp) and the Network side (FCntDown) are reset to 0.

On LoRa Basics Modem, FCntUp continuously increments on every uplink (starting from the first join request) and does not reset to zero after join -- which does not align with the specification.

Is this a deliberate design choice? Or perhaps a detail that was missed?

mluis1 commented 9 months ago

A similar question was asked under LoRaMac-node project. Please refer to the following link for the provided answer. https://github.com/Lora-net/LoRaMac-node/discussions/1571

lbm-team commented 9 months ago

LBM resets to 0 the FCntUp after each join accept . do you perform a leave before rejoining?

atektelic commented 9 months ago

Thanks @mluis1! I will close this ticket since your reply addresses our issue.