Statistics: Posted by ESP_Faye — Thu May 07, 2015 5:11 pm
Statistics: Posted by ESP_Faye — Thu May 07, 2015 3:53 pm
Statistics: Posted by carrus — Thu May 07, 2015 2:22 pm
Code:
curl -X POST -H "Content-Type:application/json" -d "{\"Request\":{\"Softap\":{\"Connect_Softap\":{\"authmode\":\"WPA2PSK\",\"channel\":6,\"ssid\":\"ESP_IOT_SOFTAP\",\"password\":\"88888888\"}}}}" http://192.168.4.1/config?command=wifi
Code:
#ifdef SOFTAP_ENCRYPT
struct softap_config config;
char password[33];
char macaddr[6];
wifi_softap_get_config(&config);
wifi_get_macaddr(SOFTAP_IF, macaddr);
os_memset(config.password, 0, sizeof(config.password));
os_sprintf(password, MACSTR "_%s", MAC2STR(macaddr), PASSWORD);
os_memcpy(config.password, password, os_strlen(password));
config.authmode = AUTH_WPA_WPA2_PSK;
wifi_softap_set_config(&config);
#endif
Statistics: Posted by ESP_Faye — Thu May 07, 2015 11:01 am
Statistics: Posted by carrus — Wed May 06, 2015 1:22 pm
Statistics: Posted by carrus — Wed May 06, 2015 1:14 pm