-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
WiFi: clean up AP SSID setter & getter, support 32 chars #7941
Conversation
@mcspr I am facing a problem where Calling Is it a related problem ? #include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
String SSIDS = "NewSSID"; // If next time i change this and upload the code again, ssid displayed doesnt actually change.
String PASSS = "NewPassword";
/* Just a little test message. Go to http://192.168.4.1 in a web browser
connected to this access point to see it.
*/
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
Serial.print("Configuring access point...");
/* You can remove the password parameter if you want the AP to be open. */
WiFi.softAP(SSIDS.c_str(), PASSS.c_str());
IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);
}
void loop() {
server.handleClient();
} This is misbehaving when the new password is different.
In that case the ssid will not be updated, Also, calling WiFi.softAP(SSIDS.c_str()); without password is leading to continous crash due to exception. |
@arihantdaga not likely. If you are using Android, just restart the WiFi via toggle or Airplane mode, or just filter out by bssid if this is some app. Scan results are cached, it could be switched into a passive mode, etc. e.g. |
@mcspr . I am sure, i can verify this is some bug, not problem with my mobile, I have tried with laptop and I have tried setting up different wifi names etc. I startee seeing it a while ago, today I verified multiple times. |
I'll check the gist also. |
Open an issue? This is not related to the PR here. |
@mcspr Thank you. I got it, the actual problem was because i was setting a password that was less than 8 characters long. |
This was updated for STA some time ago.
Plus, clean up ssid & pass copy routines similar to the #7940
Comparison also adjusted to take into an account the ssid_len and limit itself by the passphrase length, including '\0' if I read the strncmp man correctly.
Adds note in the comments that softAp only works with passphrases (...not WEP key. Terminology used is a bit confusing in regards to password vs. psk vs. passphrase)