The TinyOS Message Center Tool

Last updated 8 August 2003

This document describes Message Center, a tool for sending and receiving packets in TinyOS networks. It provides ways to dyanmically generate packet formats for sending to and receiving from a TinyOS network, as well as support for sending all packets generated by MIG.

Running Message Center

Message Center can be found in tools/java/net/tinyos/mcenter. The main class is net.tinyos.mcenter.MessageCenter.

Windows

Message Center has two windows that are always present, the SerialConnector and AppLoader. SerialConnector controls how Message Center talks to a TinyOS network; it can talk to a SerialForwarder, directly to a serial port, or to a TOSSIM simulation. AppLoader allows a user to dynamically load applications designed to work within Message Center.

The SerialConnector is responsible to inject the messages into the MessageCenter. It offers different sources. These sources are similar to the ones in the SerialForward. After selecting the apropriate source and adjusting it's setting, the message forwarding can be started by pressing the Start button. If the source sucessfully started the button turns into Stop button. If this does not happens check the shell where the MessageCenter was started for error message. The packet size and the group id can be set in the SerialConnector. Other packet sizes then the deafault 36 should be used with care.

The AppLoader consists of two separate parts. One is the list of the known apps. Double clicking on one of the list item, will load that applet. The selected Applet can be removed from the list with the remove button. New applet can be added by specifing the its fully casted name (eg. isis.nest.messageCenter.AllMSGDisplay )in the textbox. After typing the name press Enter or click on the LoadApp button. If the applet can be loaded it will be added to the list and appear on the screen. If nothing happens check the shell where the MessageCenter was started for error message.

Message Center Applications

All Message Display (net.tinyos.mcenter.AllMSGDisplay): Displays all of the incoming messages without any formatting. (a simple packet listener) The arrival time of the message can be displayed (timstamp checkbox)

Message Injector(net.tinyos.mcenter.MessageInjector): Automatically loads all MIG generated packets reachable from your Java CLASSPATH, providing a GUI for each one. Users can specify the values of all fields in the packet and can send them to any mote address.

Diagnosis Message Display (net.tinyos.mcenter.DiagMSGDisplay): Displays the received diagonis messages ( TOSROOT/lib/DiagMsg - Vanderbilt library) The AM type of the message can be specified. The arrival time of the message can be displayed (timstamp checkbox)

Big Message Display (net.tinyos.mcenter.BigMSGDisplay): Displays and saves the incomming big messages. Continous messages which are describing one countinous array of data ( TOSROOT/lib/BigMsg - Vanderbilt library). The AM type of the message can be specified. The arrival time of the message can be displayed (timstamp checkbox). The file which the Messages will bw saved into have to be specified.

Message Table (net.tinyos.mcenter.MessageTable): Displays and formats arbitrary messages in a table. The format of the message can be dynamically changed in the following way. First, we have to specify the active message ID of the message. Then we specify the message body layout. Each line in the message format text window represents one field in the message. The format of each line is

[unique|omit|const] [= ]

The following types are suppported:

int8, uint8, hex8, int16, uint16, hex16, int32, uint32, hex32, float, char

The type can be specified as above, or with "_t" attached, so the usual "uint8_t" is accepted. The of the field is displayed in the corresponding columns of the table. The omit modifier will supress the display of this field in the table. The const modifier is used to filter messages. If the corresponding value in the incoming message does not equal the specified, then the message is dropped. The unique modifier is used to select group messages. Normally, when no unique field is specified, each incoming message is added at the end of the table. When there are unique fields, then for each incoming message we check whether a row already exists in the table whose unique fields exactly match the corresponding fields of the incoming message. If so, then the new message will replace the matching row. There are two checkboxes in the message format. The timestamp checkbox will put a time stamp on message and display this value in the first column. The count checkbox is usefull only for unique fileds. It counts the number of times a row was updated as a result of a unique match. After changing the message format, the user has to press the "Reset" button to reset the message table and parse the new message format. Selected rows of the table cen be deleted with the "Delete Row(s)" button. Empty rows can be added by the "Add Row" button. Finally, the selected rows can be sent back the the base station by clicking on the "Send Msg(s)" button. Configurations can be saved, deleted and recalled with the combobox on the top of the message table window.

Acknowledgements

Message Center was designed and primarily implemented by Andrs Nadas, Janos Sallai, and Miklos Maroti at Vanderbilt University. Some modifications were made by Joe Polastre of UC Berkeley to incorporate the packet protocol changes in TinyOS 1.1. Philip Levis of UC Berkeley incorporated the MessageInjector.