Page 1 of 1

Restarting WiFi causing increased temperature

Posted: Mon Aug 08, 2022 6:09 pm
by spadespwnz
Hello,

I'm working on a project using a ESP32-PICO-D4 with ESP-IDF 4.3.

I have a temperature sensor attached near the ESP32.

The application is working as intended, connects to the wifi network and operates without issue.

I want to the ESP32 to disconnect and reconnect to the WiFi network, so I call:
esp_wifi_disconnect();
which results in a disconnect.

My WiFi event handler will then pick up the disconnect event, and reconnect to the network.

This works correctly, and the device reconnects to the network.
The problem is, the device will run much hotter from this point forward until the device is restarted.
I have tried stopping the WiFi driver and restarting it:
esp_wifi_stop();
esp_wifi_start();

But the issue still occurs.

Why would this cause the device to run at a higher temperature? What can I do to avoid this?

Additionally,
If instead of calling esp_wifi_disconnect();, I instead use esp_wifi_connect(); even while it is still connected, the temperature will begin increasing.

Re: Restarting WiFi causing increased temperature

Posted: Tue Aug 09, 2022 11:25 am
by cruvus
Do you use power management? Dynamic frequency, light sleep, etc.?
The SoftAP is off?
Or maybe it is a problem with modem sleep: esp_wifi_set_ps and esp_wifi_get_ps are some keywords.

Re: Restarting WiFi causing increased temperature

Posted: Mon Aug 15, 2022 7:45 pm
by spadespwnz
It turned out to be a bug in my application code.
Calling "esp_wifi_connect();" while already connected to a network was causing the issue.