× General topics about hardware.

ESP8266 sometimes unable to connect to AP

8 years 3 months ago - 8 years 3 months ago #3431 by Jansen
I have a ESP8266-12F setup to send data to thingspeak. It connects to my AP and does a http post to a rest service where it stores the measured light intensity and the battery voltage. That looks like this:



It does an update every minute. Between updates it goes in deep sleep mode. After a one minute timeout it wakes up and reboots and does a new post. But it sometimes seems to miss one or more updates. I have no idea if it simply doesn't wake up from the sleep cycle, if it is unable to connect to the AP or if the webservice refuses connection. Does anyone else have the same problem?
Attachments:

Please Log in or Create an account to join the conversation.

7 years 10 months ago #3634 by swisscore
what is your schematic ?

I have the same problem with my ESP-01 but I think this is because GP0 and GP2 aren't in the right status during the reset!

Maybe have a look with this idea

Please Log in or Create an account to join the conversation.

7 years 10 months ago #3637 by EasyIoT

swisscore wrote: what is your schematic ?

I have the same problem with my ESP-01 but I think this is because GP0 and GP2 aren't in the right status during the reset!

Maybe have a look with this idea


If you are using EasyIoT Cloud and MQTT: we added security feature - if there are too many login attempts with incorrect password your IP address is banned for some period of time and you are unable to connect to EasyIoT Cloud.

Please Log in or Create an account to join the conversation.

7 years 8 months ago #3731 by Nikoloudakis
I might have an idea to help you.
I think there is a problem with the sketch, because I had a similar problem.
When the esp restarts in my case, it immediately tries to connect to the WiFi.
In the beginning of the code we write WiFi.begin(storage.ssid, storage.pwd);
After debugging I found that sometimes after restart esp connected in the background immediately to WiFi before the code reaches WiFi.begin! Strange and odd! And after the code reaches WiFi.begin, it is already connected, so the connection fails and goes to AP mode
I inserted a statement if (WiFi.status() != WL_CONNECTED) before WiFi.begin and now I don't have a single connection failure. :P
The following user(s) said Thank You: swisscore

Please Log in or Create an account to join the conversation.

7 years 8 months ago #3735 by swisscore
Thanks for your tip, I will add to do better my sketch!

Please Log in or Create an account to join the conversation.

Time to create page: 0.272 seconds

Forum latest

  • No posts to display.