[GH-ISSUE #1085] STA and AP mode at the same time unwanted #926

Open
opened 2026-02-28 01:27:42 +03:00 by kerem · 6 comments
Owner

Originally created by @Primus007 on GitHub (Jun 23, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1085

Basic Infos

Hardware

WiFimanager Branch/Release:

  • Master
  • Development

Esp8266/Esp32:

  • ESP8266
  • ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • Other

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • 2.7.1
  • staging (master/dev)

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); }

Originally created by @Primus007 on GitHub (Jun 23, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1085 ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [x] Development **Esp8266/Esp32:** - [x] ESP8266 - [ ] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [x] ESP12 E/F/S (nodemcu, wemos, feather) - [ ] Other **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [x] 2.7.1 - [ ] staging (master/dev) ### 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); }`
Author
Owner

@EdgarBarranco commented on GitHub (Jul 2, 2020):

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.

<!-- gh-comment-id:653023498 --> @EdgarBarranco commented on GitHub (Jul 2, 2020): 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.
Author
Owner

@tablatronix commented on GitHub (Jul 2, 2020):

Just turn it off, its the default in esp

WiFi.mode(WIFI_STA)

<!-- gh-comment-id:653072403 --> @tablatronix commented on GitHub (Jul 2, 2020): Just turn it off, its the default in esp WiFi.mode(WIFI_STA)
Author
Owner

@EdgarBarranco commented on GitHub (Jul 2, 2020):

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.

<!-- gh-comment-id:653121464 --> @EdgarBarranco commented on GitHub (Jul 2, 2020): 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.
Author
Owner

@tablatronix commented on GitHub (Jul 2, 2020):

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

<!-- gh-comment-id:653132951 --> @tablatronix commented on GitHub (Jul 2, 2020): 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
Author
Owner

@Primus007 commented on GitHub (Jul 3, 2020):

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

<!-- gh-comment-id:653485294 --> @Primus007 commented on GitHub (Jul 3, 2020): Yes, please update the examples. this is helpful also.
Author
Owner

@tobiasfaust commented on GitHub (Aug 14, 2020):

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

  espClient = WiFiClient();
  WiFi.mode(WIFI_STA);
  WiFiManager wifiManager;
  wifiManager.setTimeout(300);
<!-- gh-comment-id:674035493 --> @tobiasfaust commented on GitHub (Aug 14, 2020): Year, this solution has been costs me > 2h investigation. Solution is like this: ```` espClient = WiFiClient(); WiFi.mode(WIFI_STA); WiFiManager wifiManager; wifiManager.setTimeout(300); ````
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#926
No description provided.