I flashed my board, but somehow my NodeMCU is connecting to my wifi.

I was playing around with some sketches where you enter your ssid and password and I had trouble uploading it with the Arduino IDE. So I decided to start from scratch and upload the firmware again.

I used these instructions https://nodemcu.readthedocs.io/en/latest/en/flash/

which sent me to https://nodemcu-build.com/ and I used the default and added MQTT. The image appeared to flash with the windows program. I was able to upload a simple hello world sketch and when I looked at the terminal I was shocked to see:


state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2

connected with HomeSweetHome, channel 1
dhcp client start...

pm open,type:2 0

It not only appears that my previous sketch uploaded, but some remnants of it appear to remain as it connected to my WiFi. What on earth is going on? Why didn't my flash wipe this out?

ETA: I was able to remove the WiFi settings through the IDE. Does this mean the WiFi component on the controller stores the router authentication information?

yes the Espressif SDK libraries remember the settings on flash. it is why in Tools menu you have option Erase->WiFi settings