Cannot reconnect to Wifi after Deep Sleep

bkgoodman
Posts: 11
Joined: Fri Feb 17, 2017 12:41 pm

Cannot reconnect to Wifi after Deep Sleep

Postby bkgoodman » Fri May 08, 2020 7:15 pm

I am using some standard code which uses

Code: Select all

ESP_ERROR_CHECK(example_connect());
to connect to Wifi.

I have been running on a DEVKIT ESP32 module for weeks and have had no issues. After doing some stuff I do a esp_wifi_stop(); and then a esp_deep_sleep - all has been very very reliable.

Today I switched over to a Sparkfun ESP32 Thing board. The only difference is that I had to change setting from a 40MHz clock to a 26 MHz clock (was giving me some serial port garbage without doing so). Everything is otherwise fine except that after going through it's first connect/deep-sleep run - when it wakes out of the deep sleep, it just forever says:

Code: Select all

example_connect: Wi-Fi disconnected, trying to reconnect...
(repeatedly - once a second).

It is 100% reliable that it does this after the first deep sleep - and doing any kind of reset will make it work again. I have tried fixing this by adding a esp_wifi_start() in the startup, but this does not help. I can't understand why this would have worked 100% on the first board, but always fails after the first deep sleep on the other.

Any ideas?

Who is online

Users browsing this forum: Baidu [Spider], marrmaddox and 27 guests