Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Valdaine
#42403 Hi,

I have a similar problem.
My application is to regularly send data with an ESP12 to a server (each 30s) using an https request. It is powered using an USB phone charger.
After a while ( randomly 6h, 12 or more), the module loose the wifi connexion and can't reconnect.

My main loop check if connected, if not, try to connect for 15s ; after that if not connected, wait for 30s, and then try again. After 5 failed loop, I do an esp.reset()

Even after an esp reset, it can't recover. I made a lot of debug around that and my latest conclusion is the following :
- my module is in a plastic box,
- if the module loose wifi connect, it will try to connect and because of power transmission, it's getting warmer (may be 35° on the metal shield)
- when the module is getting warm, may be because of ESP RF deviation with temperature, the level of RSSI for the wifi signal is going lower and lower. I could see that using serial monitor.
- Hence, the module can't reconnect, try to reconnect and heat up a little more.
- It's an endless loop even with reset.
- This especially happens when the module is near the wifi coverage limit.

If I powerdown the module for seconds, It can reconnect.

This is something that I have observed my laptop. When I am far from the router, the received signal quality is getting lower as my laptop is getting warm.

Now I don't have at the moment a solution. I don't know how to switch off the wifi part for a while to reduce temperature.

Hope this can give new ideas.
User avatar
By Ansh Verma
#42440
Alexandre Pinheiro wrote:Just to keep you updated, I discovered that I had 2 stability sources: the SQL and the WiFi. After reading a lot of posts in this forum about stability and suggestions to address the problem correctly, I made some changes in my circuit and voilà! The WiFi stability seems to be solved right now. It's been more than 12 hours without any hang. I'll wait unitl 48 hours and then I'll try to understand why it freezes after sending a bunch of queries to the SQL server.

Maybe it's better to have the server to get the data from ESP instead of the ESP sending to server.


Hey, can you share the changes you made in the circuit? I have a Sparkfun Thing board. It always drops a connection i.e. the client disconnects after sending a packet. I suspect that the wifi is re-establishing the connections every time. I wish to implement your solution.
User avatar
By Alexandre Pinheiro
#42481
Ansh Verma wrote:
Alexandre Pinheiro wrote:Just to keep you updated, I discovered that I had 2 stability sources: the SQL and the WiFi. After reading a lot of posts in this forum about stability and suggestions to address the problem correctly, I made some changes in my circuit and voilà! The WiFi stability seems to be solved right now. It's been more than 12 hours without any hang. I'll wait unitl 48 hours and then I'll try to understand why it freezes after sending a bunch of queries to the SQL server.

Maybe it's better to have the server to get the data from ESP instead of the ESP sending to server.


Hey, can you share the changes you made in the circuit? I have a Sparkfun Thing board. It always drops a connection i.e. the client disconnects after sending a packet. I suspect that the wifi is re-establishing the connections every time. I wish to implement your solution.


Sure... but keep in mind that I made that from what I've read in a lot of posts, so maybe you find some error. Look I'm not engineer, programmer or such, just a hobbyst, ok? I'm developing a project and still have a LOT of work. And I don't use any kind of brand board. I made my own circuit.

So, what I've done:

GPIO 0, GPIO 2, RESET, CH-PD has, each one, a 10k pull up resistor.
GPIO 15 has a 10k pull down resistor.
Very very close do VCC I have a 470uF electrolytic capacitor <=== THIS IS VERY IMPORTANT!!!!

This solved by WiFi problem. I still have some disconnects, but it always connects back, so this is a feature that you should manage in your code (look at my loop() in page 2).

Just to finish, I'm not using a cell phone charger. I'm using an adjustable (1.5~12V) 1.5A power adapter, adjusted to 9v and a convert board that outputs simultaneously 3.3v (to feed the esp) and 5v (to feed a sensor).
User avatar
By lethe
#42507
Valdaine wrote:If I powerdown the module for seconds, It can reconnect.
This is something that I have observed my laptop. When I am far from the router, the received signal quality is getting lower as my laptop is getting warm.

Assuming this is indeed a temperature related issues, my guess would be, that the chip does perform RF calibration at power up, but not when reset by software.
To verify whether this is a temperature issue or not, I would suggest heating the ESP with a hair dryer.

Now I don't have at the moment a solution. I don't know how to switch off the wifi part for a while to reduce temperature

As a workaround, I would suggest to try deep sleep instead of reset (you may also want to try setting system_deep_sleep_set_option()/ system_phy_set_powerup_option() explicitly). Attaching a heat sink may also help...
You should also consider reporting this to espressif, so they might be able to fix this issue: http://bbs.espressif.com/viewtopic.php?f=20&t=288