[GH-ISSUE #1133] Crash when using startConfigPortal after setAPStaticIPConfig #970

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

Originally created by @IDkonnecT on GitHub (Oct 6, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1133

Hello, I have a crash issue that I really don't find how to fix using startConfigPortal after setAPStaticIPConfig

Hardware

WiFimanager Branch/Release:

  • Master
  • [X ] Development

Esp8266/Esp32:

  • ESP8266
  • [X ] ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • [ X] Other : ESP32 WROVER Module

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • [X ] staging (master/dev)

Description

I have a crash when using startConfigPortal after setAPStaticIPConfig.
The exact same code works properly if I use autoConnect instead startConfigPortal, or if I suppress setAPStaticIPConfig line.

Sketch

#include <Arduino.h>
#include <WiFiManager.h>

const char* WiFiManager_SSID = "Module";
IPAddress WiFiManager_IP = IPAddress(192,168,1,1);
IPAddress WiFiManager_Gateway = IPAddress(192,168,1,1);
IPAddress WiFiManager_SubNet = IPAddress(255,255,255,0);

WiFiManager wifiManager;

void SetUpWiFiManager()
{
Serial.println("WiFiManager ongoing...");
wifiManager.setDebugOutput(true);
wifiManager.setWiFiAPChannel(7);
wifiManager.setAPStaticIPConfig(WiFiManager_IP, WiFiManager_Gateway, WiFiManager_SubNet);
if (!wifiManager.startConfigPortal(WiFiManager_SSID, "")) Serial.println("WiFiManager Error !");
//if (!wifiManager.autoConnect(WiFiManager_SSID, "")) Serial.println("WiFiManager Error !");
}

void setup()
{
Serial.begin(57600);
delay(5000);
while (!Serial) ;
Serial.println("Sketch Ready...");
SetUpWiFiManager();
}

void loop() {}

Debug Messages

Sketch Ready...
WiFiManager ongoing...
*WM: [1] Free heap: 317588
*WM: [1] ESP SDK version: v3.2.3-14-gd3e562907
*WM: [2] Starting Config Portal
*WM: [3] WiFi station disconnect
*WM: [3] WiFi_enableSTA enable
*WM: [2] Disabling STA
*WM: [2] Enabling AP
*WM: [1] StartAP with SSID: Module
*WM: [1] Custom AP IP/GW/Subnet:
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 14 - AP_STOP
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 3 - STA_STOP
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 3 - STA_STOP
*WM: [2] Starting AP on channel: 7
*WM: [2] AP has anonymous access!
*WM: [1] SoftAP Configuration
*WM: [1] --------------------
*WM: [1] ssid: Module
*WM: [1] password:
*WM: [1] ssid_len: 6
*WM: [1] channel: 7
*WM: [1] authmode:
*WM: [1] ssid_hidden:
*WM: [1] max_connection: 4
*WM: [1] country: CN
*WM: [1] beacon_interval: 100(ms)
*WM: [1] --------------------
*WM: [1] AP IP address: 192.168.1.1
*WM: [3] setupConfigPortal
*WM: [1] Starting Web Portal
*WM: [3] dns server started with ip: 192.168.1.1
*WM: [2] HTTP server started
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 1 - SCAN_DONE
*WM: [2] WiFi Scan completed in 2308 ms
*WM: [2] Config Portal Running, blocking, waiting for clients...
[D][WiFiGeneric.cpp:337] _eventCallback(): Event: 16 - AP_STADISCONNECTED
Guru Meditation Error: Core 0 panic'ed (InstrFetchProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x00000000 PS : 0x00060030 A0 : 0x80117dcd A1 : 0x3ffb3d30
A2 : 0x3ffce0c4 A3 : 0x3ffcece4 A4 : 0x3ffce318 A5 : 0x3ffce2f8
A6 : 0x0201a8c0 A7 : 0x0c01a8c0 A8 : 0x80117c70 A9 : 0x3ffb3cf0
A10 : 0x3ffce0d4 A11 : 0x3ffcece4 A12 : 0x3ffb3d3c A13 : 0x00000044
A14 : 0x00000001 A15 : 0x00000006 SAR : 0x00000010 EXCCAUSE: 0x00000014
EXCVADDR: 0x00000000 LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0x00000000

Backtrace: 0x00000000:0x3ffb3d30 0x40117dca:0x3ffb3d70 0x401222b5:0x3ffb3d90 0x401272bd:0x3ffb3dd0 0x4012c55a:0x3ffb3df0 0x40117f97:0x3ffb3e10 0x40088b7d:0x3ffb3e40

Rebooting...

Originally created by @IDkonnecT on GitHub (Oct 6, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1133 Hello, I have a crash issue that I really don't find how to fix using startConfigPortal after setAPStaticIPConfig #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [X ] Development **Esp8266/Esp32:** - [ ] ESP8266 - [X ] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [ ] ESP12 E/F/S (nodemcu, wemos, feather) - [ X] Other : ESP32 WROVER Module **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [X ] staging (master/dev) ### Description I have a crash when using startConfigPortal after setAPStaticIPConfig. The exact same code works properly if I use autoConnect instead startConfigPortal, or if I suppress setAPStaticIPConfig line. ### Sketch #include <Arduino.h> #include <WiFiManager.h> const char* WiFiManager_SSID = "Module"; IPAddress WiFiManager_IP = IPAddress(192,168,1,1); IPAddress WiFiManager_Gateway = IPAddress(192,168,1,1); IPAddress WiFiManager_SubNet = IPAddress(255,255,255,0); WiFiManager wifiManager; void SetUpWiFiManager() { Serial.println("WiFiManager ongoing..."); wifiManager.setDebugOutput(true); wifiManager.setWiFiAPChannel(7); wifiManager.setAPStaticIPConfig(WiFiManager_IP, WiFiManager_Gateway, WiFiManager_SubNet); if (!wifiManager.startConfigPortal(WiFiManager_SSID, "")) Serial.println("WiFiManager Error !"); //if (!wifiManager.autoConnect(WiFiManager_SSID, "")) Serial.println("WiFiManager Error !"); } void setup() { Serial.begin(57600); delay(5000); while (!Serial) ; Serial.println("Sketch Ready..."); SetUpWiFiManager(); } void loop() {} ### Debug Messages Sketch Ready... WiFiManager ongoing... *WM: [1] Free heap: 317588 *WM: [1] ESP SDK version: v3.2.3-14-gd3e562907 *WM: [2] Starting Config Portal *WM: [3] WiFi station disconnect *WM: [3] WiFi_enableSTA enable *WM: [2] Disabling STA *WM: [2] Enabling AP *WM: [1] StartAP with SSID: Module *WM: [1] Custom AP IP/GW/Subnet: [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 14 - AP_STOP [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 3 - STA_STOP [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 3 - STA_STOP *WM: [2] Starting AP on channel: 7 *WM: [2] AP has anonymous access! *WM: [1] SoftAP Configuration *WM: [1] -------------------- *WM: [1] ssid: Module *WM: [1] password: *WM: [1] ssid_len: 6 *WM: [1] channel: 7 *WM: [1] authmode: *WM: [1] ssid_hidden: *WM: [1] max_connection: 4 *WM: [1] country: CN *WM: [1] beacon_interval: 100(ms) *WM: [1] -------------------- *WM: [1] AP IP address: 192.168.1.1 *WM: [3] setupConfigPortal *WM: [1] Starting Web Portal *WM: [3] dns server started with ip: 192.168.1.1 *WM: [2] HTTP server started [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 2 - STA_START [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 1 - SCAN_DONE *WM: [2] WiFi Scan completed in 2308 ms *WM: [2] Config Portal Running, blocking, waiting for clients... [D][WiFiGeneric.cpp:337] _eventCallback(): Event: 16 - AP_STADISCONNECTED Guru Meditation Error: Core 0 panic'ed (InstrFetchProhibited). Exception was unhandled. Core 0 register dump: PC : 0x00000000 PS : 0x00060030 A0 : 0x80117dcd A1 : 0x3ffb3d30 A2 : 0x3ffce0c4 A3 : 0x3ffcece4 A4 : 0x3ffce318 A5 : 0x3ffce2f8 A6 : 0x0201a8c0 A7 : 0x0c01a8c0 A8 : 0x80117c70 A9 : 0x3ffb3cf0 A10 : 0x3ffce0d4 A11 : 0x3ffcece4 A12 : 0x3ffb3d3c A13 : 0x00000044 A14 : 0x00000001 A15 : 0x00000006 SAR : 0x00000010 EXCCAUSE: 0x00000014 EXCVADDR: 0x00000000 LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0x00000000 Backtrace: 0x00000000:0x3ffb3d30 0x40117dca:0x3ffb3d70 0x401222b5:0x3ffb3d90 0x401272bd:0x3ffb3dd0 0x4012c55a:0x3ffb3df0 0x40117f97:0x3ffb3e10 0x40088b7d:0x3ffb3e40 Rebooting...
Author
Owner

@Gerry33 commented on GitHub (Dec 3, 2020):

Same here.

Occurs if all flash or WIFI settings cleared .

_*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Status:
*WM: 6
*WM: No saved credentials
*WM: Connection result:
*WM: 6
*WM:
*WM: Configuring access point...
*WM: ESP11173028

*WM: AP IP address:
*WM: 192.168.4.1

Abort called_

<!-- gh-comment-id:738246930 --> @Gerry33 commented on GitHub (Dec 3, 2020): Same here. Occurs if all flash or WIFI settings cleared . _*WM: *WM: AutoConnect *WM: Connecting as wifi client... *WM: Status: *WM: 6 *WM: No saved credentials *WM: Connection result: *WM: 6 *WM: *WM: Configuring access point... *WM: ESP11173028 *WM: AP IP address: *WM: 192.168.4.1 Abort called_
Author
Owner

@tablatronix commented on GitHub (Dec 3, 2020):

Someone will have to decode stack traces but sounds like bad flash or esp lib bug

<!-- gh-comment-id:738454922 --> @tablatronix commented on GitHub (Dec 3, 2020): Someone will have to decode stack traces but sounds like bad flash or esp lib bug
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#970
No description provided.