Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By avc
#34088 Is there a way to get the SSID to which the ESP is currently connected to? something like WiFi.localIP()? I know after WiFi.scannetwork, I can loop through SSID(i), but I want to get the SSID to which it is connected right now. I tried WiFi.SSID() and it did not return anything. I Saw WiFi.getNetworkInfo() but not sure if that is the one to use and I could not find any documentation on how to get the SSID from this.

thanks for any hints.
User avatar
By jifopy
#34090 Does this help? https://www.arduino.cc/en/Reference/WiFiSSID

Are you defining the ssid or scanning and connecting to an ssid? This probably doesn't help you but I just print the SSID I've defined.

//Wifi Configuration
const char* ssid = "wirelessssid";
const char* password = "xxxxxx";
IPAddress local_ip(172, 2, 2, 65);
IPAddress gateway(172, 2, 2, 1);
IPAddress subnet(255, 255, 255, 0);

And then

lcd.print(ssid);