[GH-ISSUE #1] False EEPROM reading after manual restart #3

Closed
opened 2026-02-28 01:22:48 +03:00 by kerem · 13 comments
Owner

Originally created by @renno-bih on GitHub (Jun 11, 2015).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1

This library is exactly what I need but looks like it doesn't work as it should.

Module starts in AP mode. After entering SSID and password it automatically restarts and reads correct data from EEPROM and successfully connects to my WiFi router.

But as soon as I manually restart ESP-01 it reads false information from EEPROM, refuse to connect and starts AP again.

Here is what I get when restart my ESP manually:

AutoConnect
Reading EEPROM SSID
SSID: 
��?�ntX<script>function
Reading EEPROM Password
Password: 
 c(l){document.getElementById('s').value=l.innerText||l.textCont
Waiting for Wifi to connect
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Could not connect to WiFi
Started Soft Access Point

WiFi connected
0.0.0.0
192.168.4.1
mDNS responder started
Server started
Originally created by @renno-bih on GitHub (Jun 11, 2015). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1 This library is exactly what I need but looks like it doesn't work as it should. Module starts in AP mode. After entering SSID and password it automatically restarts and reads correct data from EEPROM and successfully connects to my WiFi router. But as soon as I manually restart ESP-01 it reads false information from EEPROM, refuse to connect and starts AP again. Here is what I get when restart my ESP manually: ``` AutoConnect Reading EEPROM SSID SSID: ��?����ntX�����<script>function Reading EEPROM Password Password: c(l){document.getElementById('s').value=l.innerText||l.textCont Waiting for Wifi to connect . . . . . . . . . . . . . . . . . . . . Could not connect to WiFi Started Soft Access Point WiFi connected 0.0.0.0 192.168.4.1 mDNS responder started Server started ```
kerem closed this issue 2026-02-28 01:22:48 +03:00
Author
Owner

@tzapu commented on GitHub (Jun 15, 2015):

hi, didn t actually test it on and esp01, just esp12 (nodemcu).
it kind of looks to me like some kind of memory issue, like the costants are overwriting the part of memory where the eeprom is. i ll take a look at that.

in the mean time, maybe rewrite the cost strings in your library to the minimum needed? remove all css, etc from them, just the absolute bare minimum.

<!-- gh-comment-id:111974226 --> @tzapu commented on GitHub (Jun 15, 2015): hi, didn t actually test it on and esp01, just esp12 (nodemcu). it kind of looks to me like some kind of memory issue, like the costants are overwriting the part of memory where the eeprom is. i ll take a look at that. in the mean time, maybe rewrite the cost strings in your library to the minimum needed? remove all css, etc from them, just the absolute bare minimum.
Author
Owner

@tzapu commented on GitHub (Jun 15, 2015):

might be related to https://github.com/esp8266/Arduino/issues/414
description seems similar

<!-- gh-comment-id:111974977 --> @tzapu commented on GitHub (Jun 15, 2015): might be related to https://github.com/esp8266/Arduino/issues/414 description seems similar
Author
Owner

@lesjaw commented on GitHub (Jul 4, 2015):

any fix on this? tzapu can you make a libary for this? https://github.com/jeffryr/ESP8266-Sketches/tree/master/Onboard

it works on esp01... esp01 seem have trouble saving to eeprom..

thanks

<!-- gh-comment-id:118555024 --> @lesjaw commented on GitHub (Jul 4, 2015): any fix on this? tzapu can you make a libary for this? https://github.com/jeffryr/ESP8266-Sketches/tree/master/Onboard it works on esp01... esp01 seem have trouble saving to eeprom.. thanks
Author
Owner

@tzapu commented on GitHub (Jul 6, 2015):

i don t know if there s any fix from the arduino guys, but i have tested on an esp 01 and it works without any issues with the latest staging release of the esp arduino board manager package

i want to extend this further and using the auto saved values wouldn t work well for me, but i will ponder it further

cheers

<!-- gh-comment-id:118778989 --> @tzapu commented on GitHub (Jul 6, 2015): i don t know if there s any fix from the arduino guys, but i have tested on an esp 01 and it works without any issues with the latest staging release of the esp arduino board manager package i want to extend this further and using the auto saved values wouldn t work well for me, but i will ponder it further cheers
Author
Owner

@lesjaw commented on GitHub (Jul 6, 2015):

ah ok..will test this again with lates stag.. btw join our mailing list on souliss.. https://github.com/souliss/souliss/wiki

<!-- gh-comment-id:118970755 --> @lesjaw commented on GitHub (Jul 6, 2015): ah ok..will test this again with lates stag.. btw join our mailing list on souliss.. https://github.com/souliss/souliss/wiki
Author
Owner

@lesjaw commented on GitHub (Jul 8, 2015):

i have tested with the latest ide of arduino, it seem still dont work, it work on reset, but it didnt work after unplug the power supply..

<!-- gh-comment-id:119524640 --> @lesjaw commented on GitHub (Jul 8, 2015): i have tested with the latest ide of arduino, it seem still dont work, it work on reset, but it didnt work after unplug the power supply..
Author
Owner

@tzapu commented on GitHub (Jul 9, 2015):

this is so weird @lesjaw , did you test on a couple of esp s or on just one?
i have personally tested and deployed this on 2 nodemcu 0.9, 1 nodemcu 1.0 and 1 esp-01 and seems fine.

could you send me you sketch so i can compile that and see what happens? is it a very large sketch or allocating memory/eeprom in some other way?

i like souliss, looked at it a few times, but since i m an ios user can t do much with it.

<!-- gh-comment-id:119879133 --> @tzapu commented on GitHub (Jul 9, 2015): this is so weird @lesjaw , did you test on a couple of esp s or on just one? i have personally tested and deployed this on 2 nodemcu 0.9, 1 nodemcu 1.0 and 1 esp-01 and seems fine. could you send me you sketch so i can compile that and see what happens? is it a very large sketch or allocating memory/eeprom in some other way? i like souliss, looked at it a few times, but since i m an ios user can t do much with it.
Author
Owner

@lesjaw commented on GitHub (Jul 9, 2015):

oh you use nodemcu firmware, i use v0.9.5.2 AT Firmware, souliss have openhab binding, so you can use it in iOS, I use openhab for iOS user interface..

this is the sketch http://pastebin.com/dLM7Bbnq

as you can see, i use dynamic addressing in souliss, it will detect the address and save it to eeprom too.. and it didn't work too on esp after power unplug.. i tried on esp01 and 12 with 0.9.5.2 firmware...

this is souiss library for store.h https://github.com/souliss/souliss/blob/friariello/tools/store/store.h#L14

since your wifi manager lenght save 64 byte, i change the store index of souliss to 65..

this is the store.cpp https://github.com/souliss/souliss/blob/friariello/tools/store/store.cpp

<!-- gh-comment-id:120076232 --> @lesjaw commented on GitHub (Jul 9, 2015): oh you use nodemcu firmware, i use v0.9.5.2 AT Firmware, souliss have openhab binding, so you can use it in iOS, I use openhab for iOS user interface.. this is the sketch http://pastebin.com/dLM7Bbnq as you can see, i use dynamic addressing in souliss, it will detect the address and save it to eeprom too.. and it didn't work too on esp after power unplug.. i tried on esp01 and 12 with 0.9.5.2 firmware... this is souiss library for store.h https://github.com/souliss/souliss/blob/friariello/tools/store/store.h#L14 since your wifi manager lenght save 64 byte, i change the store index of souliss to 65.. this is the store.cpp https://github.com/souliss/souliss/blob/friariello/tools/store/store.cpp
Author
Owner

@lesjaw commented on GitHub (Jul 12, 2015):

Omg it's me who stupid... Sorry..

It's been month since I use esp arduino board... So today I update it... Now its working flawless... Perfect!..

Btw it's confuse me, you are using nodemcu firmware with arduino ide?

<!-- gh-comment-id:120673546 --> @lesjaw commented on GitHub (Jul 12, 2015): Omg it's me who stupid... Sorry.. It's been month since I use esp arduino board... So today I update it... Now its working flawless... Perfect!.. Btw it's confuse me, you are using nodemcu firmware with arduino ide?
Author
Owner

@tzapu commented on GitHub (Jul 13, 2015):

hi, glad it s not the library :p
i am using just the nodemcu board, arduino ide built firmware. i fine nodemcu 0.9 board very easy to use with arduino, you don t have to use the nodemcu firmware on it
https://github.com/nodemcu/nodemcu-devkit

glad it s now working
cheers

<!-- gh-comment-id:120844329 --> @tzapu commented on GitHub (Jul 13, 2015): hi, glad it s not the library :p i am using just the nodemcu board, arduino ide built firmware. i fine nodemcu 0.9 board very easy to use with arduino, you don t have to use the nodemcu firmware on it https://github.com/nodemcu/nodemcu-devkit glad it s now working cheers
Author
Owner

@lesjaw commented on GitHub (Jul 13, 2015):

oh i see, btw your library now become default in souliss.. nice..

<!-- gh-comment-id:120899518 --> @lesjaw commented on GitHub (Jul 13, 2015): oh i see, btw your library now become default in souliss.. nice..
Author
Owner

@tzapu commented on GitHub (Jul 13, 2015):

why thank you very much, i am honoured

<!-- gh-comment-id:120935087 --> @tzapu commented on GitHub (Jul 13, 2015): why thank you very much, i am honoured
Author
Owner

@juanpintom commented on GitHub (Jul 13, 2015):

I want to say Thank you too, it was really easy to integrate this useful library on Souliss :)

Regards!

<!-- gh-comment-id:120951519 --> @juanpintom commented on GitHub (Jul 13, 2015): I want to say Thank you too, it was really easy to integrate this useful library on Souliss :) Regards!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#3
No description provided.