[GH-ISSUE #1263] Reconnect issue #1083

Open
opened 2026-02-28 01:28:26 +03:00 by kerem · 1 comment
Owner

Originally created by @robertaonnis on GitHub (Jun 16, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1263

Basic Infos

Hardware

WiFimanager Branch/Release: Master

Esp8266/Esp32:
Hardware: ESP32

Description

Problem description
I have only one problem. 2 times a day my esp32 lost the connection but do not recconect again.
only if i restart power.

i check and i don't have any problem on the router. only esp have this problem.
but ok if this appened how can set arduino to try connection again.

i ahve try this:

#BEGIN
#include <Arduino.h>
#include <WiFiManager.h>


// include MDNS
#ifdef ESP8266
#include <ESP8266mDNS.h>
#elif defined(ESP32)
#include <ESPmDNS.h>
#endif


WiFiManager wm;
unsigned long oldtime;
unsigned int  timeout   = 120; // seconds to run for
unsigned int  startTime = millis();
bool portalRunning      = false;
bool startAP            = false; // start AP and webserver if true, else start only webserver


void setup() {
`
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP    
 Serial.begin(115200);// Starts the serial communication @9600
  Serial.setDebugOutput(true);
  delay(1000);

// wm.resetSettings();
 //wm.setHostname("MDNSEXAMPLE");

 
  wm.setConfigPortalBlocking(false);

  if(wm.autoConnect("Test", "12345678")) {
        Serial.println("connected...yeey :)");
    }
    else {
        Serial.println("Configportal running");
    }
   


}

void loop() {

wm.process();

{my loop here}

}

`
#END

Debug Messages

in your opinion is that I make bad the code or i loose some code?
Originally created by @robertaonnis on GitHub (Jun 16, 2021). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1263 ### Basic Infos #### Hardware WiFimanager Branch/Release: Master Esp8266/Esp32: Hardware: ESP32 ### Description Problem description I have only one problem. 2 times a day my esp32 lost the connection but do not recconect again. only if i restart power. i check and i don't have any problem on the router. only esp have this problem. but ok if this appened how can set arduino to try connection again. i ahve try this: ```cpp #BEGIN #include <Arduino.h> #include <WiFiManager.h> // include MDNS #ifdef ESP8266 #include <ESP8266mDNS.h> #elif defined(ESP32) #include <ESPmDNS.h> #endif WiFiManager wm; unsigned long oldtime; unsigned int timeout = 120; // seconds to run for unsigned int startTime = millis(); bool portalRunning = false; bool startAP = false; // start AP and webserver if true, else start only webserver void setup() { ` WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP Serial.begin(115200);// Starts the serial communication @9600 Serial.setDebugOutput(true); delay(1000); // wm.resetSettings(); //wm.setHostname("MDNSEXAMPLE"); wm.setConfigPortalBlocking(false); if(wm.autoConnect("Test", "12345678")) { Serial.println("connected...yeey :)"); } else { Serial.println("Configportal running"); } } void loop() { wm.process(); {my loop here} } ` #END ``` ### Debug Messages ``` in your opinion is that I make bad the code or i loose some code? ```
Author
Owner

@RosmanAndrey commented on GitHub (Nov 22, 2021):

Same thing

<!-- gh-comment-id:975764489 --> @RosmanAndrey commented on GitHub (Nov 22, 2021): Same thing
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#1083
No description provided.