Active Message Communication for Tiny Networked Sensors Philip Buonadonna, Jason Hill, David Culler
Total Page:16
File Type:pdf, Size:1020Kb
1 Active Message Communication for Tiny Networked Sensors Philip Buonadonna, Jason Hill, David Culler Abstract— is dependent on a fast processing component. Routing We present an implementation and evaluation of an Ac- protocols implemented above these (e.g., OSPF) are com- tive Messages based communication system for tiny, wire- plex and place bandwidth demands that become unten- less, networked sensors. The implementation includes two able for links with kilobits per second throughput. Fi- major software components. The first is the device based nally, common high level software abstractions for using operating program which includes the communication sub- system, dispatch loop and AM handlers. The second is a the network, such as sockets, are not well suited to the communication library for general purpose host computers. constrained environment of tiny network devices. Inter- Using an Atmel 8535 based device and an Intel Pentium II faces centered on “stop and wait” semantics do not meet PC, we demonstrate an ad hoc networking application that the power and agility requirements of these small devices. uses Active Message primitives for multi-hop route discov- In this paper, we investigate the application of the Active ery and packet delivery on silver dollar sized devices. We Messages paradigm to mini-device communication. We also make observations about the applicability of TCP/IP to believe that there is a fundamental fit between the event the Tiny Networked Sensor regime. based nature of network sensor applications and the event based primitives of the Active Messages communication I. INTRODUCTION model. It is a framework that handles the limitations of The Post-PC era of computing has introduced an array these devices, yet provides a powerful programming envi- of small devices that perform a variety of specific func- ronment capable of supporting a wide space of concurrent tions. Cellular phones, pagers and portable digital assis- applications. tants are common examples of these. As technology pro- Active Messages is centered on the concept of integrat- gresses, however, devices will continue to become smaller ing communication and computation, as well as matching and more specialized. One class of device that is begin- communication primitives to hardware capabilities. Tiny ning to emerge is the tiny networked sensor. These ma- networked devices must take advantage of the efficiencies chines are characterized by an embedded processor capa- that can be achieved by this matching. Furthermore, the ble of a couple of MIPS, a limited amount of storage (i.e. inability to support a large number of simultaneous exe- 4Kb or less), a small power source, a short range radio, cution contexts requires that computation and communi- and an array of sensors and/or actuators. The practical ap- cation be overlapped so that valuable computational re- plications of such mini-devices range from environmental sources are not wasted. monitoring to micro-robots capable of performing micro- We demonstrate an implementation of Active Messages scopic scale tasks. While the functionality of an individual for a prototype networked sensor mini-device with a 4 device is limited, a collection of them working together MHz Atmel AVR 8535 Microcontroller, 512 Bytes of could accomplish a range of high-level tasks. RAM and 8KB of FLASH memory. We show an ad-hoc Paramount to achieving the goal of cooperative mini- networking application built on top of the Active Message devices is the design of the communication subsystem. primitives that performs automatic topology discovery and The demands here are numerous. It must be efficient in data collection from autonomous nodes. terms of memory, processor, and power requirements so In the next section, we outline the fundamental aspects that it falls within the constraints of the hardware. It must of networked mini-devices that place strong requirements also be agile enough to allow multiple applications to si- on the communication model. Section 3 provides back- multaneously use communication resources. ground information for Active Messages, autonomous sen- Such demands inhibit the use of legacy communication sor devices and their operating system architecture. Sec- systems (e.g. TCP/IP) which have seen a great deal of tions 4 and 5 present a high-level overview and low-level success in more conventional settings. The low level net- details of our tiny Active Messages implementation re- working protocols of legacy stacks typically require many spectively. Section 6 describes a demonstration applica- kilobytes of memory at a minimum and their performance tion built using tiny Active Messages. Section 7 evalu- 2 ates our implementation in terms of usability and raw per- formance. Section 8 presents retrospectives. Section 9 WiredLi nk presents work related to network sensors. We conclude WirelessL ink with options for future work. Internet HostPC II. REQUIREMENTS Networked sensors represent a new design paradigm BasestationMote that is being enabled by significant advances in MEMS structures and low power technology. Their communica- tion requirements are determined both by their physical design characteristics and their intended use scenarios. The ability to create sensors and actuators with IC tech- Fig. 1 nology and integrate them with computational logic has A TYPICAL SENSOR NETWORK PHYSICAL TOPOLOGY.THE created an abundance of low-power sensors. Combining HOST PC FORMS THE DEVICE’S LOGICAL CONNECTION TO these new sensors with the extensive work being done to EXTERNAL APPLICATIONS.THE DEVICE ATTACHED TO THE develop low power wireless communication [5] provides PC FORMS THE BASESTATION. the basis for networked sensors. They generally include a tiny microcontroller, environmental detectors, and a low power radio. This integration of computation, communi- tion of data from sensors and the execution of application cation, and physical interaction together in silicon has cre- level code. Keep in mind this must be done by a processor ated the unique opportunity to shrink these devices down capable of only two MIPS. to microscopic scales. Never before has it been so pre- dictable that a physical device will track Moore’s law The intended usage scenarios for networked sensors down in physical size. also dictate additional requirements for the communica- This trend toward highly integrated systems places strict tion system. In general, the user will want to be able to limits on physical capabilities of the devices. The desire quickly deploy a large number of low cost devices without to continually shrink these devices, makes it necessary to having to configure or manage them. This means that they be as efficient as possible. Specifically, modern devices must be capable of assembling themselves into an ad hoc must operate in only kilobytes of program memory and network. The mobility of individual sensors and the pres- hundreds of bytes of RAM. ence of RF interference means that the network will have Additionally, their interaction with the physical world to be capable of reconfiguring itself in a matter of seconds. places real time constraints on their operation. If they are Figure 1 shows a typical network topology. receiving a communication over the radio, missing a dead- Additionally, these devices must rely on small batter- line by a fraction of a second will cause the transmission ies or ambient energy for power and run for long peri- to be lost. Additionally, these sensors will be engaged in ods of time without maintenance. To conserve power, it multiple simultaneous interactions with the physical world is important that a communication system is capable of – sensing, communication, routing – which forces them to multi-hop routing. It is more efficient to relay data multi- be agile. It is clear that they must be able to support in- ple times towards a destination than to increase the trans- tensively concurrent operations. This necessity makes the mission strength so that it can be received by the endpoint programming paradigm of busy-waiting until data is avail- directly. Efficient use of the CPU can also lead to power able impractical. savings. While Moore’s Law will increase the computa- These constraints are compounded by the fact that the tional abilities for a given size device, a 20% increase in central processor in the microsensor is directly connected efficiency will always translate into a 20% increase in bat- to the I/O devices. Traditional systems generally use co- tery life. Software efficiencies can be translated into power processors and dedicated hardware to compose a system savings by reduction of clock speeds and CPU voltages. hierarchy. This allows for a high degree of physical par- Finally, these sensors will typically be tailored to a spe- allelism, which simplifies the task of the central proces- cific task. This tailoring will take the form of specialized sor. However, high levels of physical parallelism are not software routines as well as customized hardware. This di- practical for network sensors. In our system, the central versity in design and usage puts extra requirements on the processor must service every bit of a radio transmission overall system design. Specifically, it forces the system to individually, while simultaneously tending to the collec- be architected in a highly modular fashion that allows mul- 3 tiple application components to coexist. This precludes operating system is designed to meet the critical needs of any single application from assuming that it can utilize all the networked sensor design regime. Its execution model of the available CPU resources. Clearly, any communi- is similar to an FSM based model, but considerably more cation model that busy-waits inherently assumes that no programmable. It is designed to support the concurrency other applications are running on the device and is imprac- intensive nature of networked sensors while allowing for tical for this regime. efficient modularity. Specifically, TinyOS’s event model allows for high concurrency to be handled in a very small III. BUILDING BLOCKS amount of space.