Skip to content

Retrieving softAP SSID #4230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jsphuebner opened this issue Jan 24, 2018 · 3 comments
Closed

Retrieving softAP SSID #4230

jsphuebner opened this issue Jan 24, 2018 · 3 comments

Comments

@jsphuebner
Copy link

Hi,

added a function to ESP8266WifiAP.cpp for retrieving the stored softAP SSID

Sketch

#include <Arduino.h>
#include <ESP8266WiFi.h>

void setup() {
  Serial.begin(115200);
  Serial.print("softAP SSID: ");
  Serial.print(WiFi.softAPSSID());
}

void loop() {

}

Add to ESP8266WifiAP.cpp

String ESP8266WiFiAPClass::softAPSSID() {
    struct softap_config config;
    String ssid = "";
    
    if (wifi_softap_get_config(&config))
        ssid = reinterpret_cast<char*>(config.ssid);
    return ssid;
}

Add to ESP8266WifiAP.h

String softAPSSID();
@devyte
Copy link
Collaborator

devyte commented Jan 24, 2018

Already implemented and reviewed in #4138 .

@yoursunny
Copy link
Contributor

#4138 is merged. I guess this issue can close?

@devyte
Copy link
Collaborator

devyte commented Aug 27, 2018

Yes, thank you.

@devyte devyte closed this as completed Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants