-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Static IP WiFi connect 6 times slower with SPIFFS #1147
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'm having a similar problem. I thought it was something in my code, but now if I load up the WiFiAccessPoint.ino example the same thing happens. For me, it takes 30 seconds for the first web request to happen. But once that request is made it's fast again...unless I disconnect from the esp. When I connect again, the first web request takes 30 seconds. |
I think SPIFFS is not the direct cause. When you switch flash size, SDK config is mapped into different sectors. What may be happening, is that SDK config sectors which correspond to larger flash size contain some (erroneous) setting which makes connections slower. esptool.py -p /dev/tty.usbserial read_flash 0 4194304 flash.bin |
Thanks for looking @igrr. Here is that. This is from a NodeMCU 1.0 board which is showing the slow connect problem. |
Noticed the reference from #1177 so reading that saw the suggestion to erase the flash so gave that a go. Using a NodeMCU 0.9 board first tested it was really a slow connecting board, then uploading with no SPIFFs made it connect fast, then uploading as NodeMCU 0.9 made it slow again, then python esptool.py --port COM4 erase_flash. Now uploading as NodeMCU 0.9 - its still slow to connect, then uploading as Generic with no SPIFFs - also still slow again! So now nothing i try gets it to connect fast again :( |
use old stable 1.6.5
|
Ok yes using an old version of the Arduino/ESP IDE code gets it fast again. Reflashed with the original 1.6.1 code and it went back to doing the fast connect, then back to the latest 2.0.0 code and it works fast when using the Generic / no SPIFFS upload and slow connect when using the NodeMCU 0.9 upload. |
please retest with the latest git. |
Yes, this does appear to be fixed in the latest 2.1.0-rc1 code. Thanks! |
Edit: It turns out this isn't to do with the core release its something to do with the SPIFFS option when doing the sketch upload. For most modules i try the static IP connect is slow unless uploaded with "Generic ESP8266 module" selected and the Flash size set to 512K (no SPIFFS).
With a NodeMCU V1 board it connects slow when uploaded with "NodeMCU 1.0 (ESP-12E Module)" selected but the board connects fast when the code is uploaded with "Generic ESP8266 Module" selected and 512K (no SPIFFS). Similar with a NodeMCU 0.9 board it connects slow when uploaded with "NodeMCU 0.9 (ESP-12 Module)" selected but connects fast uploaded with "Generic ESP8266 Module" selected and 512K (no SPIFFS).
----- old text:
Using the sketch included here on an ESP-12 and the staging release from the 9th of Nov it connects to the WiFi access point in about 170 milliseconds, and thats always consistent and reliably close to that 170ms time (plus or minus a few milliseconds).
With the same ESP-12 and same sketch (only change adding the c_str() on WiFi.SSID()) using the 2.0.0 release its much slower and consistently connects at about 1060 milliseconds (again plus or minus a few milliseconds) - thats six times slower!
Interestingly, not all the ESPs i try with that 9th of Nov staging code connect fast, a lot are the slow 1060 millisecond connect time with either code release. But the ESPs that do connect fast will only work fast with that 9th Nov code and always connect slow with the 2.0.0 release.
Also, the very first connect after power up is a bit slower so with the fast board/9thNov code the first connect takes about 2197 milliseconds and then subsequent connects after a deepSleep take 170ms. On the Slow ones its always about 3070ms for the first connect and 1060 ms for the subsequent ones after deepSleep.
Odd eh? Any ideas?
The text was updated successfully, but these errors were encountered: