mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
fix(esp_wifi): Increase WPS timeout
This commit is contained in:
@ -919,13 +919,12 @@ int wps_start_msg_timer(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sm->wps->state == WPS_FINISHED) {
|
if (sm->wps->state == WPS_FINISHED) {
|
||||||
msg_timeout = 100;
|
|
||||||
wpa_printf(MSG_DEBUG, "start msg timer WPS_FINISHED %" PRId32 " ms", msg_timeout);
|
wpa_printf(MSG_DEBUG, "start msg timer WPS_FINISHED %" PRId32 " ms", msg_timeout);
|
||||||
eloop_cancel_timeout(wifi_station_wps_msg_timeout, NULL, NULL);
|
eloop_cancel_timeout(wifi_station_wps_msg_timeout, NULL, NULL);
|
||||||
eloop_register_timeout(0, msg_timeout*1000, wifi_station_wps_msg_timeout, NULL, NULL);
|
eloop_register_timeout(5, 0, wifi_station_wps_msg_timeout, NULL, NULL);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else if (sm->wps->state == RECV_M2) {
|
} else if (sm->wps->state == RECV_M2) {
|
||||||
msg_timeout = 5;
|
msg_timeout = 20;
|
||||||
wpa_printf(MSG_DEBUG, "start msg timer RECV_M2 %" PRId32 " s", msg_timeout);
|
wpa_printf(MSG_DEBUG, "start msg timer RECV_M2 %" PRId32 " s", msg_timeout);
|
||||||
eloop_cancel_timeout(wifi_station_wps_msg_timeout, NULL, NULL);
|
eloop_cancel_timeout(wifi_station_wps_msg_timeout, NULL, NULL);
|
||||||
eloop_register_timeout(msg_timeout, 0, wifi_station_wps_msg_timeout, NULL, NULL);
|
eloop_register_timeout(msg_timeout, 0, wifi_station_wps_msg_timeout, NULL, NULL);
|
||||||
@ -1663,7 +1662,7 @@ wifi_wps_scan_done(void *arg, ETS_STATUS status)
|
|||||||
esp_wifi_connect();
|
esp_wifi_connect();
|
||||||
sm->state = WAIT_START;
|
sm->state = WAIT_START;
|
||||||
eloop_cancel_timeout(wifi_station_wps_msg_timeout, NULL, NULL);
|
eloop_cancel_timeout(wifi_station_wps_msg_timeout, NULL, NULL);
|
||||||
eloop_register_timeout(2, 0, wifi_station_wps_msg_timeout, NULL, NULL);
|
eloop_register_timeout(20, 0, wifi_station_wps_msg_timeout, NULL, NULL);
|
||||||
} else if (wps_get_status() == WPS_STATUS_SCANNING) {
|
} else if (wps_get_status() == WPS_STATUS_SCANNING) {
|
||||||
if (wps_get_type() == WPS_TYPE_PIN && sm->scan_cnt > WPS_IGNORE_SEL_REG_MAX_CNT) {
|
if (wps_get_type() == WPS_TYPE_PIN && sm->scan_cnt > WPS_IGNORE_SEL_REG_MAX_CNT) {
|
||||||
wpa_printf(MSG_INFO, "WPS: ignore selected registrar after %d scans", sm->scan_cnt);
|
wpa_printf(MSG_INFO, "WPS: ignore selected registrar after %d scans", sm->scan_cnt);
|
||||||
|
Reference in New Issue
Block a user