Prerequisite for this experiment:
- Exp: Introduction to WSN
- Exp: nesC Programming
- Exp: send and receive
- Exp: data acquisition
- Exp: Wireless Sensor Network
Hardware requirement
Procedure
1.Leaf node programming
a) Configuration file
-
Identify the components which are providing the required interfaces:
-
Main
-
Module file of our application
-
TimerC - Timer
-
LedsC - Provides Leds interface
-
GenericComm - Provides both SendMsg and ReceiveMsg interface
-
DemoSensorC as Sensor
-
CC2420RadioC - Radio
-
Perform wiring :
Binding the required interfaces in our module to the components that are providing the interfaces. The syntax of wiring is Module name.interface name -> component name.interface name.
b) Module file
2. Cluster head programming
a) Configuration file
Identify the interfaces required:
-
Timer
-
Leds
-
SendMsg
-
CC2420Control
-
ReceiveMsg
Identify the components which are providing the required interfaces:
-
Main
-
Module file of our application
-
TimerC - Timer
-
LedsC - Provides Leds interface
-
GenericComm - Provides both SendMsg and ReceiveMsg interface
-
DemoSensorC as Sensor
-
CC2420RadioC - Radio
Perform wiring :
Binding the required interfaces in our module to the components that are providing the interfaces. The syntax of wiring is Module name.interface name -> component name.interface name.
b)Module file
3. Sink node programming
a) Configuration file
Identify the interfaces required:
-
SendMsg
-
HPLUART
-
ReceiveMsg
Identify the components which are providing the required interfaces:
-
Main
-
Module file of our application
-
TimerC - Timer
-
LedsC - Provides Leds interface
-
GenericComm - Provides both SendMsg and ReceiveMsg interface
-
DemoSensorC as Sensor
-
CC2420RadioC - Radio
Perform wiring :
Binding the required interfaces in our module to the components that are providing the interfaces. The syntax of wiring is Module name.interface name -> component name.interface name.
b)Module file