[GH-ISSUE #1549] ESP32 RECONNECT #1322

Open
opened 2026-02-28 01:29:35 +03:00 by kerem · 5 comments
Owner

Originally created by @PabloOyarzo on GitHub (Jan 14, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1549

Hi is it possible to provide a reconnect sample code?

As autoreconnect doesn't seem to be working.

Saw @tablatronix said in another issue that you check wifi status and do wifi begin again

Originally created by @PabloOyarzo on GitHub (Jan 14, 2023). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1549 Hi is it possible to provide a reconnect sample code? As autoreconnect doesn't seem to be working. Saw @tablatronix said in another issue that you check wifi status and do wifi begin again
Author
Owner

@tablatronix commented on GitHub (Jan 14, 2023):

I think it is supposed to be working now, what are you seeing?

<!-- gh-comment-id:1382726080 --> @tablatronix commented on GitHub (Jan 14, 2023): I think it is supposed to be working now, what are you seeing?
Author
Owner

@PabloOyarzo commented on GitHub (Jan 14, 2023):

I Haven't turned on the debug verbose, but it doesn't reconnect automatically. I'm using an ESP32, it's using the WiFi Library from arduino esp32 the latest (which is supposed to fix all reconnect issues) and wifi managers latest too. I'm testing with a hostpot right next to the esp32.

Tried it with and without autoreconnect(true).

<!-- gh-comment-id:1382727503 --> @PabloOyarzo commented on GitHub (Jan 14, 2023): I Haven't turned on the debug verbose, but it doesn't reconnect automatically. I'm using an ESP32, it's using the WiFi Library from arduino esp32 the latest (which is supposed to fix all reconnect issues) and wifi managers latest too. I'm testing with a hostpot right next to the esp32. Tried it with and without autoreconnect(true).
Author
Owner

@PabloOyarzo commented on GitHub (Jan 17, 2023):

It works now, still would like to see that check and reconnect little snippet of code that you use please!

<!-- gh-comment-id:1386024696 --> @PabloOyarzo commented on GitHub (Jan 17, 2023): It works now, still would like to see that check and reconnect little snippet of code that you use please!
Author
Owner

@yfrit83 commented on GitHub (Feb 6, 2024):

Hi, yes it work now, but only one time!

Step to get the bug :

  1. Boot ESP32-S3 device
  2. ESP32-S3 device connect automaticly
  3. Cut the wifi
  4. ESP32-S3 device disconnect.
  5. Start the wifi
  6. ESP32-S3 device reconnect automaticly.
  7. Cut the wifi again.
  8. ESP32-S3 device disconnect
  9. Start the wifi again
  10. ESP32-S3 device dosn't reconnect.

The device need to be rebooted to reconnect.

code :
WiFi.mode(WIFI_STA);
wm.setConfigPortalBlocking(false);
wm.setConfigPortalTimeout(60);
wm.setBreakAfterConfig(true);
wm.setWiFiAutoReconnect(true);
std::vector<const char *> menu = {"wifi","wifinoscan","close","sep","erase","update","restart","exit"};
wm.setMenu(menu); // custom menu, pass vector
wm.setHostname(("WM_"+wm.getDefaultAPName()).c_str());
if(wm.autoConnect("AutoConnectAP")){
Serial.println("connected...yeey :)");
}
else {
Serial.println("Configportal running");
}

  • vm.process(); in loop
<!-- gh-comment-id:1928739437 --> @yfrit83 commented on GitHub (Feb 6, 2024): Hi, yes it work now, but only one time! Step to get the bug : 1. Boot ESP32-S3 device 2. ESP32-S3 device connect automaticly 3. Cut the wifi 4. ESP32-S3 device disconnect. 5. Start the wifi 6. ESP32-S3 device reconnect automaticly. 7. Cut the wifi again. 8. ESP32-S3 device disconnect 9. Start the wifi again 10. ESP32-S3 device dosn't reconnect. The device need to be rebooted to reconnect. code : WiFi.mode(WIFI_STA); wm.setConfigPortalBlocking(false); wm.setConfigPortalTimeout(60); wm.setBreakAfterConfig(true); wm.setWiFiAutoReconnect(true); std::vector<const char *> menu = {"wifi","wifinoscan","close","sep","erase","update","restart","exit"}; wm.setMenu(menu); // custom menu, pass vector wm.setHostname(("WM_"+wm.getDefaultAPName()).c_str()); if(wm.autoConnect("AutoConnectAP")){ Serial.println("connected...yeey :)"); } else { Serial.println("Configportal running"); } - vm.process(); in loop
Author
Owner

@tablatronix commented on GitHub (Feb 11, 2024):

Whats logs say?

<!-- gh-comment-id:1937397801 --> @tablatronix commented on GitHub (Feb 11, 2024): Whats logs say?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1322
No description provided.