Hands on experiments with micaz, MTS310 and MIB520

This post is after the first set of trials with micaz mote. Till now worked only with telosb, which has usb interface and programming in single board including sensors on board.
This experiment is not conducted in avrora or any emulator.

Mote used- Micaz- CC2420 Radio (Zig-Bee compliant) : The range was much better than Telosb. It gave 21metres compared to 8 metres in telosb.
Following image shows Micaz mounted with MTS310 sensor board

Sensor Board- MTS310 ( light, temp, acoustic,acoustic actuator, seismic, magnetometer sensors)

Programming board- MIB520CB USB/JTAG

The first program came to my mind was to make buzzer on. After searching for the platform files, in mts300 board folder (/opt/tinyos-2.1.0/tos/sensorboards) I found Sounder file.
The application I wrote has 2 files BuzzerC and BuzzerP
BuzzerC
configuration BuzzerC {
}
implementation {
components MainC, BuzzerP, LedsC,SounderC ,new TimerMilliC() as MyTimer;;

MainC.Boot <- BuzzerP;
BuzzerP.Mts300Sounder -> SounderC;
BuzzerP.Leds -> LedsC;
BuzzerP.Beep -> MyTimer;
}

BuzzerP
module BuzzerP
{
uses
{
interface Boot;
interface Mts300Sounder;
interface Timer as Beep;
interface Leds;
}
}
implementation
{
uint8_t count=0;
event void Boot.booted()
{
call Beep.startPeriodic(500);

}
event void Beep.fired()
{

count++;

if((count==2))
{
call Leds.led0Toggle();
call Leds.led1Toggle();
call Leds.led2Toggle();
count=0;
call Mts300Sounder.beep(10);
}
}
}

The code is self explanatory....

Following was the error came while compiling
"Programmer is not responding"
This is because MIB520 has 2 usb ports. One used for programming and other for data.
The "motelist" command will not list any mote connected to MIB520. Instead you have to go to system log and check for the two usb ports activated after pluging in the board. Assuming that first one is usb0 and second one is usb1, the syntax for uploading a new program is "make micaz reinstall.2 mib510,/dev/ttyUSB0" where 2 is the node id

Now you can test the "Antitheft" application which worked fine after giving /dev/ttyUSB1:micaz for serialforwarder

Tracking Using RSSI: application in tinyos2.10+ubuntu+java

This small project was done as part of our OpenHouse event during Tech Fest Shaastra2008 atIIT Madras. It's the first application of its kind I have written.
Please read my previous posts to understand basics, if you are not familiar with basic terms

Project : Target tracking using RSSI with TelosB
Types of nodes: Mobile node, Static nodes and base station
Tools: Java serialforwarder and customized extension of listen class
Routing protocol used: Collection
Tracking scenario: 1 Dimensional

The details
Mobile node will send a blank packet with specific interval while moving. The static nodes will catch that signal and measure the RSSI value. It will be transmitted to BaseStation. Base station is the multihoposcilloscope base. The value received by base station node can be read using java serialforwarder and Listen class.
However the Listen class gives only raw information. So the program is modified and customized to get values. RSSI values are scaled to a positive value. Value we have got are between 0 and 89 using telosb motes.
The GUI is having 10 grids with 6 static nodes, but can scale to any number of nodes.

Code can be downloaded from here