♥India♥

WMM Power Save (WMM-PS)


12 comments
Categories : PowerSave , WLAN

Before going through WMM-PS you should go through LegacyPowerSave for better understanding.

♣ WMM-PS topics:

♣ What is WMM-PS?

If we break down WMMPS, we get WMM+PS = Wi-Fi Multimedia + Powersave. This means if any Wi-Fi device supports WMM then that device is eligible to support WMMPS. But it’s not mandatory for a device to use WMMPS evenif it supports WMM. The point is, to get WMMPS device has to support WMM.

♣ How to check if AP supports WMM-PS?

We need to check U-APSD field from AP’s Beacon.

Beacon-> Tagged Parameter-> WMM/WME -> WME Qos Info -> U-APSD

Here is this article; WMMPS refers to U-APSD (Unscheduled Automatic PowerSave Delivery). U-APSD is widely supported in all devices and more famous than S-APSD (Scheduled Automatic PowerSave Delivery)

♣ Steps for WMM-PS:

Assumptions:

a. STA and AP both should support WMM/QoS.

b. Association should be WMM association. We can check Association Request, Association Response packet for WMM IE.

c. STA and AP both should support WMMPS. For AP we have discussed in previous point.

For STA WMMPS support we need to check in Association Request frame-> WME ->WME QoS Info ->Set 4 ACs [VO, VI, BE, BK] as 1 .This also means each AC is delivery and trigger enabled. As of now just remember this we will discuss in deep in another post.

d. One more important parameter: It also specifies the maximum SP length which indicates the number of buffered frames the AP may send per service period. We will discuss this later with an example to understand better.

Screenshot for c and d

Steps:

1. Now after association is completed, STA sends one Null Data frame to AP where PM=1. This means STA is going to powersave. This is same as Legacy PowerSave mechanism.

2. We have assumed that all ACs in Association Request frame are set to 1. Then AP indicates in Beacon TIM for buffered data for sleeping STA.

3. STA wakes up in listen interval and sees that Beacon TIM indicates its AID.

4. STA sends a trigger frame to AP. A trigger frame may be a QoS Null or Data packet. Remember that PM bit is set to 1 in trigger frame (Data or QoS Null). In general we can see trigger frame is Voice Access Category.

5. Once AP receives a trigger frame, AP starts sending buffer data one by one within max service period length (See Max SP Length). In our example SP length is set to 0.

6. STA sends ACK for each Data packet.

Let’s see one instance to understand point 5, 6 better. Here we can see ping request coming from AP and ping reply coming from STA. So, ping request is buffered packet.

Screenshot 1
Screenshot 2

7. STA goes to sleep without any sending packet to AP. Because all trigger frame is having PM=1 always. This style is same as PS-POLL mechanism.

♣ Maximum Service Period Length (Max SP Length):

1. Suppose STA sets “Maximum service period length” as 10(one zero) in Association Request. So according to below table AP may send max 2 Data frame to STA within one service period.

Max SP length is 2 bits field and here is meaning table from IEEE Spec

2. Now AP has buffered 4 packets.

3. After STA sends trigger frame to AP, AP sends Data1 where More Data =1, EOSP = 0

4. Data2 where More Data =1, EOSP=1

5. So more data is buffered in AP, now STA has to send one more trigger frame to get the other buffer data.

6. After STA sends one more trigger frame,

AP sends Data3 where More Data =1 and EOSP=0

Data4 where More Data =0 and EOSP=1

♣ Partial WMM-PS:

As we know in our above example all ACs are set to 1 in Assoc Request. If any scenario STA sets some ACs as 1 in Assoc Request then different protocols will be used for powersave.

1.  AC [1] will follow WMMPS and other AC [0] follows Legacy powersave.

2. In this case, Beacon’s TIM will indicate only for Legacy buffer data. STA has to send trigger frame using own logic to get WMMPS buffer data from AP.

♣ What happens if STA sends trigger frame but AP does not have any buffered data?

In this scenario AP replies with QoS Null frame where More Data=0 and EOSP=1.

♣ Why trigger packet’s AC is Voice?

So that trigger packet gets highest priority from STA transmission on the wireless medium.

♣ One real life example where STA can send trigger frame without waiting for beacon and it’s required to do so?

Example:

Suppose one Cisco wireless voip phone is connected to Wi-Fi router (AP). AP backend has internet through wired network. This wireless phone supports WMMPS and goes to powersave. Now wireless voip phone got one voice call so any voice packet coming from AP (AP gets from wired network) should be buffered at AP. And we know voip phone (STA) can transmit voice packet any time as its TX. In general AP’s beacon interval is 100ms so AP’s TIM bit will set after 100ms. 100ms is the minimum time STA has to wait to get voice buffered data. But voice packet cannot tolerate 100ms latency. Otherwise there will not be any synchronization between received and sent voice. So to avoid this problem STA sends trigger frame on every 20ms (It’s proven that voice packet can tolerate 20ms delay) to AP and then AP clear all buffered voice packet. If there is no buffered packet then AP replies with QoS null where More Data=0 and EOSP=1.

♣ WMMPS is based on U-APSD or S-APSD?

WMMPS is based on U-APSD.

♣ Why it’s called Unscheduled?

Because there is no predefined agreed time when STA sends trigger frame.

♣ What is trigger frame?

A trigger is a data frame (may not contain data) which sent to AP from STA to get buffered data from AP. PM bit is set to 1 in trigger frame and AC is generally set to voice.

♣ Good to know

♣ Conclusion:

There are advantages for WMMPS over Legacy Powersave, that’s why WMMPS (U-APSD) is widely accepted in many devices. We will discuss the comparison between Legacy powersave and WMMPS in another post.

Download:

WMMPS_Capture

♥♥ If you have any doubts or query please let me know in comment section or send mail at feedback@wifisharks.com ♥♥

12 comments on “WMM Power Save (WMM-PS)

    dushyanth

    • April 7, 2021 at 11:50 pm

    Hi Bamdeb ,
    Article is very nice to understand in easy way .

    I understand that STA have two choices
    1)Wait for Beacon TIM
    2)Send trigger when you need

    I have doubt on 2nd point how STA will get to know AP buffered data for STA ?
    What basis STA will send Trigger frame for every 20 milliseconds ?

      Bamdeb

      • April 10, 2021 at 6:21 pm

      Q1: I have doubt on 2nd point how STA will get to know AP buffered data for STA ?
      => STA will not come to know when AP buffered data for STA. This is the responsibility of the application to know when to send trigger frame to AP.

      Q2: What basis STA will send Trigger frame for every 20 milliseconds ?
      => I have given VOIP phone example in this article. Read that part multiple times.
      STA sending trigger frame to ap and other wifi communication happens in Data link layer, Phy layer.
      If you have any VOIP application/software installed on the wireless phone device which knows that STA has to send trigger frame within this time irrespective of AP buffered data or not.
      In voip phone case 20ms is optimal time . In other application, this time may be different.
      So basically, application knows when to trigger and this application then pass this command to data link to send trigger frame. If these is buffered data with AP , AP will send or no harm right?

      But waiting for beacon time interval 100ms time and then send trigger frame ,is longer time for the time critical application like voice, video. For other data like mail, text ; 100ms waiting time is acceptable.

    Amit Deshmukh

    • December 27, 2020 at 11:06 am

    Excellent Bamdeb 🙂 Packet capture based analysis helped me to understand WMM concepts better.

      Bamdeb

      • December 27, 2020 at 11:17 am

      Hi Amit,
      Thanks for reading the article wmmps☺

    Ramprasad

    • November 17, 2020 at 4:46 pm

    good one bamdeb!

      Bamdeb

      • November 19, 2020 at 3:26 pm

      Thank you Ramprasad ☺

    Khaja Shaik

    • October 28, 2020 at 6:26 am

    Thanks for Sharing this Its really helped me. And i have below doubts can you clarify please
    In the first Scenario-
    #1. When All AC’s are set to 1 in QOS field at Assoc Req Frame . Why STA need to check the TIM Flag at beacon it can directly send UL trigger frame based on its QOS need right ?
    2. What is mean by Deliver Enable And trigger Enable ?

      Bamdeb

      • October 28, 2020 at 4:10 pm

      ♥Thanks for reading the article and i am glad that it helped you to understand WMMPS♥

      #1: One small technical correction about first line. All ACs are set to 1 in WMM IE [Should not use term QoS field] in Assoc Req. QoS ~ WMM term feels similar but some interview may catch this ☻. QoS field term can be used for Data packet.

      Now, ALL ACs are set to 1. It’s the normal protocol rule to wait for TIM bit for buffered data indication but the beauty of WMMPS is, if STA wants to send UL trigger frame without waiting for Beacon , STA is free to send and it’s is accepted by AP. That’s why i explained one real time example where that application needs to send UL trigger without waiting for beacon.
      So, all client/STA is having to two choices [a] wait for beacon TIM or [b] send trigger when you need.

      #2. By default all ACs are Delivery and Trigger Enabled.
      I will write one separate article on “Only Delivery enabled and only Trigger Enabled” to explain better. I will share link here.

      Thanks.

        Khaja Shaik

        • November 25, 2020 at 10:59 am

        Your comments really helped a lot.
        Could you please share sniffer capture if you have any for Legacy power save and WMM power save

          Bamdeb

          • November 25, 2020 at 3:53 pm

          Glad to hear that it helps you.
          I have added capture download link in WMMPS and Legacy PowerSave post. Check and confirm if you are able to download all captures.

    Rian

    • October 26, 2020 at 1:17 pm

    Very useful.

      Bamdeb

      • October 26, 2020 at 1:24 pm

      Thanks a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!
%d bloggers like this: