-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Does WifiManager suffers EEPROM failures? #242
Comments
hi , wifimanager is made so it doesn't write ssid/pwd each time it starts, it rather uses the previously saved settings by the system |
Hi, I have read again this esp8266/Arduino#1054 and seems to be a problem also in this library. I mean, if you call wifi.begin could be a problem. You can read more about PERSISTENT here: https://github.com/esp8266/Arduino/blob/master/doc/esp8266wifi/generic-class.md that explain this: """"" What I don't know is why they have defined PERSISTENT's default value as TRUE. I think it will be better for all to use FALSE. I think that we have to add wifi.persistent(false); in this library. don't we ? Hope your answer. NOTE: I will advise also to kentaylor (afterwards .... i don't know how !!!! Excuse me. I am not very used to github) |
hi cheers |
I think that is a different thing I think the solution t memory corruption is this: The default value of PERSISTENT is TRUE, So, as you can see in the commit that I have said, for example: if (_persistent) So the set_config order is different. I think "current" one check first by reading de EEPROM and if the config user and password are the same, then they are not written, the normal set_config function save ALWAYS (overwrite) the EEPROM. This is my guess. """"MORE"""" """"" Cheers, |
I really do not understand this at all, or that statement, maybe this was true as a workaround in one version of the sdk ? correct me if I am wrong but WiFista, checks current config always, not sure why the decision would be different for persistent status.
Is this referring to this workaround ?
|
Also you realize you are referencing posts from 2015, also the I fail to see the concern here. This should not be an issue using the current stable version of the sdk. I should say this is no longer an issue, if you are having issues, it is either you are using an old library, OR you found a new bug and need some reproduction sketches. |
Hi, "the problem" is still there. See this recently link (German to english) Also read this from oficial github esp8266 arduino core: https://github.com/esp8266/Arduino/blob/master/doc/esp8266wifi/generic-class.md """"" I have marked with bold the main reason to use persistent(false). It doesn't hurt, and is good in case you have a lot of reset (once an hour is almost 10.000 / year. Depends on EEPROM it will be very bad to it). Another from June: http://rayshobby.net/esp8266-reboot-cycled-caused-by-flash-memory-corruption-fixed/ Please read them. |
Yeah I know I read it. I also posted the code that does this.. It says that in your debug output ( if enabled), you can test this yourself, or throw a scope on the flash, I mean are you basing this on some assumption or actual tests? Are you talking about some other use case, like constantly switching back and forth between aps, or AP mode, or that wifimanager is causing this bug because it is constantly disconnecting and reconnecting and causing flash erases. |
Hi @tablatronix . I think that it is old, yes, but it is also effective nowadays. I haven't already test it. I am used to arduino and I am working now with esp8266. I will isntalla wifiManager and OTA updates as defaults in all my sketchs, but for that I have read tons of forum about esp8266. One thing that I have found is about EEPROM corruption; and persisten boolean variable seems to help a lot, but it is necessary to be in wifiManager. I don't know if I am wrong, but I have read in a lot of places about using persistent(false). Do you think that it is NOT necessary? Is wifiManager saving in EEPROM (wifi.Begin) each boot ? Regards, |
Because esp8266/Arduino#1997 Now if you have people using espressif SDK and not arduino sdk , then there might be still an issue, but that is not the case here, unless people are incorrectly using espressif sdk functions instead of the arduino ones. I also found this to be a good standard test to reproduce that issue, instead of crafting my own. |
Thanks @tablatronix for your great effort. At this time I have no knowledge about SDK and so on. But I don't know why @kentaylor doesn't implement WiFi.persistent(false) prior to calling WiFi.begin(SSID,password) in his wifiManager's fork. I am not an expert, but the question is:
Could @kentaylor tell us his opinion ? Regards, |
Because then you have to wait until begin to connect to wifi, else persistant starts connecting at boot. Also begin requires hardcodig credentials in your sketch. Persistant uses flash which you can set however you want. He is also referencing deep sleep modes which are highly optimized. So there might be something with that |
I don't understand you. Sorry. May be this is difficult for me. |
Meanwhile I have forked your github library and added option to use persistent(false), I will try to use it and see if there is any problem Here is another little problem about persistent(false) #280 I hope anyone else could give us their experience or knowledge. |
@ortegafernando Any news on this? |
Hi, I have been busy with an Arduino Project, so I have left ESP8266 for a few months. Has anybody any other news ? |
HI, I am a newbie with ESP8266 (no with Arduino).
I have read this issue https://github.com/esp8266/arduino/issues/1054 about corrupting eeprom after some restarts.
They solve it with Wifi.persistent(false).
I don't know if this library could suffer the same issue, or it already has a method to avoid it (his own way to save and restore settings, .....)
Thanks a lot for your great library.
The text was updated successfully, but these errors were encountered: