We present Tapper, a new software architecture for distributed embedded systems. Tapper features a scripting engine built on top of low-level APIs including wired or wireless communication primitives. The script interpreter provides a unified representation of multi-level hardware abstractions in heterogeneous platforms. It supports in-field reconfiguration of system parameters by passing scripts over communication links. In addition, scripts also generalize communication protocols and messages in distributed embedded networks. With Tapper, embedded application can be easily implemented with human readable scripts like Perl or Python. The current Tapper platforms include a variety of embedded prototypes with PIC, AVR and other micro-controllers. We demonstrate three fully-implemented wireless embedded applications: (1) real-time motion monitor, (2) real-time 3-D tilt monitor, and (3) wireless gaming console.
Emerging applications such as
wireless sensing and ambient intelligence are driving the trends
towards larger scale, heterogeneous, distributed and networked embedded
systems with increasingly dynamic configurations as well as growing
computation requirements. At the same time, embedded systems
designers today are still taking the same single-processor,
platform-specific approach to the development of embedded systems in
ways essentially unchanged for the last several decades. That is, they
perform low level manipulation of architecture-dependent registers for
configuration and control of interrupts, I/O, and power. This
methodology drives up the software development cost and effort and is
not scalable. Our approach is to support a lightweight script
interpreter that can handle system services including real-time and
power control as well as standard, extensible communication
primitives. In fact, scripts represent a generalization of
communication messages that all distributed systems must be able to
handle. A scripting architecture for embedded systems will have the
same modular, dynamic benefits as middleware systems but without the
heavy marshalling/demarshalling runtime overhead. More importantly,
because scripts are Turing complete, they will enable seamless
interoperability among a wide range of systems from the smallest of
sensor nodes to large-scale, high-performance, and general-purpose
computing clusters that can assist small systems with sophisticated
decisions and optimizations.
In Tapper project, we present a scripting-enable software
architecture and communication mechanism for distributed embedded
systems. It features a light-weight interpreter that parses human
readable scripts into calls to system services supported by underlying
hardware platforms. The system service primitives include basic GPIO
invocations, analog-digital conversions, timer/counter handling
routines, external interrupts configuration, as well as communication
transactions over wired and wireless links. Although the hardware
architecture is different on each platform, Tapper can provide a
unified image of all hardware resources over heterogeneous platform
with the same set of commands. Current hardware prototypes include AVR
and PIC micro-controllers interfaced with RS-232, 2.4GHz wireless
modules and sensors. Every Tapper platform behave like a node in a
wireless network. Each node features a serial command prompt that acts
as the front-end to as the user interface and the host programming
interface. Users can set configuration parameters and invoke system
services by typing human readable commands interactively with
HyperTerminal and any serial terminal programs. The command prompt on
one node can be used to control any other nodes through the 2.4GHz
wireless link with the same set of commands tagged with network
addresses. The serial link also serves as the host programming
interface that allows host software to send application code as scripts
wirelessly to remote Tapper nodes, without erase and upload the
firmware for each individual embedded application.
In addition to the user-friendly serial command console, we currently
have implemented three wireless embedded demos with the proposed Tapper
architecture.
All three demos are implemented by Python on the host side, and the extra code to invoke wireless application on the remote Tapper node takes 50 lines or less of scripts..
| The AVR
Butterfly interfaced with RF24G module and KXM52 3-D accelerometer |
The PIC-40
board with the RF-24G module |
The command prompt in a HyperTerminal |
| Demo
1: wireless motion monitor New! Play video |
Demo
2: wireless tilt detection with 3-D rendering New! Play video |
Demo
3: wireless console of a fun shooting game New! Play video |