802.15.4 interoperability tests between Xbee and Tmote sky

On of the objectives of the SmarTB project is to deploy a heterogeneous sensor network composed by Tmote sky motes and Arduino with Xbee wireless module. One of the first stages of the project was to ensure that all of the wireless sensors can communicate with each other. This wiki page describes the interoperability tests we did with our Tmote sky and Xbee (Series 1).

Overview

The tests described here were performed in order to verify that Tmote sky mote can communicate with a Xbee S1 module using the IEEE 802.15.4 protocol.
The testbed is described in the following diagram :

Xbee Tmote tesbbed diagram

Testbed

The components of the testbed are :
  • A Xbee S1 RF module mounted on top of a XBIB-U-DEV interface board (other interface board can be used). We will call it Xbee in this document. Xbee will send and receive 802.15.4 frames through the X-CTU software.
  • Two Tmote sky running Contiki 2.4 :
    • A Sniffer mote which will captures 802.15.4 traffic exchanged between the Xbee and the Mote. During the capture, we will decode the packet's raw data using Wireshark .
    • Another Mote which will send and receive 802.15.4 frames with the Xbee.

Upgrading & Configuring Xbee

This section is extensively based on this web page please read it if you want more details about the following steps.

  1. First of all, plug in the FTDI cable, USB adapter, Arduino /w Xbee shield, and install the drivers for your hardware.
  2. Install X-CTU and start it. You should normally have this :
    X-CTU PC settings tab screenshot
  3. Select your device in the list (COM10 here), baud rate 9600, flow control none, 8N1.
  4. Upgrade your Xbee firmware (follow the steps)
  5. Then configure the Xbee module with the following settings (Modem Configuration tab) :
    • (E) CH - Channel : means that we want to use the channel 14 (the default Contiki channel is 22 but I prefer to use custom channel to avoid interference with other current experiments).
    • (ABCD) ID - PAN ID : we will use pan id used in Contiki (it does not really matter since we are trying to use 802.15.4 broadcast).
    • (FFFF) DL - Destination Address Low : as I said, we want to broadcast.
    • (FFFF) MY - 16-bit Source Adress : we have to set MY value to 0xFFFF to disable reception of packets with 16-bit addresses (this is not mandatory).
    • (1) MM - MAC Mode : we have to disable the use of MaxStream header in the 802.15.4 packet since it's not well handled by Contiki.

Click on Write to program that settings in place. Now, you should have this :

X-CTU Modem Configuration tab screenshot

Interoperability tests

This section will cover some tests we made using the testbed described above. This section is extensively based on this web page please consider to read it if you want more details about the following steps.

Sniffer configuration

  1. Plug in your Sniffer Tmote Sky mote.
  2. Compile and upload the sniffer.c code on your mote using the command :
    $ make TARGET=sky MOTES=/dev/ttyUSB0 sniffer.upload
  3. Start tapslip6 and Wireshark using the commands :
    $ make TARGET=sky MOTES=/dev/ttyUSB0 connect
    $ wireshark &
  4. You can now use Wireshark to analyze the packets received by Sniffer on channel 14 :

Instant Contiki Wireshark screenshot

Mote configuration

  1. Plug in your Tmote Sky mote called Mote.
  2. Compile and upload the Contiki example contiki-2.4/rime/example-abc.c code on your mote using the command :
    $ make TARGET=sky MOTES=/dev/ttyUSB1 example-abc.upload
  3. This code allows the Mote to send and receive 802.15.4 broadcast packet, you can see what the mote is doing using this command :
    $ make TARGET=sky MOTES=/dev/ttyUSB1 login
    The results of this command is following :
    209.69: chameleon_output channel 14
    00001110 (0xe), 00000000 (0x0), 
    P6MAC-UT:  1 ffff:cdab:d145:0000 15 8 (25)
    abc message sent
    209.69: chameleon_output channel 14
    00001110 (0xe), 00000000 (0x0), 
    P6MAC-UT:  1 ffff:cdab:d145:0000 15 8 (25)
    
  4. We are just sending here, we don't receive anything since Xbee is not sending.

Xbee configuration

  1. Plug in the Xbee module.
  2. Start X-CTU and go the Terminal tab
  3. Click on Assemble packet tab and type in the pop up window : 0E 00 47 6F 6F 64 20 6D 6F 72 6E 69 6E 67 20 43 6F 6E 74 69 6B 69. The first byte is the Contiki Channel repeated (0x0E=14) followed by 0x00 and "Good Morning Contiki" in ASCII.
  4. Click on Send Data and you should have this in Mote log :

Xbee Tmote broadcast communication sucess screenshot

X-CTU_PC_settings_tab.png - X-CTU "PC settings" tab screenshot (41.3 kB) Baptiste Gaultier, 03/20/2012 11:59 am

X-CTU_PC_modem_configuration_tab.png - X-CTU "Modem Configuration" tab screenshot (46.5 kB) Baptiste Gaultier, 03/20/2012 11:59 am

Xbee_Tmote_figure.png - Xbee Tmote tesbbed diagram (35.9 kB) Baptiste Gaultier, 03/20/2012 11:59 am

Xbee_Tmote_broadcast_communication_sucess_screenshot_resized.png - Xbee Tmote broadcast communication sucess screenshot (113.8 kB) Baptiste Gaultier, 03/20/2012 11:59 am

Instant_Contiki_Wireshark_screenshot.png - Instant Contiki Wireshark screenshot (134.2 kB) Baptiste Gaultier, 03/20/2012 11:59 am