mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wifi scan: add wifi scan type and time config
This commit is contained in:
parent
8ee6f8227e
commit
c690447dd9
@ -296,6 +296,8 @@ esp_err_t esp_wifi_deauth_sta(uint16_t aid);
|
||||
* @attention If this API is called, the found APs are stored in WiFi driver dynamic allocated memory and the
|
||||
* will be freed in esp_wifi_get_ap_list, so generally, call esp_wifi_get_ap_list to cause
|
||||
* the memory to be freed once the scan is done
|
||||
* @attention The values of maximum active scan time and passive scan time per channel are limited to 1500 milliseconds.
|
||||
* Values above 1500ms may cause station to disconnect from AP and are not recommended.
|
||||
*
|
||||
* @param config configuration of scanning
|
||||
* @param block if block is true, this API will block the caller until the scan is done, otherwise
|
||||
|
@ -96,11 +96,30 @@ typedef enum {
|
||||
WIFI_SECOND_CHAN_BELOW, /**< the channel width is HT40 and the second channel is below the primary channel */
|
||||
} wifi_second_chan_t;
|
||||
|
||||
typedef enum {
|
||||
WIFI_SCAN_TYPE_ACTIVE = 0, /**< active scan */
|
||||
WIFI_SCAN_TYPE_PASSIVE, /**< passive scan */
|
||||
} wifi_scan_type_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t min; /**< minimum active scan time per channel, units: millisecond */
|
||||
uint32_t max; /**< maximum active scan time per channel, units: millisecond, values above 1500ms may
|
||||
cause station to disconnect from AP and are not recommended. */
|
||||
} wifi_active_scan_time_t;
|
||||
|
||||
typedef union {
|
||||
wifi_active_scan_time_t active; /**< active scan time per channel */
|
||||
uint32_t passive; /**< passive scan time per channel, units: millisecond, values above 1500ms may
|
||||
cause station to disconnect from AP and are not recommended. */
|
||||
} wifi_scan_time_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t *ssid; /**< SSID of AP */
|
||||
uint8_t *bssid; /**< MAC address of AP */
|
||||
uint8_t channel; /**< channel, scan the specific channel */
|
||||
bool show_hidden; /**< enable to scan AP whose SSID is hidden */
|
||||
wifi_scan_type_t scan_type; /**< scan type, active or passive */
|
||||
wifi_scan_time_t scan_time; /**< scan time per channel */
|
||||
} wifi_scan_config_t;
|
||||
|
||||
typedef struct {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 5c98c5a8b93dbf181849b40c6d6cd164a52bfc4c
|
||||
Subproject commit bd53ad194dd85885d3d41f455e9debeb9409aef9
|
Loading…
Reference in New Issue
Block a user