Wi-Fi Channel State Information - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 4. API Guides
tenna mode is WIFI_ANT_MODE_ANT0, the enabled antenna 0 is selected for RX/TX data. If the antenna mode
is WIFI_ANT_MODE_ANT1, the enabled antenna 1 is selected for RX/TX data. Otherwise, Wi-Fi automatically
selects the antenna that has better signal from the enabled antennas.
If the RX antenna mode is WIFI_ANT_MODE_AUTO, the default antenna mode also needs to be set. Because the
RX antenna switching only happens when some conditions are met, e.g. the RX antenna starts to switch if the RSSI
is lower than -65 dBm and if another antenna has better signal etc, RX uses the default antenna if the conditions are
not met. If the default antenna mode is WIFI_ANT_MODE_ANT1, the enabled antenna 1 is used as the default RX
antenna, otherwise the enabled antenna 0 is used as the default RX antenna.
Some limitations need to be considered:
• The TX antenna can be set to WIFI_ANT_MODE_AUTO only if the RX antenna mode is
WIFI_ANT_MODE_AUTO because TX antenna selecting algorithm is based on RX antenna in
WIFI_ANT_MODE_AUTO type.
• Currently Bluetooth® doesn't support the multiple antennas feature, please don't use multiple antennas
related APIs.
Following is the recommended scenarios to use the multiple antennas:
• In
Wi-Fi
mode
WIFI_ANT_MODE_AUTO. The Wi-Fi driver selects the better RX/TX antenna automatically.
• The RX antenna mode is configured to WIFI_ANT_MODE_AUTO. The TX antenna mode is configured
to WIFI_ANT_MODE_ANT0 or WIFI_ANT_MODE_ANT1. The applications can choose to always select
a specified antenna for TX, or implement their own TX antenna selecting algorithm, e.g. selecting the TX
antenna mode based on the channel switch information etc.
• Both RX/TX antenna modes are configured to WIFI_ANT_MODE_ANT0 or WIFI_ANT_MODE_ANT1.
Wi-Fi Multiple Antennas Configuration
Generally, following steps can be taken to configure the multiple antennas:
• Configure which GPIOs are connected to the antenna_selects, for example, if four antennas are supported and
GPIO20/GPIO21 are connected to antenna_select[0]/antenna_select[1], the configurations look like:
wifi_ant_gpio_config_t config
{ .gpio_select
{ .gpio_select
};
• Configure which antennas are enabled and how RX/TX use the enabled antennas, for example, if antenna1 and
antenna3 are enabled, the RX needs to select the better antenna automatically and uses antenna1 as its default
antenna, the TX always selects the antenna3. The configuration looks like:
wifi_ant_config_t config
.rx_ant_mode
.rx_ant_default
.tx_ant_mode
.enabled_ant0
.enabled_ant1
};

4.33.24 Wi-Fi Channel State Information

Channel state information (CSI) refers to the channel information of a Wi-Fi connection. In ESP32-S2, this infor-
mation consists of channel frequency responses of sub-carriers and is estimated when packets are received from the
transmitter. Each channel frequency response of sub-carrier is recorded by two bytes of signed characters. The first
one is imaginary part and the second one is real part. There are up to three fields of channel frequency responses
according to the type of received packet. They are legacy long training field (LLTF), high throughput LTF (HT-LTF)
and space time block code HT-LTF (STBC-HT-LTF). For different types of packets which are received on channels
with different state, the sub-carrier index and total bytes of signed characters of CSI is shown in the following table.
Espressif Systems
WIFI_MODE_STA,
both
=
{
=
1, .gpio_num
=
20
=
1, .gpio_num
=
21
=
{
=
WIFI_ANT_MODE_AUTO,
=
WIFI_ANT_ANT0,
=
WIFI_ANT_MODE_ANT1,
=
1,
=
3
1544
Submit Document Feedback
RX/TX
antenna
modes
},
}
are
configured
to
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Table of Contents

Save PDF