TinyOS

1. Install for Windows XP

a) Refer to http://www.tinyos.net/tinyos-1.x/doc/install.html#windows and install;

b) Go to Start->Control Panel->System->Advanced->Environment Variables, and add or edit:

i)   JAVA_HOME as  c:\j2sdk1.4.2_09

ii) CLASSPATH as  c:\j2sdk1.4.2_09\bin;c:\j2sdk1.4.2_09\jre\bin;c:\j2sdk1.4.2_09\jre\lib\ext\comm.jar;c:\j2sdk1.4.2_09\lib

iii) PATH      as c:\j2sdk1.4.2_09\bin\java

c)  In c:\Program Files\cygwin\home\username, add a file .bashrc, the content is:

MAKERULES="$TOSROOT/tinyos-1.x/apps/Makerules"

PATH="$PATH;\cygdrive\c:\j2sdk1.4.2_09\bin\java"CLASSPATH="$CLASSPATH;\c:\j2sdk1.4.2_09\lib\comm.jar"

d) Go to http://www.tinyos.net/tinyos-1.x/doc/tutorial/verifyhw.html  to check whether the install is successful. Before this, add a Makelocal file under c:\Program Files\cygwin\opt\tinyos-1.x\apps\, the content is:

# Makelocal file

# Radio Frequencies: uncomment the line which has the frequency of your mote.

#PFLAGS += -DCC1K_DEF_FREQ=315178000

#PFLAGS += -DCC1K_DEF_FREQ=433002000

# 433MHz Channel 0:

#PFLAGS += -DCC1K_DEF_FREQ=433113000

# 433MHz Channel 2:

#PFLAGS += -DCC1K_DEF_FREQ=433616000

# 433MHz Channel 4:

#PFLAGS += -DCC1K_DEF_FREQ=434108000

# 433MHz Channel 6:

#PFLAGS += -DCC1K_DEF_FREQ=434618000

#PFLAGS += -DCC1K_DEF_FREQ=868918800

#PFLAGS += -DCC1K_DEF_FREQ=915998000

#PFLAGS += -DCC1K_DEF_FREQ=914077000

PFLAGS += -DCC1K_DEF_FREQ=916700000

# Define for your local group in hex (otherwise it is 0x7d).

DEFAULT_LOCAL_GROUP=0x33

# Choose programmer and port. If nothing uncommented, then assumes 

#MIB500.

MIB510=/dev/ttyS0

#Note that I have only one serial interface in my laptop. If there are several of them, the serial port of MIB510 should be changed also.

Note that we may need only either one of step b or c. Besides, if we use batteries, power off motes and programming board when we put the node onto the board. In the last step of check, please power on the remote node, otherwise, it will return a message "Node transmission failure".

กก

กก