-
Notifications
You must be signed in to change notification settings - Fork 13.3k
WiFi only works once after erasing flash #3100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have exactly the same problem. Did you find a workaround? I have a NodeMCU chip and even with the flasher it is not resetting the credentials. |
Yes, if I always set the WiFi mode, like such:
If I leave off the WiFi.mode call I get the behavior described above. A lot of the sample code that I found through Google doesn't have a call to WiFi.mode. |
Can you link me which SDK/firmware and method you used to update your device? i feel like i have an old version. |
I'm using 2.3.0, nothing too special. https://github.com/esp8266/Arduino/releases/tag/2.3.0 |
I agree with @jcollie. I use the following with all my ESP modules and it fixed my re connection (or lacktherof) issues. At the top of code:
In my setup_wifi() function
Not sure what kind of black magic happens, with this, but it always seems to work. -Chase |
WiFi.persistent(false) --> doesn't it avoid the saving of the SSID/password in the flash? |
From HERE
So the way I read that is... it doesn't avoid saving the SSID/password to flash, it avoids REWRITING the values to flash if they're not different than the last values used. Either way, apologies, because I don't think I've been much help to your current dilemma. |
That's interesting, maybe i confused it with wifi.disconnect(false) ?
both before
and
I just want to add that this problem affects also other library it seems tzapu/WiFiManager#353 |
This issue is old. A lot has changed since it was reported, including several fixes that are relevant to the original post. Closing this. |
Basic Infos
WiFi only works once after erasing flash using esptool and then uploading a sketch.
Hardware
Hardware: Adafruit Huzzah Feather
Core Version: git from today
Description
If I use esptool to erase the flash and then use the Arduino IDE to upload a sketch, WiFi connects and works fine. If I reset the ESP8266 or cycle the power, WiFi never works properly again. The WiFi can authenticate and get a DHCP address but TCP connections or DNS lookups don't work. Using a Ubiquity AP-Pro as my WiFi access point. The ESP8266 is the only WiFi client that I've had problems with this AP.
Settings in IDE
Module: Adafruit HUZZAH ESP8266
Flash Size: 4MB
CPU Frequency: 80Mhz
Flash Mode: QIO
Flash Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu
Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: