I tried many things to get it work and finally this is what helped me at first try: bonjour - How to enable mDNS on Windows 10 build 17134? - Super User
I suspect it is some bug in arduinoUI OTA detection. I have "Bonjour browser" and "mDNS browser" running on the same machine as the ArduinoUI.
All my 6 OTA-devices show as _arduino._tcp.local in both browsers.
But sometimes the ports show in arduinoUI, sometimes not.
I wish there was a way to force the arduinoUI to try sending updates to an ip/port, even if it is not detected.
On my previous laptop I had the same issue with the ports randomly showing up or disappearing, but uploading over CLI always worked.
I think whatever different users have tried and it suddenly worked is just random chance.
Thank you both for your responses.
litechniks - I really don't feel like messing with extra Apple software on my Windows 10 machine right now, at least while the workaround of using the older Arduino 1.8.5 works OK
leifnel - well, in my case the ports do not show in Arduino IDE "randomly", starting from 1.8.6 they just never show (including 1.9.0 beta). Just like you said - using other mdns browsers will always show the nodes just fine (I have tried some Chrome app and Bonjour Browser from hobbyistsoftware).
I think the issue really boils down to the use of jmdns library (http://www.jmdns.org) that Arduino seems to be using now for service discovery? At least that's what the issue report on github seems to indicate (In the last two years we updated `jmdns` (which is being used to discover network boards) to address security and performance problems in the older versions. The boards are now added/removed based on the information coming from that library, so if a board disappears it is due to mdns reporting the "disconnection". · Issue #8408 · arduino/Arduino · GitHub). I have tried to run the sample discovery java code provided with the jmdns library on my Windows 10 machine (setting it to search for _arduino._tcp.local) and it doesn't discover anything. Running the same java code on a Xubuntu 18.04 VM will found the ESP8266 node just fine. Unsurprisingly running Arduino IDE 1.8.9 on the same Xubuntu VM will also find the ESP8266 just fine...
I agree with the idea of forcing an IP/port even if not detected - would be a nice workaround.
Hello -a !
I just add this comment, not to solve this issue but to confirm your are not alone, and more over, that this problem should be investigated seriously ...
For my part, I work with ESP8266, and since many years, I've always been with some difficults to see my devices in the "network ports" list ... Sometimes a reboot of the IDE was enough, sometimes a ping before starting the IDE was needed ... uncomprehensive each time, but while insisting, it was OK ...
Recently, I began to work with ESP32 ... I'm not able to say why, but ... since I've installed the ESP32 board in the IDE, it has been the end of the OTA :o
Then ... again, I tried to restart ... ping ... check my FW ... disable my FW ... reinstall Python ... Install the portable version of Arduino ...check my ISP box config. ... reboot my box ... try to discover mDNS devices with my Pi (avahi-browse -a -> all my ESP are visible ...) ...
Damn ... The IDE is unable to show me them !
Please, the Arduino team ... help us :
Oh, I was about to forget :
- W10 (1803)
- IDE 1.8.9
- Python 2.7.15
The most fun: my 4 ESP on which the OTA is activated appear in the list of network ports while some of them are not running since several hours ^^
I don't know if we have to laugh or cry ... It's going to drive me crazy !!
I had the same problem with 1.8.9 on Win 7. Tried switching to 1.8.5 and got message that python could not be found. I added python to system varialbe Path and 1.8.5 then showed network path. Reinstalled 1.8.9 and it is now showing the network path and I can OTA now. Maybe the 'bug' in 1.8.9 is that the error messages saying that python can't be found has been removed.
I have struggled for two days to be able to load a sketch on NodeMCU via OTA.
After loading Python 2.7 (important: only Python 2.7), following the instructions from the site ESP8266 OTA with Arduino IDE | Random Nerd Tutorials, I could not find the IP port of the NodeMCU board, on the Arduino IDE.
In the end, after so many futile attempts, the solution came after I discovered that the Bonjour Service was not present on my Windows 10.
So, I downloaded from the site Scarica - Servizi di stampa Bonjour per Windows (IT), the file BonjourPSSetup.exe and installed it. After checking on Windows services if it appeared in Automatic start-up and after restarting Windows, finally on the IDE Arduino the IP port of my NodeMCU card, on which I have uploaded BasicOTA sketch, appeared.
After that, I was able to upload another sketch via OTA.
I think that it is important to use the Version 2.5.0 for the NodeMCU board on Arduino IDE, not the newest one.
On the screenshot attached there are the settings on Arduino IDE I used for my NodeMCU board. I do not know if these settings are mandatory or could be changed. In my case, I am been able to load the sketch on the NodeMCU and it works.
Hope this can help.
Yep, restarting router is still solution.
Found same problem at Ubuntu workstation & Arduino IDE 1.8.10:
First, check network: the device sends UDP requests to port 5353 (mDNS / Bonjour / Avahi).
By default at Ubuntu this port was blocked by local firewall - you must open it
iptables -A INPUT -p udp --dport 5353 -j ACCEPT
Second, check with browser:
avahi-browse -a
You must found your device in list. If not - reconnect device to WLAN.
Third, IP-port must showing up in IDE. If not - restart IDE.
That's all? No, wait: you must open ports for connection from device to workstation. And then problem was solved.
I have been following this thread for months in hope the answer would show up. I have had nothing from this discussion fix the problem for me. There are so many different setups here as far as equipment goes that it is hard to blame the problem on anything. The funny thing is that every now and then an external port will show up and I take the time to try and figure out exactly where I am. But when I duplicate that setup, it doesn't work the next time. I guess we aren't donating enough to Arduino to get somebody to take this problem seriously. It would be nice if someone could figure out what is broke in the chain that sends the port presence to the IDE. From my limited knowledge, nothing that works for me really means anything. Pinging the device, access via a browser,etc. All that stuff works for me but the IDE never gets the message.
What's a mother to do????
KentM
Same problems with WIN10 / Arduino 1.8.10
Solution hint was in #20 (and link behind)
You have to enable mDNS within registry. Just copy the content of the Quote to a .bat file. Just run as administrator.
ABSOLUTELY NO WARRANTY FOR PROPPER RESULTS!
... but for me, it helped a lot!
und nochmal in Deutsch:
Hatte die gleichen Probleme mit WIN10 und Arduino IDE 1.8.10
Die Lösung fand ich in #20 und dem darin enthaltenen link.
mDNS mus freigeschaltet werden.
Einfach den Inhalt aus dem Zitatfeld unten in ein bat-File kopieren und dieses als Administrator ausfĂŒhren. Dann reboot.
ABSOLUT KEINE GARANTIE FĂR ZUVERLĂSSIGE ERGEBNISSE
... aber bei mir hat's geholfen!
REG ADD "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /V "EnableMulticast" /D "0" /T REG_DWORD /F
This network port is a most frustrating issue ... my experience is a little different to most here but maybe of interest or add another piece to the puzzle.
My configuration is Win10, Arduino IDE 1.8.10, ESP8266 core 2.6.3, ESP-01 module.
OTA works fine with the BasicOTA example ... flash via serial and the network port pops right up.
I disconnect the serial connection and I can do OTA multiple updates just fine. Rock solid and repeatable. This makes me think that all the necessary bits are working: router, IDE, MDNS, etc.
So what's the problem?
I copy the OTA code to a more complex sketch (~750 lines of code) and the network port no longer appears. Restarting IDE / Win10 / ESP-01, regedit hack, do not help. Also plenty of space for OTA.
Now if I open both sketches and load BasicOTA via serial (network port pops up straight away), then switch to my sketch, I can see the network port and I can upload multiple times to the same module. (also repeatable)
If I shut down both sketches and open just my sketch, the network port is no longer there. (repeatable)
Digging into the OTA / MDNS libraries is of little help. ArduinoOTA.begin() calls MDNS.begin() as it should. ArduinoOTA.handle() calls MDNS.update() as it should. Note: if your "security" for OTA involves not running the OTA handler unless some flag/switch is turned on, you will need to insert your own MDNS.update() in the loop.
Frustrating!
Update: 22/1/2020 - understand behavior now
My code runs WiFi mode WIFI_AP_STA at startup.
After more digging in the MDNS library, looks like if both AP and STA are connected and no IP address is passed in the call to MDNS.begin(), the library will preference AP's address (and subnet). This is verified by logging on to the local AP from my iPad and typing "hostname".local. The name is resolved OK. My Arduino IDE is on the sta subnet!
Modified my code to be WIFI_STA only and network port pops up (note: the registry hack to stop LLMNR multicast makes no difference for me).
I need WIFI_AP_STA for my app. Workaround is to handle the MDNS outside of the OTA library.
In setup() I've added the following between starting WiFi and starting OTA:
extern MDNSResponder MDNS;
MDNS.begin("TestHost", WiFi.localIP(), 0);
And in the loop() I've added:
MDNS.update();
You still need to let ArduinoOTA.begin(true) start so it can advertise to the IDE on port 8266.
NOTE: People who were looking for a way to "force" and IP address for the network port ... this is an possible way to do it.
I, like many, have also had problems with missing network addresses for OTA software updates.
After using OTA on many devices for some years, suddenly I couldn't use the system any more.
I spent some time with Wireshark monitoring port 5353, and after some playing around I realized that a 8266 must send out some 5353 packets just after booting, to advise the development system that it is present.
These packages was missing on the newly compiled units, despite nothing had been changed in the software, since the last update of the source code.
I started investigating and after a lot of trial and error, I found that the code line:
ArduinoOTA.begin();
had to be moved so that it is executed AFTER the WiFi is completely up and running, typically just after:
WiFi.begin();
I have not investigated the libraries, but I assume that some recent changes behind the scene, has made the new location of the OTA begin necessary.
Item:
While I was at it, I also saw that the OTA example code included these two files:
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
They are not needed for the OTA system alone, it works fine without them.
If you need .local names, you will need mDNS though.
Hope that can be of help to someone.
I was able to fix my issue. I have a Fritz!Box router with 2.4Ghz and 5Ghz. The ESP8266 seems to connect on 2.4Ghz.
I first created a guest account but that didn't work for some reason. The module connected but Arduino IDE couldn't see it. I then connected to the Fritz!Box 2.4 network and it worked fine. My PC is on the 5Ghz network. I do have the firwall turned off for private networks.
A few days ago, I had a problem, but all I had to do was restart the router (not via software) and the IP address appeared in the IDE again.
I am just having the same problem on macOS with the Arduino IDE 1.8.12 (but I have tried 1.8.5 and 1.6.something with the same results).
The Arduino IDE shows nothing as "Network ports" in its Tool menu after I have selected "Arduino Uno WiFi" board, even though my ESP8266-01 is up and running, and properly advertises an _arduino._tcp service.
I have been looking on the Internet for 2-3h without making any change to the Arduino or the ESP8266 and, all of a sudden, the Arduino IDE finally shows the ESP's address in the Tool menu!
Windows 10 though, but same problem :
I don't know if this will help you. I have tried a lot of things and with Arduino IDE 1.8.12 I could not connect with my nodeMcu units.
Untill I did the following (and before that most of the tips in this thread):
- Added firewall inbound opening (port 5353) for python.exe (located at %USERPROFILE%\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1\python.exe)
- Disabled my network adapter.
- Enabled my network adapter.
- Started Arduino IDE
Ports filled with my units!!
I have already done the registry fix (turn off EnableMulticast)
Installed Bonjour service by extracting it from iTunes.exe (used 7-zip to open and extract Bonjour64.msi)
I might have forgotten something along the way due to all different stuff I have tested.
Link to the post that seemed to fix it for me
Seems like you always have to disable/enable network to make it work.
Small price to pay.
Hi, just want to add my experience, once it is SOLVED for me!
Even if I am not sure, what was the right step to solve this, this is the working setup I have:
- Windows 10 Pro N
- Arduino IDE 1.8.12
- Apple Bonjour Service for Windows installed (downloaded here from Apple), Bonjour service started
- Bonjour Browser (downloaded here from Hobbyist)
- #20 done (the registry entry according to this article)
-
Chrome mDNS Browseris false positive, shows responses from _arduino._tcp.local, even if Bonjour Browser does not and neither does Arduino IDE - #31 not needed
- lots of Windows reboots and several router reboots
Hope it helps.
Thank you for this, had all but given up on this. I had exactly this problem and your solution makes perfect sense and works perfectly.
blynkuser:
This network port is a most frustrating issue ... my experience is a little different to most here but maybe of interest or add another piece to the puzzle.My configuration is Win10, Arduino IDE 1.8.10, ESP8266 core 2.6.3, ESP-01 module.
OTA works fine with the BasicOTA example ... flash via serial and the network port pops right up.
I disconnect the serial connection and I can do OTA multiple updates just fine. Rock solid and repeatable. This makes me think that all the necessary bits are working: router, IDE, MDNS, etc.
So what's the problem?
I copy the OTA code to a more complex sketch (~750 lines of code) and the network port no longer appears. Restarting IDE / Win10 / ESP-01, regedit hack, do not help. Also plenty of space for OTA.
Now if I open both sketches and load BasicOTA via serial (network port pops up straight away), then switch to my sketch, I can see the network port and I can upload multiple times to the same module. (also repeatable)
If I shut down both sketches and open just my sketch, the network port is no longer there. (repeatable)
Digging into the OTA / MDNS libraries is of little help. ArduinoOTA.begin() calls MDNS.begin() as it should. ArduinoOTA.handle() calls MDNS.update() as it should. Note: if your "security" for OTA involves not running the OTA handler unless some flag/switch is turned on, you will need to insert your own MDNS.update() in the loop.
Frustrating!
Update: 22/1/2020 - understand behavior now
My code runs WiFi mode WIFI_AP_STA at startup.
After more digging in the MDNS library, looks like if both AP and STA are connected and no IP address is passed in the call to MDNS.begin(), the library will preference AP's address (and subnet). This is verified by logging on to the local AP from my iPad and typing "hostname".local. The name is resolved OK. My Arduino IDE is on the sta subnet!
Modified my code to be WIFI_STA only and network port pops up (note: the registry hack to stop LLMNR multicast makes no difference for me).
I need WIFI_AP_STA for my app. Workaround is to handle the MDNS outside of the OTA library.
In setup() I've added the following between starting WiFi and starting OTA:
extern MDNSResponder MDNS;
MDNS.begin("TestHost", WiFi.localIP(), 0);
And in the loop() I've added:
MDNS.update();
You still need to let ArduinoOTA.begin(true) start so it can advertise to the IDE on port 8266. NOTE: People who were looking for a way to "force" and IP address for the network port ... this is an possible way to do it.