Module wifi

Module wifi 

Source
Expand description

This module contains Wi-Fi and BLE-specific functionality.

Structs§

ActiveScanTime
Range of active scan times per channel. docs
InitConfig
PromiscuousCtrlFilter
docs
PromiscuousFilter
docs
Protocols
ScanConfig
Parameters for an SSID scan. Note: If setting most of these values to 0 or empty Vecs, ESP will use its default settings. docs
ScanTime
Aggregate of active & passive scan time per channel. [docs][https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_wifi.html#_CPPv416wifi_scan_time_t)
WifiApRecord
Description of a Wi-Fi AP. docs
WifiCountry
Structure describing Wi-Fi country-based regional restrictions. [docs][https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/network/esp_wifi.html#_CPPv414wifi_country_t]
WifiHeApInfo
docs

Enums§

InterfaceType
docs
PromiscuousPktType
Promiscuous frame type.
ScanType
WifiAnt
docs
WifiAuthMode
Wi-Fi authmode type Strength of authmodes Personal Networks : OPEN < WEP < WPA_PSK < OWE < WPA2_PSK = WPA_WPA2_PSK < WAPI_PSK < WPA3_PSK = WPA2_WPA3_PSK = DPP Enterprise Networks : WIFI_AUTH_WPA2_ENTERPRISE < WIFI_AUTH_WPA3_ENTERPRISE = WIFI_AUTH_WPA2_WPA3_ENTERPRISE < WIFI_AUTH_WPA3_ENT_192. docs
WifiBandwidth
docs
WifiCipher
docs
WifiMode
docs
WifiSecondChan
docs

Functions§

ap_get_sta_list
clear_ap_list
Clear AP list found in last scan. This API will free all memory occupied by scanned AP list. When the obtained AP list fails, AP records must be cleared,otherwise it may cause memory leakage. docs
deinit
Deinit WiFi Free all resource allocated in esp_wifi_init and stop WiFi task. docs)
get_mode
get_promiscuous
Get the promiscuous mode. docs
get_promiscuous_ctrl_filter
Get the subtype filter of the control packet in promiscuous mode. docs
get_promiscuous_filter
Get the promiscuous filter. docs
get_protocol
Get the current protocol bitmap of the specified interface. docs
init
Initialize WiFi Allocate resource for WiFi driver, such as WiFi control structure, RX/TX buffer, WiFi NVS structure etc. This WiFi also starts WiFi task. docs
parse_ap_records
From a data buffer (e.g. as part of the Rpc struct), parse into Access Point records. The data buffer passed starts post the RPC “header”; the same data we include in the Rpc struct.
scan_get_ap_num
Get number of APs found in last scan. docs
scan_get_ap_record
Get one AP record from the scanned AP list. docs
scan_get_ap_records
Retrieve the list of APs found during the last scan. The returned AP list is sorted in descending order based on RSSI. docs
scan_start
Scan all available APs. docs
scan_stop
Stop the scan in process. docs
set_mode
Options: 0: Radio off 1: Station/client: Can scan and connect 2: Soft AP; cannot scan. 3: Soft-AP and Sta (slower scan) 4: Wi-Fi aware. (Not relevant to normal scanning)
set_promiscuous
Enable the promiscuous mode, and set its filter. docs
set_protocol
Set the supported WiFi protocols for the specified interface. The default protocol is (WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N). docs interface (ifx) should be 0 for Station, and 1 for Ap. Bitmap: e.g 1 | 2 | 4; = 11B | 11G | 11N. Note that this is the default.
set_ps
Set current WiFi power save type. docs
start
Start WiFi according to current configuration If mode is WIFI_MODE_STA, it creates station control block and starts station If mode is WIFI_MODE_AP, it creates soft-AP control block and starts soft-AP If mode is WIFI_MODE_APSTA, it creates soft-AP and station control block and starts soft-AP and station If mode is WIFI_MODE_NAN, it creates NAN control block and starts NAN. docs)
stop
Stop WiFi If mode is WIFI_MODE_STA, it stops station and frees station control block If mode is WIFI_MODE_AP, it stops soft-AP and frees soft-AP control block If mode is WIFI_MODE_APSTA, it stops station/soft-AP and frees station/soft-AP control block If mode is WIFI_MODE_NAN, it stops NAN and frees NAN control block. docs