Uplink frame counter : 16 bits support
- This topic has 2 replies, 2 voices, and was last updated 9 years, 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You cannot reply to this topic.
Home › Forums › Lora Network Server › Uplink frame counter : 16 bits support
Hi,
I am working with MTCAP with mLinux 3.3.9 (lora-network-server 1.0.36) and a node configured with OTAA. Node runs our custom stack, and implements 16 bits FCNT counters.
Untill it comes to a frame counter of 65535, everything works fine, but on next message (rollover to 0), all messages are rejected with a MIC FAILED error. In debug, when I force (before computing MIC) the FCNT at 0x00010000 (i.e. as if I used 32-bit counters), frame are received well.
So I assume your network server only handles 32bits frame counter. But the lorawan spec (1.02) states at paragraph 4.3.1.5 that a device can use 16 bits counter, and that the counter value can be used as present in the frame, possibly extended by leading zero if required.
Is there a way to tell your server that a device uses 16 bits counter? Or does your server have no support for 16 bits counter?
I have checked the release notes and seen no mention about frame counters on 1.0.37 and 1.0.41 (most recent releases)
The end-device should initiate a join once the 16-bit counter reaches 0xFFFF. Rolling the counter back to 0 would be reuse of counter values with same session keys.
Also in 4.3.1.5
The end-device shall not reuse the same FCntUp value, except for retransmission, with the same application and network session keys.
You are right, I missed that point.
Our stack will be corrected.
Best regards