Hello,
I have more or less the same issu as in this thred
Continuing the discussion from IDE 2.0 : OTA mDNS discovery only intermittently finds nodes:
but I'm using the arduino ide 2.1.1 appimage for Linux. my OS is debian 11.
I use arduino mega with w5100 ethernet shields
In my case the 2.1.1 ide displays the first ip address it finds.
ide 1.8

ide 2.1.1

if I disconnect the arduino with the 192.168.2.56 ip adresse I see only the 192.168.2.96 arduino
If I can help let me know.
thank you for your help
regards
Hi @Yogui79. The lower level origin of the list of "network" protocol ports is a tool named mdns-discovery. Arduino IDE doesn't directly know anything about ports. It only displays the list that is provided to it by its helper tools. So a useful troubleshooting step would be to check whether mdns-discovery itself is correctly discovering all three of the ports. The results of this experiment will give a better understanding of the origin of the problem (e.g., if the ports are not discovered by mdns-discovery then there is no point in wasting time looking at Arduino IDE itself as the source of the problem. They might also give some understanding about the nature of the problem.
This procedure is not intended to solve the problem. The purpose is to gather more information.
I'll provide the instructions here:
During all this, keep an eye out for anything that doesn't match the expected behavior as described at each step.
- Open a command line terminal.
- Run this command:
ls ~/.arduino15/packages/builtin/tools/mdns-discovery
- You will now see a list of the versions of mdns-discovery which are installed on your computer. Take note of the highest version on the list (recent versions of Arduino IDE 2.x always use the newest one)
For example, if you see output like this:0.9.2 1.0.2 1.0.5
then the newest version is "1.0.5".
- Run the following command:
~/.arduino15/packages/builtin/tools/mdns-discovery/<newest version>/mdns-discovery
(where <newest version> is the version number you found at step 3)
mdns-discovery will now start. There won't be any obvious sign of this other than that there is no longer a command prompt at the cursor in the terminal.
- Type the following command:
HELLO 1 "arduino-cli 0.21.0"
- Press the Enter key.
You should now see a response printed exactly like this:{
"eventType": "hello",
"protocolVersion": 1,
"message": "OK"
}
- Disconnect your Arduino board from its power source if you have it powered.
- Type the following command:
START_SYNC
- Press the Enter key.
You should now see a response printed exactly like this:{
"eventType": "start_sync",
"message": "OK"
}
You might also see some additional objects in the output depending on which network ports are available on your computer.
- Power your Arduino board.
You should eventually see a response printed that looks something like this:{
"eventType": "add",
"port": {
"address": "192.168.254.127",
"label": "esp32-b4e62dbf693d at 192.168.254.127",
"protocol": "network",
"protocolLabel": "Network Port",
"properties": {
".": "node32s",
"auth_upload": "no",
"board": "node32s",
"hostname": "esp32-b4e62dbf693d.local.",
"port": "3232",
"ssh_upload": "no",
"tcp_check": "no"
}
}
}
ā This is only an example of what you might see. The output will be different depending on the board you connected.
- Disconnect your Arduino board from its power source.
You should eventually see a response printed that looks something like this:{
"eventType": "remove",
"port": {
"address": "192.168.254.127",
"label": "esp32-b4e62dbf693d at 192.168.254.127",
"protocol": "network",
"protocolLabel": "Network Port",
"properties": {
".": "node32s",
"auth_upload": "no",
"board": "node32s",
"hostname": "esp32-b4e62dbf693d.local.",
"port": "3232",
"ssh_upload": "no",
"tcp_check": "no"
}
}
}
ā This is only an example of what you might see. The port data should be the same as the "add" event you saw when you powered the board.
You should continue to see the same results if you repeat steps (10) and (11).
Once you are done with your experiments with the "mdns-discovery" tool, follow these instructions to exit:
- Type the following command:
STOP
- Press the Enter key.
You should now see a response printed exactly like this:{
"eventType": "stop",
"message": "OK"
}
- Type the following command:
QUIT
- Press the Enter key.
You should now see a response printed exactly like this:{
"eventType": "quit",
"message": "OK"
}
You should now be back at the shell command line.
hello
thank for your answher
HELLO 1 "arduino-cli 0.21.0"
{
"eventType": "hello",
"message": "OK",
"protocolVersion": 1
}
START_SYNC
{
"eventType": "start_sync",
"message": "OK"
}
{
"eventType": "add",
"port": {
"address": "192.168.2.96",
"label": "Arduino at 192.168.2.96",
"protocol": "network",
"protocolLabel": "Network Port",
"properties": {
".": "arduino",
"auth_upload": "yes",
"board": "arduino",
"hostname": "Arduino.local.",
"port": "65280",
"ssh_upload": "no",
"tcp_check": "no"
}
}
}
{
"eventType": "add",
"port": {
"address": "192.168.2.56",
"label": "Arduino at 192.168.2.56",
"protocol": "network",
"protocolLabel": "Network Port",
"properties": {
".": "arduino",
"auth_upload": "yes",
"board": "arduino",
"hostname": "Arduino.local.",
"port": "65280",
"ssh_upload": "no",
"tcp_check": "no"
}
}
}
{
"eventType": "remove",
"port": {
"address": "192.168.2.96",
"label": "Arduino at 192.168.2.96",
"protocol": "network",
"protocolLabel": "Network Port",
"properties": {
".": "arduino",
"auth_upload": "yes",
"board": "arduino",
"hostname": "Arduino.local.",
"port": "65280",
"ssh_upload": "no",
"tcp_check": "no"
}
}
}
I havent disconect the 96 he disconect a few second after I plug the second arduino
Ah, I see now that my instructions were not very well tailored for the specific problem you are experiencing. They were pre-composed for the more common problem where the user reports that the port of a single board is not being discovered at all. Good job on adjusting my instructions to make them better suited for troubleshooting your specific problem!
I notice that both of the network ports use port 65280. I did some experimentation with multiple network ports and found that this also caused me problems. I don't know enough about mDNS and the network port/ArduinoOTA system to have an idea about whether that is an expected result, or a bug in mdns-discovery, but I think it would be worth it for you to try configuring a different port for each of your boards to see whether that is an effective solution/workaround for the discovery problem.
Hello,
thank you for the tip.
the issu was not the port but I stupidly copy the otasample in all my project without changing the node name (I only change the password.)
thank you very mutch for your time
Nice work finding the cause of the problem! I'm glad it is working now. Thank you for taking the time to post an update with your solution. I'm sure those who find this thread while searching for a solution to the same problem will be very grateful.
Regards,
Per