Open chadham opened 6 years ago
Well for one you are removing wifi credentials every time you reboot
WiFi.disconnect();
deletes credentials !
cannot reproduce with any combination of versions
Wifi.disconnect call was intentional as I want to force wifiManager to load each time (for testing this issue, will be removed once fixed).
I stripped it down to the minimal code per above, and am able to reproduce on 2 NodeMCU's to eliminate (or at least reduce) the chance of flash corruption on one.
Also deleted and downloaded latest version from here.
Any chance Im on a older firmware version on the nodeMCU? How do I check the firmware version?
What is your esp core?
I’m not sure. It’s a stock wemos nodemcu dev board. How do I tell what the core version is?
are you using esp staging, or 2.4.0 ?
Im sorry, but I don't understand the question. If you are asking about the WifiManager version, its whatever you get when you download the library from the clone or download button.
its 2.4.0
k
still cannot reproduce, works for me
*WM: Connecting as wifi client...
scandone
switch to channel 11
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
connected with SSID, channel 11
dhcp client start...
cnt
ip:10.80.21.143,mask:255.255.240.0,gw:10.80.16.1
*WM: Connection result:
*WM: 3
station: dc:0c:5c:e2:24:41 leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(2c:3a:e8:43:1f:5e)
Connected to SSID ,IP address is 10.80.21.143 and signal strength is -65
Started MDNS
If you use arduino ide you can install esp exception decoder tool and decode that exception. Also erase with esptool.
Not sure what else to suggest
Still happening. Here is the stack trace
I don't know who David is and why its trying to access /home/david/... right after MDNSResponder::_listen()
and the last Serial..println I get is after the MDNS.begin call
Any idea what to make of this..?
*EDITED with trace from test harness (vs main code line) Decoding 33 results 0x40220184: ieee80211_output_pbuf at ?? line ? 0x40104456: glue2esp_linkoutput at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 292 0x401043d1: glue2esp_linkoutput at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/glue-esp/lwip-esp.c line 263 0x4010453d: new_linkoutput at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/glue-lwip/lwip-git.c line 240 0x40212147: ethernet_output at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 305 0x40212150: ethernet_output at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/netif/ethernet.c line 305 0x401051da: os_printf_plus at ?? line ? 0x40232f26: pp_attach at ?? line ? 0x402181e5: etharp_output_LWIP2 at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/etharp.c line 893 0x40218c6c: ip4_output_if_opt_src at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 962 0x402192e4: mem_malloc at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/mem.c line 136 0x40106c91: __wrap_spi_flash_read at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/core_esp8266_phy.c line 267 0x40248d10: sleep_reset_analog_rtcreg_8266 at ?? line ? 0x40218cac: ip4_output_if_opt at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/ip4.c line 788 0x4021843d: igmp_send at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 0x402121ac: do_memp_malloc_pool at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/memp.c line 231 0x402121e8: memp_malloc at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/memp.c line 231 0x4021850e: igmp_lookup_group at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 0x402186e7: igmp_start_timer at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 : (inlined by) igmp_joingroup_netif at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 521 0x40218773: igmp_joingroup at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570 0x40202542: MDNSResponder::_listen() at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 0x40100690: free at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/umm_malloc/umm_malloc.c line 1737 0x4020af2c: operator delete(void) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/abi.cpp line 84 0x402037de: MDNSResponder::begin(char const*) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 0x402021a8: _M_manager at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 0x40202664: operator() at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396 : (inlined by) _M_invoke at /Users/mchadha/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/functional line 2071 0x4020a394: Print::println(int, int) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/Print.cpp line 87 0x40202110: setup at /Users/mchadha/Documents/Arduino/wifiandMDNStest/wifiandMDNStest.ino line 23 0x4020b038: loop_wrapper at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/core_esp8266_main.cpp line 57 0x40100710: cont_norm at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/cont.S line 109
Whats all that json stuff?
Replaced test harness stack above
This looks like an mdns error
Interesting question is why it works if I hardcode the ssid and password and fails if I connect through wifimanager
Sent from my iPhone
On Feb 22, 2018, at 2:30 PM, Shawn A notifications@github.com wrote:
This looks like an mdns error
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
We use webserver and dnsserver, we switch mode several times?
Try making sure the wifi is at the right state or a known state, before starting mdns, set mode etc.
I think there is a mdns debug flag in the files.
Not entirely sure whats going on here, but that stack seems far from wifimanager.
Another thing you can try put wifimanager in a different scope.
What lwip do you have selected in arduino?
Thanks, let me try checking the state.
Should I not assume that wifimanager.Connect blocks until WiFi is successfully setup?
Ie do u wait for connection success confirm before returning?
Sent from my iPhone
On Feb 22, 2018, at 2:36 PM, Shawn A notifications@github.com wrote:
We use webserver and dnsserver, we switch mode several times?
Try making sure the wifi is at the right state or a known state, before starting mdns, set mode etc.
I think there is a mdns debug flag in the files.
Not entirely sure whats going on here, but that stack seems far from wifimanager.
Another thing you can try put wifimanager in a different scope.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Master, Yes by default, development has a lot more features to choose
Actually Lwip might only be an option in staging esp.
I’ll check WiFi state once back at my computer but if you only release on successful connection, count if that’s what is causing it. Stay tuned.
Sent from my iPhone
On Feb 22, 2018, at 3:16 PM, Shawn A notifications@github.com wrote:
Master, Yes by default, development has a lot more features to choose
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
What is lwip and how do I check?
Sent from my iPhone
On Feb 22, 2018, at 3:22 PM, Shawn A notifications@github.com wrote:
Actually Lwip might only be an option in staging esp.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Have you tried esptool erase ?
No. You think it’s corruption in the flash? I tied two different esp’s, same issue.
Let me read up on esptool erase
Sent from my iPhone
On Feb 22, 2018, at 3:24 PM, Shawn A notifications@github.com wrote:
Have you tried esptool erase ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Looks complex .. a couple of quick questions..
appreciate any guidance
iwi variant is V2 Prebuilt
Checked and confirmed WiFi.Status() is reporting connected (3)
Esptool just erases flash Needs python Esptool.py -p /dev/tty/... erase_flash
Upload fine after
There are corruption bugs in 2.4.0
issue remains after erase_flash....
Not sure what else to try here...
maybe someone else will reproduce, I have not been able to. I even added mdns to the development branch and it worked fine.
do you get this on release as well?
maybe post to esp issues and someone will know what those are.
lwip ieee80211_output_pbuf etc
Is this still an issue?
MDNS did not work for me with 2.4.0 and work with 2.4.1
Yes :(
Sent from my iPhone
On Mar 14, 2018, at 9:55 AM, Shawn A notifications@github.com wrote:
Is this still an issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Try 2.4.1 or staging maybe. Still not seeing this, could it be router specific?
Im getting the same Exception 28 with MDNS and WiFiManager - 2.4.0 and 2.4.1 using the Arduino IDE.
If I bypass WiFiManager and hard-code my wireless setup, works fine with the same code.
Might try PlatformIO.
hmm sketch code?
There are 1 or 2 known issues with esp32 I have found, I have implemented some workarounds in the library, are you seeing this with the latest commits from development branch ? , have you pulled recently ?
I suspect this is a race condition issue , which makes sense since wm exposes it, and normal use does not, since wm switches modes back and forth alot.
Not using an esp32 - esp12e based Wemos mini lite.
Remove wifimanager from the equation and the exact same code works perfectly
Regards,
Mike
On Apr 6, 2018, at 01:58, Shawn A notifications@github.com wrote:
There are 1 or 2 known issues with esp32 I have found, I have implemented some workarounds in the library, are you seeing this with the latest commits , have you pulled recently ?
I suspect this is a race condition issue , which makes sense since wm exposes it, and normal use does not, since wm switches modes back and forth alot.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Sorry I meant esp8266
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
Debug Messages
USING WIFIMANAGER.AUTOCONNECT
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 cntconnected 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