OTA_Mode - No Network port is shown !

rtek1000:
Very well!

Please add [Solved] at the beginning of the title :wink:

Well it worked for me but I can't speak for the OP.

dreed75:
Well it worked for me but I can't speak for the OP.

Ops! :-[

Had the same problem and rebooting the rooter did the trick My router is Asus RT-AC87U. I'd like to know if you also (those of you for whom it worked that way) , by chance, own an Asus router of similar type, so maybe we can open a ticket on Asus's website to let them know of the issue.

Found this discussion after attempting to perform an OTA upload after a LONG break. I am also affected by the issue where the network port doesn't appear in the menu. To make this short, here's what I found out:

  • Arduino IDE versions 1.8.6, 1.8.7, 1.8.8 and 1.8.9 will NOT show my ESP8266 node in the network port list
  • Arduino IDE versions 1.8.3 as well as 1.8.5 work correctly and instantly show the network port and are able to successfully perform an OTA upgrade
    I spent a lot of time troubleshooting this until I recalled I originally used 1.8.3 and then I tried to find the newest working version, which turned out to be 1.8.5. Does anybody have any idea why this is happening and whether this is a known issue (or whether it should be submitted)? I am on Windows 10 and version 1.8.5 works OK with both Python 2.7 as well as 3.7. Thanks for any pointers!

I also have/had the same problem. Im on Arduino 1.8.5 on one PC and 1.8.9 on another. After an OTA upload to my ESP devices today neither PC showed a complete Network list of all my ESP8266 devices and connectivity to the devices was very hit and miss. But I've just managed to get them all back and perform another OTA update on them all to hopefully sort it out.
Firstly a Router (BT hub) reboot sorted out getting the network list back visible in Arduino, but Im pretty sure the main problem was the update I did earlier on today to all my ESP devices, this update contained an improvement (or so I thought) to include ESP8266WiFiMulti.h; this was meant to allow me to upgrade my Router to a new "improved" one I just got from BT. I upgraded the Arduino sketch for the ESP devices to set up WiFiMulti to include both the old and the new Router SSID & Password combinations so all my devices would automatically connect to either AP and work as normal when I swapped the router over to the new one. It was after this update, and before Id even swapped over the router, that all the problems started with intermittent access to all my devices and I was unable to reconnect to any of them in the Arduino IDE to do another OTA (some of my devices are in the walls/ceilings so FTDI was not going to be an easy option).
All my devices have had a rock solid connection up until today with the old firmware sketch so it had to be this change I did in the sketch to include ESP8266WiFiMulti.h functionality.
After rebooting the router I managed to get the devices to show up again and managed to revert them all back to the old sketch with just a single WiFi connection identified. It all seem stable now.
Personally I think its a problem with ESP8266WiFiMulti.h functionality.

Interesting findings Vince... In my case it doesn't seem to be ESP8266WiFiMulti or router related. I'm not using this library in my pretty simple sketch, and the problems were reproducible with the old firmware/sketch that worked reliably in Arduino IDE versions 1.8.5 and earlier. Rebooting the TP-Link WR841N didn't have any effect in my case.

Hi

Installing / reinstalling Python might make it work:

[SETUP] ESP8266 Over The Air (OTA) Programming In Arduino IDE

rtek1000:
Hi

Installing / reinstalling Python might make it work:

[SETUP] ESP8266 Over The Air (OTA) Programming In Arduino IDE

Actually, Python was my first suspect, as I have recently upgraded from 3.5.0 to 3.7.2 but testing with different python versions made no difference in my case. I did this before trying the different Arduino IDE versions.

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 :slight_smile:

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 ::slight_smile:

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.