Linux Centos IDE with YUN port

Running Linux Centos 6 IDE. I just bought a YUN. This is my first time and I know nothing just works with Linux.

When I try to select the port the only choice is /dev/ttys0. I need to log in wirelessly. But that choice isn't there. I can access the board using a browser so I know it's working. I can even SSH in. But can't upload.

What am I missing?

Thanks in advance.

mperkel:
I know nothing just works with Linux

Not True - most things work with less fuss than Windows.

Are you trying to upload an Arduino sketch or a program for the Linux side of the Yun?

...R

mperkel:
When I try to select the port the only choice is /dev/ttys0. I need to log in wirelessly. But that choice isn't there. I can access the board using a browser so I know it's working. I can even SSH in. But can't upload.

The Yun sends out a broadcast to identify itself, and that needs to be seen by the IDE before the Yun's network port will show up in the IDE.

In my experience, that means that the Yun and the computer need to be on the same physical network segment, as the broadcasts likely won't travel through a router or make the hop between a wireless and wired network. Also, if you have any firewall rules on your computer that blocks the Yun's broadcast, that can also cause problems.

Finally, it seems to me that the IDE must be up and running before you start the Yun. If you start up the IDE well after the Yun has booted up, the Yun's network port will often not show up in the IDE. (Perhaps the required broadcast is only sent during booting?)

I've had a lot of variability with my networked Yuns showing up in the IDE (I'm running Windoze.) I've had the best (but not perfect) luck using wired Ethernet for both the computer and Yun, and starting the IDE first then booting the Yun.

Parting comment: if you can find the compiled .HEX file for your sketch, you can use the Yun's configuration web interface to upload a sketch. Access the Yun with your web browser, log in, and at the bottom of that first summary page is a button to upload a sketch. (This wasn't present in old Yun system versions, so you may need to update your Yun Linux image if you don't see it.)

The computer and Yun are both on the same net 192.168.2.0/24. However the computer is connected by ethernet and the YUN is wireless. Is that the issue?

i'll try starting the YUN after the IDE. (Counter intuitive) but it would be better if there were a way to just permanently add the yun's IP into the config and not count on weird signals to announce its presence.

mperkel:

  1. The computer and Yun are both on the same net 192.168.2.0/24. However the computer is connected by ethernet and the YUN is wireless. Is that the issue?

i'll try starting the YUN after the IDE. (Counter intuitive) but it would be better if there were a way to just permanently add the yun's IP into the config and not count on weird signals to announce its presence.

@mperkel
On (1), ethernet is wired; wireless is, well, wireless. They maybe on the same network, but that usually depends on the bridge/router/AP. Quite likely this could be a problem. Please post the IPs for both systems. The problem could also be your routing on your AP; it may be set to only route to the Internet.

On your Centos box, check that your avahi-daemon (or equivalent) is running, as well as dnsmasq. What you want is ZeroConf, which should be via the avahi-daemon and dnsmasq.

Oh and also check your firewall, if you have one installed.

Lastly, I'm running Ubunut 14.04 LTE, and only have minimal issues.

Jesse

OK - I'm using a Buffalo access point running DD-WRT. The Linux desktop box is 192.168.2.240 and the YUN is 192.168.2.4.

Everything works except that the IDE isn't discovering that the YUN is present. I can access the YUN using HTTP and SSH.

Bringing up the IDE first does seem to work. But that's going to be a problem in the long run.

I'm just starting at this but I'm going to build a 2 axis solar tracker to control my solar system out in my yard. I would like to be able to upload new code to it without having to go outside and power cycle the YUN every time I want my IDE to talk to the system out in the yard. Is there a way to stuff this into a cinfig file so that it alwats tries to go there?

BTW - thanks for your help.

mperkel:
The computer and Yun are both on the same net 192.168.2.0/24. However the computer is connected by ethernet and the YUN is wireless. Is that the issue?

It is the issue for me. Yes, you are on the same logical network, but I was careful to say the same "physical segment" which is not the case for you. So now, it's a question of whether your router's configuration will pass broadcasts from wireless to wired.

mperkel:
I'm just starting at this but I'm going to build a 2 axis solar tracker to control my solar system out in my yard. I would like to be able to upload new code to it without having to go outside and power cycle the YUN every time I want my IDE to talk to the system out in the yard.

Your most reliable bet is to use the upload sketch function of the first status page of the Yun's configuration web management interface.

Is there a way to stuff this into a cinfig file so that it alwats tries to go there?

No. I've been asking for this since my first day of using a Yun. The answer has either been a resounding no (perhaps because it would be to confusing to beginners?) or they say I should write it myself and submit it to the project. Either way, the powers that be appear to have no interest in such a feature. You and I are not the first to ask about it.

mperkel:
I would like to be able to upload new code to it without having to go outside and power cycle the YUN every time I want my IDE to talk to the system out in the yard.

Another option:

  • Start the IDE
  • Start an SSH session to the Yun
  • Then issue the "reboot" command to the SSH shell
  • Wait for the Yun to finish rebooting and check the IDE port menu

There is a possible issue that the sketch may be sending something to the Serial1 port (actually, the Bridge class might be sending something) which could interrupt the boot process and make the Yun unresponsive (since at the beginning of booting, u-boot says "press any key to interrupt booting" and the Bridge output could do that.) So, you may want to add a step 2.5 and issue a "reset-mcu" command immediately before booting (this may work best if you put a few seconds delay at the beginning of the sketch before you start the Bridge or write to Serial1.) See http://playground.arduino.cc/Hardware/Yun#rebootStability

I just did this with a remote Yun, and it worked, I now see it in the IDE.

It was working a little while yesterday and it's not working today. I installed the software on a Windows 8.1 and a Windows 7 computer and neither one of them see the YUN over the network either. The Windows 7 computer is also wireless.

First impressions are not good.

mperkel:
It was working a little while yesterday and it's not working today. I installed the software on a Windows 8.1 and a Windows 7 computer and neither one of them see the YUN over the network either. The Windows 7 computer is also wireless.

First impressions are not good.

@mperkel & ShapeShifter,

I do know that the IDE is using an IP port to make the connect (5017, I think). It may be that your "windows" firewall allows incoming connections, but only "if the outgoing connection, initiates the process". This is the norm.

However, you are reporting the opposite (in your second message). That is, you start the IDE first, then the YUN. Which has me thinking that the IDE is giving up too early, then retries after a few minutes.

I'm NOT able to test this at this time, perhaps ShapeShifter could give it a go?

Jesse

jessemonroy650:
Which has me thinking that the IDE is giving up too early, then retries after a few minutes.

I’m not understanding this. The broadcast is coming from the Yun, not the IDE. Are you suggesting that the IDE is first sending out a broadcast to “open the port” in the firewall?

I was using it yesterday, and I started the IDE first. About ten minutes and fifteen minutes later I rebooted the Yun, and it did show up in the IDE. Interestingly, recently it’s been showing up under both the wired and wireless addresses,which hasn’t been the case in the past. That’s why I’ve been hooking up the wired when I wanted to do IDE access, because the wireless wasn’t coming through my WiFi AP (which is a stand-alone box, not part of my router.)

Yes, it is inconsistent (and disappointing.) There must be some other condition causing this inconsistent behavior which we don’t yet understand (or it just really is flaky.)

I sure wish I could just pre-configure the port menu with a list of Yun names (yun1.local, yun2.local, etc) and have them always show up, just like I’ve done with PuTTY.

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

OK all,
in the other thread SonnyYy says there is a bug. Please read that thread.
Jesse

I haven't got it to work yet. In fact it's worse. I installed the IDE on a Windoes 8.1 in a VirtualBox under Linux and I installed it on a Windows 7 laptop. None of these computers see the YUN over the network. My router is a Buffalo running DD-WRT.

I would really like to get this working. And I appreaciate all the help everyone has given me so far.

mperkel:
I haven't got it to work yet. In fact it's worse. I installed the IDE on a Windoes 8.1 in a VirtualBox under Linux and I installed it on a Windows 7 laptop. None of these computers see the YUN over the network. My router is a Buffalo running DD-WRT.

I would really like to get this working. And I appreaciate all the help everyone has given me so far.

@mperkel,

okay,
if these next things don't work, I'll make a check list. If one of these works, please let us know (and mark the original subject line as [SOLVED])

#1 ShapeShifter recently reminded me that there is a Troubleshooting Guide with an entry for the IDE

#2 The problem might be your router or firewall is blocking UDP traffic on port 5353. Check it.
Seeing Yun in IDE Port menu
[The problem might be your router is blocking UDP traffic on port 5353. Check it. ''Seeing Yun in IDE Port menu'' http://forum.arduino.cc/index.php?topic=188101.0](http://The problem might be your router is blocking UDP traffic on port 5353. Check it. ''Seeing Yun in IDE Port menu'' http://forum.arduino.cc/index.php?topic=188101.0)

Jesse

LINUX

OK - I tested it from Linux and access to port 5353 worked.

nc -uvz 192.168.2.4 5353
Connection to 192.168.2.4 5353 port [udp/mdns] succeeded!

I tested port 5354 also to verify my test and it failed.

On Linux the port for the Yun doesn't show up. Ran lsusb and I see it.

Bus 008 Device 005: ID 2341:8041 Arduino SA

But ports only show /dev/ttyS0

I also plugged in the ethernet port and that makes no difference. The Linux box is wired.

I can SSH into the board so I know the network is working.

WINDOWS 8.1

I also tried a VirtualBox Windows 8.1 and nothing works. The Yun driver is not installed. And when I try to install the driver it says that there are not compatible drivers there. Windows 8.1 also didn't see it on the network.

WINDOWS 7 Laptop

I tried a laptop wireless running Windows 7. The driver did install and it usually works on the USB port. (every now and then I get an error that it didn't find a board on COM18. The Windows 7 laptop also doesn't see the yun on the network.

I'm dedicated to making this work because I have a real world project to do. But if I wasn't motivated I would have thrown it on the shelf and never got back to it. Obviously I'm missing something somewhere.

mperkel:
...
On Linux the port for the Yun doesn't show up. Ran lsusb and I see it.

Bus 008 Device 005: ID 2341:8041 Arduino SA

But ports only show /dev/ttyS0
...

Make sure the port show up

[root@localhost ~]# ls -l /dev/ttyACM0
crw-rw----. 1 root dialout 166, 0 Apr  8 01:17 /dev/ttyACM0

Make sure your account at group of dialout

usermod -a -G  dialout sonnyyu

Reboot !

mperkel:
...
WINDOWS 7 Laptop

I tried a laptop wireless running Windows 7. The driver did install and it usually works on the USB port. (every now and then I get an error that it didn't find a board on COM18. The Windows 7 laptop also doesn't see the yun on the network.
...

Please do not use "COM10" or greater at Windows

Install Yun driver at Windows

Re-install Yun driver by right click remove it, force it to reload/reinstall.

After you try every thing, but it still does not work. It is worth change USB Cable.

mperkel:
...
WINDOWS 8.1

I also tried a VirtualBox Windows 8.1 and nothing works. The Yun driver is not installed. And when I try to install the driver it says that there are not compatible drivers there. Windows 8.1 also didn't see it on the network.
...

@mperkel,

We know you can FLY. Try those suggestions by SonnyYu. Also, all windows boxes since post '95 have firewalls installed. So check you WINDOWS firewall as well.

Jesse