When the ssid and password are configured at compile time, the connection work. When the SSID is set from a file the connection fails with a 201 - NO_AP_FOUND. I can reproduce the problem here using the simple_wifi example. changing it to:
Code: Select all
wifi_config_t wifi_config;
memcpy(wifi_config.sta.ssid, ssid, sizeof(wifi_config.sta.ssid));
memcpy(wifi_config.sta.password, password, sizeof(wifi_config.sta.password));
Code: Select all
static const char ssid[] = "MySSID";
static const char password[]= "MyPassword";
The example works fine without the modification.
I couldn't figure out the issue in the code above.