[GH-ISSUE #1087] AP Station keep active and doesn't shutdown #929

Closed
opened 2026-02-28 01:27:43 +03:00 by kerem · 1 comment
Owner

Originally created by @ruudboon on GitHub (Jul 2, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1087

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
  • staging (master/dev)

Description

After connecting to configured wifi the AP Station keep active and doesn't shutdown.

Settings in IDE

Module: NodeMcu

Sketch


#include <Arduino.h>

void setup() {
  Serial.println("Setup WIFI");
  WiFiManager wifiManager;
  wifiManager.setAPCallback(configModeCallback);
  if (!wifiManager.autoConnect()) {
    Serial.println("failed to connect and hit timeout");
    //reset and try again, or maybe put it to deep sleep
    ESP.reset();
    delay(1000);
  }
  WiFi.hostname(hostname);
  Serial.println("Hostname: " + hostname);
}

void configModeCallback (WiFiManager *myWiFiManager) {
  Serial.println("Entered config mode");
  Serial.println(WiFi.softAPIP());
  //if you used auto generated SSID, print it
  Serial.println(myWiFiManager->getConfigPortalSSID());
}

void loop() {

}

Debug Messages

Setup WIFI
*WM: [1] AutoConnect 
*WM: [2] Connecting as wifi client... 
*WM: [3] STA static IP:
*WM: [2] setSTAConfig static ip not set, skipping 
*WM: [1] Connecting to SAVED AP: MySSID
*WM: [3] Using Password: MyPASSWORD
*WM: [3] WiFi station enable 
*WM: [3] enableSTA PERSISTENT ON 
*WM: [1] connectTimeout not set, ESP waitForConnectResult... 
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] AutoConnect: SUCCESS 
*WM: [1] STA IP Address: 172.20.0.202
Hostname: vmix-tally-13047577
Originally created by @ruudboon on GitHub (Jul 2, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1087 ### 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 - [x] 2.4.0 - [ ] staging (master/dev) ### Description After connecting to configured wifi the AP Station keep active and doesn't shutdown. ### Settings in IDE Module: NodeMcu ### Sketch ```cpp #include <Arduino.h> void setup() { Serial.println("Setup WIFI"); WiFiManager wifiManager; wifiManager.setAPCallback(configModeCallback); if (!wifiManager.autoConnect()) { Serial.println("failed to connect and hit timeout"); //reset and try again, or maybe put it to deep sleep ESP.reset(); delay(1000); } WiFi.hostname(hostname); Serial.println("Hostname: " + hostname); } void configModeCallback (WiFiManager *myWiFiManager) { Serial.println("Entered config mode"); Serial.println(WiFi.softAPIP()); //if you used auto generated SSID, print it Serial.println(myWiFiManager->getConfigPortalSSID()); } void loop() { } ``` ### Debug Messages ``` Setup WIFI *WM: [1] AutoConnect *WM: [2] Connecting as wifi client... *WM: [3] STA static IP: *WM: [2] setSTAConfig static ip not set, skipping *WM: [1] Connecting to SAVED AP: MySSID *WM: [3] Using Password: MyPASSWORD *WM: [3] WiFi station enable *WM: [3] enableSTA PERSISTENT ON *WM: [1] connectTimeout not set, ESP waitForConnectResult... *WM: [2] Connection result: WL_CONNECTED *WM: [3] lastconxresult: WL_CONNECTED *WM: [1] AutoConnect: SUCCESS *WM: [1] STA IP Address: 172.20.0.202 Hostname: vmix-tally-13047577 ```
kerem closed this issue 2026-02-28 01:27:43 +03:00
Author
Owner

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

void setup() {
WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP

<!-- gh-comment-id:653152867 --> @tablatronix commented on GitHub (Jul 2, 2020): void setup() { WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP
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#929
No description provided.