S-MAC Software: Information and Source Code
Introduction
S-MAC is an energy-efficient MAC protocol designed for wireless sensor
networks. The major design goals are energy efficiency,
self-configuration and flexibility to node changes. S-MAC has four
major
components. First, it enables low-duty-cycle operation of nodes in a
multi-hop network. Nodes periodically listen and sleep, and form
virtual clusters based on common sleep schedules. Second, S-MAC adopts
similar contention schemes as the IEEE 802.11 ad hoc mode. Third, S-MAC
avoids overhearing unnecessary traffic to further save energy. Finally,
S-MAC supports efficient transmissions of long messages. For details of
S-MAC design, please look at S-MAC
papers.
We have implemented S-MAC in both TinyOS on the Mote
platform and in ns-2, the network simulator.
S-MAC Implementation in TinyOS
S-MAC implementation in TinyOS provides a different communication stack
than Berkeley stack. It replaces Berkeley stack from the packet layer
and below with a layered architecture. The functions of MAC and
the physical layer (PHY) are cleanly separated. S-MAC only replaces the
communication stack, and does not affect other components in TinyOS
such as timers and senor stacks.
Major features of current S-MAC implementation are listed as follows.
- Nested header structure:
The implementation uses a nested header structure to allows different
components to freely add header fields to a packet and define its own
packet formats.
- Compile-time configurations:
The user can specify the duty cycle of nodes at compile time (from 1%
to fully active mode).
- Reliable unicast:
RTS-CTS-DATA-ACK packet exchange handles collisions and hidden terminal
problems and enables fast error recovery through retransmissions.
- Support long messages:
The implementation supports variable length packets up to 250 bytes at
the physical layer. With the fragmentation support, even longer packets
are supported.
- Link state statistics:
S-MAC collects link state statistics to help upper layers make better
estimation on link quality and wisely use each link.
- Compatibility mode: The
native S-MAC interface is incompatible with Berkeley stack, due to the
limitations of the single TOS_Msg in Berkeley stack. However, S-MAC
provides a compatibility layer that allows applications developed over
Berkeley stack to run over S-MAC without modifications. To have better
performance, the native S-MAC interface needs to be used.
Examples of Energy Consumption.
Several people have measured the energy consumption on Berkeley motes
when S-MAC is used. This example is
done by Mohammad Rahimi
at UCLA Center for Embedded
Networked Sensing (CENS). It measures the timing and energy
consumption of S-MAC on Mica2 motes with an oscilloscope.
S-MAC Implementation in NS-2
S-MAC implementation in ns-2 reflects
S-MAC design described in
S-MAC journal paper. It does not contain some latest features presented
in S-MAC implementation in TinyOS, such as link statistics and the global
schedule algorithm.
Pleaes note that the experiments described in S-MAC papers are based on
S-MAC implementation in TinyOS, not
ns-2.
To get S-MAC implementation in ns-2, go to this page. S-MAC
is in ns-2.26 and later releases. The latest code is in ns-2 CVS.
Please note that an important update to the energy
model is checked in to
ns-2 on June 14, 2005, and you
should use a version later than that date.
For details, please check this page.
Mailing List
We created a mailing list for S-MAC announcement and discussions, called
smac-users.
Everyone who is using S-MAC is encouraged to
subscribe
to the mailing list.
To prevent spam, only subscribers can post to the list, but non-subscribers can
browse the mail
archives.
People
The following people have contributed to S-MAC source code.
Links
MACSS: MAC Protocols Specific
for Sensor Networks
I-LENSE: ISI Laboratory for
Embedded Networked Sensor Experimentation
CENS: Center for Embedded Networked
Sensing
SCADDS Project
Please send comments to Wei Ye.
Last modified on Sept. 27, 2005.