ECE 6615: Sensor Networks

Lab Project

Part 3

The goal of this assignment is to get an experience of creating multi-hop sensor networks, in which one or more nodes may engage in forwarding packets to the base station.

    Task 1

    Select four MicaZ nodes and place them in a row. Each sensor is hardcoded with an ID based on their position (1,2,3,4). This must be a command-line input to the sensor at compile time (no direct embedding of the ID in the code, leading to one common code for all the sensors). The furthest node from the sink is given the ID (4), then the second furthest node is (3) and so on. Each sensor may be programmed to check if the packet received is sent from one of its adjacent neighbors and drop the packet if this condition is false. In addition, each packet must have an unique ID or packet number. A node will never process and transmit the same packet twice.

    Connect a sensor board to each node. Nodes 4-2 will use the light sensor, whereas node (1) will be using the buzzer. Program the following application:

    1. Nodes 4-2 are periodically checking the light level as you did in the second lab assignment. If the light level is below a given pre-defined threshold for Node 4, then Node 4 transmits a packet to node 3 containing the source node id, the final destination id, the unique packet id and a variable `mydark` of 3 bits where the first bit is 1 if Node 4 is in the dark and the first bit is 0 if Node 4 is in the light. Note that there is no need to send a packet if there is no useful information.
    2. Node (3) should receive the packet from Node 4 and it also should check its own light level. If Node 3 is in dark it should change the second bit of `mydark` to 1. Even if Node 3 is not in the dark, it should relay the information of Node 4, i.e., it should send `mydark` to Node 2. Node 2 will receive the packet of Node 3 and will check its own light level. Node 2 will relay the information to Node 1 while setting the third bit of `mydark` to 1 if Node 2 is in the dark or to 0 if it is in the light. Now, we have created a multi-hop network. Upon reception of the packet, Node 1 should show the value of `mydark in its leds`. Also, if all of the sensors are in the dark the buzzer should buzz for 10 sec.

Deliverables

  • A visual demonstration of Task 1 to one of the TAs is required.
  • Soft-copy of code for Task 1 to be submitted to infocom@ece.gatech.edu.

Due Date

  • March 3, 2017 (11:59pm; Friday Midnight).

Questions? E-mail: infocom@ece.gatech.edu