15.11.2012 Views

Poster Abstract: An Open-Source IEEE 802.15.4 ... - TKN - TU Berlin

Poster Abstract: An Open-Source IEEE 802.15.4 ... - TKN - TU Berlin

Poster Abstract: An Open-Source IEEE 802.15.4 ... - TKN - TU Berlin

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Poster</strong> <strong>Abstract</strong>: <strong>An</strong> <strong>Open</strong>-<strong>Source</strong> <strong>IEEE</strong> <strong>802.15.4</strong><br />

MAC Implementation for TinyOS 2.1<br />

Jan-Hinrich Hauer ∗ , Roberta Daidone † , Ricardo Severino ‡ , Jasper Büsch ∗ , Marco Tiloca † and Stefano Tennina ‡<br />

∗ Telecommunication Networks Group<br />

Technische Universität <strong>Berlin</strong><br />

Germany<br />

† Department of Information Engineering<br />

University of Pisa<br />

Italy<br />

‡ CISTER Research Unit<br />

Polytechnic Institute of Porto (ISEP-IPP)<br />

Portugal<br />

Email: {hauer, buesch}@tkn.tu-berlin.de, {roberta.daidone, marco.tiloca}@iet.unipi.it, {rars, sota}@isep.ipp.pt<br />

<strong>Abstract</strong>—The <strong>IEEE</strong> <strong>802.15.4</strong> standard has been attracting<br />

strong interest, but in the academic community so far very little<br />

research related to the <strong>IEEE</strong> <strong>802.15.4</strong> MAC has been evaluated<br />

experimentally, with real hardware under realistic conditions.<br />

This is mainly due to the fact that a stable, open-source<br />

<strong>IEEE</strong> <strong>802.15.4</strong> MAC implementation has been unavailable for a<br />

long time. Vendor-specific implementations are often proprietary,<br />

cover the standard only partially or are customized to a specific<br />

platform. Our work aims at closing this gap: we present our<br />

open-source, platform-independent <strong>IEEE</strong> <strong>802.15.4</strong>-2006 MAC<br />

implementation, which has been published as a part of the 2.1<br />

release of the TinyOS operating system.<br />

I. INTRODUCTION<br />

The <strong>IEEE</strong> <strong>802.15.4</strong> standard [1] covers the physical layer<br />

(PHY) and the medium access control sublayer (MAC) in<br />

the ISO-OSI layered network model. The goal is to enable<br />

wireless connectivity between “ultra-low complexity, ultralow<br />

cost, ultra-low power consumption, and low data rate”<br />

devices in wireless personal area networks (WPAN). Since<br />

its first ratification in 2003 the standard has quickly been<br />

adopted by several other wireless communication standards,<br />

such as ZigBee, IETF 6LowPAN and WirelessHART. Yet, in<br />

contrast to the many analytical and simulation studies of the<br />

<strong>802.15.4</strong> MAC so far very little research related to the <strong>802.15.4</strong><br />

MAC (and protocols on top/using it) has been evaluated<br />

experimentally, with real hardware under realistic conditions.<br />

While the first steps in wireless protocol design can often be<br />

made with the help of analytical and simulation models, the<br />

last steps, however, require the use of real hardware, in realistic<br />

environmental conditions and experimental setups.<br />

The lack of empirical investigations is mostly due to the fact<br />

that available open-source <strong>802.15.4</strong> MAC implementations<br />

(e.g. [2]) have limitations and/or stability problems and<br />

most commercial implementations are proprietary, cover the<br />

standard only partially or are customized to the vendorspecific<br />

platforms. To close this gap, we have implemented<br />

an open-source platform-independent <strong>IEEE</strong> <strong>802.15.4</strong>-2006<br />

MAC implementation and published the core as part of the<br />

2.1 release of the TinyOS operating system [6]. Our design<br />

is based on three goals:<br />

Fig. 1. <strong>IEEE</strong> <strong>802.15.4</strong> superframe structure (source: [1])<br />

• Platform Independence: the MAC is decoupled from<br />

a particular mote platform and can be used on any<br />

platform that provides a compatible TinyOS 2 execution<br />

environment, namely, timers that satisfy the precision and<br />

accuracy requirements specified in the standard and a<br />

suitable radio chip (PHY) abstraction.<br />

• Modularity: existing implementations of the <strong>802.15.4</strong><br />

MAC/PHY can result in code sizes of up to 37.3 kB [3].<br />

Given that a typical mote platform may have 48 kB of<br />

program memory and 10 kB of RAM, the implementation<br />

should follow a modular design that allows to select<br />

only the subset of the MAC functionality required by the<br />

particular application. We achieve modularity by mapping<br />

the MAC services to a set of software components and<br />

allow the user to select a suitable subset at compile time.<br />

• Extensibility: To support the research community in<br />

evaluating MAC extensions and facilitate the transition to<br />

a future MAC revision our design is kept extensible: the<br />

component-based design in conjunction with an advanced<br />

radio arbitration mechanism allows flexible integration<br />

of new components and/or modification of the MAC<br />

superframe structure.<br />

In the following we will provide a brief summary of the<br />

main <strong>802.15.4</strong> MAC functions and detail the status of our<br />

implementation, which consists of a core and the (optional)<br />

GTS and security services. For more details on the core<br />

implementation please refer also to [4].


DataP<br />

Promiscuous-<br />

ModeP<br />

ScanP<br />

MCPS-SAP MLME-SAP<br />

Beacon-<br />

TransmitP<br />

PollP IndirectTxP<br />

Beacon-<br />

SynchronizeP<br />

Resource<br />

Radio[Tx/Rx/Off]<br />

RadioControlP<br />

Radio Driver / PHY<br />

[Dis]AssociateP<br />

FrameTx<br />

FrameRx<br />

DispatchQueueP<br />

Dispatch[Un]-<br />

SlottedCsmaP<br />

RadioTx RadioRx RadioOff EnergyDetection<br />

Fig. 2. Architecture Overview<br />

PibP<br />

II. THE <strong>IEEE</strong> <strong>802.15.4</strong> MAC<br />

Coord/<br />

DeviceCfpP<br />

SimpleTransfer-<br />

ArbiterP<br />

Coord-<br />

RealignmentP<br />

Coord-<br />

BroadcastP<br />

RxEnableP<br />

Alarm & Timer<br />

Symbol Clock<br />

The MAC sublayer supports different configurations and<br />

operating modes. One commonality is that every network has<br />

exactly one PAN coordinator, which is the primary controller<br />

responsible for PAN identifier and device address assignment<br />

and device synchronization. <strong>802.15.4</strong> PANs can either<br />

be nonbeacon-enabled or beacon-enabled. In a nonbeaconenabled<br />

PAN frames are transmitted according to an unslotted<br />

CSMA-CA algorithm (nonpersistent CSMA): if the channel is<br />

detected idle the transmission can start immediately otherwise<br />

the device defers the transmission for a random time period<br />

uniformly drawn from an exponentially increasing backoff<br />

interval.<br />

In beacon-enabled mode coordinators periodically transmit<br />

beacons which mark the beginning of a superframe as depicted<br />

in Figure 1. A beacon carries information about pending data<br />

and the current network configuration. Immediately after the<br />

beacon follows the contention access period (CAP). During the<br />

CAP devices use a slotted variant of the CSMA-CA algorithm:<br />

a device must sense an idle channel twice before it may<br />

transmit and both, channel sensing and transmission must be<br />

performed on backoff slot boundaries. The CAP is followed by<br />

an optional contention-free period (CFP), which is portioned<br />

in so-called guaranteed time slots (GTS). GTSs are allocated<br />

dynamically and the corresponding time interval can be used<br />

exclusively to transmit packets in a contention-free fashion.<br />

The CFP is followed by an optional inactive period in which<br />

all nodes can sleep to preserve energy and achieve low duty<br />

cycles.<br />

III. ARCHITEC<strong>TU</strong>RE & CODE STA<strong>TU</strong>S<br />

Our architecture covers a platform independent <strong>802.15.4</strong><br />

MAC implementation and defines the interfaces towards the<br />

layer below (PHY / radio driver) and above (to the network<br />

layer). Fig. 2 shows an overview of our implementation, its<br />

main components and the interfaces that are used to exchange<br />

MAC frames between them. For the purpose of explanation the<br />

architecture can be subdivided into three sublayers: the components<br />

on the top level (white boxes) implement several MAC<br />

data and management services, for example, PAN association<br />

or requesting (polling) data from a coordinator. These services<br />

typically utilize data and command frame transmission and<br />

reception and are connected to a component that prepares<br />

the channel access according to the (un)slotted CSMA-CA<br />

algorithm (Dispatch[Un]SlottedCsmaP). Most of the<br />

components on the second level (light gray boxes) are responsible<br />

for the other portions of a superframe in beacon-enabled<br />

mode, e.g. beacon transmission and tracking. The third level<br />

(dark gray boxes) manages the access to the radio driver: it<br />

controls which of the components is allowed to access the<br />

radio at what point in time based on an extended TinyOS 2<br />

resource arbiter. The design and implementation of the radio<br />

driver (PHY) is platform/chip specific and thus not part of the<br />

architecture.<br />

Our MAC implementation includes almost the entire functionality<br />

described in the <strong>802.15.4</strong>-2006 specification including<br />

the optional GTS and security services. It consists of 26<br />

core components with a total of approx. 8000 “Physical <strong>Source</strong><br />

Lines Of Code” [5]. It is available online [6] as part of the<br />

TinyOS 2 core.<br />

The implementation is currently available for the TelosB<br />

and micaZ platform. However, it can be ported to other<br />

platforms with little effort: a new platform must only (1)<br />

include a radio driver that provides the interfaces required by<br />

our MAC implementation; (2) provide TinyOS Alarm and<br />

Timer interfaces with a precision of a <strong>802.15.4</strong> symbol (62.5<br />

kHz for the 2.4 GHz band) and an accuracy of ±40 ppm; and<br />

(3) provide a TinyOS configuration component that connects<br />

(“wires”) our platform independent MAC implementation to<br />

the platform specific timer subsystem and radio driver.<br />

ACKNOWLEDGMENT<br />

This work has been partially supported by the EC under<br />

contract FP7-2007-IST-2-224053 (CONET project)<br />

REFERENCES<br />

[1] LAN/MAN Standards Committee of the <strong>IEEE</strong> Computer Society, <strong>IEEE</strong><br />

Standard for Information technology – Part 15.4: Wireless Medium Access<br />

Control (MAC) and Physical Layer (PHY) Specifications for Low Rate<br />

Wireless Personal Area Networks (LR-WPANs), Sep. 2006.<br />

[2] A. Cunha, A. Koubaa, R. Severino, and M. Alves, “<strong>Open</strong>-ZB: an opensource<br />

implementation of the <strong>IEEE</strong> <strong>802.15.4</strong>/ZigBee protocol stack on<br />

TinyOS,” in Mobile Adhoc and Sensor Systems, 2007. MASS 2007. <strong>IEEE</strong><br />

Internatonal Conference on, Oct. 2007, pp. 1–12.<br />

[3] Freescale, “<strong>802.15.4</strong> MAC PHY Software Reference Manual,”<br />

http://www.freescale.com/files/rf if/doc/ref manual/802154MPSRM.pdf.<br />

[4] J.-H. Hauer, “<strong>TKN</strong>15.4: <strong>An</strong> <strong>IEEE</strong> <strong>802.15.4</strong> MAC Implementation for<br />

TinyOS 2,” Telecommunication Networks Group, Technical University<br />

<strong>Berlin</strong>, <strong>TKN</strong> Technical Report Series <strong>TKN</strong>-08-003, Mar. 2009.<br />

[5] R. Park, “Software size measurement: A framework for counting source<br />

statements,” Carnegie Mellon University, Tech. Rep., Sep 1992.<br />

[6] J.-H. Hauer, R. Daidone, R. Severino, J. Büsch, M. Tiloca,<br />

and S. Tennina, “<strong>Source</strong> code of the <strong>IEEE</strong> <strong>802.15.4</strong><br />

MAC Implementation,” http://code.google.com/p/tinyosmain/source/browse/trunk/tos/lib/mac/tkn154/.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!