Feedback
Feedback

If you are having issues with the exercises, please create a ticket on DevZone: devzone.nordicsemi.com
Click or drag files to this area to upload. You can upload up to 2 files.

Beacon frames: TIM and DTIM

Power save modes are an essential part of the operation of any low power IoT device. They help the device extend its battery lifetime, mitigating the need for costly regular battery replacements. Wi-Fi is not an exception, it implements various power save modes which operate in different ways.

Although there are some differences in the operation of power save modes in Wi-Fi, they are generally quite similar. Wi-Fi power save modes are mainly concerned with how a sleeping STA retrieves buffered messages from the AP. Such signaling and data retrieval is done via special information elements called Traffic Indication Map (TIMs) elements.

Beacon Frames

Beacon frames are a key aspect to how APs communicate with their current and potential STAs. An AP transmits beacon frames at regular intervals for several reasons:

  • To announce its SSID to enable close-by STAs to discover its network
  • To broadcast key network information to connected STAs , such as:
    • Supported data rates
    • Operational channel numbers
    • Security protocols used
    • Existence of buffered multicast or unicast messages

TIM Elements

An integral part of beacon frames is an information element called Traffic Indication Map (TIM). A TIM is important because it informs STAs about the state of buffered data at the AP. The figure below shows a typical TIM element.

A TIM element

The partial Virtual Bitmap represents the traffic status for all the STAs covered by an AP. If the AP wishes to inform an STA that it has buffered unicast messages for it, it will indicate this in the Partial Virtual Bitmap by setting the bit corresponding to the STAs Association Identifier (AID) to 1. Whereas if the AP wishes to inform STAs that it has buffered multicast/broadcast messages for them, it will indicate this by setting bit 0 in the Bitmap Control field to 1.

In normal operation (non-power-save mode), STAs are always awake and they receive every beacon frame, inspecting the TIM element. If an STA finds its AID in the Partial Virtual Bitmap, then it sends the AP a message indicating it is ready to receive its buffered messages.

DTIM Beacons

A DTIM beacon is a special kind of beacon frame that occurs every specific interval, namely; every DTIM period. A special counter is used to indicate this in real-time, called the DTIM count. In other words, only some beacon frames are DTIM beacons, depending on the DTIM period.

For example, if the DTIM period is 4, this means that there are 4 regular (TIM) beacons between each DTIM beacon. This value of “DTIM period=4” will always be there in the DTIM period field in every beacon frame.

The DTIM count, on the other hand, provides a real-time counter, indicating how many frames (including the current frame) will appear before the next DTIM beacon frame. Using the same example, the first beacon frame will have the DTIM count=4 and it will have a normal TIM element. The second beacon frame will have a DTIM count value of 3 and will also have a normal TIM element. By the 5th beacon frame, the DTIM count will be zero and this frame will be a DTIM beacon frame.

Definition

DTIM frame: A special type of beacon frame.
DTIM period: Indicates how many regular (TIM) beacon frames are between successive DTIM beacon frames.
DTIM count: A counter value that decrements for every beacon frame until it’s zero, to indicate a DTIM frame.

A DTIM frame is important because in normal operation (non-power-save mode), the AP buffers multicast/broadcast messages and sends them right after a DTIM frame.

However, DTIM frames also play a significant role in power save modes due to one key behavior done by STAs in power save modes: they sleep in periods of normal TIM frames and wake up at DTIM frames.

Message retrieval

Broadcast/multicast message retrieval

When operating in power save modes, STAs can go to sleep for short periods, to save power. A device in sleep mode will stay asleep during normal TIM beacon frames and only wake up every DTIM frame to check the DTIM bit of the Bitmap control field of the TIM element.

TIM element

If that bit is equal to 1, the device will stay awake and the AP will send the buffered multicast data right after the DTIM beacon. If an AP serves many devices, and as little as one of the those devices uses some kind of a power save mode, the AP will buffer multicast messages and send them directly after a DTIM beacon, to ensure that all devices are awake at that particular moment. The differences between power save modes are more highlighted when an AP has buffered unicast messages for a device.

Unicast message retrieval

A device in power save mode will wake up every DTIM beacon period and will also examine another part of the TIM element, the Partial Virtual Bitmap, looking for its AID. When found, the STA will know that the AP has buffered unicast data for it. If the device does not find its AID in the TIM element of the DTIM beacon, it will only receive the buffered multicast data (if any) then go back to sleep. It is important to note then when an AP has buffered unicast messages for a device, it indicates this in all its beacons, not only in DTIM beacons as its the case for multicast messages. This is important and will play an important role in understanding power save modes later.

To summarize, buffered broadcast/multicast messages are indicated in the DTIM bit of the TIM element, every DTIM frame, which STAs have to wake up and monitor anyways. On the other hand, unicast messages are indicated in the Partial Virtual Bitmap in every TIM frame, but devices are only notified in DTIM frames where they wake up.

Register an account
Already have an account? Log in
(All fields are required unless specified optional)

  • 8 or more characters
  • Upper and lower case letters
  • At least one number or special character

Forgot your password?
Enter the email associated with your account, and we will send you a link to reset your password.