FireBug Sensor network architecture

FireBug sensor network architechture consists of the followings:
  1. Base station (mote 0)
  2. A bunch of Motes attached with sensor board on it (Mote1- MoteN)

Function of the Mote

For each of the work unit, they will realize the following function:
Base Station ( Mote1-MoteN (

Function of the Messages

There are 3 sorts of message travelling in the network, Sensor network architecture

Data Structure of the Message

For Data (Originated/Forward) Message and Command Message.

typedef struct TOS_Msg
	/* The following fields are transmitted/received on the radio. */
      uint16_t addr;
      uint8_t type;
      uint8_t group;
      uint8_t length;
      int8_t data[TOSH_DATA_LENGTH];
      uint16_t crc;

      /* The following fields are not actually transmitted or received 
      * on the radio! They are used for internal accounting only.
      * The reason they are in this structure is that the AM interface
      * requires them to be part of the TOS_Msg that is passed to
      * send/receive operations.
      uint16_t strength;
      uint8_t ack;
      uint16_t time;
      } TOS_Msg;

      typedef struct VirtualCommheader
      uint8_t source;		//
      uint8_t seqnum;		//
      } VirtualCommHeader

      typedef Struct MHSenderHeader
      uint8_t mhsendertype;
      uint8_t dataseqnum;
      uint8_t realsource;   //address of mote which generate the message
      } MHSenderHeader

Originated/Forward Message and Command Message have different DataFormat.
Struct RoutePacket
Struct RoutePacket
	uint8_t parent;
	uint8_t hop;
	cost_t cost;
	uint8_t estlength;

Message Processing Flow

The software application development of motes make use of all existing low level TinyOS API function, to process the originate/forward message and route message. The followings are the flow chart for each kind of messages, red dot stands for the place of beginning of message

Mote1-MonteN The each mote does only three type of message processing:

Base Station(