nodes, we experienced that nodes were not able to transmit any message at all, and
sometimes they crashed. We attributed these malfunctions to the incomplete power-up
phase of the radio (these problems are not visible in the simulated environment).
This problem can be avoided, for example, by introducing a delay between the ac-
tivation of the radio subsystem and its usage. However, this requires the programmer
to know the length of the transition phase of the radio component from the low power
state to the operational state, that can be different on the basis of the hardware platform.
6 Conclusions
Creating software abstractions suitable for sensor networks is challenging since the sen-
sor nodes require software architectures radically different from traditional networking
systems.
As known, the application logic is central for defining an effective strategy for en-
ergy saving. To make these strategies real, applications need the cooperation of the un-
derlying layers, which must expose mechanisms for power management. As described
in [8], the strategies adopted by applications are in many cases based on few and recur-
ring principles, for this reason the underlying layers can offer abstractions that appear
to be general and reusable.
In this paper we have described our experience on developing applications for sen-
sor networks, focusing on the abstractions provided by the TinyOS communication li-
brary. On the basis of the lessons learned we rationalized and re-organized the original
communication library, not only to provide cleaner programming abstractions, but also
to generate more energy efficient code.
References
1. TinyOS: (http://webs.cs.berkeley.edu/tos/)
2. Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., Culler, D.: The nesC language: a
holistic approach to networked embedded systems. SIGPLAN Not. 38 (2003) 1–11
3. Moteiv Inc.: (http://www.moteiv.com)
4. Gay, D., Levis, P., Culler, D.: Software Design Patterns for TinyOS. Proceedings of the ACM
SIGPLAN/SIGBED 2005 Conference on Languages, Compilers, and Tools for Embedded
Systems (LCTES’05), Chicago (2005)
5. Handziski, V., Polastre, J., Hauer, J., Sharp, C., Wolisz, A., Culler, D.: Flexible Hardware
Abstraction for Wireless Sensor Networks. Proceedings of the Second European Workshop
on Wireless Sensor Networks (EWSN ’05), (2005)
6. Levis, P., Madden, S., Gay, D., Polastre, J., Szewczyk, R., Woo, A., Brewer, E., Culler, D.:
The Emergence of Networking Abstractions and Techniques in TinyOS. Proceedings of the 1st
USENIX/ACM Symposium on Networked Systems Design and Implementation (NSDI2004)
(2004)
7. Shnayder, V., Hempstead, M., Chen, B., Welsh, M.: PowerTOSSIM: efficient power simula-
tion for tinyos applications. Proceedings of ACM SenSys 2003 (2003)
8. Levis, P., Hill, J., Buonadonna, P., Szewczyk, R., Woo, A.: A Network-Centric Approach to
Embedded Software for Tiny Devices. Lecture Notes in Computer Science (2001)