1: Open the/etc/apt/sources.list file and add the installation source at the bottom of the file:
Deb http://tinyos.stanford.edu/tinyos/dists/ubuntu Lucid main
2. Perform the update
sudo apt-get update
3. Install TinyOS and all support Tools
sudo Install tinyos-2.1. 2
4. Setting Environment variables
Since tinyos-2.1.2 below does not tinyos.sh this file, now create a new one.
$ cd/opt/tinyos-2.1. 2 sudo vim tinyos. SH (or edit with Gedit)
Enter the content:
#! /usr/bin/EnvBashexport Tosroot="/opt/tinyos-2.1.2"Export Tosdir="/opt/tinyos-2.1.2/tos"Export CLASSPATH="$CLASSPATH: $TOSROOT/support/sdk/java/tinyos.jar:."Export Makerules="/opt/tinyos-2.1.2/support/make/makerules"Export PATH="/opt/msp430/bin:/opt/jflashmm: $PATH"
Next, edit the. BASHRC so that each time you start bash, the tinyos.sh script above will execute.
$ sudo vim ~/.bashrc (或者使用gedit编辑)
Add the following two lines at the end of the. bashrc file:
/opt/tinyos-2.1. 2/tinyos. SH
Then update the settings for. BASHRC:
$ source ~/.BASHRC
5. Installing JNI and g++
sudo tos-install-sudoinstall g++
6. Turn off all terminals and restart the terminal to make sure that the settings you just made are in effect 7. Perform tos-check-env check whether the installation is complete
$ tos-check-env
There are typically two warning. One is that your Java version is wrong, not 1.4 or 1.5, and the other is that you have a problem with the Graphviz version. This can be ignored.
8. Install the Python-dev package and execute the following command:
sudo Install Python2. 7-dev
9. Test, Blink is an LED flashing application that is now compiled for this application.
sudo chmod 777 /opt/tinyos-2.1. 2/apps//opt/tinyos-2.1. 2/apps/ make Micaz Sim
10. Download the program to the TELOSB node
$ cd/opt/tinyos-2.1. 2/apps/makesudochmod666 /dev/ttyUSB0 make TELOSB Reinstall bsl,/dev/ttyusb0
Precautions:
1. The difference between "install" and "reinstall" is that the former compiles the application for the target platform, designs the node address and downloads the program to the node, while the latter does not have a program compilation process.
TinyOS Installing the tutorials under Linux