Wi-Fi Power Modes
Introduction
This document provides details on the different Wi-Fi power modes which can be used by the host to optimize the power efficiency of its application. In addition to providing information on the different Wi-Fi power modes available, the document describes how they should be enabled using the WF(M)200 FMAC or LMAC APIs. To optimize even further the power consumption, the WF200 can make use of its different device power modes (i.e., active, sleep, reset and shutdown). The device power modes are documented here .
Low Power Wi-Fi Background
Wi-Fi power save mechanisms were implemented first in the 802.11 specification. However, at this time (1999) there was almost no battery powered Wi-Fi devices on market so Power Save (PS) was rarely used. Current day IoT devices have a set of specific, well-defined, low-power requirements:
- Power Save Mode (PSM) (1999)
-
Automatic Power Save Delivery (APSD) as a part of WMM (Wi-Fi Multimedia) related to QoS (Quality-of-Service), with two modes:
- Scheduled (S-APSD), targeting large data flow such as video and audio streaming. Rarely used as it is simpler to leave power save.
- Un-scheduled (U-APSD), using a trigger frame sent by the Station, targeting less demanding bidirectional communication such as VoIP
The WF(M)200 provides everything required to save power by turning the RF and other parts of the chip off whenever possible (i.e., when not active or receiving beacons) while maintaining the connection to the AP, as well as allowing the host processor to enter suspend mode in the absence of relevant Wi-Fi traffic.
WF(M)200 Low Power Wi-Fi
Silicon Labs WF(M)200 allows applications to achieve optimal power consumption by providing a highly configurable Wi-Fi power mode selection API.
Wi-Fi Protocol Power Modes
The WF(M)200 supports four Wi-Fi power modes.
- Active mode
- Legacy 802.11 PS Mode (PS-Poll)
- Fast-PS mode
- U-APSD mode (WMM-PS)
Below are cases for each mode where the station is connected to an Access Point and configured in the power mode.
To indicate that it will go to sleep, the Station sends a QoS NULL data frame with the Frame Control Field's 'P' (Power Management) bit set to
1
.
Active Mode
This is the standard and default mode where the Station is not in power save.
- 2 unicast packets received by the AP for the Station.
- The delivery is done immediately.
- An acknowledgement packet is sent to the AP after every reception.
Legacy 802.11 PS Mode (PS-Poll)
- 2 unicast packets received by the AP for the Station.
- The delivery is postponed until next the Station wake-up.
- The AP indicates data availability using the AID (Association IDentifier) in the TIM (Traffic Indication Map).
-
On the next wake-up, the Station
sends a PS-Poll
to retrieve one packet.
- The Station has to send a PS-Poll to receive one single packet.
- The PS-Poll frame sent by the Station contains its AID.
- The Station re-enables power save mode when no more packets are left.
Fast-PS Mode
Fast-PS is not defined in the 802.11 specification but is a de-facto popular method to handle power save by having the STA indicate it enables/disables Power Management. When out of power save, less messages are required conpared to PS-Poll to retrieve all the buffered frames.
- 2 unicast packets received by the AP for the Station.
- The delivery is postponed until next the Station wake-up.
- The AP indicates data availability using the AID (Association IDentifier) in the TIM (Traffic Indication Map).
-
On the next wake-up, the Station
disables power save mode
. The Station
sends a QoS Null frame
with the
'P'
bit set to
0
to indicate it leaves power save mode. - The AP sends packets.
- The Station re-enables power save mode after a certain amount of time without activity (Timeout).
U-APSD Mode
Introduced with the WMM-PS specification (Wi-Fi Multimedia-Power Save), U-APSD (Un-scheduled Automatic Power Save Delivery) is part of the latest protocols introduced in the Wi-Fi specification.
-
The AP indicates U-APSD support in
beacon frames
via a
WMM/WME
Information Element (IE), in theWME QoS Info/U-APSD
bit. -
The Station indicates U-APSD support in
(re) Association frames
via a
WMM/WME
Information Element (IE), in theWME QoS Info/AC_BE/AC_BK/AC_VI/AC_VO
bits, corresponding to 'Best Effort'/'BacKground'/'VIdeo'/'VOice'. - 2 unicast packets received by the AP for the Station.
- The delivery is postponed until next the Station wake-up.
- The AP indicates data availability using the AID (Association IDentifier) in the TIM.
- On the next wake-up, the Station sends a QoS trigger frame to start a Service Period.
- The AP sends packets with EOSP bit (End Of Service Period) at 0 as long as there is still data available.
- The last available packet comes with EOSP bit at 1 ending the Service Period.
- The Station goes back in power save.
Choosing the Most Efficient Wi-Fi Power Mode
You can refer to the table below to select the most appropriated Wi-Fi power mode for your application.
Wi-Fi power mode | Low throughput | High throughput | Interoperability | Power savings |
---|---|---|---|---|
Active |
|
|
|
|
PS-Poll |
Appropriated for "one packet per wake-up" application |
Requires additional protocol traffic for each packet |
|
Related to the additional traffic |
Fast-PS |
Timeout after each communication |
High throughput handled without power save mode enabled |
|
trade-off |
U-APSD |
|
|
Relies on the support and good implementation on the AP side |
|
Configuring the Wi-Fi Power Mode in your Application
FMAC Wi-Fi Power Mode API
In
sl_wfx_set_power_mode()
, set
strategy
to the Wi-Fi power mode which fits your application the best.
// Initialize the Wi-Fi FMAC driver
sl_wfx_init();
// Connect to a Wi-Fi access point
sl_wfx_send_join_command();
// Wait for the succesful connection indication
/**************************************************************************//**
* @brief Set the power mode used as a station. The Wi-Fi chip will enable the
* Wi-Fi power mode feature.
*
* @param mode is the power mode to be used by the connection
* @arg WFM_PM_MODE_ACTIVE
* @arg WFM_PM_MODE_BEACON
* @arg WFM_PM_MODE_DTIM
* @param strategy is the device power save polling strategy
* @arg WFM_PM_POLL_UAPSD
* @arg WFM_PM_POLL_FAST_PS
* @param interval is the number of beacons/DTIMs to skip while sleeping
* @returns SL_STATUS_OK if the command has been sent correctly,
* SL_STATUS_FAIL otherwise
*
* @note the power mode has to be set once the connection with the AP is
* established
*****************************************************************************/
sl_wfx_set_power_mode(mode, strategy, interval);
The WF(M)200 firmware handles the power mode based on the host request and the AP capabilities.
- The default connection mode is always active.
- If the host requests a U-APSD or Fast-PS power mode, the WF(M)200 applies the request if the mode is supported by the AP. If this is not the case, the WF(M)200 can default to PS-Poll. The host is informed via a "power save error indication".
- If an interoperability issue is detected, the WF(M)200 can take the initiative to switch power mode (U-APSD -> Fast-PS, Fast-PS -> PS-Poll). The host is informed via a "power save error indication".
In addition to the power mode, the host can configured how many beacons/DTIMs should be skipped by the WF(M)200.
The broadcast frames are sent right after a beacon with DTIM. If a Station uses DTIM skipping (The Station does not wake up for every DTIMs), it can miss part of the broadcast traffic. If the application relies on receving important broadcast messages, it is recommended to wake up on every DTIMs.
LMAC Wi-Fi Power Mode API
The Wi-Fi power save mode can be enabled on a Linux platform with the command below.
# Activate Wi-Fi power save
iw wlan0 set power_save on
Not all Linux kernels allow U-APSD. To enable it, follow these intructions . The WF(M)200 handles the Wi-Fi power save mode based on the AP and MAC80211 settings:
- The LMAC firmware defaults to U-APSD if supported by the AP and enabled by MAC80211 (see above).
- If U-APSD is not supported, it uses Fast-PS.
- In both cases, if the firmware detects an issue to retrieve data when using U-APSD, it switches to Fast-PS.
The LMAC API defaults to configuring the WF(M)200 to wake up on every DTIMs.