-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WDT reset when enabling OTA (only with lwIP v2) #4028
Comments
This is interesting. Aren't chips all the same (excepted esp8285)? You can get lwip2 submodule sources and recompile (for further debugging in
and why not try its latest version
|
They should be the same. |
To debug lwip2, edit If there is no difference between chips on boards, could you check or add more capacitors accross power pins ? |
Done activating debug. I get:
And the cycle repeats :( I already have 10nF + 100pF SMD near the power pins. But I tried anyway adding a 1uF electrolytic capacitor: no change (phew... I already have 60 boards with the same base design...). |
Does it happen with your D1 mini as well ? |
No, I can't replicate any more neither with D1 nor with my HW. |
Thanks for the report ! |
I have to reopen this issue. |
On my HW with full sketch and debug enabled I get:
On WemosD1mini it starts nearly the same, but then goes on (a lot -- here it's truncated):
Seems on my HW it tries sending the packet even if wifi is not yet initialized... With the minimal sketch posted when opening the issue, it goes on a bit more, up to:
Again, that message "sent to wilderness"... Uhm... |
A question: why is it using soft-ap instead of station interface? |
I just did a little experiment... Suspecting it could be something in the blob that does not like my "calling convention", I first commented out WiFi.persistent(false) to let the blob store my network credentials in its cache. The loaded sketch still triggered WDT. The current setup() is:
Maybe that could give an hint about what's happening. But doesn't explain why it works on the D1mini. |
I can now reproduce the bug with your original sketch on a D1 mini lite. |
Urgh! Today (w/o updating anything from git) it does not crash. Even restoring the commented lines! |
@NdK73 That's unfortunate - I promise I did nothing from here - so far :) More seriously, I will shortly send a fix for lwip2. |
Glad you could spot it! |
OTA uses mDNS which is multicast. It does it after the waiting loop, but currently lwip can choose the wrong interface to send its multicast packets. |
@NdK73 Please retest with the referenced PR. |
I don't know how to import a pr to my local repo... |
You can try this:
When you are done testing
|
About what I said before
|
related to esp8266#4101 esp8266#4078 esp8266#4060 esp8266#4028 and maybe others
Tks. I followed your instructions, but lwip-esp.c is the old version (18928bytes vs 20277bytes of the file I manually downloaded) -- actually seems it's not been touched:
Anyway, it keeps working (but I'll have to check it better after successfully connecting to another network). |
@NdK73 I'll be merging the PR once CI passes, pls retest then. |
related to esp8266#4101 esp8266#4078 esp8266#4060 esp8266#4028 and maybe others
@NdK73 do you confirm that's ok with git version of core ? To clear modifications made to your local repository and update, you can:
|
Done. Seems it does not crash... at least for now :) Now there seems to be an interaction between analogRead() and SPI transfers that crashes TFT_eSPI, but that's another (sad) story. But why do I have to find all these race conditions? :( |
WiFi is limited by MTU which is always 1460 on esp8266 (initialized by the physical layer). This applies to IP (and TCP, UDP). |
@NdK73 I let you close this issue if everything is OK regarding the original post. |
Haven't had the issue anymore after the latest pulls. Seems resolved. Closing. |
Pretty sure this commit also fixes a problem (hang / crash) i was seeing with flashing a Sonoff Basic with my own firmware using mDNS / MDNSserver thanks |
Hardware: ESP-12
Core Version: GIT
Description
I have a sketch where calling ArduinoOTA.begin() triggers a WDT reset if I compile with lwIP v2. The same sketch (I only change "lwIP variant" option) works when compiling with "lwIP v1.4 (prebuilt GCC)".
That sketch seems to work when loaded on a Wemos D1 mini (but changes quite a lot of the surrounding HW). Loaded on another ESP12 (on the same HW) gives the same problem. Is it possible it's related to some GPIO state? I don't think so...
I could trace the issue to ESP8266mDNS.cpp, function _listen(), line 198: igmp_joingroup(IP_ADDR_ANY, &multicast_addr) seems not to return (at least not for the time needed to trigger WDT). But I couldn't find igmp_joingroup under lwip2 tree to dig deeper :(
The failing (minimal) sketch is:
It prints the IP but does not print "begun". Then, after 7-8s, wdt triggers :(
The text was updated successfully, but these errors were encountered: