EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1550 background imageLoading...
Page #1550 background image
Chapter 4. API Guides
Current implementation of 802.11k includes support for beacon measurement report, link measurement report and
neighbor request.
Refer IDF example examples/wifi/roaming/README.md to set up and use these APIs. Example code only demon-
strates how these APIs can be used, the application should define its own algorithm and cases as required.
4.33.18 Wi-Fi Location
Wi-Fi Location will improve the accuracy of a devices location data beyond the Access Point, which will enable
creation of new, feature-rich applications and services such as geo-fencing, network management, navigation and
others. One of the protocols used to determine the device location with respect to the Access Point is Fine Timing
Measurement which calculates Time-of-Flight of a WiFi frame.
Fine Timing Measurement (FTM)
FTM is used to measure Wi-Fi Round Trip Time (Wi-Fi RTT) which is the time a Wi-Fi signal takes to travel from
a device to another device and back again. Using Wi-Fi RTT the distance between the devices can be calculated
with a simple formula of RTT * c / 2, where c is the speed of light. FTM uses timestamps given by Wi-Fi interface
hardware at the time of arrival or departure of frames exchanged between a pair of devices. One entity called FTM
Initiator (mostly a Station device) discovers the FTM Responder (can be a Station or an Access Point) and negotiates
to start an FTM procedure. The procedure uses multiple Action frames sent in bursts and its ACKs to gather the
timestamps data. FTM Initiator gathers the data in the end to calculate an average Round-Trip-Time. ESP32-S2
supports FTM in below configuration:
ESP32-S2 as FTM Initiator in Station mode.
ESP32-S2 as FTM Responder in SoftAP mode.
Distance measurement using RTT is not accurate, factors such as RF interference, multi-path travel, antenna orien-
tation and lack of calibration increase these inaccuracies. For better results it is suggested to perform FTM between
two ESP32-S2 devices as Station and SoftAP. Refer to IDF example examples/wifi/ftm/README.md for steps on
how to setup and perform FTM.
4.33.19 ESP32-S2 Wi-Fi Power-saving Mode
Station Sleep
Currently, ESP32-S2 Wi-Fi supports the Modem-sleep mode which refers to the legacy power-saving mode in the
IEEE 802.11 protocol. Modem-sleep mode works in Station-only mode and the station must connect to the AP first.
If the Modem-sleep mode is enabled, station will switch between active and sleep state periodically. In sleep state,
RF, PHY and BB are turned off in order to reduce power consumption. Station can keep connection with AP in
modem-sleep mode.
Modem-sleep mode includes minimum and maximum power save modes. In minimum power save mode, station
wakes up every DTIM to receive beacon. Broadcast data will not be lost because it is transmitted after DTIM.
However, it can not save much more power if DTIM is short for DTIM is determined by AP.
In maximum power save mode, station wakes up every listen interval to receive beacon. This listen interval can be set
longer than the AP DTIM period. Broadcast data may be lost because station may be in sleep state at DTIM time. If
listen interval is longer, more power is saved but broadcast data is more easy to lose. Listen interval can be configured
by calling API esp_wifi_set_config() before connecting to AP.
Call esp_wifi_set_ps(WIFI_PS_MIN_MODEM) to enable Modem-sleep minimum power save mode or
esp_wifi_set_ps(WIFI_PS_MAX_MODEM) to enable Modem-sleep maximum power save mode after call-
ing esp_wifi_init(). When station connects to AP, Modem-sleep will start. When station disconnects from
AP, Modem-sleep will stop.
Call esp_wifi_set_ps(WIFI_PS_NONE) to disable modem sleep entirely. This has much higher power con-
sumption, but provides minimum latency for receiving Wi-Fi data in real time. When modem sleep is enabled,
Espressif Systems 1539
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish