I'm having trouble configuring ESP8266 to work as encrypted SoftAP. I'm using following code
void user_init(void) {
stdoutInit();
static struct softap_config config;
wifi_softap_get_config(&config);
os_sprintf(config.password, "abc");
config.authmode = AUTH_WPA_WPA2_PSK;
os_printf("WIFI: SSID [%s]\n", config.ssid);
os_printf("WIFI: Password [%s]\n", config.password);
os_printf("WIFI: Mode [%d]\n", config.authmode);
if (wifi_softap_set_config(&config)) {
os_printf("SUCCESS: AP config set\n");
} else {
os_printf("WARNING: Failed to set AP config\n");
}
}
I'm able to get SUCCESS message only when using AUTH_OPEN or AUTH_WEP.
Can you guys please give some advice what possibly is wrong.