I am using an ESP8266 for a project which requires the ESP to establish a connection to the Access Point , with as less delay as possible, but as of now it takes a minimum of 4-5 mins for establishing the connection which is too much delay. I have tried to set a static ip, gateway, subnet and DNS by passing them as parameter to WiFi.config() function, still no success. Would someone help me regarding this issue ?
3
votes
2 Answers
2
votes
I have seen lengthy delays on ESP8266 WiFi connection if the WiFi is persisting its configuration to the flash memory. Anywhere from a few seconds to a minute or so.
Try to call WiFi.persistent( false )
before you call WiFi.mode()
and WiFi.begin()
.
At the very least, that will help you narrow down the cause of the problem.
0
votes
Ensure access point frequency is 2.4Ghz (not 5Ghz). This will cause prolonged connection time (never connecting).
"The ESP8266 is not designed for 5 GHz." Source
NodeMCU V1.0 (as pictured) uses an ESP8266's (ESP-12E) chip, Antenna is configured for 2.4 Ghz only.
WifI
class I don't think that's the case) or your network environment. Does the problem appear with all hotspots? You have tried connecting to, say, a hotspot from your smartphone? – Maximilian Gerhardt