struct station_config cnf;
c_memset(&cnf, 0, sizeof(struct station_config));
dns_hijack_http_urldecode(cnf.ssid, name_str_start, name_str_len);
dns_hijack_http_urldecode(cnf.password, pwd_str_start, pwd_str_len);
c_printf("\n");
c_printf("WiFi Credentials Stored\n");
c_printf("-----------------------\n");
c_printf("name: \"%s\"\n", cnf.ssid);
c_printf("pass: \"%s\"\n", cnf.password);
c_printf("bssid_set: %u\n", cnf.bssid_set);
c_printf("bssid: \"%s\"\n", cnf.bssid);
c_printf("-----------------------\n\n");
wifi_station_disconnect();
while (wifi_station_set_config(&cnf) == FALSE)
{
c_printf("dns_hijack_http_handle_credentials failed. Unable to set STATION mode config.\n");
}
Produces:
WiFi Credentials Stored
-----------------------
name: "lovenest"
pass: "sweetlove"
bssid_set: 0
bssid: ""
-----------------------
dns_hijack_http_handle_credentials failed. Unable to set STATION mode config.