Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 does not reconnect to Wifi #2400

Open
4 tasks done
LPG-PG opened this issue Nov 9, 2024 · 0 comments
Open
4 tasks done

ESP32 does not reconnect to Wifi #2400

LPG-PG opened this issue Nov 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@LPG-PG
Copy link

LPG-PG commented Nov 9, 2024

What happened?

After an indefinite period of time, the ESP32 module loses the connection to the WiFi. No new DHCP lease is obtained, so neither web, API, MQTT nor ping works.

To Reproduce Bug

It happens ramdomly between 1 and 5 days

Expected Behavior

OpenDTU has to be reboot to fix it temporary

Install Method

Pre-Compiled binary from GitHub releases

What git-hash/version of OpenDTU?

v24.10.15

What firmware variant (PIO Environment) are you using?

generic_esp32

Relevant log/trace output

No response

Anything else?

I checked some parts of the code and I'm not sure, if there is a bug in NetworkSettings.cpp -> NetworkSettingsClass::applyConfig()
line 288ff

WiFi.begin(
            Configuration.get().WiFi.Ssid,
            Configuration.get().WiFi.Password,
            WIFI_ALL_CHANNEL_SCAN);

I mean, that Wifi.begin is called with Channel 1 because the enum WIFI_ALL_CHANNEL_SCAN value is 1.

The declaration of the called function is:

wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);

So the third paramter is the channel, which is in this case 1.

Please confirm the following

  • I believe this issue is a bug that affects all users of OpenDTU, not something specific to my installation.
  • I have already searched for relevant existing issues and discussions before opening this report.
  • I have updated the title field above with a concise description.
  • I have double checked that my inverter does not contain a W in the model name (like HMS-xxxW) as they are not supported.
@LPG-PG LPG-PG added the bug Something isn't working label Nov 9, 2024
@tbnobody tbnobody mentioned this issue Nov 29, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant