-->
Page 2 of 2

Re: Arduino esp8266 hide ssid and password

PostPosted: Fri Feb 03, 2017 11:24 am
by Pablo2048
It's the SDK - SDK store SSID/Password somewhere. Use WiFi.persistent(false) to disable this... (RTFM https://github.com/esp8266/Arduino/blob ... s.md#begin ;-) )

Re: Arduino esp8266 hide ssid and password

PostPosted: Fri Feb 03, 2017 11:38 am
by jeffas
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.

Re: Arduino esp8266 hide ssid and password

PostPosted: Sat Feb 04, 2017 5:13 pm
by g6ejd
Your Wi-Fi credentials are stored on and recovered from the ESP8266