Seeing Yun in IDE Port menu

I have similar issues and have tried to read through this thread thread trying various things along the way, but I'm feeling it's some other network straightforward issue, maybe. Anyway my symptoms are :

  1. On wifi I can access the yun config panel, use putty, use sFtp all fine
    but the Yun doesn't appear on the Port menu.

  2. On wifi using the suggested tools bonjour lists and shows the settings for the yun

  3. If I connect my computer to ethernet whilst leaving yun on wifi and restart the yun magically appears on the IDE port menu.

The signal strength of the wifi is good at both the yun end and the laptop computer.

Any ideas?

leave wifi connected, and disconnect ethernet.

Post output of

ping arduino.local

times out no reply

http://forum.arduino.cc/index.php?topic=188101.msg1583686#msg1583686

http://forum.arduino.cc/index.php?topic=188101.msg1554795#msg1554795

What is your Yun ip address?

Are you on windows?

address is 192.168.18.6
I have already had a quick look at those threads and installed the bonjour browser which did seem to correctly list my yun
I am on win7 and have disabled av and firewall

ping arduino.local
times out no reply

and

bonjour browser list correctly yun.

Could be some thing wrong DNS setting (DNS hijacking) or Windows OS problem.

Seeing Yun in IDE Port menu - #32 by sonnyyu - Arduino Yún - Arduino Forum for DNS hijacking,

Use an other Windows machine for testing OS problem.

I will try another laptop later today. I am stumped as to why the wired connection lists the yun in the IDE but the wifi connection does not. Yes the yun gets listed under wifi with the bonjour browser and the yun also works in wifi for everything else apart from the IDE......
Does seem like something silly on my PC networking (but everthing else works) so, will try as you suggested another PC....

I had the same issue when I tried to use my MacPro for Arduino 1.5.6-r2 IDE access to the Yun by wifi. However, what I found enabled wifi access was first connecting the Yun to the MacPro by USB. The wifi connection then appeared in the IDE and was accessible by the IDE for upload (I did get a password pop-up, too).

I found this "solution" because I had just upgraded the Yun to the latest firmware and had to connect it via USB to a MacBook. The IDE showed the wifi connection when it was connected by USB and after when the Yun was on my network.

Hope this can help.

Hi all,

I had the same issue regarding port not always seen in Arduino IDE 1.5.8 and I found a workaround. Of course if you are Wifi connected to YUN it works, but when you connect YUN to your LAN and if your main DHCP/DNS server is not the YUN it does not work every time.

So you need of course to have bonjour service installed and running, but it's not enough.

I think the Arduino IDE try to find devices with bonjour service only if it can resolve the address arduino.local (but it try to resolve LOCALLY, not using any DNS resolution). I think that because I've put this as static entry in my DNS server but didn't work either.

So I’ve put this entry in my windows hosts file and it works every time. You can put the following on your hosts file (change for your yun IP)

192.168.1.246 arduino.local

With that, it works every time (trust me I've spent some time do test all cases).

What is fun is that putting the IP address of my Synology NAS (not the YUN one) it also works so my understanding is that when Arduino success to LOCALLY resolve arduino.local then it request the bonjour service and is able to find all YUN on the same network.

Funny and disappointing working mode, may be worth to look at the IDE source code to really know what is done.

Merry Christmas to all of you.

It's not a DNS issue, which is why your various attempts to fix it didn't work. However, you can manually configure a DNS solution, which is what you did when you added the entry to your hosts file. The issue with that is it works only on that one computer, and only until the Yun's address changes (which it will tend to do from time to time unless you took special steps to make the address static.)

Charly86:
so my understanding is that when Arduino success to LOCALLY resolve arduino.local then it request the bonjour service and is able to find all YUN on the same network.

You've got cause and effect backwards. It does not resolve the address locally, then request the bonjour service. Bonjour is the service that locally resolves the address.

"Bonjour" is French for "Hello." (OK, it literally translates to "good day" but it's commonly used as a greeting.) Bonjour is an implementation of mDNS, a way for computers to greet each other and locally identify themselves. Computers identify themselves by sending out broadcast messages with their name and address. Other computers receive that broadcast and make note of it.

In this case, the Yun is periodically sending out a broadcast that essentially says "Hello, my name is arduino.local, and I'm at aaa.bbb.ccc.ddd." Your computer receives that, and makes an entry into its address resolution file. The IDE also adds an entry to its port menu.

Of course if you are Wifi connected to YUN it works, but when you connect YUN to your LAN and if your main DHCP/DNS server is not the YUN it does not work every time.

In my case it's exactly the opposite: when the Yun is WiFi only, I can't use arduino.local from my computer, but over Ethernet I can. The reason for both our problems is the same, and the reason why our behaviors are different is due to the way things are connected.

As just discussed, finding arduino.local (and showing up in the port menu) depends on your computer receiving broadcasts from the Yun. Broadcasts generally only travel on one network segment; they tend not to make hops through bridges or routers. In my case, my computer is on the wired Ethernet, and I have a bridge to a wireless network. When the Yun is only on the a WiFi network, the broadcasts don't make it to the Ethernet network, so my computer can't resolve arduino.local. It can still access the Yun by its address (since addressed packets do make the jump through bridges and routers) but it can't find the name and it doesn't show up on the IDE port menu. If I connect the Yun to Ethernet, then it is on the same network segment, the broadcasts go through, and I can access it by name and from the IDE.

Now, for your case, I'm assuming your computer is on the wireless network. When the Yun is also on the wireless, the broadcasts go through, and everything works. When the Yun is on Ethernet, the broadcasts don't make the hop between network segments, and now you have your issues.

Charly86:
Funny and disappointing working mode, may be worth to look at the IDE source code to really know what is done.

No need. The problem is that you didn't seem to heed the advice to make sure you have the Bonjour service running on the host. That is Apple's (misguided) attempt on name resolution without using a DNS server or a host file entry on the local machine. The later is what you used and it will fail again if for some reason your Yun becomes a different IP address. Commonly, a DHCP host will always try to request the same IP address from the DHCP server, but if for whatever reason the server does not honor that request, it will happily accept whatever IP address it is given... :wink:

Merry Christmas to all of you.

Happy New Year! :sunglasses:

Ralf

It seems to me there should be a way to enter an IP address to connect to rather than relying on what is obviously a fragile solution. I have 3 Yuns running 24/7 and all 3 never show up at the same time in the Ports menu even though they all show up all the time using a Bonjour browser, are accessible from HTTP, and also from SSH. Not to add they communicate over Wifi in their applications non-stop. Also, even if a Yun doesn't show up in the Ports menu, if it is the last Yun I uploaded to then the IDE can keep uploading successfully. My point is this is just a discovery issue and the Yun's are in my experience unique in having issues (i.e. I have a number of devices that rely on Bonjour for discovery and they never show this type of problem).

I have not found a way in the IDE to tell it to connect to an IP address. Is there one? If not, is there a method of requesting it?

Ok, similar symptoms here:

Using a Yun, available on wifi at the ip but not at .local address, ssh working, not showing in bonjour on Windows and not available as a port in IDE. Bonjour for windows is also not showing that my iPhone is available, which is also on the network.

Just tried with a friend's macbook, and the Yun shows in the IDE without a problem. So I assume this must be a problem with zeroconf/bonjour on windows, but I have reinstalled bonjour 3 times to no avail.

Tried adding Yun's ip (192.168.1.101) to hosts file, also no luck.

What am I missing?

Maybe something else is interfering with bonjour?

When you tried with your friend's macbook, was it in the same network of your computer?

tykom:
...
Just tried with a friend's macbook, and the Yun shows in the IDE without a problem. So I assume this must be a problem with zeroconf/bonjour on windows, but I have reinstalled bonjour 3 times to no avail.
...

Step 1. Install Bonjour Browser (Bonjour windows client ) to confirm Bonjour is working.

http://forum.arduino.cc/index.php?topic=188101.msg1554795#msg1554795

Step 2. The Arduino IDE itself is written in Java, and it can communicate to the Arduino via the Java library. Reinstall java as well as Arduino IDE Software.

http://forum.arduino.cc/index.php?topic=188101.msg1574357#msg1574357

hi, i followed the thread, because i have the same problem....

the first time i connected the yun with my pc (windows7 64 bit) it worked fine.
after restarted my computer, here begins the troubles...
The IDE tools>ports shows only the serial connection (COM12), and misses the yun's ip.

i uninstalled and reinstalled the following components:
all listed Java,
all listed bonjour,
arduino ide,

i also tryed to change my dns into 8.8.8.8.
opened the port 5353 UDP in the windows firewall,
i can connect to arduino via ssh, arduino.local via browser, via winscp, and via usb by ide.
bonjour browser shows the arduino yun.... works fine

_arduino._tcp (Arduino)
_ssh._tcp.(Secure Shell on Arduino)

do you have any suggestion???

pasluc7469:
...
The IDE tools>ports shows only the serial connection (COM12), and misses the yun's ip.
...

COM12 might be OK at Java but not at other programming languages. fix it anyway?

sonnyyu:
CreateFile() is successful when you use "COM1" through "COM9" for the name of the file; however, the message INVALID_HANDLE_VALUE is returned if you use "COM10" or greater.

HOWTO: Specify Serial Ports Larger than COM9 - Microsoft Support

Removing or changing unused COM Ports from Windows.

http://www.digi.com/support/kbase/kbaseresultdetl?id=3308

pasluc7469:
...
i can connect to arduino via ssh, arduino.local via browser, via winscp, and via usb by ide.
bonjour browser shows the arduino yun.... works fine

_arduino._tcp (Arduino)
_ssh._tcp.(Secure Shell on Arduino)
...

This means bonjour service as well as firewall is OK. now either Java or IDE is problem, worse case is Windows.

Plan A.

ghost back fresh copy windows 7.

Plan B.

Test it at an other windows 7 box.

Plan C.

Make sure complete uninstall Java ( JRE as well as JDK) and Arduino IDE. Re-install latest version Java as well as IDE.

thanks for yor reply....

i installed the same components in another pc, and it seem to work fine....

now, how can i fix the issue?

i scanned the system with malwarebytes, ... what else?

what do you mean with

ghost back fresh copy windows 7

?

Windows Backup and Restore.

Ghost is a disk cloning and backup tool.