Preparing to install
The following steps were only tested on Ubuntu 6.06 Desktop edition. I highly recommend you Ubuntu 6.06 Desktop edition for trouble free installation.
Create a directory
$HOME mkdir cvs cd cvs mkdir downloads
Download Tinyos and EmStar
EmStar
cvs -d :pserver:anoncvs@cvs.cens.ucla.edu:/home/cvs/cvsroot login password: anoncvs cvs -z9 -d :pserver:anoncvs@cvs.cens.ucla.edu:/home/cvs/cvsroot co emstar
TinyOS
cvs -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos login cvs -z3 -d:pserver:anonymous@tinyos.cvs.sourceforge.net:/cvsroot/tinyos co tinyos-1.x
Java
cd download sudo apt-get install elinks //As a command-line-based web browser elinks https://sdlc2e.sun.com/ECom/EComActionServlet;jsessionid=8867539F24FD894F2CBE4DC72225B70D
or
https://sdlc2e.sun.com/ECom/EComActionServlet;jsessionid=8867539F24FD894F2CBE4DC72225B70D //using firefox
Accept license agreement and under “Linux Platform”
choose “Download Now! self-extracting file”
If you used firefox save to ~/cvs/downloads
chmod 755 j2sdk-1_4_2_14-linux-i586.bin ./j2sdk-1_4_2_14-linux-i586.bin
Go to the bottom of the agreement, hit enter
Accept the agreement, type yes
sudo mv j2sdk1.4.2_14/ /opt
Gcc
sudo apt-get install gcc
Libftdi0
sudo apt-get install libftdi0
or
wget ftp://64.50.236.52/.1/ubuntu/pool/universe/libf/libftdi/libftdi0_0.7-1_i386.deb sudo dpkg -i libftdi0_0.7-1_i386.deb
Libgtk
sudo apt-get install libgtk2.0-0 sudo apt-get install libgtk2.0-dev
Libglib
sudo apt-get install libglib2.0-0 sudo apt-get install libglib2.0-dev
Header
sudo apt-get install linux-headers-`uname - a | cut -f 3 -d' '`
Flex
sudo apt-get install flex
Bison
sudo apt-get install bison
Libcgicg
sudo apt-get install libcgicg1 sudo apt-get install libcgicg1-dev
or
wget http://lug.mtu.edu/ubuntu/pool/universe/libc/libcgic/libcgicg1_1.07-3_i386.deb sudo dpkg -i libcgicg1_1.07-3_i386.deb wget http://lug.mtu.edu/ubuntu/pool/universe/libc/libcgic/libcgicg1-dev_1.07-3_i386.deb sudo dpkg -i libcgicg1-dev_1.07-3_i386.deb
[edit] Libcurl
sudo apt-get install libcurl3-dev sudo apt-get install libreadline5-dev
Avr and Nesc
wget http://cvs.cens.ucla.edu/emstar-platforms/avr-3.3-platform.tgz wget http://cvs.cens.ucla.edu/emstar-platforms/nesc-1.1-platform.tgz sudo cp avr-3.3-platform.tgz / sudo cp nesc-1.1-platform.tgz / cd / sudo tar -zxvf avr-3.3-platform.tgz sudo tar -zxvf nesc-1.1-platform.tgz
Now you have avr and nesc in /usr/local/lecs
TinyOS tools
sudo apt-get install automake sudo apt-get install make cd ~/cvs/tinyos-1.x/tos/platform rm -fr emstar ln -s ~/cvs/emstar/mote/emtos emstar cd ~/cvs/tinyos-1.x/tools/make ln -s ~/cvs/emstar/mote/emtos/emstar.target . cd ~/cvs/tinyos-1.x/tools/src/mspgcc sudo ./build-mspgcc install cd /opt/msp430/bin sudo ln -s ~/cvs/tinyos-1.x/tools/src/mspgcc-pybsl/bsl.py ./msp430-bsl sudo ln -s ~/cvs/tinyos-1.x/tools/src/motelist/motelist-linux /usr/local/bin/motelist
Java
cd ~/cvs/downloads/ elinks https://sdlc6b.sun.com/ECom/EComActionServlet;jsessionid=CC4B4333E9C6DBA5490D484345814B49
or
https://sdlc6b.sun.com/ECom/EComActionServlet;jsessionid=CC4B4333E9C6DBA5490D484345814B49 // in firefox
username: rip4rr
password: rupert
If you used firefox, save comm3.0_u1_linux.zip to ~/cvs/downloads
cd ~/cvs/downloads unzip comm3.0_u1_linux.zip sudo cp commapi/jar/comm.jar /opt/j2sdk1.4.2_14/jre/lib/ext/ sudo cp commapi/docs/javax.comm.properties /opt/j2sdk1.4.2_14/jre/lib/ sudo cp commapi/lib/libLinuxSerialParallel* /opt/j2sdk1.4.2_14/jre/lib/i386/ sudo cp ~/cvs/tinyos-1.x/tools/java/jni/libgetenv.so /opt/j2sdk1.4.2_14/jre/lib/i386/
.bashrc
cd $HOME nano .bashrc
Copy the following commands to .bashrc
# NeuroMote/TinyOS stuff # Based on http://www.moteiv.com/community/Tmote_Linux_install # Java export JDKROOT=/opt/j2sdk1.4.2_14 export PATH="$JDKROOT/bin:$PATH" # MSPGCCROOT export MSPGCCROOT=/opt/msp430 export PATH="$MSPGCCROOT/bin:$PATH" # TinyOS export TOSROOT=$HOME/cvs/tinyos-1.x export TOSDIR=$TOSROOT/tos export CLASSPATH="`$TOSROOT/tools/java/javapath`" export MAKERULES=$TOSROOT/tools/make/Makerules # Emstar stuff #export PATH="/usr/local/lecs/nesc-1.1/bin:$PATH" export PATH="/usr/local/lecs/nesc-1.2/bin:$PATH" export PATH="/usr/local/lecs/avr3.3/bin:$PATH"
Nesc
cd ~/cvs/downloads wget http://umn.dl.sourceforge.net/sourceforge/nescc/nesc-1.2.8a.tar.gz tar -zxvf nesc-1.2.8a.tar.gz cd nesc-1.2.8a/ ./configure --prefix=/usr/local/lecs/nesc-1.2 make sudo ln -s /opt/j2sdk1.4.2_14/bin/jar /usr/local/bin/jar
Ncc
cd ~/cvs/tinyos-1.x/tools/src/ncc/ sudo chmod 777 /usr/local/bin ./Bootstrap && ./configure && make && sudo make install sudo chmod 755 /usr/local/bin
Java
cd ~/cvs/tinyos-1.x/tools/java make; make
Header
cd /usr/src sudo ln -s linux-headers-2.6.15-26-386/ linux
EmStar
cd ~/cvs/emstar cd tos-contrib/ wget http://vango.cs.ucla.edu/dist/vango-0.1.tgz tar -zxvf vango-0.1.tgz cd .. // Now back in ~/cvs/emstar rm -fr tinyos-1.x/ ln -s ~/cvs/tinyos-1.x/ .
change: BUILD_EMTOS := 0 to BUILD_EMTOS := 1
nano Make.conf BUILD_EMTOS := 1
Add the following line after timewrap and before emrun
nano BUILD tos-contrib/vango/emstar, // <---- THIS LINE in this position in the file
G++
sudo apt-get install g++ PATH=/usr/local/lecs/nesc-1.1/bin:$PATH; make
Kfusd
cd ~/cvs/emstar) sudo /sbin/insmod obj.i686-linux/fusd/kfusd.ko sudo make install-fusd sudo cp fusd/initscripts/fusdd-debian /etc/init.d/fusdd sudo update-rc.d fusdd start 98 2 5 .
Mote
Create /etc/id
sudo nano /etc/id 1 Ctrl(x)
NOTE: Although the VanGo website says the number can be anything, it MUST be 1. Otherwise you won’t receive any packets
At this point, Restar you system again
NOT CRITICAL FOR VANGO
This is if you want to do other TinyOS stuff(might be useful for debugging)
Add the following lines
sudo nano $JDKROOT/jre/lib/javax.comm.properties serpath0 = /dev/ttyUSB0 serpath1 = /dev/ttyUSB1
VanGo
When you compile AuricleDemo (see VanGo instructions: http://vango.cs.ucla.edu/intro.html)
cd ${EMSTAR_ROOT}/tos-contrib/vango/apps/AuricleDemo/
make install,2 telosb bsl,/dev/ttyUSB1
You will get the following error:
/opt/msp430/msp430/include/stdlib.h:52: syntax error before “asm”
make: *** [exe0] Error 1
Here is the workaround:
Line 52 of /opt/msp430/msp430/include/stdlib.h looks like:
extern void exit(int) __asm__(”__stop_progExec__”) __ATTR_CONST__;
Make lines 52/53 look like (you will be adding a line):
nano /opt/msp430/msp430/include/stdlib.h
extern void exit(int) __ATTR_CONST__;
void exit(int a) __asm__("__stop_progExec__");
enjoy your VanGo :D
