tzapu / WiFiManager

ESP8266 WiFi Connection manager with web captive portal
http://tzapu.com/esp8266-wifi-connection-manager-library-arduino-ide/
MIT License
6.53k stars 1.96k forks source link

Does not switch between wifi and ap automatically #1575

Closed hackintoshlover closed 1 year ago

hackintoshlover commented 1 year ago

Basic Infos

Hardware

WiFimanager Branch/Release: Master

Esp8266/Esp32: ESP32

Hardware: ESP32-Wroom

Core Version: 2.0.6

Description

I am using the example sketch Auto-Connect Non Blocking

Settings in IDE

Additional libraries: None

Problem: After uploading the code, the esp starts in ap mode and i can access the web portal to connect it to wifi router. But once the wifi router goes off, the device does not automatically enter into ap mode or connect to other router whose credentials are stored in it. How do i resolve the issue?

tablatronix commented 1 year ago

When you say automatically, do you mean on reboot? Do you have logs?

hackintoshlover commented 1 year ago

Not on reboot. Consider the case below. 1) Esp is connected to my existing wifi and working normal, as soon as my wifi turns off the esp should ideally connect to other wifi in range whose credentials are stored in it. 2) I realised while testing that this behaviour is currently not possible with this library since it does not store multiple wifi credentials in it.

The effect that I want is that when my existing wifi goes off the esp should try and connect to other wifi whose credentials are stored in its memory when none is found it should switch to AP mode.

Is there some way using which I can achieve the desired behaviour?

tablatronix commented 1 year ago

ok well esp should automatically do autoreconnect, but it seems to not work very well. Also we can only store 1 set of credentials, otherwise you have to use multiwifi which wm does not support at this time.

hackintoshlover commented 1 year ago

Would be really helpful if you could implement it. There's a WifiManager library by khoi-zhan but that's darn slow, I tried it.

tablatronix commented 1 year ago

So you want a secondary wifi ap to fallback to? This is not really an issue as much now that mesh is a thing..

Esp supports the basic wifi creds easily but adding another is a fair amount of code. I will look into it though