NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Template: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.