tzapu / WiFiManager

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

STA and AP mode at the same time unwanted #1085

Open Primus007 opened 4 years ago

Primus007 commented 4 years ago

Basic Infos

Hardware

WiFimanager Branch/Release:

Esp8266/Esp32:

Hardware: ESP-12e, esp01, esp25

ESP Core Version: 2.4.0, staging

Description

At the first run i connect to the AP and configure my wifi. all works fine. next time i start the wifi module i have STA and AP . Is there any way to have only STA ? I don't want the AP.

My Scetch: if (!wifiManager.autoConnect("AutoConnectAP")) { Serial.println("failed to connect and hit timeout"); delay(3000); //reset and try again, or maybe put it to deep sleep ESP.restart(); delay(5000); }

EdgarBarranco commented 4 years ago

I am also experiencing this same issue with the alpha lib version 2.0.1, 2.0.2, and 2.0.3. After the device is configured to connect to the router, it connects, but also keeps the AP mode enable WiFi.mode(STA_AP) somehow is enabled instead of just WiFi.mode(STA).

The problem is that the ESP AP is running on the same channel as the router causing wireless network degradation for other devices connected to the router.

I am using the Arduino IDE 1.8.13, esp8266 2.7.1 and the hardware is an ESP8266 Wemos D1 Mini. To get it to work without this "feature" I reverted to 0.15.

tablatronix commented 4 years ago

Just turn it off, its the default in esp

WiFi.mode(WIFI_STA)

EdgarBarranco commented 4 years ago

Ok, but this is something that changed between versions and is not what the documentation says. I imagine a lot of people will not know that now it will go into AP_STA mode by default causing network performance degradation. I just happen to notice because the wifi coverage was bad after switching to the new library version.

tablatronix commented 4 years ago

Well there is no documentation for development yet.

hmm, not sure what to do about it, that is how the esp works. you are supposed to set your own user mode in your code, wm no longer disturbs your persistent wifi modes, it was a bug.

I can update the examples at least

Primus007 commented 4 years ago

Yes, please update the examples. this is helpful also.

tobiasfaust commented 4 years ago

Year, this solution has been costs me > 2h investigation. Solution is like this:

  espClient = WiFiClient();
  WiFi.mode(WIFI_STA);
  WiFiManager wifiManager;
  wifiManager.setTimeout(300);