Search

Intel Edison flash arduino via wifi SSH (linux)

Intel Edison flash arduino via wifi SSH (linux)

Hi all

I recently acquired an Intel Edison with Arduino mounting board, along with the Seeedstudio Grove Starter Kit Plus (GEN 2).

I quickly got tired of the quirky way to connect it to your PC (it requires 2 USB leads and a power lead) so I decided to see if I could figure out how to upload to the device over wifi.

You can, and here is how I achieved it:
Steps:
Download and extract the Arduino software for the Edison board

Go to the install location – mine was /home/greg/arduino-1.5.3-Intel.1.0.4

Browse to hardware/arduino/edison/tools/izmir

Open the file clupload_linux.sh for editing

At the top of the file, insert the following:

#!/bin/sh
set -e
HOST=192.168.0.16 # CHANGE THIS TO YOUR DEVICE'S IP
SKETCH=/sketch/sketch.elf
OLD_SKETCH=${SKETCH}.old
ssh [email protected]$HOST "mv -f $SKETCH $OLD_SKETCH"
scp $2 [email protected]$HOST:$SKETCH
ssh [email protected]$HOST "chmod +x $SKETCH; killall -q -USR1 launcher.sh || true; killall -q clloader || true; killall -q sketch.elf || true; $SKETCH /dev/pts/0 > /dev/null 2>&1 &"
echo "Success"
exit 0

Create a passwordless login to the Edison:
In a terminal on your computer type in the following:

ssh-keygen -t rsa
At the prompts, press Enter to accept the defaults
When you get back to the prompt, type in:

a="$(cat .ssh/id_rsa.pub)"; ssh [email protected] "mkdir -p ~/.ssh; echo $a >> ~/.ssh/authorized_keys"
when prompted type in the Edison’s root password (for the last time!)

You can now log into the edison just by typing in ssh [email protected]

From this point onwards you can flash the Edison via wifi.

If you wish to see serial output you would still need to plug in a USB lead (at least until I can figure that part out too :P)

Don’t miss my next Edison post where I describe how to install an ipk file on ubilinux.

Related posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.