www.pudn.com > mantis-0.9.5.rar > README



MANTIS Sample Applications README
-------------------------------------------

MOS now bundles a binary sample application for several platforms
to facilitate quick and easy verification of the system.

Currently, Mica2, MicaZ and Telos Rev. B binaries are provided.
The source for the binaries can be found in src/apps/sample_app.

The sample application provides a multi-hop sensing application,
with one base station. Output from the leaf nodes can be seen on
the base station using a PC.

Each sensing node should run the binary "sample_app_send". The
base station node should run "sample_app_recv".

Instructions
-------------------------------------------

If you are using MOS under a cygwin environment, a copy of the
shell is provided. On other host platforms, you will first need
to build a copy of mos_shell using the normal build process
(./autogen.sh; cd build/linux; ./configure; make; make install)

If you are using a Mica2/MicaZ, the nodes will need the MOS
bootloader installed first. This process requires a programming
board and UISP (binaries of which should be installed via the MOS
toolchain). Simply run the "set_mos" script in the scripts/
scripts directory to load up the bootloader and set the necessary
fuse bits. Please note: if you need to stop using MOS, these fuse
bits will still be set. Run the "set_tos" script to get the fuse
reset for using TinyOS.

To load code:

Mica2/MicaZ: Go into the proper binary directory for this
architecture and run mos_shell -p  to load a
node. You may have to restart the node to begin the code transfer.

Telos Rev B: Go into the proper binary directory for this
architecture and run the following sequence of commands:

bsl.py --telosb -c  -e
bsl.py --telosb -c  -p 

The first command erases and sets the 'password', which is
required before each programming.

Running the Application
------------------------------------------

MOS currently utilizes a user-specified node id. To set the node
id of each node, use the commander, an interactive application
which runs on the node. Load the commander binary as described
above. Then run "mos_shell -n" to interact with the node. "help"
displays a list of the available commands, we are interested in
"set_id" and "get_id" here. "set_id" will prompt for an integer
node id, "get_id" will return the currently set node id. These
are typically initialized to -1, the default state of the
memory this data is stored in.

Once you have set the ids of your nodes, load up a base station
and some sensing nodes. Use "mos_shell -n" to view the output of
the base station, to verify that all sensing nodes are properly
reporting data, and to see the number of hops each sensing node
needs to reach the base station.