How is frame count (FCnt) desyncronisation managed? (1.0.4+)

ElectronicallyE
Tue, 06 May 2025 01:35:51 +0000
The Things Stack v3

There are several situations where the frame count (FCnt) sent by a device does not match with that expected by the gateway. Such examples include:

The gateway is offline, resulting in the device transmitting packets with a higher frame count than expected.

The sensor is too far away from the gateway for reliable packet detections by the gateway, resulting in a higher frame count than expected transmitted by the device.

Because most packets are unacknowledged, how is desynconisation managed?
My understanding is that devices should request acknowledgments and reconnect to the network on occasion (which is also a good security practice to refresh keys on OTAA). By reconnecting to the network, the frame count is reset, which is no issue for OTAA (due to new keys), but means that ABP devices that do not retain/save their frame count will have their packets rejected (the network server considers these frames as already having been sent).

But there are devices which do not reconnect to the network or request acknowledgments. How do these continue to work correctly if there is patchy coverage?
I have come across the following forum post from 2017:
How much frame count deviation is allowed? - End Devices (Nodes) - The Things Network

The forum post calls out a maxFCntGap = 16384. I believe this means that there can be up to a difference of 16384 frames between one frame and the next which are deemed acceptable/valid, after which the counter will “resync”. In other words, frame counts aren’t very strict.

But reviewing RP002-1.0.4 Regional Parameters, it states the following:
MAX_FCNT_GAP was deprecated and removed from LoRaWAN 1.0.4 and subsequent versions.

Does this mean The Things Stack decides on the acceptable gap? If so, what is it now and is there a link/source to where it is called out?

I would also appreciate it if someone can confirm if my understanding is correct.

31 posts - 6 participants