03.08.2013 Views

Design and Implementation of TinyGALS: A Programming Model for ...

Design and Implementation of TinyGALS: A Programming Model for ...

Design and Implementation of TinyGALS: A Programming Model for ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5 Example<br />

The <strong>TinyGALS</strong> programming model <strong>and</strong> code generation tools have been implemented<br />

<strong>for</strong> the Berkeley motes [21], a wireless networked sensor plat<strong>for</strong>m, <strong>and</strong> are compatible<br />

with existing TinyOS v0.6.1 components [5]. In this section, we give an example <strong>of</strong> the<br />

redesign <strong>of</strong> a multi-hop ad hoc communication protocol known as the beaconless protocol,<br />

or BLESS.<br />

The specific generation <strong>of</strong> motes, called MICA, that we used in this example has a<br />

4MHz ATMEGA103L microcontroller, 128KB programming memory, 4KB data memory,<br />

5 types <strong>of</strong> sensors, <strong>and</strong> an RF communication component. MICA motes operate <strong>of</strong>f <strong>of</strong> two<br />

AA batteries. BLESS is a single base multi-hop protocol, where a single base station col-<br />

lects in<strong>for</strong>mation from a distributed wireless sensor network. BLESS dynamically builds a<br />

routing tree rooted at the base station. A sensor node finds its parent node in the routing<br />

tree by listening to the network traffic.<br />

1<br />

1<br />

¡ ¢¡¢¡¢ ¡<br />

¡ ¡ ¢¡¢¡¢<br />

¢¡¢¡¢ ¡ ¡<br />

base<br />

(a) All nodes that can hear the<br />

base station label themselves<br />

as one hop from the base.<br />

1<br />

1<br />

2<br />

2<br />

1<br />

1<br />

¡ ¢¡¢¡¢ ¡<br />

¡ ¡ ¢¡¢¡¢<br />

¢¡¢¡¢ ¡ ¡<br />

base<br />

(b) When a one-hop node<br />

sends a message, unlabeled<br />

nodes that overhear this mes-<br />

sage will label themselves as<br />

two-hop nodes.<br />

2<br />

1<br />

1<br />

2<br />

2<br />

1<br />

3<br />

1<br />

¡ ¢¡¢¡¢ ¡<br />

¡ ¡ ¢¡¢¡¢<br />

¢¡¢¡¢ ¡ ¡<br />

base<br />

(c) Three-hop nodes label<br />

themselves.<br />

Figure 19: Illustration <strong>of</strong> the BLESS protocol.<br />

The base station periodically sends a beacon message. Those nodes that directly receive<br />

38<br />

2<br />

1<br />

3<br />

3<br />

1<br />

3

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

Saved successfully!

Ooh no, something went wrong!