Tutorial: ZigBee

From MobiNetS
Jump to: navigation, search

This page shows the tutorial for experiments with ZigBee communications and the testbed.

The ZigBee Testbed in B1-612, Main Building

Useful links:

The simplest example

This example shows

1) how the event-driven programming works,

2) how to burn a program to a TelosB node.

for details you can see simplest tinyos program



1. Configuration file, SimpleAppC.nc

configuration SimpleAppC{
}

implementation{ 
    components SimpleC, MainC;
    SimpleC.Boot -> MainC.Boot;
}

this file will link two components SimpleC and MainC


2. SimpleC.nc

module SimpleC{
    uses interface Boot;
}

implementation{
    event void Boot.booted() {
    }
}

When system starts, it will call interface booted in MainC, but this interface is not implemented.

So SimpleC implements it.

MainC in nesC is just like main function in C.

In this example, it does nothing, so it is just like following code in C:

int main () {
  return 0;
}


3. Makefile

COMPONENT=SimpleAppC
include $(MAKERULES)

with Makefile we can compile the code by typing

make telosb


4. install

make telosb install bsl,/dev/ttyUSB0

Measurement

To measure various information from received packets.

Code template

Extract info upon receiving a packet.

Payload

Header

Footer

RSSI

Byte-level RSSI

Routing

Code template

Broadcast

Unicast

Anycast

Testbed usage

Data collection using USB cables

Batch burn of multiple network nodes

Remote configuration via web

Multi-hop networks

Useful parse scripts