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 #1557 background imageLoading...
Page #1557 background image
Chapter 4. API Guides
Select Wi-Fi CSI in menuconfig. It is Menuconfig > Components config > Wi-Fi > WiFi CSI(Channel
State Information).
Set CSI receiving callback function by calling API esp_wifi_set_csi_rx_cb().
Configure CSI by calling API esp_wifi_set_csi_config().
Enable CSI by calling API esp_wifi_set_csi().
The CSI receiving callback function runs from Wi-Fi task. So, do not do lengthy operations in the callback function.
Instead, post necessary data to a queue and handle it from a lower priority task. Because station does not receive
any packet when it is disconnected and only receives packets from AP when it is connected, it is suggested to enable
snier mode to receive more CSI data by calling esp_wifi_set_promiscuous().
4.33.26 Wi-Fi HT20/40
ESP32-S2 supports Wi-Fi bandwidth HT20 or HT40, it doesnt support HT20/40 coexist.
esp_wifi_set_bandwidth() can be used to change the default bandwidth of station or AP. The de-
fault bandwidth for ESP32-S2 station and AP is HT40.
In station mode, the actual bandwidth is firstly negotiated during the Wi-Fi connection. It is HT40 only if both the
station and the connected AP support HT40, otherwise its HT20. If the bandwidth of connected AP is changes,
the actual bandwidth is negotiated again without Wi-Fi disconnecting.
Similarly, in AP mode, the actual bandwidth is negotiated between AP and the stations that connect to the AP. Its
HT40 if the AP and one of the stations support HT40, otherwise its HT20.
In station/AP coexist mode, the station/AP can configure HT20/40 seperately. If both station and AP are negotiated
to HT40, the HT40 channel should be the channel of station because the station always has higher priority than AP
in ESP32-S2. E.g. the configured bandwidth of AP is HT40, the configured primary channel is 6 and the configured
secondary channel is 10. The station is connected to an router whose primary channel is 6 and secondary channel is
2, then the actual channel of AP is changed to primary 6 and secondary 2 automatically.
Theoretically the HT40 can gain better throughput because the maximum raw physicial (PHY) data rate for HT40 is
150Mbps while its 72Mbps for HT20. However, if the device is used in some special environment, e.g. there are
too many other Wi-Fi devices around the ESP32-S2 device, the performance of HT40 may be degraded. So if the
applications need to support same or similar scenarios, its recommended that the bandwidth is always configured
to HT20.
4.33.27 Wi-Fi QoS
ESP32-S2 supports all the mandatory features required in WFA Wi-Fi QoS Certification.
Four ACs(Access Category) are defined in Wi-Fi specification, each AC has a its own priority to access the Wi-Fi
channel. Moreover a map rule is defined to map the QoS priority of other protocol, such as 802.11D or TCP/IP
precedence to Wi-Fi AC.
Below is a table describes how the IP Precedences are mapped to Wi-Fi ACs in ESP32-S2, it also indicates whether
the AMPDU is supported for this AC. The table is sorted with priority descending order, namely, the AC_VO has
highest priority.
IP Precedence Wi-Fi AC Support AMPDU?
6, 7 AC_VO (Voice) No
4, 5 AC_VI (Video) Yes
3, 0 AC_BE (Best Effort) Yes
1, 2 AC_BK (Background) Yes
The application can make use of the QoS feature by configuring the IP precedence via socket option IP_TOS. Here
is an example to make the socket to use VI queue:
Espressif Systems 1546
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