Upload a sketch to Arduino directly from Linino

Hi all,

Just a simple question.

I'm accessing my Yún through a remote SSH connection, so that I don't have physical access to it and thus I can't use the Arduino IDE to upload a sketch to the Arduino through a port neither through the WiFi.

Is there any way to make it directly from Linino or is there any port I could redirect (SSH tunnel) to get access to it from my local machine (remote to the Yún) running the IDE?

I hope I have explained clearly the situation.

Thanks a lot in advance.



Hi Francis problem with the IDE is that it has to detect the yun, i.e. your computer must receive a zeroconf UDP packet on port 5353. If you and your yun are on different networks, it may be too difficult to implement

The good news is that you can make everything manually Compile your sketch with the IDE, locate the .hex file and scp it to the yun as /tmp/sketch.hex. SSH into the yun, then run

merge-sketch-with-bootloader.lua /tmp/sketch.hex
run-avrdude /tmp/sketch.hex

Tested and working!

Thanks a lot.

A simple question, after uploading hex to tmp folder on YUN, is it correct to upload it without the bootloader in this way?

run-avrdude /tmp/sketch.hex

(btw…still trying to compile for Atmel/YUN without bootloader to get more K for code)

  • 1. flash bootloader only
  • 2. flash sketch only ( save memory)
  • 3. flash sketch+bootloader


Thanks a lot for pointing me to correct post. ;)