ESP NOT ABLE TO CONNECT TO WIFI : STA DISCONNECT: 201
ESP NOT ABLE TO CONNECT TO WIFI : STA DISCONNECT: 201
Postby vks007 » Mon Mar 06, 2017 1:10 am
I am having trouble with the ESP 01 connecting to WiFi in certain scenarios. The problem does not happen always but when it does, I am not able to set it right. The issue is that it keeps on trying to connect to WiFi and keeps on disconnecting with the error messages as shown below. I am using this chip on a circuit I have wired on the PCB. I have the same circuit wired on the breadboard. The strange part is that I have not got this error even once on the bread board. It always works fine there. At times the problem went away when I re-flashed my code on the ESP and then again it comes back after some time. At times I have waited for a long time and it successfully connects after trying for 5-10 minutes but not always. It has nothing to do with my code as the WiFiClient example also gives the same issue. Can somebody point me where should I debug this?
I dont think there is anything wrong with the ESP as I have experienced this with multiple ESPs. They would all work fine if I put them onto a circuit I have wired on the breadboard though.
Debug messages:
.wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
I dont think there is anything wrong with the ESP as I have experienced this with multiple ESPs. They would all work fine if I put them onto a circuit I have wired on the breadboard though.
Debug messages:
.wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
....wifi evt: 1
STA disconnect: 201
.......wifi evt: 1
STA disconnect: 2
......wifi evt: 1
STA disconnect: 2
-
- Posts: 2
- Joined: Wed May 10, 2017 4:00 pm
Re: ESP NOT ABLE TO CONNECT TO WIFI : STA DISCONNECT: 201
Postby esp-link32 » Wed May 10, 2017 4:04 pm
You should check your router. May be firewall or access filter prevent esp to connect wifi. 

Re: ESP NOT ABLE TO CONNECT TO WIFI : STA DISCONNECT: 201
Postby ememberus » Thu May 11, 2017 10:04 pm
I also experience similar issue (in addition to memory leaks and crashes):
viewtopic.php?f=66&t=4245
My code is attached therein, so you can use it as your testbed.
The problem with connection happens when RF connection is unstable.
The initial connection is typically smooth.
After RF connection is lost first time:
- following reconnect attempts become slower (connection timeouts, maybe?)
- in some cases esp8266 client never reconnects again
The AP has nothing to do with it:
- it accepts other connections with no problem
- if rebooted, esp8266 can connect to AP again
All these issues - reconnect failures, memory leaks, CPU crashes - could be parts of the same problem.
A race condition in esp8266 connection state machine, for example?
Note: all these problem do not occur to me if RF signal is always (!) strong.
viewtopic.php?f=66&t=4245
My code is attached therein, so you can use it as your testbed.
The problem with connection happens when RF connection is unstable.
The initial connection is typically smooth.
After RF connection is lost first time:
- following reconnect attempts become slower (connection timeouts, maybe?)
- in some cases esp8266 client never reconnects again
The AP has nothing to do with it:
- it accepts other connections with no problem
- if rebooted, esp8266 can connect to AP again
All these issues - reconnect failures, memory leaks, CPU crashes - could be parts of the same problem.
A race condition in esp8266 connection state machine, for example?
Note: all these problem do not occur to me if RF signal is always (!) strong.
Who is online
Users browsing this forum: No registered users and 3 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.