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 newCameraMultiHop and CameraJpegTestSerialMod applications

(May 2011)
How to use newCameraMultiHop and CameraJpegTestSerialMod applications.

  1. Install the CameraJpegTestSerialMod, follow this link for instructions
  2. Download the archive of the newCameraMultiHop here.
  3. Extract the archive in the imote2/apps directory from the tinyos-2.x-contrib directory. This is to avoid compilation errors about missing headers files (or you could just modify the included Makefile for your own purposes).
  4. With a terminal console, enters the extracted directory (should be newCameraMultiHop), then begin with the base node (the one that will be connected to the computer and will acts as the radio gateway)
  5. $ cd baseNode
  6. attach the imote2 that will serve as the radio gateway  to the debugging board
  7. connect the JTAG cable to the debugging board
  8. connect the mini-USB cable to the debugging board
  9. $ make intelmote2 install openocd
  10.  you should see:
    Programming imote2 with binary: build/intelmote2/main.bin.out
    Starting OpenOCD...
    Connecting to OpenOCD...
    Halting device...
    Erasing flash...
    Writing image...
    Resuming device...
    Doing cleanup...
    if openocd hangs at "Starting OpenOCD..." unplug the mini-USB and plug back and
    run again
    $ make intelmote2 install openocd

  11. $ cd ..
  12. Then continue with the imote2 that have the camera
  13. $ cd camNode
  14. attach the imote2 and camera board to the debugging board
  15. connect the JTAG cable to the debugging board
  16. connect the mini-USB cable to the debugging board
  17. $ make intelmote2 install openocd
  18. you should see:
    Programming imote2 with binary: build/intelmote2/main.bin.out
    Starting OpenOCD...
    Connecting to OpenOCD...
    Halting device...
    Erasing flash...
    Writing image...
    Resuming device...
    Doing cleanup...
    if openocd hangs at "Starting OpenOCD..." unplug the mini-USB and plug back and
    run again
    $ make intelmote2 install openocd
  19. Then use the java application that has been installed with the CameraJpegTestSerialMod package
  20. $ cd /opt/tinyos-2.x-contrib/intelmote2/apps/cameraJpegTestSerialMod/java
  21. Start the GUI with: "./run X", where X is the identifier of the USB port wich the camera is connected, i.e., if you use /dev/ttyUSB1, type "./run 1". This will automatically start the Java Serial forwarder.
  22. The "ONE SHOT MODE" lets you capture one picture for viewing or for saving. Juste press the "CAPTURE" button to get a picture from the camera. A window will apear where you can see the picture appearing progressively on it. When the picture is completely received, you can save it to a directory of your choice by pressing the "SAVE" button.
  23. The "NON-STOP MODE" will display continuously the pictures captured by the device. A new shot is automaticaly taken when the previous is entirely received. Two windows will apear, one showing you the current picture that is being received, the other showing you the last taken picture. Just press on the "PLAY >>" button to start the capture. You can stop the capture at any time by pressing the "STOP" button.

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.