Closed
Description
In a quick test with the provided example for WiFiMulti, I was unable to connect to a hidden SSID...
If I use the standard WiFi.begin(nSSID, nPassword); version, all work fine and it can find the hidden SSID.
Arduino IDE 1.8.10
ESP32 Arduino 1.0.4
/*
* This sketch tries to Connect to the best AP based on a given list
*
*/
#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);
}
}
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START
[I][WiFiMulti.cpp:84] addAP(): [WIFI][APlistAdd] add SSID: lafleur
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 1 - SCAN_DONE
[I][WiFiMulti.cpp:114] run(): [WIFI] scan done
[I][WiFiMulti.cpp:119] run(): [WIFI] 1 networks found
[D][WiFiMulti.cpp:151] run(): 0: [1][82:2A:A8:D7:F3:34] RSF-Guest (-57) *
[E][WiFiMulti.cpp:191] run(): [WIFI] no matching wifi found!
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 1 - SCAN_DONE
[I][WiFiMulti.cpp:114] run(): [WIFI] scan done
[I][WiFiMulti.cpp:119] run(): [WIFI] 1 networks found
[D][WiFiMulti.cpp:151] run(): 0: [1][82:2A:A8:D7:F3:34] RSF-Guest (-58) *
Activity
lbernstone commentedon Oct 6, 2019
Does it work if the hidden ssid is the only one added to the list?
trlafleur commentedon Oct 6, 2019
No...
atanisoft commentedon Oct 6, 2019
WiFi.scanNetworks() will not show hidden SSIDs by default, WiFiMulti doesn't pass the flag to enable hidden networks to be included. You can try changing this line to:
And see if it works.
trlafleur commentedon Oct 6, 2019
stale commentedon Dec 5, 2019
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
stale commentedon Dec 20, 2019
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.
BararDiHoumes commentedon Nov 14, 2021
I were expecting fix for this as well, and after all this time none work on it ? Really ?
lucasssvaz commentedon Feb 1, 2024
Fixed by #9202
8 remaining items