mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Changed wifi provisioning scan method
Signed-off-by: sanket.wadekar <sanket.wadekar@espressif.com>
This commit is contained in:
parent
a5adb4bc58
commit
bd6a74fcac
@ -45,4 +45,16 @@ menu "Wi-Fi Provisioning Manager"
|
|||||||
depends on WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
|
depends on WIFI_PROV_KEEP_BLE_ON_AFTER_PROV
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
choice WIFI_PROV_STA_SCAN_METHOD
|
||||||
|
bool "Wifi Provisioning Scan Method"
|
||||||
|
default WIFI_PROV_STA_ALL_CHANNEL_SCAN
|
||||||
|
config WIFI_PROV_STA_ALL_CHANNEL_SCAN
|
||||||
|
bool "All Channel Scan"
|
||||||
|
help
|
||||||
|
Scan will end after scanning the entire channel. This option is useful in Mesh WiFi Systems.
|
||||||
|
config WIFI_PROV_STA_FAST_SCAN
|
||||||
|
bool "Fast Scan"
|
||||||
|
help
|
||||||
|
Scan will end after an AP matching with the SSID has been detected.
|
||||||
|
endchoice
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -111,6 +111,13 @@ static esp_err_t set_config_handler(const wifi_prov_config_set_data_t *req_data,
|
|||||||
/* Using strlcpy allows both max passphrase length (63 bytes) and ensures null termination
|
/* Using strlcpy allows both max passphrase length (63 bytes) and ensures null termination
|
||||||
* because size of wifi_cfg->sta.password is 64 bytes (1 extra byte for null character) */
|
* because size of wifi_cfg->sta.password is 64 bytes (1 extra byte for null character) */
|
||||||
strlcpy((char *) wifi_cfg->sta.password, req_data->password, sizeof(wifi_cfg->sta.password));
|
strlcpy((char *) wifi_cfg->sta.password, req_data->password, sizeof(wifi_cfg->sta.password));
|
||||||
|
|
||||||
|
#ifdef CONFIG_WIFI_PROV_STA_ALL_CHANNEL_SCAN
|
||||||
|
wifi_cfg->sta.scan_method = WIFI_ALL_CHANNEL_SCAN;
|
||||||
|
#else /* CONFIG_WIFI_PROV_STA_FAST_SCAN */
|
||||||
|
wifi_cfg->sta.scan_method = WIFI_FAST_SCAN;
|
||||||
|
#endif
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1114,6 +1114,15 @@ components/wifi_provisioning/include/wifi_provisioning/scheme_ble.h
|
|||||||
components/wifi_provisioning/include/wifi_provisioning/scheme_console.h
|
components/wifi_provisioning/include/wifi_provisioning/scheme_console.h
|
||||||
components/wifi_provisioning/include/wifi_provisioning/scheme_softap.h
|
components/wifi_provisioning/include/wifi_provisioning/scheme_softap.h
|
||||||
components/wifi_provisioning/include/wifi_provisioning/wifi_scan.h
|
components/wifi_provisioning/include/wifi_provisioning/wifi_scan.h
|
||||||
|
components/wifi_provisioning/proto-c/wifi_config.pb-c.c
|
||||||
|
components/wifi_provisioning/proto-c/wifi_config.pb-c.h
|
||||||
|
components/wifi_provisioning/proto-c/wifi_constants.pb-c.c
|
||||||
|
components/wifi_provisioning/proto-c/wifi_constants.pb-c.h
|
||||||
|
components/wifi_provisioning/proto-c/wifi_scan.pb-c.c
|
||||||
|
components/wifi_provisioning/proto-c/wifi_scan.pb-c.h
|
||||||
|
components/wifi_provisioning/python/wifi_config_pb2.py
|
||||||
|
components/wifi_provisioning/python/wifi_constants_pb2.py
|
||||||
|
components/wifi_provisioning/python/wifi_scan_pb2.py
|
||||||
components/wifi_provisioning/src/scheme_console.c
|
components/wifi_provisioning/src/scheme_console.c
|
||||||
components/wifi_provisioning/src/wifi_config.c
|
components/wifi_provisioning/src/wifi_config.c
|
||||||
components/wifi_provisioning/src/wifi_scan.c
|
components/wifi_provisioning/src/wifi_scan.c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user