ESP not able to connect to WiFi : STA disconnect: 201
Posted: Sun Mar 05, 2017 11:50 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