That will show the last time the file was "read", which doesn't relate to this discussion.Lysenko wrote:OK, but what do you get if you use -lu instead?dhylands wrote:So the last time a password was written was in Aug, over 3 months ago, even though my laptop has been rebooted several times. The first file "Blue-Heron" is the SSID I normally connect to, and it hasn't changed since I installed 16.04.
Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
An extract from Espruino with Javascript, where we have wifi.save()
Code: Select all
var wifi = require("Wifi");
wifi.connect("my-ssid", {password:"my-pwd"}, function(ap){ console.log("connected:", ap); });
wifi.stopAP();
You may want to add wifi.setDHCPHostname("espruino"). Once you're happy with your connection, you can use wifi.save() to persist it, so you don't have to reconnect each time you reset your ESP8266.
Yes Frida is my watchdog!
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
+1
should esp.save_config be renamed to wifi.save_config?
esp.save_config sounds a bit general to me.
Other than that that proposal sounds good! Thanks for your effort.
should esp.save_config be renamed to wifi.save_config?
esp.save_config sounds a bit general to me.
Other than that that proposal sounds good! Thanks for your effort.
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
I did place it inside the esp module, because it is only specific to this platform.
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
My $0.02: If a seeming small change can reduce e-waste and shipping pollution, that's a win for the environment.
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Oh dear. (I posted the bug that started this. Sorry.)
I really, really, didn't plan on starting this "Holy War".
Please take a chill pill (or two).
For my part, I'd be happy with any reasonable solution which allows connecting / disconnecting without wearing the flash. If it's backwards-compatible, great, if not, great as well.
Mark
I really, really, didn't plan on starting this "Holy War".
Please take a chill pill (or two).
For my part, I'd be happy with any reasonable solution which allows connecting / disconnecting without wearing the flash. If it's backwards-compatible, great, if not, great as well.
Mark
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Just finished reading through all pages of this post and am left with a question: given there's no technical reason against it, was there anything wrong with the compromise solution proposed? If I read all this correctly, the suggestion was implementing a save_config() with an optional boolean to allow the original behaviour (pfalcon's desire) but at the same time provide the optional non-write functionality that 100% of the active readers on this forum (thus far) also seem to desire?
How does that break anyone's experience or backward compatibility?
How does that break anyone's experience or backward compatibility?
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
I think it essential to address this issue because many if not most applications will use deepsleep to reduce power consumption, and if its use ultimately causes hardware failure in a relatively short lifespan, then the ESP8266-micropython combination is not a valid choice of platform.
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Hello Woodat. Without knowing the details, I assume that even that implementation requires a change in the esp-sdk toolchain, if possible at all, which then would have to be maintained. And that's what Paul want to avoid, I guess.given there's no technical reason against it, was there anything wrong with the compromise solution proposed?
Re: Avoid flash wearing by altering behavior originally introduced by Espressif (the inventor of the ESP8266)
Nö Robert, the suggested changes in my pull request do only use official API calls. It changes only the two (or maybe three) year old default behaviour of the ESP8266. Those additional API methods have been introduced with a early version 1.0 and are still present in the 2.0 SDK. What pfalcon wants to avoid is the additional support he feats from that change.