Skip to content

Commit db5e20f

Browse files
jbherenigrr
authored andcommitted
proposal for issue #1845 wifi_wps_status_cb get an undefined status 4 and missed wifi_wps_disable (#2312)
1 parent c52088c commit db5e20f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,12 @@ void wifi_wps_status_cb(wps_cb_status status) {
590590
case WPS_CB_ST_WEP:
591591
DEBUGV("wps WEP\n");
592592
break;
593+
case WPS_CB_ST_UNK:
594+
DEBUGV("wps UNKNOWN\n");
595+
if(!wifi_wps_disable()) {
596+
DEBUGV("wps disable failed\n");
597+
}
598+
break;
593599
}
594600
// TODO user function to get status
595601

@@ -670,4 +676,3 @@ void ESP8266WiFiSTAClass::_smartConfigCallback(uint32_t st, void* result) {
670676
WiFi.stopSmartConfig();
671677
}
672678
}
673-

tools/sdk/include/user_interface.h

+1
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ enum wps_cb_status {
481481
WPS_CB_ST_FAILED,
482482
WPS_CB_ST_TIMEOUT,
483483
WPS_CB_ST_WEP,
484+
WPS_CB_ST_UNK,
484485
};
485486

486487
bool wifi_wps_enable(WPS_TYPE_t wps_type);

0 commit comments

Comments
 (0)