A.2 Installation

All of these instructions could also be found in the Makefile under gateway/user directory.

A.2.1 Install a User Tag Mote

Each of the tag has unique coefficients, when it is created at manufacturing time. Please locate the following lines in UserC.nc source code to change coefficients, and these are the default settings used in the demonstration:

 
1  //A(x,y) = a11 * x * y + a10 * x + a01 * y + a00 
2  void A(word_t* x, word_t* u, word_t* res) 
3  a11[0] = 1; 
4  a10[0] = 1; 
5  a01[0] = 1; 
6  a00[0] = 1; 
7  //B(x,y) = b11 * x * y + b10 * x + b01 * y + b00 
8  void B(word_t* x, word_t* u, word_t* res) 
9  b11[0] = 1; 
10  b10[0] = 2; 
11  b01[0] = 1; 
12  b00[0] = 1;

Here is the command needed to compile and install a user program on a TelosB mote.

 
1make telosb install.1000 MSG_SIZE=128

A.2.2 Install a Gateway Mote

After you have locate the source code under gateway director, use the following to compile and install a gateway program on a TelosB mote.

 
1make telosb install.1 MSG_SIZE=128

A.2.3 Install a Base Station program

Here is the command needed to compile and install the base station program on a Java-supported computer.

 
1rm *.class 
2rm BaseMsg.java 
3mig java -target=null -java-classname=BaseMsg Base.h BaseMsg -o BaseMsg.java 
4make telosb