-->
Page 1 of 1

ESP only connects to access point about once out of 10 tries

PostPosted: Mon Dec 28, 2015 8:32 am
by Nurgak
I am having trouble getting my project (using ESP-12E) to connect to my access point, it works only once every 10 times. I have tested it on another AP where it connects every time. I don't really know how to proceed to debug this from here...

So far I've tried to get closer to the AP, changing channels and testing the example sketches to eliminate any potential issues arising from other parts of my code. Nothing has helped.

If I power cycle the ESP about 10 or so times it connects flawlessly. I wrote a code that will reset the module (ESP.reset()) if it fails to connect, but even after running it for 30 minutes (reset every 20 seconds) it still can't get access to the network, so only power cycling works. Maybe there's something cached that I don't know about, has this happened to anybody else?

EDIT

These are the messages I get from debug serial:
Code: Select allscandone
state: 0 -> 2 (b0)
Connecting to AP: 4a82dd
state: 2 -> 0 (2)
reconnect
f 0, scandone
state: 0 -> 2 (b0)
state: 2 -> 0 (2)
reconnect
f -180, scandone
state: 0 -> 2 (b0)
state: 2 -> 0 (2)
reconnect
f r0, scandone
state: 0 -> 2 (b0)
state: 2 -> 0 (2)
reconnect
f 0, scandone
state: 0 -> 2 (b0)
state: 2 -> 0 (2)
reconnect
f -180, scandone
state: 0 -> 2 (b0)
state: 2 -> 0 (2)
reconnect
f r0,

Re: ESP only connects to access point about once out of 10 t

PostPosted: Fri Jan 01, 2016 8:47 am
by Nurgak
I narrowed down my issue a little bit, it seems when I call "ESP.x" methods the ESP has problems with WiFi. This revealed another issue that just as strange. I'll test with another ESP to see if it's an problem with the flash.