-
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
[OTA] Device no longer found by Arduino IDE 2.5.0 (Beta 1) #5487
Comments
I can reproduce this with a Wemos D1 mini on Windows using Arduino IDE 1.8.7 and the latest 2.5.0 Beta1 ESP8266 core. OTA on 2.4.2 was working perfectly, but the device is no longer visible with 2.5.0 Beta1. This is with lwIP 1.4 Higher Bandwidth. Re-installing 2.4.2 and re-compiling/re-uploading the code (erasing only the sketch) resulted in the device being visible for OTA within a few seconds. |
@Swiftnesses @pfeerick |
I was going to say that this didn't make any difference for me - but some more testing has shown that adding the Two observations - a quick grep of the ESP8266 libriries doesn't show a single call to MDNS.update in even the MDNS examples except for the newLEAmDNS examples that have been added post 2.4.2. Also, MDNS isn't highlighted as a keyword anymore with the 2.5.0 Beta1 core??? If going forward Edit: For consistency, here is the code I used to test this - it's a modified version of the BasicOTA sketch with a few extra serial outputs, etc. I just commented/uncommented line 79 to test 2.4.2/2.5.0Beta1 OTA functionality. https://gist.github.com/pfeerick/bef13f437b16e11b427bbb27416e4194 |
@pfeerick MDNS.update() has always been needed. It's just that, given certain conditions that have nothing to do with the ESP, the legacy implementation would still work without it. |
@devyte Thanks for helping us understand this. What I don't understand is, none of my OTA sketches used to include (even though they're part of the examples):
They still worked without issue (very well in fact), how is this possible? Trying to get my head around why it worked before and why I need to add 2 new libraries...? |
The MDNSResponder in our core has been rewritten from scratch. |
@devyte Thank you for the explanation, appreciate it. I've now included I assume that |
Hey @Swiftnesses , |
@dav1901 thanks for the confirmation ;-) |
I just realized that in the case of ArduinoOTA I can include the call to MDNS.update() inside ArduinoOTA::handle(). In that case, calling MDNS.update() in the loop is not needed when ArduinoOTA is used. |
Excuse my lack of knowledge (I'm not much of a coder...) But all my sketches include On another note, even with the update in the loop, my distant sensors no longer present themselves for OTA update, likely related to the low connection speed and slow ping that I reported. I planned to test reverting the change you suggested, but upon OTA flash, the sensor never came back (even though I can ping it!). Something's not right, but it's freezing outside and the sensors are at the bottom of the garden, bugger that. |
Wemos D1 mini also lost OTA with beta update. Reverted and was discovered. Did notice |
@kerryeven Even after adding the MDNS.update() and required includes? @devyte Thanks for the explanation... that makes perfect sense now. It would be great if you can include the MDNS.update() as part of ArduinoOTA.update()... then nothing needs to be changed in existing sketches. What about also including |
@pfeerick All I know is I got a notice that some boards had updates. Went to board manager, searched on updateable, and saw the ESP8266 beta 5.0 so I installed it. Was working on a duct fan controller for a remote attic ductfan. Made a minor change and uploaded. Never to be seen again until I downgraded back to 2.4 whatever and it started OTA'ing again. Didn't see anything about any required includes or MDNS notifications when I updated. Did notice that color was black with the upgraded board include and red (orange) with the old rev. Directory problem or something...I don't know. |
@kerryeven the color of words in the IDE has exactly zero impact on functionality. It is just syntax highlighting, based on configuration found in file library.properties. In other words, it's just eye candy. |
Would that cause the OTA port to stay invisible. Port did not show with upgrade. Did show, same sketch with downgrade. |
NO. As per the last few comments, it is due to an internal change to how mDNS works, which is how the devices running OTA-enabled firmware advertise themselves on your network. As the code stands right now, if you add |
Is there a way to let peeps know they need to add to their basic ota sketches before upgrading. Kind of a bummer to have to crawl around the attic. Thanks for the explanation..clear now. |
If devyte makes the change hinted about above from six hours ago, it won't be needed, as the previous code behaviour will be kept (but with the more newer and more reliable mDNS). Otherwise, it's a matter of waiting to see the documentation updates when 2.5.0 is released. But generally, if it says beta (i.e. 2.5.0-beta1), expect something to break! |
Definately does work...added MDNS.update(); immediately after loop() and before ArduinoOTA.handle(). Thanks |
Oops, keywords.txt not library.properties. |
@devyte keywords.txt and readme.rst are in the \src folder, not in the library root (https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266mDNS) ... they got moved with the rest of the source files in that commit. ;) |
Closing via #5494 . |
Basic Infos
Platform
Settings in IDE
Problem Description
Following the update to 2.5.0 (Beta 1), devices are no longer found by Arduino IDE (1.8.9).
Restarted IDE, no change. Reverting back to 2.4.2 (full flash erase via OTA), devices show within 10 seconds. Note: the valve is remote to the house, so I have not tried a serial flash (I will, once the weather improves!).
Sketch contains the following ESP parameters:
The text was updated successfully, but these errors were encountered: