Closed dev-strom closed 3 years ago
This is an unsolved MultiWiFi bug of ESP32 core, mentioned in WiFiMulti not working with hidden SSID #3325.
You can try the following sketch to verify
#include <WiFi.h>
#include <WiFiMulti.h>
WiFiMulti wifiMulti;
void setup()
{
Serial.begin(115200);
delay(100);
WiFi.disconnect(true);
WiFi.mode(WIFI_STA);
wifiMulti.addAP("hiddenssid", "12345"); // Hidden SSID, will not work
wifiMulti.addAP("openssid", "12345"); // open SSID, work fine...
Serial.println("Connecting Wifi...");
if (wifiMulti.run() == WL_CONNECTED)
{
Serial.println("");
Serial.println("WiFi connected");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
Serial.print("Channel: ");
Serial.println(WiFi.channel());
}
}
void loop()
{
if (wifiMulti.run() != WL_CONNECTED)
{
Serial.print("WiFi not connected! ");
Serial.println(WiFi.status());
delay(1000);
}
}
I'm sorry I can't solve it by myself, and suggest that you don't use the hidden SSID, if possible, because hidden SSID is not useful anymore like in the past with very good encryption nowadays. If you have time, you can repost the issue to esp32 issue.
If there are more requests relating to this hidden SSID, I'll think about rewrite the code to get rid of MultiWiFi so that hidden SSID is working OK.
I'm closing this now.
Thanks for the hint! (Btw: I don't need MultWifi, but I need to connect to a hidden SSID...)
Describe the bug
I compiled the example ConfigPortalParamsOnSwitch and tried to connect to a wifi network with a hidden SSID. I was able to start the configuration portal and enter the credentials of the wifi network. The data is stored and the device reboots. But it didn't connect to the wifi. If I reconfigure the wifi to show the SSID, the device connects to it. But after switching back to hidden SSID and reboot of the device, I got no connection.
Steps to Reproduce
Expected behavior
The device should connect to wifi networks having a hidden SSID.
Actual behavior
The device tries to connect to the wifi network having a hidden SSID, but it got no connection.
Debug and AT-command log (if applicable)
And after some time looping...
Information