EasyManua.ls Logo

Espressif ESP32-S2 - Page 108

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
Loading...
Chapter 2. API Reference
Return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
Parameters
mask: WiFi event mask.
esp_err_t esp_wifi_get_event_mask(uint32_t *mask)
Get mask of WiFi events.
Return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
ESP_ERR_WIFI_ARG: invalid argument
Parameters
mask: WiFi event mask.
esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buer, int len, bool en_sys_seq)
Send raw ieee80211 data.
Attention Currently only support for sending beacon/probe request/probe response/action and non-QoS data
frame
Return
ESP_OK: success
ESP_ERR_WIFI_IF: Invalid interface
ESP_ERR_INVALID_ARG: Invalid parameter
ESP_ERR_WIFI_NO_MEM: out of memory
Parameters
ifx: interface if the Wi-Fi mode is Station, the ifx should be WIFI_IF_STA. If the Wi-Fi mode
is SoftAP, the ifx should be WIFI_IF_AP. If the Wi-Fi mode is Station+SoftAP, the ifx should be
WIFI_IF_STA or WIFI_IF_AP. If the ifx is wrong, the API returns ESP_ERR_WIFI_IF.
buffer: raw ieee80211 buffer
len: the length of raw buffer, the len must be <= 1500 Bytes and >= 24 Bytes
en_sys_seq: indicate whether use the internal sequence number. If en_sys_seq is false, the
sequence in raw buffer is unchanged, otherwise it will be overwritten by WiFi driver with the system
sequence number. Generally, if esp_wifi_80211_tx is called before the Wi-Fi connection has been
set up, both en_sys_seq==true and en_sys_seq==false are fine. However, if the API is called after
the Wi-Fi connection has been set up, en_sys_seq must be true, otherwise ESP_ERR_WIFI_ARG
is returned.
esp_err_t esp_wifi_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
Register the RX callback function of CSI data.
Each time a CSI data is received, the callback function will be called.
Return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
Parameters
cb: callback
ctx: context argument, passed to callback function
esp_err_t esp_wifi_set_csi_config(const wifi_csi_config_t *config)
Set CSI data configuration.
return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start or promiscuous mode is not en-
abled
ESP_ERR_INVALID_ARG: invalid argument
Parameters
config: configuration
Espressif Systems 97
Submit Document Feedback
Release v4.4

Table of Contents