Important Requirements

You will need a JTAG cable like the Olimex ARM-USB-TINY and a IIB2400 debug board in order to be able to flash the imote2. This is necessary, as flashing via USB is not yet supported in UNIX (this also applies to Windows and OS X users, since they are going to use a Linux image) .

Installing TinyOS 2.1.0

There are two methods available to install TinyOS in your machine, depending on the Operating system you are using. If you have an UNIX system, you can compile and install the needed software and drivers, or you can use a VMWare image packed with all the software required. If you are using Microsoft Windows or Mac OS X, you will need the VMWare image.

Install a Virtual Machine Image

Instead of installing the software and drivers, you can use an (X)Ubuntu Virtual Machine Image in VMware Player, which contains tinyos-2.x-contrib with all the tools and drivers required to use the imote2 sensor board

Manual installation in ubuntu

Follow the instructions in this page where you can find the scripts to install Tinyos 2.1, openocd and the drivers for Olimex ARM-USB-TINY. Important: if you prefer to install the deb packages (instead of compiling it) for the Cross Compile GCC for XScale, you can download the script here.

Cross Compile GCC for XScale on Ubuntu

This script installs gcc for cross compilation for the Xscale processors, used by the IntelMote2. You must have root privileges to execute this script.

Download here

Installing Openocd (if you choosed the XubuntuOs 2.1 VM)

Follow the intructions on this page.

Compiling, Installing and Using the CameraJpegTestSerial application

by Marcin Szczodrak (Feb 12, 2010)
How to use simple camera application.

When compiling the cameraTestJpegSerial application, you may have the following errors:

    No such file or directory: ov7670.h

To correct this problem you have to edit the /opt/tinyos-2.x-contrib/intelmote2/apps/cameraTestJpegSerial/cameraJpegTestM.nc file, and change line 43 from #include "ov7670.h" to #include "OV7670.h".

    No such file or directory: XbowCam.h

To correct this problem you have to edit the /opt/tinyos-2.x-contrib/intelmote2/tos/sensorboards/xbow_cb/XbowCamM.nc file, and change line 58 from #include "XbowCam.h" to #include "xbowCam.h".

Return to step 6

Compiling, Installing and Using the modified CameraJpegTestSerial application

This is a modified version of the CameraTestJpeg Java GUI that is found in the "imote2/apps/" directory of the tinyos-2.x-contrib branch. This version lets you visualize in real time -although with the serial connexion limitation- what is captured from the camera.

NOTE: the program should succesfully display color pictures (it has been coded -and tested- with color support in mind), but you cannot get color pictures from the camera at the time of writing these instructions, so selecting the "RGB" option will only gives you a grayscale picture -but not the same picture has if you would have chosen the "Grayscale" mode.

NOTE: JPEG option has been totally removed from the GUI interface, since the JPEG compression DOES NOT WORK.

Here is a snapshot of the application that could serve as a video surveillance system.