Snapmac: A Generic Mac/Phy Architecture Enabling Flexible Mac Design
Snapmac: A Generic Mac/Phy Architecture Enabling Flexible Mac Design
Snapmac: A Generic Mac/Phy Architecture Enabling Flexible Mac Design
Abstract
Timing is a key issue in many wireless, lower-layer (e.g., physical and data
link layer) communication protocols. Maintaining time-critical behavior while
increasing MAC protocol complexity is the challenge for many MAC imple-
mentations. To comply with stringent time constraints, current MAC im-
plementations typically require such a tight integration to the radio driver
that they become one monolithic block of code with MAC-specific logic hard
coded at the lowest firmware level. Execution of time-critical functions in
the firmware is a good strategy, but results in limited flexibility for MAC de-
signers because the radio driver is dedicated for specific MAC protocol logic.
We propose “snapMac”: a generic MAC/PHY architecture with a clean sep-
aration between the MAC protocol logic at the user level and the execution
at the radio firmware level. Our generic programming interface enables more
flexibility, an easy way to compose new MAC designs, and getting feedback
from the radio capabilities We demonstrate the feasibility and performance of
this architecture by implementing it on a resource-constrained wireless sensor
node. The experimental evaluation shows, for example, that we can simul-
taneously keep the flexibility of a software ACK and meet the ACK timing
I
Readers are reminded to treat all the data as being strictly CONFIDENTIAL during
the review process. Before publishing this manuscript we first need to file our patent
application.
∗
Corresponding author
∗∗
Principal corresponding author
Email address: Pieter@DeMil.be (Pieter De Mil)
URL: http://ibcn.intec.ugent.be (Pieter De Mil)
1. Introduction
1.1. Situation and Problem Statement
More and more devices are being connected to the Internet (Internet of
Things (IoT) vision [1]), enabling a wide range of applications having vary-
ing requirements. Libelium [2] - a Wireless Sensor Network (WSN) platform
provider - lists more than 50 IoT applications, grouped in different domains
such as Smart Cities, Smart Metering, Security & Emergencies, Retail, Lo-
gistics, Home Automation, etc. Communication is mostly wireless, although
the underlying PHY technology can vary (e.g., IEEE 802.15.4, Bluetooth,
WiFi). The PHY hardware sets the upper bounds on the data rate (e.g.,
250 kbit/s for the 2.4 GHz 802.15.4 PHY) but it are the radio driver and the
Medium Access Control (MAC) layer who play an important role to meet
the dispersed set of application requirements [3].
Because of these diverse applications requirements, lots of MAC proto-
cols [4] were proposed over the last decades. Even in the IEEE 802.15.4-
2006 [5] standard, multiple options are available: beacon-enabled or not,
(un)slotted CSMA-CA or Guaranteed Time Slots. Also in the 802.15.4e [6]
standard multiple MAC techniques (time slotted channel hopping, asyn-
chronous multi-channel adaptation, low latency deterministic networks, etc.)
and frame formats (multi-superframe, slotframe, etc.) are specified to sup-
port a wide range of industrial and commercial applications. As a result, a
MAC designer needs to implement a complex algorithm (with stringent time
constraints) that can execute radio actions in a time accurate manner.
A MAC designer basically wants the freedom to compose any MAC de-
sign, with time-accurate execution and without the need for changing the
radio driver firmware. Conversely, a firmware engineer basically wants to
implement a performant driver, with a generic interface and without the
2
need for making it MAC protocol specific. With snapMac we target both
MAC designers and firmware engineers. In [7], an important requirement of
the future data link layer is given in the definition: “In order for IoT sys-
tems to achieve full interoperability, as well as the support of heterogeneous
technologies (. . . ), this data link layer must allow for diversity.”. Diversity
means being able to design completely new MAC protocols, but also being
able to change the MAC protocol at run-time in order to achieve interoper-
ability with other devices. Ideally, the driver firmware is MAC agnostic and
a generic interface is presented to a MAC designer. This will enable both
reusability and portability.
1.2. Contributions
We have been working on WSN solutions since 2005 and experienced that
we had to design various MAC protocols. In 2012, we published our plural-
isMAC [8] framework. This allows for flexible switching between MAC pro-
tocols (so-called maclets). These maclets use shared functions for controlling
the radio. We have designed the first version of pluralisMAC on top of a tra-
ditional radio driver (TinyOS CC2420 driver). This meant that most of the
MAC functions were tied to the driver, and time-accurate execution was not
possible. In a national project, iMinds and RMoni have designed a new sen-
sor platform (RM-0901 , using the CC2520 radio chip). There was no CC2520
driver available, so we took this opportunity to design it ourselves, keeping
in mind the lessons we had learned. We addressed this challenging problem
by designing snapMac: a generic MAC/PHY framework for flexible MAC
design. Such a framework must allow to achieve the required time accuracy
but with a clean separation between MAC and radio driver, hereby increas-
ing flexibility, adaptability and portability at both levels. To proof this, we
have implemented the proposed architecture on a resource-constrained sen-
sor node and evaluated key metrics like ACK timing, throughput, round trip
time and energy consumption. As such the key contributions of this article
are the following:
1
RM-090 info: http://www.rmoni.com/en/products/hardware/rm090
3
• We show that MAC design is more flexible, easier and more time-
accurate by using our patent pending chain of commands technique.
2. Related Work
In this section, we highlight the bottlenecks on resource-constrained plat-
forms, the related work in the WSN domain, and the related work in non-
WSN domains.
4
Host PC
Processor
User level
Communication
Communication Kernel level bus
RX/TX
bus
Packet
Time Buffer
Reference Control lines
Figure 1: Typical setup of a Network Interface Card (NIC) or sensor node plugged into a
host PC communication bus (e.g., PCI, USB, etc.). The NIC/sensor node typically has a
microcontroller and radio chip interconnected via an on-board communication bus (e.g.,
SPI) and control lines. Unlike a NIC, a sensor node can operate without host PC.
The radio chip of a typical sensor node (or Network Interface Card), de-
picted in Figure 1, is responsible for transmitting or receiving data that is
generated or consumed on the processing unit (processor on host PC, micro-
controller on a stand-alone sensor node). This data needs to be transferred
to the radio unit via a communication bus (e.g., SPI). When multiple pe-
ripherals are connected to a shared communication bus, unpredictable access
timings and/or packet transfer rate are often unavoidable. On the TelosB
(TMote Sky) platform [10], the CC2420 radio chip and the flash storage unit
share the SPI bus with the processing unit. An SPI bus arbiter is needed to
grant access to a specific slave unit. Hence, it might take some time to get
access to the bus when a transfer to/from the flash storage device is active.
The same is valid for the Zolertia Z1 platform [11], while on the waspmote
platform [12] the communication bus is shared with the USB port. As a con-
sequence it is difficult to tightly control the timing of radio actions on such
hardware platforms (although it would be possible if the drivers for all the
peripherals are managed by the same engine). We conclude that the commu-
nication bus between the radio and the processing unit introduces variable,
unpredictable delays and jitter. We advise to use a dedicated communication
bus to improve the time accuracy.
Another bottleneck is the fact that processes are executed sequentially
on the microcontroller. It is unpredictable when exactly (i.e., microsecond
5
precision) processes are executed in a non real-time operating system. User
processes have a lower priority than kernel processes, but even kernel timers
in a Linux-based OS cannot guarantee to execute processes precisely on the
requested time, as the author in [13] states that ”a kernel timer is far from
perfect, as it suffers from jitter and other artifacts induced by hardware inter-
rupts, as well as other timers and other asynchronous tasks”. We conclude
that too many interrupt sources or too long interrupt routines and asyn-
chronous tasks (code reachable from an interrupt handler) may affect the
time accuracy.
2
https://github.com/tinyos/tinyos-main/wiki/Tasklet-design-notes
6
User level User level
Applications Applications
<<Hardware Independent Interface >> <<snapMac Data Plane>> <<snapMac Control Plane>>
Figure 2: Traditional software stack di- Figure 3: snapMac exposes two interfaces
vided between user level and kernel level, (data plane and control plane) to the Full
the latter contains usually a driver with Control MAC in user level. The snapMac
a dedicated Lower MAC (protocol control) engine and snapMac modules in the kernel
and fixed MAC frame formatting. level are MAC agnostic.
radio settings like channel, transmit power, etc. The MAC functionality
builds on top of these interfaces and exposes a Hardware Independent In-
terface towards user space. This layer is therefore also called the Hardware
Independent Layer (HIL).
In TinyOS, the basic HIL that must be provided for every platform is the
ActiveMessageC configuration. This defines the message buffer format to be
used, and has send and receive function calls. A send call is executed as soon
as possible after the moment it is called. This results in an unpredictable
time between the call, and the actual sending of the frame. In addition, the
time accuracy of the call itself has a large spread. We have measured the
delay between the requested transmit time, and the effective transmit time
to be almost uniformly distributed between 10 − 20 ms on a TMote Sky
node running TinyOS. Hence a MAC designer who wants accurate frame
transmission timings (in microseconds range) has to implement this in kernel
space, hereby hampering reusability of the MAC code. Ideally, the basic
(radio) functions are made available to the MAC designer, so that she has
the flexibility to compose new MAC designs without changing the driver.
In standard TinyOS, the actual frame formatting is done inside the driver.
We will show that we can give control on frame formatting to the MAC
7
designer, hereby enabling both flexibility for the MAC designers (no need to
adjust the driver) and portability for driver developers (no need to take into
account specific frame formatting).
In [17], Hauer presents a platform independent IEEE 802.15.4-2006 MAC
implementation (TKN 15.4) for TinyOS. It is stated that in most typical sen-
sor node platforms, “these (ed., timing) requirements can practically not be
met by a platform independent MAC protocol, rather they should be pushed
from the MAC to the PHY, ideally to hardware“. A common approach is to
push time-critical operations from the MAC to the lower level radio control.
In [17], the radio driver includes a part of a specific MAC protocol and ex-
poses those MAC specific services via non-generic interfaces. We will show
that it is possible to create a MAC protocol agnostic driver.
In [18], Steiner et al. analyzed traditional MAC protocols in order to
obtain a generalized C-MAC state machine (some states are optional or can
have different implementations) for three major categories: channel polling,
scheduled contention, and time division multiple access. This C-MAC con-
cept is targeted to these three MAC protocol categories and does not support
fine-grained, time-accurate control on the radio functions (the Round Trip
Time between two nodes is 79 ms). C-MAC makes it possible for easy con-
figuring a MAC protocol that fits in one of the three categories, but it does
not foster the creation of completely new MAC protocols.
In [19], a component-based MAC layer architecture (MLA) for implement-
ing different MAC protocols is presented. MLA uses two types of compo-
nents: “High-level, hardware-independent components (channel poller, LPL
listener, preamble sender, time synchronization, slot handlers, low level dis-
patcher) are aimed at supporting flexibility by allowing different MAC protocol
features to be composed together in a platform independent manner. Low-
level, hardware dependent components (radio power control, channel moni-
tor, cca control, low-cost packet resending, low-latency I/O, alarms) provide
abstract, platform independent interfaces to features otherwise specific to a
particular radio or microprocessor platform. Though the implementation of
these hardware-dependent components is inherently platform specific, they ex-
port interfaces which support the development of fully platform independent
high-level components.”. snapMac does not provide hardware-independent
components or low-level hardware-dependent components. Instead, it pro-
vides the basic commands which enable to create any desired functionality.
For each of the hardware-dependent and -independent components (MLA) it
is possible to create a snapMac command chain. MLA has used a different
8
approach to solve the issues. In MLA, it is not possible for a MAC designer
to know how long it takes to turn on the radio and to plan the execution
time of a command (for example, transmit). For the TDMA MAC protocols,
an async interface is exposed to the MAC designer. This will make the MAC
control faster but not precise. No async interface is exposed to the user level
in snapMac, but we do allow precise control of the (low-level) actions, in user
level.
From the above analysis we can state that system developers try to
achieve the required time accuracy leading to the typical kernel level / user
level separation shown in Figure 2. All time-critical functions (e.g., sending
an ACK) are implemented in kernel space, which basically pushes (tradi-
tionally) the full MAC (or at least the lower-MAC) implementation into the
radio driver as it requires strict timing. In addition, a strong coupling be-
tween the radio driver and the in-kernel MAC is typically needed in these
conventional approaches in order to achieve sufficiently low response times.
The need for low response times - e.g. when an ACK message needs to be
transmitted as a response to a successfully received frame - also results in
the radio driver being frame type dependent. This implies that the reusabil-
ity of both MAC implementation and radio driver is very low, as they are
dependent on the implemented standard (or proprietary protocol) and also
dependent on each other. Due to the large amount of work needed to build
a MAC from scratch for every wireless standard and every new generation of
radio hardware, the complexity and adaptability of current MAC protocols
following such an approach is severely limited.
3
http://www.ettus.com/
9
ceive latency ranges from 1 ms up to 30 ms. Obviously, these high latencies
limit the response time and precise timing control needed in a MAC design
(e.g., the default ACK timeout is 48 µs in 802.11b and 864 µs in the 2.4GHz
802.15.4). In [20], Nychis et al. present a split-functionality approach where
a minimum set of core MAC functions are implemented close to the radio
(e.g., FPGA processing on the hardware), while maintaining control on the
host processing unit through a programming interface. They have concluded
that time-critical radio or MAC functions should not be placed on the host
CPU and that in order to be widely applicable, the control of the flexible
MAC implementation should reside on the host.
A Cognitive Radio is based on SDR technology, and adds knowledge so
that dynamic spectrum access becomes a reality. In this domain, aspects
like adaptability and flexibility are very important. We agree with Ansari
et al. [22] [23] that a MAC protocol implemented in a monolithic fashion
with tight coupling to the underlying hardware restricts these aspects. The
authors propose a decomposable MAC framework by defining a set of MAC
functionalities (blocks) as a library. This way a wide range of protocols can
be realized by combining these MAC blocks through a wiring engine, but
designing completely new protocols is not supported.
In the WLAN (Wi-Fi) domain, Tinnirello et al. [24] have introduced
a programmable wireless platform “Wireless MAC Processors”(WMP) that
supports a MAC defined in terms of a Finite State Machine (FSM). This
FSM consists of transitions between states. These transitions can be trig-
gered by events (e.g., frame received). The transition will be executed if a
certain boolean condition is TRUE (e.g., ACK on). Before completing the
transition to the new state, an action (e.g., transmit ACK) can be performed.
We like the idea of having an “instruction set” (actions, events, conditions)
to compose an FSM that is executed by a MAC protocol agnostic engine.
Unfortunately it is impossible to adapt a MAC protocol (FSM) at run-time,
locally on the NIC. In WMP, an adapted MAC protocol (new FSM) needs to
be recompiled on a remote machine and re-injected on the interface card. We
will show that snapMac offers run-time reconfigurability of any MAC design
without needing a remote machine.
In [25], Djukic et al. present a software TDMA MAC protocol, imple-
mented in Linux user level, running over commodity 802.11 hardware. The
focus is on tight synchronization of pairs of nodes. The 1.5 GHz laptop
runs Linux with real-time extensions, which is necessary for precise software
timers. The user space uses a real-time thread implementation. The authors
10
want to test new standards (802.11s, 802.16 mesh protocol, etc.) and have
chosen for an overlay approach because “it is unlikely that the equipment
implementing these standards can be modified to develop new TDMA pro-
tocols”. In [26], Rao et al. present an overlay MAC layer (OML) solution.
They want to test new protocols without changing the underlying MAC. Re-
placing this existing MAC layer is much harder because it is implemented
“partly in hardware, partly in firmware, and partly in the device driver of the
Network Interface Card”. This tight integration of a MAC with the driver
is one of the reasons why we have made snapMAC MAC-independent. We
can conclude that any overlay MAC is always limited by the interface pro-
vided by the underlying MAC layer (and consequently the PHY driver). A
MAC protocol using snapMAC also runs in user level, but not on top a MAC
specific driver. This way, it is much easier to implement any MAC.
The goals in these non-WSN domains are the same as ours (i.e., flex-
ibility and adaptability), but this often goes together with a reduced per-
formance. We have focussed on flexibility, adaptability, and performance.
Furthermore, our proposed architecture aims to be universally applicable
(portability) thanks to the clean separation between MAC logic and radio
driver.
3. Goals of snapMAC
The move towards a generic, MAC protocol agnostic radio programming
interface fostering the design of any MAC is the major goal of snapMAC.
This radio programming interface (and architecture) should therefore present
a solution to the constraints described in the introduction. In this section
we propose our 5 goals, related to the problems of traditional MAC design.
We have shown that implementing time-critical operations in the MAC
becomes increasingly problematic in user level. Pushing time-critical opera-
tions from the user level MAC to a lower level reduces the implementation
complexity at user level. In traditional MAC design, a part of the MAC
is running in kernel space, which makes debugging harder, and the risk of
creating kernel lockups higher. Hence we would like to design the MAC
logic in user space, with support to control the time-critical operations.
This way the development and debugging are less complicated. Moreover
this also increases the portability as different platforms / operating systems
only have to supply the generic interface and execution environment.
11
A generic radio interface (API) must allow MAC designers to reuse the
same interface across different hardware/software platforms and different ra-
dio chips (PHYs). This goal will enable reusability of MAC implementa-
tions on different platforms. Of course, radio chips for different PHYs may
have divergent features. Being able to add these new features without chang-
ing the interface (API) is a big advantage. A traditional radio interface needs
to be extended with new interface functions any time new features are avail-
able. This is not needed with a generic radio interface because the specific
new command (e.g., for a new feature) is a parameter of that function call.
This way, new commands (features) can be implemented in the driver, and
made available to the MAC designer without changing the API.
We have seen dedicated radio drivers that are quite accurate only because
they are designed and implemented for a specific MAC protocol (traditional
concept). In our concept the radio driver must be MAC protocol and MAC
frame format agnostic. This will advance portability of both the radio
driver and the MAC protocol logic to other platforms.
Some actions require time-critical decisions which cannot be made at the
user space MAC protocol level. For example, checking if the ACK request-
bit is set in a header, copying the sequence number to an ACK frame and
sending that frame within the same deadline as a hardware autoACK. An-
other example is the random back-off interval in the CSMA/CA algorithm.
The user level MAC designer can set the constraints (e.g., minimum and
maximum backoff exponent), but the random value will be determined in
the hardware abstraction architecture. Any time-critical decision that must
be made within 1000 µs should be done in kernel level. The architecture
must support a generic mechanism to allow these time-critical interac-
tions, without requiring MAC-specific radio driver extensions (as is done in
traditional MAC design). Furthermore, it must be possible to implement a
standard compliant MAC.
We also want to provide a flexible research platform for MAC designers.
It must be possible to make per frame settings (channel, transmit power,
use CSMA/CA or not, etc.) and time-accurate, run-time reconfiguration
of any MAC design. With traditional MAC design, this level of flexibility
is impossible. Our framework will speed up the prototyping/development of
enhanced MAC protocols that may exploit new radio chip features. This will
also yield a fair comparison of MAC protocols because the underlying radio
driver is MAC protocol agnostic.
12
4. The snapMAC Architecture
4.1. Overview
Based on the goals proposed in the previous section we have designed
snapMac, a generic MAC/PHY framework for flexible MAC design. A con-
ventional upper MAC, running in user level, cannot reach sufficiently accu-
rate timings (i.e., microseconds precision) and therefore a kernel level lower
MAC with pre-defined protocol logic is usually needed. We think it would
be better if the user level MAC can decide, in advance, when exactly an
action/command (e.g., turn radio on, set channel, listen, check a bit in a
frame, etc.) must be executed, without being constrained by the kernel level
driver.
The user level MAC on top of snapMac, shown in Figure 4, uses two
interfaces: snapMacDataPlane and snapMacControlPlane. The snapMac-
DataPlane interface, exposed by the kernel level Data Plane Toolbox, is
used for sending and receiving frames. The snapMacControlPlane interface,
exposed by the kernel level snapEngine, is used for posting the user-defined
MAC protocol logic to snapMac.
Through this Control Plane interface, one or more time-annoted chains
(e.g., chain T ) can be posted. A chain is composed of commands and is used
to describe MAC protocol logic. Most of the commands are implemented
in snapMac modules. A module can be a general toolbox (e.g., data plane
and arithmetic) or a hardware abstraction for a specific chip (e.g., antenna
switcher A HAL, radio B HAL). Each module exposes the Command inter-
face to the snapMac Engine. Based on the timestamps associated with each
posted chain, the scheduler will sort the chains. Via the dispatcher, each
command is executed just in time by the suitable module.
13
Applications
Transport, Routing, etc. Queue
time
Full Control MAC
User level snapMacDataPlane snapMacControlPlane
Chain T
Kernel level R R A D D E @tT
buffers M
Data
Plane scheduler Engine
s Points to the current command Command
RxTo Toolbox
n RxS time
Command Chain R
TxS
a D D R E A A E @tR
Buffer- M WTRG
p
transaction GOTO
M dispatcher STOP
a State=RX
Radio Command Command
Command
c B
Sleep Antenna
Rx HAL Switcher
time A Arithmetic
SW_1 HAL Toolbox
WAIT
SpiSequencer- SW_2
ADD
lite GPIO
1 legend
Hardware
Antenna functions
Radio Chip RF
Switch 2 chip lib mod.
B interface
A
Figure 4: Our snapMAC architecture. The Full Control MAC (in user level) uses two
generic interfaces: snapMacDataPlane for the data flow and snapMacControlPlane for
the MAC protocol logic. Our “chain” technique is used to describe the MAC protocol
logic. snapMac (one engine and n modules) is responsible for time-accurate execution of
the user-defined protocol logic.
14
used this for the implementation of the “Transmit frame” (Tx ) command.
After a transmission the radio (e.g., Radio B = CC2520) will return to the
stable state RX automatically, that is why we do not have a stable state TX
in the Radio B HAL module. Before we can transmit a frame, we must check
if the radio is in stable state ON or RX. Next, three more steps are required:
switch the radio to tx (rx-tx turnarond), transmit the frame (tx), and switch
back to rx (tx-rx turnaround). We will use subcommands for these steps.
Such a sequence of one command followed by n subcommands is a subchain.
The user level MAC designer can not call individual subcommands. It will
be done automatically. A subcommand may start and end with a transient
state, as long as the start and the end of the subchain have stable states.
This is shown in Figure 5.
Chain: x command y z
Figure 5: A command always starts from a stable state and ends in a stable state. A
command y may have subcommands. In this case, the subchain starts with the command
y, followed by n subcommands. A transient state is a temporary state, mostly until the
execution of a short hardware-related action (e.g., rx-tx turnaround) has finished.
Each module will expose the narrow waist Command interface (see Listing
1) to the snapEngine. The estimateTime2FinalizeCommand function returns
how long it will take to finalize (execution and optional transition) a specific
command taken into account the parameter(s) of the command, based on
a configurable lookup table that contains the timings. The executeCom-
mand function will actually execute the command that is requested by the
snapEngine. A module can also throw a commandEvent to the snapEngine
if an event occurs. The getCurrentState function will return the current state
of the snapMac module (if applicable).
15
1 command TimeStampT e s t i m a t e T i m e 2 F i n a l i z e C o m m a n d ( CommandT
commandId , ParamT param , StateT blockingState ) ;
2
Every module will have its own library of commands, but the narrow
waist Command interface is reused for every module. Next, we will give
more details on our two classes of modules: hardware abstraction modules
and toolbox modules.
16
The capabilities (maximum frame length, number of supported channels,
configurable transmit power, etc.) of the underlying radio hardware are
available in the header file of each Radio HAL module. It is the responsibility
of the MAC designer to check the capabilities of the radio chip when an
existing chain is reused.
The postTxFrame function will enable the user level MAC to post mul-
tiple frames (depends on the configurable buffer capacity) that need to be
transmitted. Posting a Tx frame in the Date Plane Toolbox buffers can be
done at any time. It is the MAC logic that will decide when a frame can
17
be transmitted. At that time, a command implemented in the radio HAL
module will get the next frame from the Data Plane Toolbox. The buffer-
Transaction interface, exposed by the Radio B HAL module (see Figure 4),
will be used for exchanging frames between the Data Plane Toolbox and the
Radio HAL module. The txLoadFrameDone event will be signalled to the
user level MAC when the TxSignal (TxS) command is executed in the Data
Plane toolbox.
Similarly, we have functions and events for the receiving part. The
postDataBuffer function will enable the user level MAC to give the Data
Plane Toolbox a buffer where it can store the received data. The completed-
DataBuffer event will be signalled to the user level MAC when the RxSignal
(RxS) command is executed. If there is no buffer capacity left in the Data
Plane Toolbox, the droppedDataBuffer event will be signalled to the user
level MAC for every frame retrieved by the radio HAL module.
The snapMacDataPlane interface makes it possible for a user level MAC
designer to use a user level message queue and post pointers to queue entries
to the Data Plane Toolbox. This mechanism makes it possible to quickly
integrate the snapMac solution with existing wireless stacks.
4
This is how we have mapped our 32000 Hz crystal : 32000 Hz times 500 is 16 MHz;
16 MHz divided by 16 is 1 MHz, 1 tick every microsecond
18
ticks which is 16 times smaller than the 2.4 GHz 802.15.4 symbol time. This
will allow us to define and execute the MAC protocol logic very accurately.
19
at the cost of having a (slightly) less energy-efficient solution. If too many
external interrupts are expected (e.g., sample the ADC with 100 ksps), we
advise to use a separate application processor.
Our chain concept is an alternative for a Finite State Machine. We believe
it gives more flexibility to a MAC designer, thanks to the ability to compose,
reload or adapt chains at run-time. It also gives the opportunity to accurately
plan the execution of commands.
• Skip on condition (S): this type will be used for commands that are
verifying a condition (e.g., check if a bit is set or not). If the condition
is not true, the next command in the chain will be executed. If the
condition is true, we will skip the next command in the chain and
continue the execution of the chain.
• Skip on event (T ): this type will be used for commands that are waiting
on a event (i.e., trigger), during a user-defined duration (timer). If the
timer expires (i.e., the event did not occur) the next command will be
executed. If the event occurs before the timer expires, we will skip the
next command and continue the execution of the chain.
The snapEngine owns four special commands: GOTO, JUMP, WTRG (Wait
Trigger) and STOP. The GOTO command makes it possible to go to another
command (designated by an absolute value) in the chain. We typically have
a type S or type T command before a GOTO command, because this allows
us to take an alternative path in the chain. The JUMP command allows to
20
jump to another command (designated by a relative offset) in the chain. The
WTRG command waits for an event (i.e., trigger) from a module. Other
commands must be used to check which event it was (e.g., frame that needs
to be transmitted, frame received). The STOP command needs to be placed
at the end of every chain. With this command, we can reload the chain
automatically, keep the chain in memory for future use or destroy the chain.
If a STOP is executed, it will sequentially signal all the events (rx frames,
cmd reports, etc.) to the user level to minimize the interference from the
upper layers during execution of a chain.
In Table 1, we have listed the data plane toolbox commands. For example,
the RxFM command will check if a 16-bit field at a given offset in a received
frame matches with a given reference (ref ). A 16-bit mask can be applied
to that 16-bit field in order to know if a certain bit is set or not. If it is set
(i.e., condition is true), the next command in the chain will be skipped. This
generic command is very powerful. We have used it, for example, to check if
the ACK request bit is set in a received frame.
In Table 2, we have listed the CC2520 Radio HAL commands. For ex-
ample, the AutoAck command will configure the radio to send hardware
acknowledgments or not. This can command can only be executed if the
start state is ST NO-LPM2 (not in low power mode 2).
21
Table 1: The commands of the Data Plane Toolbox. For
each command the type, the parameters and a short de-
scription is given. (continued)
22
Table 1: The commands of the Data Plane Toolbox. For
each command the type, the parameters and a short de-
scription is given. (continued)
23
Table 2: The commands of the CC2520 Radio HAL mod-
ule. For each command the required start state, the sta-
ble end state (if applicable) and a short description is
given. All commands are type C, expections are indi-
cated. (continued)
24
Table 2: The commands of the CC2520 Radio HAL mod-
ule. For each command the required start state, the sta-
ble end state (if applicable) and a short description is
given. All commands are type C, expections are indi-
cated. (continued)
25
1 command error_t postCommand ( ChainT chainId , SlaveT slaveId ,
CommandT cmdId , ParamT param , StateT blockingState , bool
eventOnExcec ) ;
2
3 command error_t executeAt ( ChaintT chainId , TimestampT valid ,
StateT referenceState ) ;
4
5 command error_t executeNow ( ChainT chainId ) ;
6
A user level MAC designer has to choose a unique chain identifier, and
post all the commands and associated parameters for this chain one by one
using the postCommand function. Each command in a chain needs a unique
index number (the slaveId). The master command is designated with slaveId
zero. All the commands before the master command are called negative
slaves, all the commands after the master command are called positive slaves.
The slaveId can be used if the user level MAC designer wants to use the
GOTO command.
Posting commands from the user level to the kernel level only happens
when the user wants to test a new MAC protocol or when the user wants to
update the arguments of one or more existing (scheduled) commands.
In case of a new MAC protocol, all the commands must be posted (only
once) before the snapEngine can execute this new chain. This chain is stored
in the snapEngine, so that no further command control traffic between user
level and kernel level is required after posting a complete chain. Posting (a
large number of) commands of a new chain during the execution of an existing
chain does not interrupt the execution of the existing chain. To guarantee
good system functioning, only one chain can be active at any given time.
In case of updating the arguments of one or more commands, the updates
are effective the next time the commands are executed.
26
We already introduced the subchain concept. In Figure 6, the TX com-
mand is a subchain with three subcommands. An extra feature of our system
is that we can start executing the next command before or during the execu-
tion of a (sub)command. When using the postCommand function, the MAC
designer can specify a so-called “blockingState” for a command. When that
is executed and this “blocking state” is reached, we will immediately start
the next command (e.g., this can be used to store the timestamp when we
start a transmission). The only restriction is that the next command must
not change the state of the module that is already executing the previous
command (this may be a subcommand). Conversely, the execution of a com-
mand A is “full blocking” if it is not allowed to start the next command
during the execution of command A (this is the default use). It is like a full
protection that only command A is allowed until it finishes its execution.
Figure 6: We can start the next command in the chain, based on a “blocking state” in
a subchain. In this example, STATE-TXFR was specified as the “blockingState” in the
postCommand function. So, after the first turnaroundtime, the next command is started
in parallel while the current command is transmitting the frame.
Once a chain is completely posted, it can be started in two ways. The ex-
ecuteAt function lets the MAC designer plan, at run-time, the time-accurate
execution of a chain’s master command. The user-defined time tM is the
time when the master command (or a subcommand of the master command)
must be valid. For example in Figure 7, it would be the actual “start of
transmission” time that the user level MAC designer wants to specify.
Because “transmit frame” is a subcommand of the TX command, the
MAC designer can associate the suitable reference state to the user-defined
time tM . We can see that tM is associated with the transient reference state
“STATE-TXFR” because the MAC designer wanted to plan the actual start
27
Negative slaves 1 Master command Positive slaves
STATE_ON STATE_RX
Figure 7: Fine-tune the execution time of a command by associating the given time tM
with a (transient) reference state of a subchain.
28
Command Allowed Time type Time Next state Next cmd
state mask [µs]
TX ST ON, Execution 4 ST 2TX 2TX
ST RX
2TX ST 2TX Transition 192 ST TXFR TXFR
TXFR ST TXFR Fixed, 160 ST TXRX TXRX
per byte 32
TXRX ST TXRX Transition 192 ST RX NONE
Table 3: Part of the execution and transition time table, to show the time needed for
transmitting a frame. The time needed for actual transmission of a frame is given per
byte (160 µs for the complete preamble, 32 µs per byte).
29
Figure 8: Schematic view of the IEEE 802.15.4 frame format
Passing the received frame to the user level and creating an ACK there will
lead to high delays (at least 1 ms). Through the usage of frame templates the
user level MAC is able to determine the frame formatting for time-critical
responses.
For example, the MAC designer could choose to disable the CC2520 sup-
port for generating ACK frames automatically. This way it is up to the MAC
designer to decide where to add the ACK request MPDU subfield, and to
generate a software ACK frame. The content of this software ACK frame
template is also defined by the user level MAC designer and is not pre-defined
in the radio driver.
First we will use the RxFM command to check if the ACK request MPDU
subfield is set. Using a mask and a byte offset, the user level MAC designer
can decide which subfield that needs to be checked. Next we need to copy
the sequence number of the received frame to the ACK template. This is
done with the RxFC command. Finally, the template can be loaded in the
transmit buffer with the LoadFr command. No interaction with the user
level MAC is necessary in order to send time-critical responses on incoming
frames. Our MAC/PHY abstraction architecture is agnostic to the message
format used in the user level MAC. This feature allows for maximal flexibility
in frame formats. Radio driver developers also benefit from this approach
as they do not need to bother about frame types, therefore resulting in a
cleaner (and faster) implementation.
4.9. Conclusion
Our architecture differs significantly in several aspects with respect to
current implementations in the WSN domain. The first difference is the
30
snapMAC concept itself: a clean separation between the user level MAC
protocol and the kernel level. In the kernel level, we have a central snapMac
Engine in combination with toolboxes and hardware abstraction modules.
No MAC-specific time-critical functions are present in the kernel. We also
introduced a generic snapMacControlPlane programming interface (between
the MAC control running in user level and the snapMac Engine running in
kernel level). This enables posting of time-annoted command chains that
contain the MAC protocol logic. The last aspect relates to our requirement
that the radio driver must be independent of the frame format in order to
maximize MAC design flexibility. Therefore we brought the frame formatting
to the user level MAC. Combining all of the above results in reusability of
MAC designs in a generic way while guaranteeing the time-critical execution
of any MAC.
31
Frame in TX buffer max. 864 µs
Reload
max. 192 µs
chain
Waiting DATA FRAME 672 µs 352 µs Signal TX
ACK requested
TX for Load
RX frame in data frame ACK req? RX Signal RX
TX buffer Yes ACK
channel 26 Check DSN
ON/TX
Sleep SFD
On from Sleep
RX sleep channel 12 channel 26
Waiting Signal TX
ACK
TX for
RX frame in RX FRAME Signal RX
RX buffer
channel 12
TX
Sleep
Reload
RX
channel 26 channel 26 chain
Check ACK requested? Yes
Copy DSN to ACK template
Load ACK in TX buffer
Tx On Load Tx TxFM
GOTO
Wait ∞ on TX frame FromSleep Frame Transmit (Check if ACK requested in
Slave 16
in queue frame tx frame)
Frame arrived ACK requested (skip next CMD)
in TX queue No ACK requested
RX StartOfFrame GOTO
Switch Channel 12
Receive mode Wait 672 µs Slave 17
RxTo
GOTO RxS RxTxFM GOTO
Wait 192 µs on rec.
Slave 17 Signal received fr. (Check Sequence Number) Slave 17
frame
Frame received Sequence number OK (skip
(skip next) No frame received Wrong sequence
next)
number
TxS STOP
Switch Channel 26 Sleep
Signal transmitted fr. Reload chain after 15 µs
Figure 10: The command chain for the transmitter in this example contains 19 commands.
We have not shown the init command chain (configures the radio to use channel 26 and
not to send hardware ACKs.)
32
chain of 19 commands (Figure 10) will be executed (point of time of master
command is decided by the user level MAC).
The master command (0) will wait infinitely long for a frame to be trans-
mitted (so we do not skip a command once a frame is ready to be transmitted)
Slave 2 will turn on the radio from sleep, slave 3 will load the frame in the
radio, and the next command will start the actual transmission on channel
26. Slave 5 will check if the transmitted frame has requested an ACK. If no
ACK is requested, the transmission is successful and slave 6 will go to slave
16 in order to signal the transmission to the user level MAC. However, if
an ACK is requested, slave 6 will be skipped and we are going to prepare
the reception of an ACK on channel 12 (slave 7 and 8). We have chosen to
wait for the start of a frame with a timeout of 672 µs . If no frame start is
detected before this timeout, command 10 is executed (jump to slave 17).
However, if the start of a frame is detected we will skip slave 10 and wait
192 µs for receiving the ACK frame (slave 11). If a complete frame is re-
ceived, we will signal (slave 13) this to the user level MAC. Next, we will
check the sequence number in slave 14. If it is OK, we will skip slave 15 and
signal an acknowledged transmission to the MAC. After setting the channel
to the designated channel of the receiver, we turn the radio in sleep mode
and reload this command chain after 15 µs.
33
captured on node S, and we have verified the accuracy with a spectrum
analyzer.
Oscilloscope
Spectrum Analyzer
Logic Analyzer A
Sniffer Wireshark
B
Figure 11: The experimental set-up. Node A, B and sniffer S are RM-090 boards.
34
Start preparing ACK ACK time (us)
Frame 1075 Legend
length
9B Preamble, SFD,
Length
895
15 B Data frame
732 Preparing
ACK frame
21 B RX/TX
turnaround
732
Software
27 B ACK frame
192 us 352 us
544 us
Figure 12: The ACK frame is prepared after receiving 6 bytes of the data frame. For very
short frames (smaller than 21 bytes) the preparation of the ACK frame is not finished
during the reception of the data frame. For those small packets, the ACK time is a bit
higher.
the computational resources for other tasks severely. For small frames, they
monitored that 0.08 % of their software-generated ACK frames were lost (vs.
0.0 % for hardware ACKs). Using snapMac 0.00% of the software ACKs were
lost during a 1700 sec test (42500 data frames), as illustrated in Figure 14.
The bottom line shows the minimum data length (i.e. ACK frames) and
the top line shows the increasing/decreasing maximum data length in the
WireShark trace file. The extra advantages of software ACKs are the ability
to choose (1) a custom transmit power, (2) a custom channel and (3) a custom
frame format. This allows to create novel protocols with the ability to test
them fast (no driver hacking) and efficiently (e.g., no busy waiting).
6.3. Throughput
We have measured the maximum single-hop throughput by sending max-
imum sized frames, every 4448 µs, originating from the user level MAC from
one node to another. We did not use a backoff scheme and we did not request
an ACK. So, the only delay between frames is the turnaround time from tx
35
Influence of frame length
on software ACK time
1100
1050
1000
950
ACK time (µs)
900
750
700
650
9
15
21
27
33
39
45
51
57
63
69
75
81
87
93
99
105
111
117
123
frame length (byte)
to rx, loading the frame and the turnaround time from rx to tx.
The number of nodes in a network does not impact the kernel level oper-
ation of each individual node. Each individual node has its own engine. This
configuration with two nodes is the ideal stress test for the implementation of
snapMac because with a larger number of nodes the load of each individual
node would be lower. This proofs that the proposed architecture can handle
’heavy’ traffic from one transmitter to a receiver.
The initialization chain contains 5 commands, the main chain contains 7
commands. We ran this test during 8 hours and we measured the throughput
at 10 random moments (using a sniffer and WireShark to count the number
of transmitted frames per second). Sending a maximum sized frame (includ-
ing the preamble) lasts 4256 µs. The maximum measured throughput is 218
frames per second. For each frame, the maximum data payload size is 125
bytes (everything between the length byte and the Frame Check Sequence).
As calculated in Section 2.1 of [31], the theoretical upper bound on the single-
hop throughput Ts is 224.82 kbit/s. We achieved 97% (i.e., 218 frames per
second times 125 bytes (1 kbit/s) payload is 218.0 kbit/s) of this theoretical
upper bound. This is the highest reported throughput. The average time
between frames is 332 µs. The fact that we can achieve such a high through-
36
200 Frame length
(bytes)
100
5B 10000 ACKs 27 B
Figure 14: Reliability of software ACKs with data frame lengths increasing/decreasing
over time. We have sent 25 frames per second during 1700 seconds. The bottom line
shows the length of the captured ACK frames (5 B).
put also means that every single transmission is executed very efficiently.
As such we conclude that the overhead for a single transmission is minimal.
Minimal overhead also leads to minimal wasted energy consumption. With
the standard CC2420 TinyOS driver on a TMoteSky and a Zolertia Z1 mote,
the maximum measured throughput is respectively 66 and 89 frames per sec-
ond. The new CC2420x TinyOS driver is able to transmit respectively 116
and 179 frames per second.
37
Once the chain is executed, it is automatically reloaded. The initialization
chain contains 8 commands, the main chain contains 11 commands.
4.256 ms 4.256 ms
transmit receive
user level Mac
snapMac
RTT=10.328 ms
Node A
radio chip
radio chip
Node B
snapMac Overhead
user level Mac
Figure 15: Round Trip Time measured with Logic Analyzer on node A. Round trip time
(10.328 ms) starts when the frame is passed to snapMAC. Next it is loaded in the radio and
transmitted to node B (4.256 ms), there a new frame is created in the user level of node
B, loaded in the radio and transmitted to node A (4.256 ms), and finally made available
in snapMac for the user level MAC of node A.
As shown in Figure 15, the RTT is 10.328 ms. The overhead introduced
by node A and B together is 1.816 ms. As mentioned in the Related Work
section, in [18] the measured RTT was 60 ms for “No CSMA/CA / ACK”,
79 ms for “CSMA/CA / ACK enabled”, and 62 ms for Meshnetics ZigBeeNet
MAC”. We conclude that the processing overhead introduced by snapMac is
very low.
We have repeated the same test as done in [27]. In Table 4 the theoretical
values of the 802.15.4 BI are compared with the experimental values (for
38
Table 4: Experimental results of the beacon interval accuracy. The average experimental
results are both accurate and precise.
Theoretic Experimental Avg. error Precision
BI Min Avg. Max. Abs. Perc. Std. deviation
BO [ µs] [ µs] [ µs] [ µs] [ µs] [%] [ µs] [ppm]
0 15360 15331 15352 15360 8 0.052 5.4 352
1 30720 30642 30701 30721 19 0.062 12.8 417
2 61440 61342 61418 61442 22 0.036 19.1 311
3 122880 122719 122806 122883 74 0.06 32.1 261
5
Errata Number UCS10, MSP430F5437 Device Erratasheet SLAZ287C Revised Jan-
uary 2013
39
6.6. Energy consumption: sleep - load - transmit - receive ACK - sleep
Here we want to show the energy consumption of a MAC sequence that
is often used in duty-cycled MAC protocols. This energy consumption mea-
surement shows that the commands (sleep - load - transmit - receive ACK
- sleep) are executed just in time and that the chain handles both cases:
receiving an ACK and not receiving an ACK.
DATA ACK
I
4.4mA
t
(a) (c) (e) (g)
(b) (d) (f) (h)
500us
I
DATA
4.4mA
t
(g’)
(f’)
500us
Figure 16: Energy consumption measured on the oscilloscope. In the bottom screenshot,
no ACK is received and we can see that the node waits longer: (f) vs. (f’).
40
tx to rx (e), wait for an ACK (f), inform the user level MAC (g) and go back
to sleep and some serial communication (h). In the bottom screenshot, we
have disabled node B. We can see that node A is waiting for an ACK for
830 µs (f’) and that more energy is consumed when an ACK is not received.
This is because searching for the start of a message is more intensive than
receiving the message.
6
http://www.youtube.com/watch?v=on3fzlzaUjI
41
4) Periodic check if
channel is clear before tranmitting
Node B
Node A
Figure 17: Radio HAL activity (captured with a Logic Analyzer) for node A and node B,
demonstrating the Low Power Listening MAC.
42
The complete snapMac framework (without user-defined chain(s)), in-
cluding TinyOS, a microsecond timer, maximum 40 commands and 10 com-
mands with debug information utilizes 11720 bytes of the ROM and 1616
bytes of the RAM. This is 4.6% of the available ROM and 10.1% of the
available RAM on our RM-090 node.
Now we have analyzed the RAM usage, we will look at the ROM usage.
First we will show the ROM requirements for the different commands:
• The data plane toolbox commands (see Table 1) use 1110 bytes in
ROM.
• The CC2520 Radio HAL commands (see Table 2) use 1734 bytes in
ROM.
The total ROM requirement for all the commands is 3802 bytes. The snap-
Mac framework without any commands and user-defined chain(s), including
TinyOS, a microsecond timer, maximum 0 commands and 0 commands with
debug information utilizes (11720-3802) 7918 bytes of the ROM and 326 bytes
of the RAM. TinyOS without the snapMac framework uses 1048 bytes of the
ROM and 8 bytes of the RAM. We conclude that the overhead of the bare
snapMac framework is 6870 bytes in ROM and 318 bytes in RAM. This is the
code that can be completely reused. The material-independent commands
(snapEngine, arithmetic toolbox and data plane toolbox commands) can also
be reused: this adds 2068 bytes in ROM. In total, 8938 bytes in ROM can
be reused. This is 84% of the snapMac framework. The material-dependent
commands use 16%. This is shown in Fig. 18.
It is easy to disable commands (at compile-time) that are never used
in the user-defined chain(s). This way the total ROM requirement can be
further reduced.
We were not able to compare our framework with a monolithic imple-
mentation (because there is no monolithic implemenation available for our
hardware platform). In TinyOS there is a CC2520 driver, using the tasklet
mechanism, for the SAM platform. According to Eric Decker “the existing
cc2520 driver isn’t very good” and “it is tightly wedded to the sam platform”
43
Material-independent
Bare snapMac commands
framework (2068 Bytes ROM)
(6870 Bytes ROM) 20%
64%
Material-dependent
commands
(1734 Bytes ROM)
16%
Figure 18: snapMac ROM footprint: the material-dependent commands use 16% of the
total snapMac framework.
7
. Other researchers in our research group have ported the “native” contiki
driver to our hardware platform. Next, they will port snapMac to Contiki.
At that time, it will be possible to compare the memory footprint of snapMac
MAC protocols with “native” protocols.
7
http://tinyos-help.10906.n7.nabble.com/BlinkToRadio-on-micaz-using-cc2520-not-
working-td23577.html October 7 2013
44
7. Future work: portability of snapMac
In this section we describe the different options of snapMac regarding the
portability of the framework and the MAC protocols.
7.1. Framework
Supporting new hardware platforms (i.e., another PHY radio chip) only
requires a minimum of changes if the same OS (i.e., TinyOS) is already sup-
ported on the new hardware platform. For example, the Zolertia Z1 hardware
platform supports TinyOS, but has an older radio chip (CC2420). For this
radio chip we need to develop an appropriate radio HAL module in snap-
Mac. The snapEngine and the Toolbox modules remain unchanged. The
material-dependant Hardware Abstraction modules (e.g., Radio HAL, An-
tenna Switcher, etc.) define their own commands and expose their commands
via the unaltered Command interface. The commands listed in Table 2 are
most likely applicable to a new radio chip, with exception of the SwitchChan
command if the radio operates on a single channel. For each of these com-
mands, a specific implementation for the hardware chip is required. If the
hardware chip offers extra (chip specific) functionality, extra commands can
be added to the new Hardware Abstraction module. Our Command interface
is generic, so this interface will remain the same on all the supported hard-
ware platforms. The MAC designer is now able to use these new commands
in its composition of the command chain(s) at user level.
Our CC2520 Radio HAL module has 1020 lines of code, of which 516
lines of code are specific for the CC2520. Supporting the CC2420 radio chip
would require replacing these 516 lines of code with the CC2420 specific
instructions.
Supporting another OS (e.g., Contiki OS) requires a port of the snapMac
framework. If the new OS is written in C, most of the nesC code can be
reused, but one would need to adapt snapMac to the constructs used in the
new OS. Once snapMac is ported to a new OS, the user-defined chains can be
reused. This would allow us to port existing MAC protocols accross different
operating systems. We have not yet completed the port to Contiki OS.
45
Reusing a MAC protocol chain accross different hardware platforms with
a different PHY is also possible, but the MAC designer should check the ca-
pabilities and features of the new PHY. The IEEE 802.15.4 supports different
PHYs (frequency, data rate, modulation). Supporting different frequencies
and data rates (e.g., 868 MHz, 20 kbps) only requires two updates: (1) change
the supported channel list, (2) change the time needed to transmit (this time,
as configure in Table 3, relates to the data rate). In [32] an 802.15.4 based
MAC is adapted on a powerline communication (PLC) non-wireless medium.
This demonstrates the future applicability of our snapMac framework.
8. Conclusions
The major goal of the snapMAC concept is to foster reusability of MACs
on different hardware / software / radio platforms.
We have shown that the snapMac architecture supports any time-accurate
user level Full Control MAC (1) which communicates through a generic ra-
dio interface (2) with a MAC protocol agnostic radio driver (3) that allows
generic time-critical interactions (4) while maintaining maximum flexibility
and freedom for MAC designers (5). The snapMac architecture changes
MAC implementation significantly. First of all, we invented a scheduling
(planning) based technique (time-annotated chains) to describe the MAC
protocol logic. Second, frame formatting is done in user space in contrast
to driver space. Third, a generic MAC protocol agnostic driver can respond
instantly on events. Fourth, we have defined two generic MAC protocol
agnostic interfaces between the MAC and the radio driver.
This architecture has been implemented and evaluated on the RMoni
RM-090 wireless sensor nodes running the TinyOS operating system. We
showed that the ACK time is within the 802.15.4 limit for frames bigger
than 15 bytes. We also showed that we can reach up to 97% of the theoret-
ical throughput. Our implementation enables energy-efficient execution of
duty-cycled MAC designs because we can plan the execution of commands
just in time. Although our implementation is oriented towards WSNs, the
architecture and the interfaces can be used on PCs with any wireless NIC. In
such a scenario the proposed snapMac ’driver’ part is the firmware running
on the NIC, and any MAC can be implemented on the PC’s user level. The
only task of the kernel would then be to enable communication between the
PC’s user level MAC and the NIC firmware.
46
Concluding we can state that the snapMAC architecture increases reusabil-
ity and decreases complexity of MAC implementations as well as the underly-
ing radio drivers. Moreover the architecture enables time-accurate execution
of radio-related actions and instant reaction on time sensitive events in a
generic way.
References
[1] J.-P. Vasseur, A. Dunkels, Interconnecting Smart Objects with IP: The
Next Internet, Morgan Kaufmann Publishers Inc., San Francisco, CA,
USA, 2010.
[6] IEEE Standard for Local and metropolitan area networks–Part 15.4:
Low-Rate Wireless Personal Area Networks (LR-WPANs) Amendment
1: MAC sublayer, Technical Report, 2012.
47
wireless networks, applied to smart containers, EURASIP Journal on
Wireless Communications and Networking 2012 (2012) 166.
[9] C. Bormann, Guidance for light-weight implementations of the internet
protocol suite, 2013.
[10] Tmote sky sensornode, http://www.crew-
project.eu/portal/wilab/sensornode-tmote-sky, 2013.
[11] Zolertia z1 low-power wireless module, http://www.zolertia.com/ti,
2013.
[12] Libelium waspmote, the sensor device for developers,
http://www.libelium.com/products/waspmote, 2013.
[13] Linux device drivers, 3rd edition (chapter 7, section 4),
http://www.makelinux.net/ldd3/chp-7-sect-4, 2013.
[14] Tinyos, open source os for low-power wireless devices,
http://www.tinyos.net/, 2013.
[15] Contiki, open source os for the internet of things, http://www.contiki-
os.org/, 2013.
[16] T. Reusing, Comparison of operating systems tinyos and contiki, Sensor
Nodes–Operation, Network and Application (SN) 7 (2012).
[17] J. Hauer, TKN15.4: An IEEE 802.15.4 MAC Implementation for
TinyOS 2, Technical Report, 2009.
[18] R. Steiner, T. Mück, A. Fröhlich, C-mac: A configurable medium access
control protocol for sensor networks, in: Sensors, 2010 IEEE, pp. 845
–848.
[19] K. Klues, G. Hackmann, O. Chipara, C. Lu, A component-based archi-
tecture for power-efficient media access control in wireless sensor net-
works, 2007.
[20] G. Nychis, T. Hottelier, Z. Yang, S. Seshan, P. Steenkiste, Enabling mac
protocol implementations on software-defined radios, in: Proceedings of
the 6th USENIX symposium on Networked systems design and imple-
mentation, NSDI’09, USENIX Association, Berkeley, CA, USA, 2009,
pp. 91–105.
48
[21] T. Schmid, O. Sekkat, M. B. Srivastava, An experimental study of net-
work performance impact of increased latency in software defined radios,
in: Proceedings of the second ACM international workshop on Wireless
network testbeds, experimental evaluation and characterization, Win-
TECH ’07, ACM, New York, NY, USA, 2007, pp. 59–66.
[22] J. Ansari, X. Zhang, A. Achtzehn, M. Petrova, P. Mahonen, Decompos-
able mac framework for highly flexible and adaptable mac realizations,
in: New Frontiers in Dynamic Spectrum, 2010 IEEE Symposium on, pp.
1 –2.
[23] J. Ansari, X. Zhang, A. Achtzehn, M. Petrova, P. Mahonen, A flexible
mac development framework for cognitive radio systems, in: Wireless
Communications and Networking Conference (WCNC), 2011 IEEE, pp.
156 –161.
[24] I. Tinnirello, G. Bianchi, P. Gallo, D. Garlisi, F. Giuliano, F. Gringoli,
Wireless mac processors: Programming mac protocols on commodity
hardware, in: INFOCOM, 2012 Proceedings IEEE, pp. 1269 –1277.
[25] P. Djukic, P. Mohapatra, Soft-tdmac: A software tdma-based mac over
commodity 802.11 hardware, in: INFOCOM 2009, IEEE, pp. 1836 –
1844.
[26] A. Rao, I. Stoica, An overlay mac layer for 802.11 networks, in: Proceed-
ings of the 3rd international conference on Mobile systems, applications,
and services, MobiSys ’05, ACM, New York, NY, USA, 2005, pp. 135–
148.
[27] A. Hernandez, P. Park, IEEE 802.15.4 Implementation based on
TKN15.4 using TinyOS, Technical Report, 2011.
[28] L. Tytgat, O. Yaron, I. Moerman, P. Demeester, Energy awareness
in self-growing sensor networks, in: Computer Aided Modeling and
Design of Communication Links and Networks (CAMAD), 2012 IEEE
17th International Workshop on, pp. 241–245.
[29] L. Tytgat, O. Yaron, P. I., I. Moerman, P. Demeester, Analysis and ex-
perimental verification of frequency based interference avoidance mech-
anisms in ieee 802.15.4, Submitted to IEEE/ACM Transactions on Net-
working, under re-review as of Jan 23 (2013).
49
[30] W.-B. Pottner, S. Schildt, D. Meyer, L. Wolf, Piggy-backing link quality
measurements to ieee 802.15.4 acknowledgements, in: Mobile Adhoc and
Sensor Systems (MASS), 2011 IEEE 8th International Conference on,
pp. 807 –812.
50