LoRaWAN FCnt size 16 or 32 bit?
-
What is the length of the LoRaWAN frame counters (FCnt), is it 16 or 32 bits?
-
@bmarkus Accoring to the spec it's 32 bits.
-
@robert-hh said in LoRaWAN FCnt size 16 or 32 bit?:
@bmarkus Accoring to the spec it's 32 bits.
Which spec?
-
@bmarkus Sorry, the LoRa spec about the message format says 16 bits, but I recall during my scanning through the sources, that the counter field has 32 bits. That was at the time when I searched for the reason why the nano-gateway code did not work. Counters wasn't it. Practically, during my tests, it did not make a difference. But I may never have exceeded the 16 bit range.
-
In the LoRaWAN specs (1.0.1 - 1.1) in section 4.3.1.5 the Frame counters says that it ALLOWS for the counters to be either 16-bits or 32-bits. But, importantly, if they are 32, still only the least significant 16 bits are transmitted, and the server must 'infer' the 16 most sig bits.
So if the server is expecting 32 bits, and you send a lower frame count (16 bits), it COULD decide that the end device has wrapped. It would be interesting to see how the server code handles it. It may be a good option to do another OTAA join when your frame counter gets high so that they reset.
-
@bed said in LoRaWAN FCnt size 16 or 32 bit?:
In the LoRaWAN specs (1.0.1 - 1.1) in section 4.3.1.5 the Frame counters says that it ALLOWS for the counters to be either 16-bits or 32-bits. But, importantly, if they are 32, still only the least significant 16 bits are transmitted, and the server must 'infer' the 16 most sig bits.
So if the server is expecting 32 bits, and you send a lower frame count (16 bits), it COULD decide that the end device has wrapped. It would be interesting to see how the server code handles it. It may be a good option to do another OTAA join when your frame counter gets high so that they reset.
I know what is in the LoRaWAAN Specification. My question is, on Pycom LoRaWAN stack 16-bit or 32-bit counters implemented?
-
@bmarkus The PyCom LoraWAN stack uses 32 bits for the uplink and downlink frame counters, even though only the bottom 16 bits are transmitted / received.
-
@bed said in LoRaWAN FCnt size 16 or 32 bit?:
@bmarkus The PyCom LoraWAN stack uses 32 bits for the uplink and downlink frame counters, even though only the bottom 16 bits are transmitted / received.
Thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login