IoT Demo requires many retries to connect to wifi network
Posted: Mon Feb 23, 2015 11:08 pm
I'm playing around with the IoT Demo from Electrodragon (http://www.electrodragon.com/w/ESP8266_IoT, sample code R1) and I've noticed that the ESP8266 takes a while to connect to the wifi network. I added some print outs for the IP address and the return code for espconn_connect() and here's what I'm seeing:
So, it always starts off in the "Connecting" state, then goes into the "Wrong password" state and after 5 minutes, it finally connects. However, this is rather inefficient for the development process, so I was wondering if anyone has found a workaround for this problem.
Code: Select all
WiFi connecting...
IP address: 0.0.0.0
Connect status:1
WiFi connecting...
IP address: 0.0.0.0
Connect status:2
WiFi connecting error, wrong password
IP address: 0.0.0.0
Connect status:2
WiFi connecting error, wrong password
IP address: 0.0.0.0
Connect status:2
WiFi connecting error, wrong password
IP address: 0.0.0.0
So, it always starts off in the "Connecting" state, then goes into the "Wrong password" state and after 5 minutes, it finally connects. However, this is rather inefficient for the development process, so I was wondering if anyone has found a workaround for this problem.