Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

RF4CE Frame Counter

From Texas Instruments Wiki
Jump to: navigation, search

The Frame Counter (FC) is a field in an RF4CE frame that is used to detect duplicate transmission, and thus also help protect against replay attacks. It is stored in the Network Information Base, in the attribute nwkFrameCounter. It is a 32 bit unsigned integer and each RF4CE node will have one transmitted FC which is initialized to 1. In addition to the transmitted FC each node will maintain one received FC per paired node which is initialized to 0. This value is stored in the pairing entry.

When a node generates a frame it will set the FC to the value of nwkFrameCounter, and then add 1 to nwkFrameCounter. Note that it is not incremented when a frame is re-transmitted, only when first generated.

When a node's Network Layer receives a frame, in other words the frame passes all first-level filtering in the MAC layer, it will check the FC. The FC must be greater than the currently stored received FC for this pairing entry. If it passes this check then the received FC is updated with the new incoming FC value.

During a warm start, when the Network Layer resets, the constant nwkcFrameCounterWindow (1024) must be added to nwkFrameCounter.

If nwkFrameCounter reaches the maximum value of 0xFFFFFFFF then the Network Layer will report an error to application when requested to generate a frame. The error reported is 0xB6, FRAME_COUNTER_EXPIRED.