System Design for Wireless Sensor Networks. (SDWSN). Exercise 3: ... 2
Understand the S-MAC radio protocol described in [YHE02]. 2 Implement the ... [
KW05] Holger Karl and Andreas Willig. Protocols and Architectures for Wireless.
Sensor ...
Hand-out: October 20, 2011
Due: November 26, 2011
System Design for Wireless Sensor Networks (SDWSN)
Exercise 3:
Radio Protocols Dr. Thorsten Kramp
[email protected]
Rolf S. Adelsberger
[email protected]
1
Alexandru Caracas
[email protected]
Goals 2 Understand the S-MAC radio protocol described in [YHE02] 2 Implement the synchronization and network formation functionality 2 Setup up a simulated test-bed
1
Introduction
After this exercise you will have gained the required knowledge to program a radio protocol. You will learn how to use the different operation modes for the radio module together with precise timings to synchronize transmissions and receptions in a multi-hop wireless network.
1.1
Radio Messages and Timestamps
In Mote Runner a radio message is timestamped upon reception and the timestamp is passed to the respective RadioRxPDU callback. This reception timestamp can be used as a synchronization point. // Register the callback function which is invoked when a radio PDU has been received. public static void setRxHandler(byte backlog, RadioRxPdu pduHandler) //This type of method is being called when a radio frame has been received. public abstract void RadioRxPdu(byte[] pdu, uint len, long time, uint quality)
1.2
Test Automation
For automating the setup of a test all commands used in the Mote Runner Shell can be included in a script file. For example to create a new mote with specified coordinates you can use the following command: mote-create -x 1000 -y 2000
1.3
Network Topology
You can use the “Net” view in the Mote Runner Dashboard to view or create a desired network topology such that two nodes can either hear each other or not.
2
1.4
Logging
Check the “logging” example in the Mote Runner distribution for example source code of how to use logging in your application. Note: Preparing the log message takes time and may interfere with your protocol.
2
Tasks 1. Read and understand the S-MAC protocol from the original paper [YHE02]. A summary of the protocol is also available in Chapter 5.2.2 (pages 123 — 126) from the text book [KW05] 2. Implement the functionality which synchronizes the nodes in the sensor network and allows new nodes to attach to the network; i.e., only SYNC packets, without data packets. Make reasonable choices for the required parameters for the sleep and listen periods. 3. Test your implementation with a setup of at least five sensor nodes positioned such that the unique root node is at least two hops away from any leaf node. Use the logging facilities or LEDs to mark the behavior of nodes.
References [KW05] Holger Karl and Andreas Willig. Protocols and Architectures for Wireless Sensor Networks. John Wiley & Sons, 2005. [YHE02] Wei Ye, John Heidemann, and Deborah Estrin. An energy-efficient mac protocol for wireless sensor networks. In Proceedings of the IEEE Infocom, pages 1567–1576, New York, NY, USA, June 2002. IEEE.
3