So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By jeffas
#61977 I was writing this when Pablo2048 posted his information (thanks!). It seems that I was on the right lines.

I have a possible answer to my own question about preventing storage of config to flash.
The WiFi library has a member "_persistent" which controls whether it uses wifi_station_set_config (which saves to flash) or wifi_station_set_config_current (which doesn't, according to Espressif's doc here https://espressif.com/sites/default/fil ... nce_en.pdf). It is initialized as true.
I added a call WiFi.persistent(0) to my sketch, before WiFi.begin. I believe that this will stop it writing to flash.
I don't know if there's a neat way to clear out of flash anything that has already been written there. I guess you would have to run a sketch with invalid values so that they get stored.
My sketch built OK, so I guess I got the syntax right!
The fundamental problem remains, of course, that something on the ESP needs to know the password. I'm going to stick with my rotate encryption unless someone can come up with anything better. It at least stops someone grabbing the flash contents and looking for likely text strings.