Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Nurgak
#37316 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,