Arduino IDE doesn't list network ports

I have a few ESP32 and ESP8266 chips running on the network running ArduinoOTA, and have frequently updated their firmware.

Recently, no network ports appear in the IDE.

They appear on a different PC running Arduino IDE, they appear on this computer in Bonjour Browser.

I have tried disabling all other network interfaces, IPv6 is disabled, I have checked mDNS is allowed through the firewall, restarting the PC, reinstalling the IDE.

builder_bob is vague about his solution RE a recent KB update.

Updating libraries through the annoying prompt gets stuck halfway (I didn't clear the libs folder on reinstall.)

Time to move to PlatformIO me thinks

I am unsure if you solved your problem. If not, the first thing we ask new folks to do is read the pinned post re 'How to get the most from the forum'

No, I did solve the problem, I'll move to PlatformIO.

Great, thanks for pointing me to that thread.

Navigating to
C:\Users\ \AppData\Local\Arduino15\packages\builtin\tools\mdns-discovery

Then copying the contents of "1.0.9" into "1.0.12", replacing them, solved it. I can get my updates through.

I had the same problem and the solution above solved it about two months ago. It has come back and the solution no longer works. Any ideas?

I assume the IDE has updated it (i.e. you have allowed it to update)- my fix is still working (just checked.)

Just try the fix again, you might have to find a copy of 1.0.9 mdns-discovery.exe if it's no longer there.

It is true that the workaround provided by @woodengoat will stop working after each new release of the mdns-discovery tool, since Arduino IDE automatically installs the latest available version of tool, and always uses the installation from the folder with the highest version number. So, for example, if version 1.0.13 is released then the next time you start Arduino IDE it would install that version here:

C:\Users\<username>\AppData\Local\Arduino15\packages\builtin\tools\mdns-discovery\1.0.13

The workaround installation will still be present at the same place as before:

C:\Users\<username>\AppData\Local\Arduino15\packages\builtin\tools\mdns-discovery\1.0.12

but it would no longer have any effect since Arduino IDE will not use it.

That said, there hasn't been a new release of mdns-discovery, so the regression was not caused by Arduino IDE installing a new version of mdns-discovery. It is definitely worth trying to reinstate the workaround in case somehow you ended up with the true version 1.0.12 installed.

Otherwise, you should keep in mind that a symptom may have multiple causes. For example, the fault could also be caused by a bug in the sketch program running on the board.

Yes, after a glitch that caused a partial reinstall I did find the version with about 5.7 MB again. I replaced it with the 4.8 MB one from the 1.0.9 folder but this time that did not work. As you confirm it should have done, I'll try a full reinstall of the IDE. Maybe something else was broken.
Danke, Axel

May I digress?
My new problem stems from trying to move the 16 GB of Arduino15 out of the system partition. With every test I could think of
mklink /J "c:\Users\Axel Berger\AppData\Local\Arduino15" "d:\rpi\Arduino\Arduino15"
has worked perfectly. Only the Arduino IDE didn't see it and I had to revert. Before reinstalling:
Would using the portable Zip version solve that too? I couldn't find anything about that in its description. Is the path to Arduino15 configurable there?
Danke, Axel

Do this:

  1. If Arduino IDE is running, select File > Quit from the Arduino IDE menus to close the application.
  2. Start any text editor application.
  3. Open the file at the following path on your hard drive in the text editor:
    C:\Users\Axel Berger\.arduinoIDE\arduino-cli.yaml
    
  4. Add the following content to the bottom of the arduino-cli.yaml file:
    directories:
      data: d:\rpi\Arduino\Arduino15
    
  5. Save the file in the text editor.

Now start Arduino IDE. This time it will use d:\rpi\Arduino\Arduino15 as the "data folder" instead of the default c:\Users\Axel Berger\AppData\Local\Arduino15 data folder path.

Reference:
https://arduino.github.io/arduino-cli/latest/configuration/

You can also delete the directory junction you created.

The instructions above will definitely work with any of the following packages of Arduino IDE, as offered for download from the "Software" page:

  • "Windows Win 10 or newer (64-bit)"
  • "Windows MSI installer"
  • "Windows ZIP file"

The only official package I'm not sure about is the Microsoft Store app. I know there are some differences in the Microsoft app's behavior, but I don't have experience using it so I can't say whether they are relevant to this specific procedure.

Thank you ptillisch for your detailed explanation.

Axel, if you can't for whatever reason get it working, the PlatformIO plugin in VSCode is definitely worth researching as it's what people tend to graduate to when they outgrow Arduino IDE. I still haven't made the jump yet I am scared;)

Thank for your advice. That part has worked flawlessly. I still do not see any newly flashed devices but do see the older one last flashed in March. Would deleting everything in "Arduino15\packages\arduino" and "Arduino15\packages\builtin" and letting Arduino rebuild it help or would that break even more?

I have installed and used that. Works. But as I mostly find Arduino simpler and easier I have very little experience yet. PlatformIO requires a deeper folder structure, but if you name every main file "src/src.ino" you can use both compilers on the same file.

This makes me think the problem is with the sketch running on the boards, not with mdns-discovery.

Try this:

  1. Connect one of the boards that is not being discovered via its "network" port to your computer with a USB cable.
  2. Select the appropriate board from Arduino IDE's Tools > Board menu.
  3. Select the serial port of the board from Arduino IDE's Tools > Port menu.
  4. Select Tools > Serial Monitor from the Arduino IDE menus to open the Serial Monitor view if it is not already open.
  5. Select the appropriate baud rate from the menu at the top right corner of the Serial Monitor panel. This should match the value of the argument of the Serial.begin call in the code of the sketch program that is running on the board.
    If you are using the "BasicOTA" example that is provided with the "esp32" boards platform, then the baud rate will be 115200.
  6. Press and release the reset button on the board (or disconnect and then reconnect the USB cable to power cycle if the board doesn't have a reset button).

Now watch the output panel in the Serial Monitor view. The sketch program should print information about its connection to the Wi-Fi access point. Does that show the board successfully connected?

The only things this will accomplish is:

  • Deleting "Arduino15\packages\arduino" will uninstall any official boards platforms you had installed.
  • Deleting "Arduino15\packages\builtin" will cause Arduino IDE to reinstall the latest version of each of the "built in" tools.

In regards to the former, if you made some modifications to the platform of the board you are working with and you suspect those might be the cause of the problem, then it could be useful to uninstall and then reinstall a fresh copy of the platform. However, I'm guessing you are using a board from the 3rd party "esp32" or "esp8266" platform. If so, uninstalling all the official platforms won't accomplish anything. Furthermore, it will be more friendly to just use the Arduino IDE Boards Manager to remove and then reinstall the platform.

In regards to the latter, this would undo the workaround you performed of replacing the installation of version 1.0.12 of mdns-discovery with version 1.0.9, and so will actually be counterproductive. None of the other built in tools are involved in discovery of network ports, so forcing a reinstallation of those tools won't accomplish anything.

Does that show the board successfully connected?

Thank for the good howto for the monitor. It may well be helpful to other, though not me. I use the serial monitor for debugging all the time. If confirming WLAN is all to be achieved here, I do not need it. Not only is the connection shown in my Fritzbox but I also successfully receive MQTT updates over WLAN every minute.

None of the other built in tools are involved in discovery of network ports,

Thanks. That answers what my question really was about. So unfortunately it remains unsolved for me.
Thanks again for your help and advice.

Hi @woodengoat and @axelberger. Some fixes have been made in mdns-discovery since the time of this discussion, and those fixes have now been released in version 1.1.0.

Arduino IDE will automatically install the new version the next time you start the IDE, and will use that version. So you may want to check to see if the problem is now solved.

If the problem still occurs even with 1.1.0, you will need to perform the workaround of replacing the 1.1.0 installation with the executable from the 1.0.9 installation, as you did before with version 1.0.12.


If you check 1.1.0, please do reply here to share your findings.

I must make a correction to this statement I posted earlier:

It turns out that we have not yet added the new release to the primary package index Arduino IDE uses to identify updates. So for now it will continue to use the older version 1.0.12 without the fix.

In case you are interested in trying it out now, 1.1.0 is available for download from the "Assets" section under the GitHub release page:

https://github.com/arduino/mdns-discovery/releases/tag/v1.1.0#:~:text=3%20other%20contributors-,Assets,-14

Otherwise, you can wait for the update from Arduino IDE. I'll circle back here to post an update once that happens.

Version 1.1.0 has now been published to the index. So Arduino IDE is now able to update mdns-discovery to the version that contains the fixes.