Main Issues • Three major issues that we are concerned with in sensor networks are – Clustering Routing and Security To be considered against the backdrop of strict hardware constraints • Clustering Dividing the network into clusters after deployment, and choosing a cluster head • Routing Deciding routing paths for communication between the base station and the cluster heads • Security Ensuring that the communications are secure (Particularly important in military applications) Goals • Implement clustering, routing, and security algorithms developed by the team • Run test cases for different parameters of a sensor network • For example number of nodes in the network, number of clusters • Run different test cases for ‘abnormal’ conditions to check the robustness of the algorithms • For example a cluster head dying out without being able to inform other cluster members How do we do this ? …simulation The software • TinyOS TinyOS is a component-based runtime environment designed to provide support for deeply embedded systems which require concurrency intensive operations while constrained by minimal hardware resources --- TinyOS website at UC Berkeley • The programming language – nesC, a programming language for Network Embedded Systems nesC Application A NesC application consists of one or more components, linked together to form a runnable executable. Component Components are the basic building blocks for NesC applications. Components are of two types: modules and configurations. Module A module is a NesC component consisting of application code in a C-like syntax. Configuration A configuration is a component that "wires" other components together. Every NesC application has a single top-level configuration that specifies the set of components in the application and how they invoke one another. Configuration Module 1 Module 2 Module n TOSSIM • TOSSIM - The TinyOS simulator Allows nesC code to be compiled and executed on a Linux machine Even has a simple GUI to it Example Simulation • Consider two motes (ID 0 and1) communicating with each other as follows: Mote 0 maintains a 16-bit integral counter, and at every tick of the counter it broadcasts the value of the counter across it’s RF communication channel to Mote 1 Example Simulation The format of the data transmitted/received over the radio channel 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]; /* 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; Example Simulation Format of data Mote 0 Data ff ff 04 7D 08 04 00 00 Mote Data 1 ff ff 04 7D 08 04 00 00 ff ff = addr (broadcast) 04 = type (handler ID) 7D = group (cluster ID) 08 = length 040000= Data Thank You Questions ?