From SensorScope Wireless Distributed Sensing System for Environmental Monitoring
Contents |
Description
This is the TinyOS code that we use in our sensing stations. It includes an energy-efficient multi-hop communication stack that we especially developed to meet our requirements, but it may be used as a basis for any other kind of needs. We plan to describe the complete architecture of our communication stack in an upcoming publication, so this page does not contain a lot of information about the design itself.
With the default settings, all motes report their sensing data once every 128s. Note that it takes around 15mn for the network to spawn, because motes wait for a minimal amount of packets received before trusting links to neighbors. Most of the configuration may be changed by editing the file apps/consts.h, which is self-documented.
This code compiles fine against the latest TinyOS version (v2.0.2). Note that some errors may be reported by the compiler with earlier versions (e.g., the LocalTime interface was previously named CounterMilli). It has been successfully tested on:
- TinyNode motes
- Tmote Sky motes
- TelosB motes
Usage
To compile this code, first make sure that the TinyOS environment variables (e.g., TOSROOT) are correctly set. Then go to the apps directory and use the standard command line for your platform, e.g.:
make tmote install.1 mote bsl,/dev/ttyUSB0
Notice the mote keyword stating that you are compiling the code for a mote. If you would like to compile it for a base station, simply use the basestation keyword:
make tmote install.40 basestation bsl,/dev/ttyUSB0
With the current settings, the base station should always have the identifier 40 (MAIN_BS_ID). You must always specify either mote or basestation when compiling the code.
The other keywords are optional and depend on your needs:
- acks: Enable acknowledgments at the MAC layer. When a packet is not acknowledged, the sender tries to send it again.
- multihop: Enable multi-hop routing. By default, only motes directly connected to the base station may report data.
- duty-cycling: Enable the MAC layer to turn on/off the radio to save energy. Currently, the radio is on for 13 seconds and off for 115 seconds (MAC_DUTY_CYCLING_LISTEN_TIME_IN_SEC, MAC_DUTY_CYCLING_CYCLE_LENGTH_IN_SEC). Be aware that the length of the listen state must be large enough with regards to the size of your network.
So if you would like to compile the code with all features enabled, the command line should look like this:
make tmote install.1 mote acks multihop duty-cycling bsl,/dev/ttyUSB0
Make sure to use the same set of features for both the base station and the motes. Also make sure to give a different identifier to all motes.
The leds on the mote are used to indicate what it is currently doing. Here is a description of their usage:
- Led 0: Indicate whether the radio is on.
- Led 1: Toggled when a packet has been received.
- Led 2: Toggled when a packet has been sent.
License
Our code is available under a BSD-like license. The following copyright is included in all files, please respect it.
Copyright (c) 2007, Ecole Polytechnique Fédérale de Lausanne (EPFL),
Audiovisual Communications Laboratory, 1015 Lausanne, Switzerland.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Download
v1.0 (5th October 2007)
| File | Size | MD5 |
|---|---|---|
| sensorscope-network-code-1.0.tar.gz | 40KB | cfa438794afd1cbffb6d89a846482798 |
ChangeLog
v1.0 (5th October 2007)
- First public release