Skip to content

Commit

Permalink
proposal for issue esp8266#1845 wifi_wps_status_cb get an undefined s…
Browse files Browse the repository at this point in the history
…tatus 4 and missed wifi_wps_disable (esp8266#2312)
  • Loading branch information
jbheren authored and igrr committed Aug 1, 2016
1 parent c52088c commit db5e20f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,12 @@ void wifi_wps_status_cb(wps_cb_status status) {
case WPS_CB_ST_WEP:
DEBUGV("wps WEP\n");
break;
case WPS_CB_ST_UNK:
DEBUGV("wps UNKNOWN\n");
if(!wifi_wps_disable()) {
DEBUGV("wps disable failed\n");
}
break;
}
// TODO user function to get status

Expand Down Expand Up @@ -670,4 +676,3 @@ void ESP8266WiFiSTAClass::_smartConfigCallback(uint32_t st, void* result) {
WiFi.stopSmartConfig();
}
}

1 change: 1 addition & 0 deletions tools/sdk/include/user_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ enum wps_cb_status {
WPS_CB_ST_FAILED,
WPS_CB_ST_TIMEOUT,
WPS_CB_ST_WEP,
WPS_CB_ST_UNK,
};

bool wifi_wps_enable(WPS_TYPE_t wps_type);
Expand Down

0 comments on commit db5e20f

Please sign in to comment.