Arduino UNO + Yun Shield Auth Fail

Arduino: 1.8.1 (Mac OS X), Board:"Arduino/Genuino Uno"

Hi all,

Recently started playing with a UNO R3 and Yun Shield. Everything attached and connected properly to my home network. I just can't get simple sketches like 'ConsoleRead' or 'WiFistatus' to work. Also in on the Monitor it says: 'Not connected: new try (0)...' . The 'Blink' sketch uploads nicely though. Am I doing something wrong? Maybe somebody can help me?

//Error message//
com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(
Auth fail
com.jcraft.jsch.JSchException: session is down
at com.jcraft.jsch.Channel.sendChannelOpen(
at com.jcraft.jsch.Channel.connect(
at com.jcraft.jsch.Channel.connect(
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEventImpl(
at java.awt.EventQueue.access$500(
at java.awt.EventQueue$
at java.awt.EventQueue$
at Method)
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForFilters(
at java.awt.EventDispatchThread.pumpEventsForFilter(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I'm facing the same problem. It seems that nobody cares in this crappy forum. In my case I keep on getting the stupid error "Could not connect to YunServer 146 Connection refused" while executing the Bridge Example.

Similarly I can't event telnet the stupid shield without getting a connection refused error.

Yun is such a piece of crap.


And of course I am going to provide help to somebody who is clearly being obnoxious in an attempt to garner help.

I will give you a clue though.
there is a search box at the top of the page USE IT.

And maybe before you do that READ THIS.

When you are able to present yourself in a better frame of mind maybe start your own topic.

I am having the same issue with a Mega 2560 and Arduino Yun Shield.

IoTR8, were you ever able to solve the problem?

Let's start with the basics: do you have it set up properly? Did you see and follow this section in the getting started documentation?

It's poorly worded: the header makes reference to the Uno and Mega, but then the text only mentions the Uno when it says you need a jumper. The Mega needs this jumper as well. Without it, the Mega's on-board USB interface will interfere with the serial communications between the sketch and the Shield, and you can get the results mentioned here.

Also, some example sketches like the WiFiStatus example, will not work with a Mega and the Yun Shield without modification. These examples are designed for the standalone Yun board, not the Yun Shield. The Yun board uses the processor from the Leonardo, which has a USB serial port (Serial) that is independent of the serial port on pins 0 and 1 (Serial1) that talks to the Linux processor. The Mega's USB serial port is the same port that is used to talk to the Linux processor. That's why you need the jumper on the Mega to disable the USB serial interface, and why you can't use the Serial object in any sketch with the Mega/Yun Shield combination.

With the jumper in place, sketches that use the Console object for I/O should work. Sketches that use Serial will not.

Thanks ShapeShifter.

I have been using the Arduino Yun "classic" for a few years and was hoping the Yun Shield and Mega 2560 R3 would be a step up from using multiple Yuns. I was psyched to get blink sketch working right away via Wifi after doing the usual set-up.

My configuration is: I'm using IDE 1.8.3; Board: Mega 2560, Processor: ATmega2560 and Port: Yun Shield chosen.

For some of the other basic bridge sketches I have modified code to not use the serial method but console instead. They have worked.

Right now there seems to be two kinds of problems:

  1. Tested adding diffreent libraries and most of them end up with this problem: End of IO Stream Read. With the serial window I just get the message: "unable to connect: retrying." I never had this problem with classic Yun. Also, I've Googled that error and haven't found anything useful.

  2. The other problem is the random "auth fail" messages which seems to be related to the Arduino IDE not asking for credentials. When it does this usually will work. Sometimes it doesn't immediately "auth fail" there could be a few seconds lag after sketch is uploaded. With the classic Yun either it asked or it didn't and I never saw an "auth fail" before.

I've used the jumper method and that doesn't help much. I'm sure it is something simple but for now I am completely baffled.

I'm sorry, but I don't have any direct experience with the Mega and the shield, I was just taking a stab at the easy solutions first that have seemed to trip up others in the past. It's clear that you are far beyond that stage, as you have quite a lot working and it sounds like you know what you're doing (which often is not the case!)

All of my Yun experience comes from the "classic" Yun, and like you, I have not seen these issues with that hardware.

Thinking out loud... You say that you get problems when you try to introduce other libraries. Could those libraries be using the Serial object, and thus clobbering the Bridge connection which is dependent on using Serial?

Thanks Shapeshifter for the thought.

UPDATE: I have not gotten to the bottom of this but have a workaround...It is not likely a library thing but here is the latest. DON'T USE THE CONSOLE.

Half-kidding...this is definitely about the Console and Bridge part of the Arduino Yun Shield perhaps in combo with the Mega 2560 R3. I was able to get a modified version of the Bridge data logger example code consistently working by stripping out the console and bridge functions. I tested it by checking via FTP and Web browser to confirm that the data logfile was being updated and it was.

That said, there is mention here of some crafty method that is related to the Bridge baud rate

Fortunately, I do not really need Console functionality but it would be nice for debugging.

I'm very intrigued by how you got the Bridge data logger example working while stripping out the Bridge code? Could you please post your updated code?

If you have any successful communications between the sketch and Linux (for example, through FileSytem calls) then I don't think you have a baud rate mismatch like mentioned in that thread you linked.

And just to make sure: besides having the USB reset jumper previously mentioned, you have nothing connected to Shield pins 0 and 1 - they are connected between the Mega and the shield, and nowhere else, correct?