ikea-led-obegraensad icon indicating copy to clipboard operation
ikea-led-obegraensad copied to clipboard

Reconnect to WiFi in case of disconnection

Open c64emulator opened this issue 10 months ago • 2 comments

Es gab bereits schon mal ein Ticket und einen PR dazu. Das Problem scheint nicht behoben bzw. wieder da zu sein: Leider musste ich bei meinem neuen WLAN-Router einen Scheduler einrichten, der in jeder Nacht (nachdem die FRITZ!Box einen DSL-Reconnect durchgeführt hat) den Router neu bootet. Das war notwendig, weil das WLAN extrem unzuverlässig lief. Als Folge davon öffnet das LED-Panel nun seinen AP (mit Webserver auf 192.168.4.1). Allerdings zeigt es dort dann die normale GUI (und nicht die WiFi-Konfiguration). Problematisch dabei ist, dass in den Default-Einstellungen kein WLAN-PW für den AP-Mode vorgesehen ist. Originally posted by @c64emulator in https://github.com/ph1p/ikea-led-obegraensad/issues/14#issuecomment-2052633457

** Setup successfull, starting loop()! Lost connection to Wi-Fi. Reconnecting... *wm:AutoConnect [10995390][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3001 *wm:Connecting to SAVED AP: MyWLAN *wm:connectTimeout not set, ESP waitForConnectResult... *wm:AutoConnect: FAILED for 3727 ms *wm:StartAP with SSID: IKEA OBEGRANSAD LED-Panel -- WiFi Setup *wm:AP IP address: 192.168.4.1 *wm:Starting Web Portal

c64emulator avatar Apr 13 '24 22:04 c64emulator

small modification in "connectToWiFi()" fixed it for me:

wifiManager.setConfigPortalTimeout(300); bool res; res = wifiManager.autoConnect(WIFI_MANAGER_SSID, WIFI_MANAGER_PW); if (!res) { Serial.println("***** Failed to connect - RESTARTING..."); ESP.restart(); }

c64emulator avatar Apr 21 '24 08:04 c64emulator

Hallo,

bin C-technisch nicht so gut drauf....

Kannst mir bitte sagen, wo und wie Du die "connectToWiFi()" modifiziert hast? Einfach dazuhängen ging nicht...

Danke!

WRedux avatar Jun 06 '24 19:06 WRedux