-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WiFi.softAP("apname", "") not working #1924
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
Comments
What you probably mean is "WiFi.softAP() only works when the length of passphrase is >= 8 characters, which is true. The whole routine fails if passphrase is too long or too short. It also fails if ssid is too long.
This doesn't help much because its already testing for strlen(passphrase) < 8. What would make this routine more robust would be:
|
@jeroenst you are correct that 0 length passphrases were failing when they should have just set an open AP. I put up a pull request that should fix it. In the meantime you can try replacing the one line with the following: if(passphrase && strlen(passphrase) > 0 && (strlen(passphrase) > 63 || strlen(passphrase) < 8)) { |
You're right, my proposed fix was wrong. Thanx for the solution! |
Tested your fix, and it accepts passphrase "" now. |
Yes it should have been checking strlen(passphrase) > 0 first. Please close if this solves the issue. |
Shouldn't I wait with closing until this issue has been solved in the master branch? |
Either way, it'll get fixed if my pull request gets accepted, but that may be awhile. The devs are very busy with lots of projects and we don't want to annoy them because they bring us lots of shiny new features to play with. :) |
I got same error on my serial monitor. Compiler builds with any error but serial monitor prints; |
espressif/arduino-esp32#1924 Limits PSK to >= 8 chars -- thats why the PSK was not updating.
WiFi.softAP only works when passphrase is 0, in esp8266 it also works when passphrase is "".
In WiFiAP.cpp on line 104 should change from:
to:
The text was updated successfully, but these errors were encountered: