schufti wrote:Hi,
just a little sidenote on the storage part:
it is not necessary to store the WiFi credentials. If you do a "WiFi.begin(ssid, pass)" with valid credentials and get connected, the esp fw stores them internal. The next time you can use "WiFi.begin("","")" and the esp fw will use the "last known good" credentials. If several attempts to (re)connect fail (or e.g. button is pressed at startup), it is time to fire up the config again.
Not a lot to spare but even simpler....
Moderator: igrr
However, how does one modify the library. I too have problems with the "+" inserted into spaces in my SSID. How do I edit the library to copy your fix?
Also, how difficult would it be for the author to modify this as an update? <not that he has to...already a great tutorial! Just sayin'...>
luketanti wrote:Hi all. First of all thanks for this great library.
I have been trying to connect to my AP which the SSID contains spaces.
But instead of spaces it saved a plus sign '+' instead. This made it impossible for the ESP to connect to my AP.
In the library I have modified a little the setEEPROMString method.Code: Select allvoid WiFiManager::setEEPROMString(int start, int len, String string) {
int si = 0;
for (int i = _eepromStart + start; i < _eepromStart + start + len; i++) {
char c;
if(si < string.length()) {
c = string[si];
if (c == '+')
c = ' ';
DEBUG_PRINT("Wrote: ");
DEBUG_PRINT(c);
} else {
c = 0;
}
EEPROM.write(i, c);
si++;
}
}
All I have done is to replace any '+' characters with a space ' ' character.
It worked fine after this modification.
Hope this helps someone
chriscook8 wrote:https://github.com/chriscook8/esp-arduino-apboot
This reads from eeprom to get SSID and password information. Then trys to connect to it. If it doesn't work, or no SSID is found it boots into a AP mode hosting a configuration webpage.
First pass on this task anyway.
Chris