FireBug Sensor network architecture
FireBug sensor network architechture consists of the followings:
- Base station (mote 0)
- 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 (genericbase.nc)
- Distribute route messages at specific time intervals.
- Receive route messages from other motes and update
- Receive command messages from UART port, and distribute
each message to the appropriate node in the route table.
- Receive data message from other motes,
forwarding to PC through UART port.
- Distribute route message at specific time interval.
- Receive route message from other mode and update route table.
- Samples the data from its sensor board,
originates a data message and forwards it to
its parent node according to routing table.
- Receive data message from its child node,
forward it to its parent node according to
its routing table.
Function of the Messages
There are 3 sorts of message travelling in the network,
- Route Message: Any node inside the network broadcast this
message at specific time interval, the node
receive this message will retrieve routing
information from the payload of the packet,
calculate the shortest path according routing algorithm,
update its routing table. Routing is accomplished using the
- Data Message: Each node samples sensor data,
it will generate a message which contains
the useful data, and forward the message to
his parent node in terms of its routing table.
Data messages may be originated at the mote or forwarded
from a child mote.
- Temperature data: Each sensor is capable
of measuring the temperature of its surroundings.
- Location data: Each mote is equipped with
a GPS sensor. On initial deployment and at
intervals after initial deployment,
the GPS sensor forwards the location of the mote to
its parent node.
- Command Message: Only used by Base station.
There is a command center which runs on top of the
base station, it will send command packet which
generated by the user to the base station from
UART port, and base station forward the command
message from radio to the target mote throughout the network
Data Structure of the Message
For Data (Originated/Forward) Message and Command Message.
Originated/Forward Message and Command Message have different DataFormat.
typedef struct TOS_Msg
/* The following fields are transmitted/received on the radio. */
/* 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.
typedef struct VirtualCommheader
uint8_t source; //
uint8_t seqnum; //
typedef Struct MHSenderHeader
uint8_t realsource; //address of mote which generate the message
- Originated/Forward Message:
uint8_t addr; //the address of mote which generate the message
- Command Message:
uint8_t destaddr; // the mote address the base station send the cmd to.
xxxxxxxxx //... whatever
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
The each mote does only three type of message processing:
- Originate and Send a Message
- Receive and Forward a Message
- Send and receive a route Message