EasyManua.ls Logo

Espressif ESP32-S2 - Page 106

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
ESP_ERR_WIFI_NVS: WiFi internal NVS error
others: refer to the erro code in esp_err.h
Parameters
interface: interface
conf: station or soft-AP configuration
esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf)
Get configuration of specified interface.
Return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
ESP_ERR_INVALID_ARG: invalid argument
ESP_ERR_WIFI_IF: invalid interface
Parameters
interface: interface
[out] conf: station or soft-AP configuration
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta)
Get STAs associated with soft-AP.
Attention SSC only API
Return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
ESP_ERR_INVALID_ARG: invalid argument
ESP_ERR_WIFI_MODE: WiFi mode is wrong
ESP_ERR_WIFI_CONN: WiFi internal error, the station/soft-AP control block is invalid
Parameters
[out] sta: station list ap can get the connected stas phy mode info through the struct member
phy_11bphy_11gphy_11nphy_lr in the wifi_sta_info_t struct. For example, phy_11b = 1 imply
that sta support 802.11b mode
esp_err_t esp_wifi_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
Get AID of STA connected with soft-AP.
Return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
ESP_ERR_INVALID_ARG: invalid argument
ESP_ERR_NOT_FOUND: Requested resource not found
ESP_ERR_WIFI_MODE: WiFi mode is wrong
ESP_ERR_WIFI_CONN: WiFi internal error, the station/soft-AP control block is invalid
Parameters
mac: STAs mac address
[out] aid: Store the AID corresponding to STA mac
esp_err_t esp_wifi_set_storage(wifi_storage_t storage)
Set the WiFi API configuration storage type.
Attention 1. The default value is WIFI_STORAGE_FLASH
Return
ESP_OK: succeed
ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
ESP_ERR_INVALID_ARG: invalid argument
Parameters
storage: : storage type
esp_err_t esp_wifi_set_vendor_ie(bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t
idx, const void *vnd_ie)
Set 802.11 Vendor-Specific Information Element.
Return
Espressif Systems 95
Submit Document Feedback
Release v4.4

Table of Contents