Power Save =================== .. contents:: :local: :depth: 3 Overview -------- IEEE 802.11b defines a **Power Save (PS)** mechanism that allows stations (STAs) to conserve power by periodically turning off their radios (entering *doze mode*) while the Access Point (AP) buffers their traffic. At specific intervals, the AP announces buffered traffic via **beacons** containing a **Traffic Indication Map (TIM)**. Dozing STAs wake up, check for pending traffic, and either stay awake or return to sleep. This mechanism provides a tradeoff between power efficiency and latency and operates entirely at the **MAC layer** (PHY-independent). Power Save States ----------------- +------------------+-----------------------------------------------+ | State | Description | +==================+===============================================+ | **Active** | STA is fully awake, can transmit and receive. | | **Doze** | STA radio off, cannot send or receive. | | **Awake** | Temporary awake period after beacon or data. | | **Sleep** | Long-term power-saving state. | +------------------+-----------------------------------------------+ Power Management Bits ---------------------- Two bits in the **Frame Control** field control power save behavior: +----+------------------+-----------------------------------------------+ | Bit| Field Name | Meaning (1 = set) | +====+==================+===============================================+ | 12 | Power Management | STA will enter PS (doze) mode after this frame| | 13 | More Data | AP has additional buffered frames for STA | +----+------------------+-----------------------------------------------+ - STA sets *Power Management = 1* to inform AP it is entering doze mode. - AP sets *More Data = 1* in downlink frames if more buffered frames remain. Beacon Operation and TIM ------------------------ The AP transmits **beacons** at regular intervals (typically 100 TU = 102.4 ms). Each beacon includes: - **Timestamp** (for TSF synchronization) - **Capability information** - **TIM element** — announces which STAs have buffered unicast frames - **DTIM element** — announces pending broadcast/multicast frames Traffic Indication Map (TIM) ---------------------------- The **TIM element** identifies which stations have buffered data at the AP. Structure: +----------------------+----------------------------------------------+ | Field | Description | +======================+==============================================+ | DTIM Count | Number of beacons until next DTIM beacon | | DTIM Period | Interval between DTIM beacons | | Bitmap Control | Offset for partial bitmap | | Partial Virtual Bitmap| Bits indicating buffered STAs by AID index | +----------------------+----------------------------------------------+ Each STA is assigned an **AID (Association ID)** during association. The AP maps each AID to one bit position in the TIM bitmap. - **Bit = 1:** AP has buffered unicast frame(s) for that STA. - **Bit = 0:** No buffered frames. When an STA sees its bit set, it stays awake and sends a **PS-Poll**. DTIM (Delivery Traffic Indication Message) ------------------------------------------ The **DTIM** is a special beacon that informs STAs of pending broadcast/multicast data. Fields in TIM element: +-------------------+---------------------------------------------+ | Field | Description | +===================+=============================================+ | DTIM Count = 0 | Indicates this beacon *is* a DTIM beacon. | | DTIM Period | Defines how often DTIMs occur (e.g., 3). | +-------------------+---------------------------------------------+ Behavior: - STAs must wake for every DTIM beacon if they wish to receive broadcast traffic. - The AP transmits all queued broadcast/multicast frames immediately after DTIM beacon. Unicast Delivery Using PS-Poll ------------------------------ When an STA detects its bit set in the TIM, it requests its buffered frames using a **PS-Poll** control frame. PS-Poll Frame ~~~~~~~~~~~~~ +---------------------+------------------------------------+ | Field | Description | +=====================+====================================+ | Frame Control | Type: Control / Subtype: PS-Poll | | AID | STA’s Association ID | | BSSID | AP’s MAC address | | TA (Transmitter) | STA’s MAC address | +---------------------+------------------------------------+ PS-Poll Procedure ~~~~~~~~~~~~~~~~~ 1. STA wakes up at beacon time. 2. STA reads TIM; sees its AID bit = 1. 3. STA contends for the medium using DCF (DIFS + backoff). 4. STA sends **PS-Poll** to AP. 5. AP replies with one buffered frame: - **More Data = 1:** additional frames buffered. - **More Data = 0:** last buffered frame. 6. STA acknowledges the frame. 7. If More Data = 1 → STA sends another PS-Poll. 8. If More Data = 0 → STA returns to doze mode. Example Sequence ~~~~~~~~~~~~~~~~ .. code-block:: none Beacon(TIM) → PS-Poll → DATA#1 [MoreData=1] → PS-Poll → DATA#2 [MoreData=0] → Sleep NAV and Duration ---------------- - The PS-Poll frame includes a **Duration** field, reserving the medium for the upcoming AP response (DATA + ACK exchange). - Other STAs update their NAV and defer until the exchange completes. Null Data Frames (State Transitions) ------------------------------------ STAs use **Null Data** frames (no payload) to signal power state transitions. | Bit | Power Management | Meaning | |------|------------------|---------| | 0 | Active mode (stay awake) | | | 1 | Enter PS mode (doze) | | The STA transmits this frame before going to sleep or after waking up, allowing the AP to update its association table accordingly. Buffered Frame Delivery (Example) --------------------------------- .. code-block:: none AP : Beacon + TIM(bit=STA) STA: Wake → PS-Poll AP : DATA1 (MoreData=1) STA: ACK → PS-Poll AP : DATA2 (MoreData=0) STA: ACK → Sleep DTIM and Broadcast/Multicast Delivery ------------------------------------- - AP buffers broadcast/multicast frames until the next DTIM beacon. - When DTIM Count = 0, AP transmits all buffered broadcast/multicast frames after beacon transmission. - All PS STAs must stay awake until the DTIM transmission completes. .. code-block:: none DTIM Beacon → [Broadcast#1] → [Broadcast#2] → End of DTIM → STAs return to sleep Ad Hoc (IBSS) Power Save (ATIM Window) -------------------------------------- In **IBSS (Independent BSS)** networks, there is no AP to buffer frames. Instead, STAs coordinate via **ATIM (Announcement TIM)** frames. Mechanism: 1. All STAs wake for the **Beacon + ATIM window**. 2. During ATIM window, STAs announce buffered data via ATIM frames. 3. Recipients of ATIM stay awake for the next data period. 4. STAs without ATIMs return to doze after ATIM window. Timing: .. code-block:: none Beacon → ATIM window (announcements) → Data period → Sleep Timing Example (Infrastructure Mode) ------------------------------------ .. code-block:: none AP : Beacon (TIM bit=STA) STA: DIFS + Backoff → PS-Poll AP : SIFS → DATA (MoreData=1) STA: ACK → PS-Poll AP : SIFS → DATA (MoreData=0) STA: ACK → Sleep Power Save Timing Relationships ------------------------------- +-------------------+---------------------------------------------+ | Parameter | Description | +===================+=============================================+ | Beacon Interval | Period between beacon transmissions | | DTIM Period | Frequency of DTIM beacons | | SIFS | Between PS-Poll and DATA or ACK responses | | DIFS + Backoff | Before sending PS-Poll | | NAV | Protects AP’s PS-Poll DATA response window | +-------------------+---------------------------------------------+ Important MAC Fields -------------------- +----------------------+---------------------------+--------------------------------+ | Field | Function | Where Used | +======================+===========================+================================+ | Power Mgmt bit | STA sleep/awake signaling | Frame Control (STA→AP) | | More Data bit | AP indicates queued frames| Frame Control (AP→STA) | | TIM Bitmap | Announces buffered STAs | Beacon (TIM element) | | AID | Identifies STA bit index | Association & PS-Poll | | DTIM Count / Period | Multicast delivery timing | Beacon (DTIM field) | +----------------------+---------------------------+--------------------------------+ Edge Cases and Behavior Notes ----------------------------- | Case | Behavior | |-------|-----------| | STA misses beacon | STA stays asleep until next beacon, increased latency | | Multiple PS STAs | AP maintains per-STA buffers and bitmap bits | | AP buffer overflow | Queued frames dropped silently | | STA stays awake | Treated as active; AP transmits immediately | | PS-Poll lost | STA retries after timeout | | STA fails to send PS-Poll | Buffered frames eventually expire | Power Save with Fragmentation and RTS/CTS ------------------------------------------ - If buffered frame is fragmented, AP transmits fragments using SIFS spacing. - STA stays awake until final fragment (More Data = 0). - RTS/CTS may precede PS-Poll response to protect channel access. - NAV ensures protection during PS-Poll → DATA exchanges. Infrastructure vs IBSS Power Save --------------------------------- +------------------------+----------------------------------+----------------------------------+ | Feature | Infrastructure (AP-based) | IBSS (Ad Hoc) | +========================+==================================+==================================+ | Coordination | Centralized (AP) | Distributed among peers | | Signaling Mechanism | TIM / DTIM beacons | ATIM window | | Buffered by | AP | Each STA maintains buffer | | Unicast Delivery | PS-Poll frames | ATIM + direct data | | Broadcast Delivery | At DTIM | During ATIM window | | Wake Period | Beacon interval | Beacon + ATIM window | +------------------------+----------------------------------+----------------------------------+ Example Beacon TIM Layout ------------------------- Example TIM element in beacon frame: .. code-block:: none Element ID: 5 (TIM) Length: variable DTIM Count: 0x01 DTIM Period: 0x03 Bitmap Control: 0x00 Partial Virtual Bitmap: 0x40 0x00 (bit 6 = STA with AID=6 has pending data) Implementation Guidelines -------------------------- - Beacons must always be sent at **basic rates**. - TIM and DTIM fields must accurately reflect buffered traffic. - AP must maintain per-STA queues for PS clients. - PS STAs must synchronize with AP’s beacon interval. - DTIM period determines broadcast delay and power-saving efficiency. - AP may drop buffered frames after timeout or queue overflow. References ---------- - IEEE Std **802.11-2020**, Clause **10.2.1–10.2.3 (Power Management)** - IEEE Std **802.11b-1999**, Clause **18.2.3.6 (TIM, DTIM, PS-Poll)** - Gast, M. *802.11 Wireless Networks: The Definitive Guide*, O’Reilly - Tanenbaum & Wetherall, *Computer Networks*, 5th Edition - Heusse et al., *Performance Anomaly of 802.11b*, IEEE INFOCOM 2003 Figures -------- .. figure:: _static/powersave_tim.svg :align: center :alt: TIM bitmap and DTIM structure Example TIM and DTIM relationship in beacon frame. .. figure:: _static/powersave_sequence.svg :align: center :alt: Power save sequence timing PS-Poll and data delivery sequence between STA and AP.