WiFiManager: setDebugOutput(false) causes the automatic Wi-Fi connection to fail
Basic Infos
Hardware
WiFimanager Branch/Release: Master
Esp8266/Esp32: Esp32
Hardware: LILYGO TTGO T-Camera WROVER PIR Mic (v1.6.2)
Core Version: 2.4.0, staging
Description
When setting setDebugOutput(false) Wi-Fi connection will systematically fail.
Settings in IDE
Module: Esp32 Dev Module
Additional libraries:
Sketch
#BEGIN
#include WiFi.h
#include FS.h
#include esp_camera.h
void setup() {
WiFiManager wifiManager;
bool connected = false;
wifiManager.setDebugOutput(false); // ATTENTION - when debug is set to false, connection to the configured Wi-Fi SSID fails systematically and the AP comes available...
wifiManager.setConfigPortalTimeout(30);
Serial.println("\nCheck Wi-Fi connection...");
connected = wifiManager.autoConnect("iomitacam", "Password1");
}
void loop() {
}
#END
Debug Messages
messages here
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15
Added a fix to git, a workaround is to make sure you set mode sta in setup early as possible on esp32
Its a race condition, ill fix it
Sorry @Maurizio1 that was not to you!, I deleted some other posts, someone else.
Thanks for creating issues and improving wifimanager!
That comeback issue is another known issue with some routers… Although its a bit different, can you open a new issue for that one, and I will link it to the workarounds and other issue
I’m sorry. I didn’t mean to waste your time. Of course I did test your patch and it worked. That’s why I wrote “Thank you @tablatronix” before my last post and put a “thumb up” emoji on your answer. Sorry if I was not clear enough.
As for the “debugging” that you mentioned I just added the “delay(100)” instruction, that’s all. My intent was to help to pinpoint the cause. Also, on my device (ESP32), I get more than 25 failed attempts before Wi-Fi starts.
Again, I’m not trying to devour your time, I’m just giving some more info in the hope it can help, so please forgive me. Anyway, your patch worked for me, so I am OK with that. Thank you again.
esp8266 works fine, this is unrelated to this issue, and your wasting my time, thanks.
@Maurizio1 did you get a chance to test latest git?