Can't program YUN over Wifi

Hi,

I'm on OSX 10.9 Mavericks. I've tried Arduino 1.5.5 beta and nightly and both give the same results.

  • Basic configuration of Yun (connected to AP, set password, no other config like SSH keys)
  • Can SSH to Yun with root@
  • Yun shows up under Tools->Port
  • Password prompt appears, re-appears if I enter the wrong password
  • Entering the correct password results in:

processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SSHUploader.uploadUsingPreferences(SSHUploader.java:102)
at processing.app.Sketch.upload(Sketch.java:1672)
at processing.app.Sketch.exportApplet(Sketch.java:1578)
at processing.app.Sketch.exportApplet(Sketch.java:1550)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2399)
at java.lang.Thread.run(Thread.java:695)
Caused by: com.jcraft.jsch.JSchException: session is down
at com.jcraft.jsch.Session.openChannel(Session.java:843)
at cc.arduino.packages.ssh.SSH.execSyncCommand(SSH.java:58)
at cc.arduino.packages.uploaders.SSHUploader.runAVRDude(SSHUploader.java:127)
at cc.arduino.packages.uploaders.SSHUploader.uploadUsingPreferences(SSHUploader.java:93)
... 5 more

I've tried uninstalling, reinstalling Arduino app, reinstalling the JRE/JDK 1.6 and 1.7

Any thoughts?

Do you have other mac to try with? We don't have a Maverick yet and it's the first time I see this kind of error, so it could be maverick related

I am afraid I can't help you, but wanted to confirm that I am running successfully on Maverick for both Arduino 1.5.5 beta and nightly builds. I have JRE 1.6 on the machine. I am able to upload to my Yun over WiFi.

This isn't very helpful, but I have one system that works, one that doesn't ...

With a new Yun I received today I was getting
the same problem - not able to upload sketches, with an exception
in the IDE that starts:

Caused by: com.jcraft.jsch.JSchException: session is down

This was on a Fujitsu laptop running Kubuntu 13.10, and using todays
nightly build of the IDE (as well as 1.5.5), trying both ethernet and wireless
uploads.

On the same hardware running Linux Mint 16 KDE, sketch upload
works over ethernet (haven't tried wireless yet).

The versions of java seem to be the same on both:

../arduino-yun/arduino-nightly$ java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.12) (7u25-2.3.12-4ubuntu3)
OpenJDK Server VM (build 23.7-b01, mixed mode)

Any ideas of other things I can look at to help ... ??

neal

Same problem with the Arduino Yún on 10.9 Mavericks.

I can't access to the Yún webpage but the port doesn't appear on the Tools > Port list of the Arduino IDE 1.5.5.

I tried with the firewall turned on and off, same result.

Any hints?

Hi,

I was also experiencing this issue under OSX 10.9. In my case the issue turned out to be a particular line in my ~/.ssh/config file

host arduino.local
    Port 22
    User root
    StrictHostKeyChecking no
    IdentityFile ~/.ssh/id_rsa

host blah
    Port 22
    ForwardX11 no
    TCPKeepAlive yes
    ServerAliveInterval 20
    User blah

The "ServerAliveInterval 20" line in the unrelated host configuration block seems to trigger the issue, I suspect that there are other options that may be problematic.

I reduced my ~/.ssh/config file to the following entry only

host arduino.local
    Port 22
    User root
    StrictHostKeyChecking no
    IdentityFile ~/.ssh/id_rsa

/etc/ssh_config should also be checked for options other than the default below

 Host *
   SendEnv LANG LC_*

Cheers,
Garth

Thanks for the hint.

In terminal mode, I ran a

arp -d -a

to clear the list of connected devices.

Then I waited for about 10 minutes before the Arduino Yun came back on the list on my WiFi server.

This is very slow... but it works now.

garthberry:

...

ServerAliveInterval 20




The "ServerAliveInterval 20" line in the unrelated host configuration block seems to trigger the issue, I suspect that there are other options that may be problematic.
...

I had exactly the same problem as the OP and removing the ServerAliveInterval solved it. Thanks garthberry!

But I need that option for other purposes and it is a normal ssh optionn so I hope this will be fixed in the future.

yes - just had exactly the same problem. would be best if this were fixed - it's not exactly intuitive. and as others have mentioned, that option is perfectly valid and necessary in some situations.

K.

qarl:
yes - just had exactly the same problem. would be best if this were fixed - it's not exactly intuitive. and as others have mentioned, that option is perfectly valid and necessary in some situations.

K.

@qarl,
Please don't use old threads. While your problem may be reporting similar results, you are likely doing something different. Please start a new thread. Please explain:

  1. what you are trying to do?
  2. what you have tried.
  3. what is not working as expected.

In the meantime, the issue you have is very common. It can be truthfully said that working with the Arduino Yun can be a challenge and at times frustrating. In the meantime, Please read and follow this canned answer. Also, if the following canned answer solves your issue, please follow up on this thread.

TIA
Jesse

= [Q:] I cannot connect to My Arduino Yún. What do I do? =

First it's good to know, when Arduino Yun cannot find the AP you have set it for (like your home wifi), it has a script that puts it back into default SSID and AP mode.

Next, you may have already watched this video, but it's worth watching again. Pay extra attention to the part with the sketches.
Getting started with Arduino Yún - tutorial (6:53)

Then, read the short instructions immediately below. We (the volunteer support group) already know these steps by heart, so be familiar with the different reboot methods, and especially the 30+ second wifi reset. Also, not mentioned on that page, if you reset the Wifi/Linux part of the Yun, it will take from 2-8 minutes for the reboot. Lastly on this part, YOU MUST WAIT for the Linux portion to fully boot BEFORE YOU PRESS ANY of the RESET buttons.

Resetting the processors (AR9331, WiFi, and 32U4)
http://arduino.cc/en/Guide/ArduinoYun#toc6

Then start over, plug your Yun into the USB port, run this sketch, and hit the ''Wifi Reset button'' (for 5-10 seconds).
http://arduino.cc/en/Tutorial/YunSerialTerminal

The YunSerialTerminal provides a simplified console access to the Linux part of the Yun. It works via the USB port (the one that powers the Yun - the microUSB). From there you'll be able to run a few commands to give us a better idea of problems.

Also, be ready with this sketch YunWiFiStatus. This sketch will help us see the status of your home AP. The sketch prints the wifi status to the console every 5 seconds or so. This sketch might seem familiar as it was in that first video link (above).

Let us know how it goes.
Post results from the YunSerialTerminal, if you are still having problems.
Please use markup when posting results.

Thanks again
Jesse