Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18153

Re: Wirelessly program Edison

$
0
0

I managed to get something working if anyone's interested. It only works on Linux and Mac, someone should be able to do something similar for Windows.


To get this to work, modify the upload script in the Arduino folder. For Mac OS X, the location is: <Arduino Application>/Contents/Resources/Java/hardware/arduino/edison/tools/izmir/clupload_osx.sh


(Make sure to change the $HOST variable below to the IP of your device.)

 

#!/bin/sh

 

set -e

 

HOST=192.168.1.29  # CHANGE THIS TO YOUR DEVICE'S IP

SKETCH=/sketch/sketch.elf

OLD_SKETCH=/sketch/sketch.elf.old

TMP_DIR=/home/root/tmp

TMP_SKETCH=$TMP_DIR/sketch.elf

TMUX=/home/root/bin/tmux

 

ssh root@$HOST "mv -f $SKETCH $OLD_SKETCH"

scp $2 root@$HOST:$SKETCH

ssh root@$HOST "chmod +x $SKETCH"

ssh root@$HOST "killall -q -USR1 launcher.sh || true"

ssh root@$HOST "killall -q clloader || true"

ssh root@$HOST "killall -q sketch.elf || true"

ssh root@$HOST "$SKETCH /dev/pts/0 > /dev/null 2>&1"

 

echo "Success"

 

It's a little hacky, but if you SSH into the device before you upload the sketch, the sketch will output its Serial.print statements to the terminal. It's probably a bug, but it's a happy accident for me.


Viewing all articles
Browse latest Browse all 18153

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>