WiFiManager: wifiManager.autoConnect crashes ESP on MDNS.begin with Fatal exception 28(LoadProhibitedCause):
Basic Infos
Hardware
WiFimanager Branch/Release: Development Version 0.12.0 (per Arduino Library Manager) Hardware: NodeMcu 1.0 (ESP12-E module)
Core Version: Version 0.12.0 (per Arduino Library Manager) Downloaded the latest git and confirmed issue on it
Description
Problem description: If wifiManager.autoconnect is used to connect the esp8266, it crashes when MDNS.begin(…) is called
Settings in IDE
Module: NodeMcu 1.0 (ESP12-E module)
Additional libraries: ESP8266mDNS.h
Sketch
#include <Arduino.h>
#include <ESP8266mDNS.h>
#include <WiFiManager.h>
WiFiManager wifiManager;
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
WiFi.disconnect();
wifiManager.autoConnect("DEVICE", "123456789"); //THIS CAUSES MNDS.being to crash
/* // WORKS IF YOU USE THIS CODE BLOCK INSTEAD
WiFi.begin("router", "password1234");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(1000);
}
*/
Serial.print("\nConnected to "); Serial.print(WiFi.SSID()); Serial.print(" ,IP address is "); Serial.print(WiFi.localIP()); Serial.print(" and signal strength is "); Serial.println(WiFi.RSSI());
if (!MDNS.begin("hello")) { Serial.println("Error setting up MDNS responder!"); }
else { Serial.println("Started MDNS"); }
}
void loop() {}
Debug Messages
USING WIFIMANAGER.AUTOCONNECT
rl�d⸮⸮|�⸮l⸮|⸮$⸮c|⸮⸮⸮⸮;⸮c⸮c⸮⸮g'⸮lng⸮⸮⸮bx⸮⸮l;l{lx⸮o⸮⸮d⸮⸮#g⸮|d⸮⸮#⸮⸮no⸮�$⸮⸮l ⸮ogl n{⸮⸮⸮gc⸮ls⸮⸮n#⸮d⸮⸮⸮c⸮l ⸮⸮g⸮*WM:
*WM: AutoConnect
bcn 0
del if1
mode : sta(2c:3a:e8:43:17:f7)
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 0
mode : sta(2c:3a:e8:43:17:f7) + softAP(2e:3a:e8:43:17:f7)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: SET AP STA
*WM:
*WM: Configuring access point...
*WM: DEVICE
*WM: 123456789
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
add 1
aid 1
station: b0:70:2d:82:d3:90 join, AID = 1
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
scandone
*WM: Scan done
*WM: DUP AP: Router
*WM: DUP AP: Router
*WM: HP-Print-06-LaserJet 200
*WM: -40
*WM: Router
*WM: -54
*WM: Iro
*WM: -66
*WM: ASUS
*WM: -89
*WM: Sent config page
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
scandone
switch to channel 6
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt
connected with Router, channel 6
dhcp client start...
ip:10.0.1.111,mask:255.255.255.0,gw:10.0.1.1
*WM: Connection result:
*WM: 3
station: b0:70:2d:82:d3:90 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(2c:3a:e8:43:17:f7)
sl
**Connected to Router ,IP address is 10.0.1.111 and signal strength is -59
Fatal exception 28(LoadProhibitedCause):**
epc1=0x40225ba3, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000098, depc=0x00000000
Exception (28):
epc1=0x40225ba3 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000098 depc=0x00000000
ctx: cont
sp: 3fff0670 end: 3fff0aa0 offset: 01a0
>>>stack>>>
3fff0810: fffffffe 00000000 4010100f 3fff284c
3fff0820: 4021ffd0 3fff1d5c 3fff145c 3fff3044
3fff0830: 3fff2dfa 40231e47 3fff284c 3fff1344
3fff0840: 00000000 40220c83 3ffee1ec 40106b9c
3fff0850: 3fff2dfa 40104456 3fff1d5c 3fff3044
3fff0860: 0000002e 3fff0f00 3fff1d5c 401043d1
3fff0870: 3fff2db4 3ffe973d 3fff184f 40222a3f
3fff0880: 3ffee8f8 3ffee9f0 40224b34 3fff0f35
3fff0890: 3fff0f00 3fff0f00 3fff2db4 4010453d
3fff08a0: 40211f93 3fff2db4 3fff2dfa 40211f9c
3fff08b0: 00000008 3fff08e0 4022451b 3ffeea10
3fff08c0: 3ffee9f0 40224b34 3ffee8f8 3fff2e08
3fff08d0: 3fff2db4 3fff3368 3fff0f00 40218031
3fff08e0: 005e0001 4000fb00 60000200 3fff0990
3fff08f0: 00000018 3fff3368 3fff2db4 40218ab8
3fff0900: 40222b38 3ffee1ec 00000000 00000000
3fff0910: 3fff0984 00000001 00000000 00000002
3fff0920: 3fff0e60 00000004 3ffe8a81 40219130
3fff0930: 4023a9ba 3ffe8a95 3ffe8a81 3fff3364
3fff0940: 00000000 3fff2db4 3fff2e20 40218af8
3fff0950: 3fff0f00 3fff0980 00000004 3fff3364
3fff0960: 00000016 3fff0f00 3fff3364 40218289
3fff0970: 3fff0f00 3fff0980 00000004 40211ff8
3fff0980: 00000494 0104a8c0 3fff105c 40212034
3fff0990: 3fff3368 3fff0f00 3fff2ebc 4021835a
3fff09a0: 3fff3314 3ffef76c 3fff0a50 00000020
3fff09b0: 3fff0a1c 3fff0f00 3fff3364 40218533
3fff09c0: 3fff0a1c 3ffe98d4 3fff0f00 402185bf
3fff09d0: 3fff0900 00000001 3fff0a50 00000001
3fff09e0: 3ffef724 3ffef768 3ffef724 402025ce
3fff09f0: 00000000 3ffef768 3fff0a40 40100690
3fff0a00: 3ffef98c 000003af 00000000 4020ad78
3fff0a10: 00000000 3ffef768 3ffef750 fb0000e0
3fff0a20: 00000000 3ffef768 3ffef724 3ffefa70
3fff0a30: 00000000 3ffef768 3ffef724 4020386a
3fff0a40: 3fff2d3c 3fff0a70 40202234 402026f0
3fff0a50: 00000000 00000000 3ffef9b0 4020a1e0
3fff0a60: 3fffdad0 3ffef768 3ffef9b0 40202128
3fff0a70: 3ffe93b8 6f01000a 00000000 feefeffe
3fff0a80: feefeffe 00000000 3ffefa68 4020ae84
3fff0a90: feefeffe feefeffe 3ffefa80 40100710
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
scandone
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 0
mode : sta(2c:3a:e8:43:17:f7) + softAP(2e:3a:e8:43:17:f7)
add if1
dhcp server start:(ip:192.168.4.1,mask:255.255.255.0,gw:192.168.4.1)
bcn 100
*WM: SET AP STA
*WM:
*WM: Configuring access point...
*WM: DEVICE
*WM: 123456789
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
Works fine when using WiFi.being(said, password)
Here is that output
1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
;l�d⸮⸮|�⸮$⸮|⸮$⸮c|ǃ⸮⸮{⸮c⸮c⸮⸮og⸮l’o⸮⸮⸮#x⸮⸮l;l{lp⸮n⸮⸮d⸮⸮co⸮|l⸮⸮c⸮⸮‘o⸮�d⸮⸮$⸮no$
’{⸮⸮⸮gc⸮ls⸮⸮’c⸮d܃⸮c⸮l`⸮⸮g⸮scandone
…scandone
state: 0 -> 2 (b0)
.state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt
connected with Router, channel 6 dhcp client start… ip:10.0.1.111,mask:255.255.255.0,gw:10.0.1.1
Connected to Router ,IP address is 10.0.1.111 and signal strength is -53 Started MDNS
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 43
MDNS did not work for me with 2.4.0 and work with 2.4.1
Interesting question is why it works if I hardcode the ssid and password and fails if I connect through wifimanager
Sent from my iPhone