Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ESP8266 takes long time to connect

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 ?

like image 277
Pratik Kumar Avatar asked Oct 19 '25 03:10

Pratik Kumar


1 Answers

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.

like image 195
Erik HB Avatar answered Oct 22 '25 07:10

Erik HB