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

User avatar
By Meyotch
#68698 Super weird thing.

I put a sketch on a wemos d1 mini using the arduino ide on mac os. It was a simple test sketch that had the board broadcast an SSID. It worked fine.

I then burnt a simple blink sketch that blinks the onboard LED. It blinks. Great.

However, the board is still broadcasting the SSID. And blinking! I've used a different network scanner and yes it's still broadcasting.

In a nutshell, WTH?

Any insight or questions appreciated.

M
User avatar
By yoursunny
#68699 ESP8266WiFi library by default operates in "persistent" mode where the SSID and PIN setting for AP and STA are saved to the flash storage. The main benefit of this is that the ESP would start connecting to WiFi even before your sketch start running.
As a result, if you flash a new sketch that does not modify WiFi parameters, the previous saved parameters would take effect, and cause your ESP appears to be running the old sketch. In fact, it's just broadcasting the SSID, but the old sketch is gone.

I typically include
Code: Select allWiFi.persistent(false);
in my sketch so this does not happen.
User avatar
By Meyotch
#68701
rudy wrote:When you set up the network connection the lower level routines saved it. And is still using it. That's how it is.


Interesting. So there must be a way to do a deep reset or flash the board to truly restore it to a pristine state? Do you have a link to a way to do this?

Much appreciated.

M