wiki:node-tinyos

Version 6 (modified by fornasiero, 14 years ago) (diff)

--

FIRST DRAFT (poor english!!!)

Sensei Node Cookbook

This document includes instructions how to install and to run the SENSEI's tmotes software.

Table of Contents

  1. Introduction
  2. Installation
    1. Setup TinyOS
    2. Install SENSEI mote software
  3. Usage:

Introduction

SENSEI's telosb node software is an applications that brings IPv6 network connectivity on telosb motes. When programmed with SENSEI software nodes can interact on the network like a COaP compliant webserver. Mote's resources can be reached from the web using a normal browser. Interaction with mote's resources is achieved using normal HTTP requests with GET, PUT and POST methods.

Installation

Setup TinyOS

To install the software on telosb motes need a tinyOS 2.1 working copy see: http://www.tinyos.net for informations on tinyOS installation.

Installation on Ubuntu 10.04

Add the following line to /etc/apt/sources.list

deb http://tinyos.stanford.edu/tinyos/dists/ubuntu lucid main
sudo apt-get update
sudo apt-get install tinyos-2.1.1

than you have to checkout a working copy of tinyos from the project repository:

sudo apt-get install subversion

svn checkout http://non ne ho idea destination_folder

svn checkout https://telecom.dei.unipd.it/tlcrepos/castellani/iot/tos

Set up your .bashrc variables to enable tinyos compilation toolchain: In this example tos is installed in $HOME/tos

export TOSROOT=$HOME/tos
export TOSDIR=$TOSROOT/tos
export CLASSPATH=$TOSROOT/support/sdk/java/tinyos.jar:$TOSROOT/support/sdk/java/
export MAKERULES=$TOSROOT/support/make/Makerules
export PATH=$PATH:/opt/msp430/bin

To use tinyOS's java utilities you need sun java6: enable PARTNER repository: menu->system->administration->Software sources

install java6

sudo apt-get install sun-java6-jdk

# setting sun-java as default java provider
sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/java-6-sun/bin/javac
sudo update-alternatives --set javac /usr/lib/jvm/java-6-sun/bin/java
#
sudo tos-install-jni

Install SENSEI mote software

Than you can checkout the native-island folder on the svn repository: svn checkout https://telecom.dei.unipd.it/tlcrepos/castellani/iot/net

$ svn --username [username]  co https://svn-batch.grid.pub.ro/svn/Sensei-WP5/

[The above command if ask for some security certificate exchange; Accept it [yes]]
[otherwise it prompt for the password for svn access]
Enter your password.

Compile SENSEI gateway

# move to gateway folder
$cd gateway/
$sudo apt-get install g++ libssl-dev libxml2-dev

# Install socket++ library
$ cd gateway/lib/Socket-2.3.7
gateway/lib/Sockets-2.3.7$ make clean
gateway/lib/Sockets-2.3.7$ make 
gateway/lib/Sockets-2.3.7$ sudo make install

Compile SENSEI tinyOS-node

To compile and install the executable you've to move to

native-island/node2 make install.NODE_ADDRESS bsl,NODE_USB_DEVICE

Usage: