PSFQ [1] is one of the first reliable transport protocols designed specifically
for sensor networks (please refer to the paper in [1] for details about PSFQ).
This is a development version for demonstration purposes only, for researchers
that are interested in studying reliable transport problems in sensor networks.
The code is not ready to be used to support real applications at the current stage.
Many "TODOs" need to be done in order to make the current code capable of supporting
real applications. These "TODOs" are embedded as comments at the proper location
within the code, so it should be straightforward to add those functions in
the near future, which the authors plan to do.
Patches/bug fixes from users of PSFQ are always more than welcome. It is
the authors' intention to develop a general purpose reliable transport layer
for sensor networks in the spirit of open source.
This beta release of PSFQ includes both NesC code for mica/mica2 motes, and
a set of supporting PC tools including a java application that
interprets PSFQ report messages, derives the logical network topology
from the messages and plots the network topology as well as some
PSFQ-specific information of each node within a GUI window (thanks to
Anupama Lath). All the code is included in a single tarball
"psfq.tar.gz".
In this demonstration version, PSFQ supports both broadcast mode and unicast
mode. Different modes are selectable using the psfq PC tool "bs", located under
the directory "psfq/tools". In the menu mode of "bs", a user has the option to
transfer a file to the whole network in broadcast mode (the scope of the
flood can be controlled by setting the TTL value, well, sort of), or to transfer
a file to a specific node in unicast mode, assuming a predefined routing
matrix exists. In the current implementation, the predefined routing matrix is
defined in "lib/StaticRoutesM.nc", representing a 3x3 grid network. The routing
interface in the PSFQ code is clean so it should be easy to hook up different
routing modules for routing purposes in PSFQ unicast mode.
Using the PC tools and current NesC code of PSFQ, a user can transfer any
files to the motes. The only limitation is the file size can not be larger
than 32KB. Again, this is just a matter of implementation choice with regards to memory space; there's
no size limit in the protocol.
As mentioned, this beta release is mainly for demonstration purpose. Therefore
code readability is our first priority as opposed to trying to optimize the
code in terms of program size or memory footprint. Hence, there is a lot
of space for code optimization and users are welcome to contribute their
modifications. Notice that we have included tons of very detailed comments
within the code to help users understand the code and relate the implementation
to PSFQ design, as described in paper [1].
[Installation]
The code has been tested on TinyOS 1.1.0 and 1.1.11, it should be compatible
with any TinyOS version later than TinyOS 1.1.0.
Download the latest psfq tarball from the Armstrong software directory.
Untar the tarball under the directory "apps/" within your TinyOS directory.
You should see a directory named "psfq". Do as follows:
1) cd into "psfq/", you can compile the NesC code for PSFQ, e.g. "make
mica2 install,1 eprb,xxxx". (if you plan to use TOSSIM, enable the TOSSIM
option in the Makefile, then use "make pc")
2) cd into "psfq/tools", type "make" to compile the PC tools. (if
you plan to use TOSSIM, additionally type "make bs-tossim")
3) cd into "psfq/tools/sensortopo", type "make" to compile the java
app. Assuming your TinyOS environment and java class paths have
been setup correctly, the compilation should go smoothly. Otherwise you might
need to play with the java environment setup a bit.
Then you are good to go.
[Running/Testing PSFQ]
The Java GUI included in this beta release is a nice tool to observe the
actual logical topology within the mote networks and to understand the
PSFQ report primitive. We recommend a user to always run the java GUI
when testing PSFQ. Of course, there are also a lot of message
printouts via the 'bs' tool when running PSFQ, which can help the user to understand the
different PSFQ operations.
Below we describe an easy way to get a feel of PSFQ:
1) Program a mote with "TOSBase" and use that mote as the base station that
connects to your PC. Set the node ID to "0" for the base station.
2) Program few motes, preferably, a 3x3 grid network, with PSFQ images. Please
refer to "lib/StaticRoutesM.nc" for the node id assigment if you want to
test the unicast mode of PSFQ. When you turn on those PSFQ motes, you should
see a LED boot up sequence on each mote. The same boot up sequence will be
continuously displayed whenever each mote successfully receive a file through
PSFQ. This is, of course, for demonstrations purpose only as LEDs drain the
battery quickly.
3) Fire up "SerialForwarder", the java application that comes with the TinyOS
release. Both the PSFQ tool and its java sidekick talk through "SerialForwarder"
through the TOSBase node to the network.
4) CD into "psfq/tools/", type "./run-sensortopo" to load PSFQ java tool.
5) Within "psfq/tools/", type "./bs test30 -C -M" to run PSFQ tool. Follow
the run-time instructions to choose some options and to start the PSFQ pump
process. At anytime, press <ctrl-\> to get back to the menu mode.
Under menu mode, choose "i" (interactive mode) then "c" to see and set a
series of PSFQ parameters. Just press <enter> if you want to accept
the default setting (printed in parenthesis).
Enjoy playing with PSFQ.
Authors: Chieh-Yih Wan, Shane B. Eisenman <{wan,shane}@comet.columbia.edu>
(Chieh-Yih has relocated to the west coast and taken a full time job with Intel
Research, so please be patient if you write him an email regarding the code)
[Links to Users]
Please email us if you are using PSFQ in your course or project. We would
like to hear about your experiences and how you are using PSFQ.
NesCT is a programming language translator that uses NesC programming
language as an input and produces C++ classes for OMNeT++, a more
mature alternative to TOSSIM. The primary aim is to provide a new
simulation environment and speed up development. Check Omnet ++
website for features.
2. BriMon: Wireless Sensor Network based Bridge Monitoring
BriMon proposes a solution for the problem of structural monitoring of railway
bridges. The main
challenge is to reliably collect vibration data of a railway bridge,
enabling on-demand analysis of the bridge.
-- updated January 1, 2007
End Nedstat Basic code -->
[References]
[1] Chieh-Yih Wan, Andrew T. Campbell and Lakshman Krishnamurthy, "Pump-Slowly,
Fetch-Quickly (PSFQ): A Reliable Transport Protocol for Sensor Networks"
[PDF],
IEEE Journal on Selected Areas in Communications, Vol. 23, No. 4,
pp. 862-872, April 2005.