working WPS and cmd to set AP

Former-commit-id: a2a02ab2dfb61e6f3552ccae7b7831b6647ead56
This commit is contained in:
2016-05-07 22:03:12 +02:00
parent 78e0569f87
commit 485a383e6d
5 changed files with 25 additions and 12 deletions
+2 -2
View File
@@ -316,7 +316,7 @@ httpd_cgi_state ICACHE_FLASH_ATTR cgiWiFiConnStatus(HttpdConnData *connData) {
//Template code for the WLAN page.
httpd_cgi_state ICACHE_FLASH_ATTR tplWlan(HttpdConnData *connData, char *token, void **arg) {
char buff[256];
int x;
WIFI_MODE x;
static struct station_config stconf;
if (token==NULL) return HTTPD_CGI_DONE;
wifi_station_get_config(&stconf);
@@ -331,7 +331,7 @@ httpd_cgi_state ICACHE_FLASH_ATTR tplWlan(HttpdConnData *connData, char *token,
// strcpy(buff, (char*)stconf.password);
} else if (strcmp(token, "WiFiapwarn")==0) {
x=wifi_get_opmode();
if (x==2) {
if (x==SOFTAP_MODE) {
strcpy(buff, "<b>Can't scan in this mode.</b> Click <a href=\"/wifi/setmode?mode=3\">here</a> to go to STA+AP mode.");
} else {
strcpy(buff, "Click <a href=\"/wifi/setmode?mode=2\">here</a> to go to stand-alone AP mode.");