MM-IoT-SDK WNM Sleep Operation
Features > WNM Sleep
WNM Sleep mode is supported by the MM IoT SDK. The following function is provided as part of the morselib API to enable and disable WNM Sleep mode:
enum mmwlan_status mmwlan_set_wnm_sleep_enabled(bool wnm_sleep_enabled);
An overview of the operation of this function is shown in the diagram below.
Application code triggers entry to WNM Sleep by invoking mmwlan_set_wnm_sleep_enabled() with the enabled parameter set to true. This triggers the WPA Supplicant software on the STA to send a request to enter WNM Sleep Mode to the AP. If the Supplicant receives an affirmative response from the AP, it puts the MM chip into WNM Sleep mode, in which case the chip will no longer wake up to receive DTIM beacons.
To wake up from WNM Sleep, the application code invokes mmwlan_set_wnm_sleep_enabled() with the enabled parameter set to false. This causes the Supplicant to send a request to exit WNM Sleep Mode to the AP and disable WNM Sleep on the MM chip, causing it to return to normal operation. Following exit from WNM Sleep, the AP may initiate the group rekey procedure if a rekey occurred while the STA was in WNM Sleep.