Run Contiki OS on a Crossbow TelosB IEEE 802.15.4 mote attached to a COSMOS node,
compile and flash the hello-world example, then run a broadcast communication
experiment between two nodes over the 802.15.4 radio channel.
The Crossbow TelosB
is an IEEE 802.15.4-compliant wireless sensor node commonly used in IoT research.
COSMOS sandbox nodes expose the TelosB over USB, making it accessible to the Linux
host for flashing and serial communication.
This tutorial walks through:
dmesg).hello-world example over USB.The workflow demonstrates the full cycle of IoT firmware development: set up the
build environment, compile application firmware, flash over USB, and monitor serial
output — all on a live testbed node.
After completing this tutorial you will be able to:
dmesg.make TARGET=sky.serialdump-linux.| Difficulty | Beginner |
| Estimated time | 60 min |
| Domain / sandbox | Sandbox with IEEE 802.15.4 nodes — example: sb5.cosmos-lab.org |
| Topic group | Bluetooth & Zigbee / IEEE 802.15.4 |
| Last verified | Not re-tested (migrated 2026-06-20) |
Background knowledge
apt-get) and the USB device subsystem.Account & access
Devices / nodes
| Resource | Role | Qty | Notes |
|---|---|---|---|
| node1-1 | Build, flash, and run hello-world; one side of broadcast experiment | 1 | Requires Crossbow TelosB attached via USB |
| node1-2 | Other side of broadcast experiment | 1 | Requires Crossbow TelosB attached via USB |
Disk images
| Image | Load onto | Provides |
|---|---|---|
| ubuntu-16-04-64bit-rzraven.ndz | node1-1, node1-2 | Ubuntu 16.04 64-bit; USB serial (FTDI) support for TelosB |
Software components
| Component | Version | Source |
|---|---|---|
| Contiki OS | 3.0 | Downloaded from GitHub during tutorial (contiki-os/contiki, tag 3.0) |
| gcc-msp430 / msp430-libc / msp430mcu | as provided by Ubuntu 16.04 apt | apt-get install during tutorial |
| mspdebug | as provided by Ubuntu 16.04 apt | apt-get install during tutorial |
| gcc-arm-none-eabi / gdb-arm-none-eabi | as provided by Ubuntu 16.04 apt | apt-get install during tutorial |
| openjdk-8-jdk / openjdk-8-jre / ant | as provided by Ubuntu 16.04 apt | apt-get install during tutorial |
| serialdump-linux (patched) | from cmorty/contiki pull branch | Downloaded from GitHub during tutorial |
| build-essential / binutils-msp430 / make / python | as provided by Ubuntu 16.04 apt | apt-get install during tutorial |
Spectrum / RF / special
TelosB operates on IEEE 802.15.4 (2.4 GHz, channel 26 by default in Contiki). The
mote radio is on-board; no external cabling or spectrum reservation is needed beyond
the standard node reservation. Ensure your reservation permits use of nodes with
attached IoT motes.
Two COSMOS sandbox nodes (node1-1, node1-2), each with a Crossbow TelosB IEEE
802.15.4 mote connected via USB (exposed as /dev/ttyUSBN on the host). The
Linux host flashes firmware to the mote over USB and reads serial output via the
same interface. The two motes communicate wirelessly over the 802.15.4 radio
channel. Both nodes are reached via SSH from the sandbox console.
Reserve nodes with TelosB IEEE 802.15.4 hardware (see Prerequisites) and log into the console:
ssh <username>@console.sb5.cosmos-lab.org
Make sure the nodes are off before imaging:
omf tell -a offh -t system:topo:allres
Load the image onto both nodes:
omf load -i ubuntu-16-04-64bit-rzraven.ndz -t system:topo:allres
Turn the nodes on and confirm they are up:
omf tell -a on -t system:topo:allres
omf stat -t system:topo:allres
Open SSH sessions to each node from the console:
ssh root@node1-1
ssh root@node1-2
Before installing ContikiOS, confirm the TelosB device is detected by the Linux
kernel and assigned a USB device path. Parse dmesg for the Crossbow string to
find the USB Bus and Port number, then search for that bus/port to find the device
path. In this example the device is assigned to /dev/ttyUSB2.
root@node1-1:~# dmesg | grep -i Crossbow
[ 1.931956] usb 3-10: Product: Crossbow Telos Rev.B
root@node1-1:~# dmesg | grep -i "usb 3-10"
[ 1.798466] usb 3-10: new full-speed USB device number 5 using xhci_hcd
[ 1.931954] usb 3-10: New USB device found, idVendor=0403, idProduct=6001
[ 1.931955] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1.931956] usb 3-10: Product: Crossbow Telos Rev.B
[ 1.931956] usb 3-10: Manufacturer: XBOW
[ 1.931957] usb 3-10: SerialNumber: XBOL88EP
[ 8.322005] usb 3-10: Detected FT232BM
[ 8.322133] usb 3-10: FTDI USB Serial Device converter now attached to ttyUSB2
Note the device path (ttyUSB2 in this example). Adjust the /dev/ttyUSBN
argument in later commands to match what you observe.
Install all toolchain dependencies on node1-1:
root@node1-1:~# apt-get update
root@node1-1:~# apt-get install build-essential binutils-msp430 gcc-msp430 msp430-libc msp430mcu mspdebug gcc-arm-none-eabi gdb-arm-none-eabi openjdk-8-jdk openjdk-8-jre ant libncurses5-dev lib32ncurses5 make python
Download and unpack Contiki OS 3.0 from GitHub. Further installation details are available here.
root@node1-1:~# wget https://github.com/contiki-os/contiki/archive/3.0.zip
root@node1-1:~# unzip 3.0.zip
root@node1-1:~# mv contiki-3.0 contiki
The serialdump-linux tool bundled with Contiki 3.0 has known issues. Replace it
with the patched version from the cmorty/contiki pull branch. The original is
backed up first.
root@node1-1:~# cd contiki/tools/sky
root@node1-1:~# mv serialdump-linux serialdump-linux.bak
root@node1-1:~# wget https://github.com/cmorty/contiki/raw/pull/serialdump/tools/sky/serialdump-linux
root@node1-1:~# chmod 775 serialdump-linux
Compile and flash the Contiki hello-world example to the TelosB, then open the
serial monitor. Specify the device path found in Step 1:
root@node1-1:~# cd
root@node1-1:~# cd contiki/examples/hello-world/
root@node1-1:~# make TARGET=sky MOTES=/dev/ttyUSB2 hello-world.upload login
:
:
:
../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB2
connecting to /dev/ttyUSB2 (115200) [OK]
Rime started with address 0.18.116.0.13.104.74.236
MAC 00:12:74:00:0d:68:4a:ec Contiki 3.0 started. Node id is not set.
nullsec CSMA ContikiMAC, channel check rate 8 Hz, radio channel 26,
CCA threshold -45
Tentative link-local IPv6 address
fe80:0000:0000:0000:0212:7400:0d68:4aec
Starting 'Hello world process'
Hello, world
Hello, world in the serial output confirms the mote is running Contiki and the
firmware was flashed successfully. Press Ctrl-C to exit the serial monitor.
You have two options:
Option A — Save and reload the prepared image (faster): After completing Step 5
on node1-1, save the image and load it onto node1-2:
omf save -n node1-1
omf load -i <saved-image-name>.ndz -t node1-2
Option B — Repeat the setup steps on node1-2: SSH into node1-2 and repeat
Steps 1–4 (device verification, dependency install, Contiki download, serialdump
patch). No hello-world flash is needed; the broadcast example is compiled in Step 7.
The Rime broadcast example makes each node transmit a hello message and receive
messages from the other node over the 802.15.4 channel. Run the following on
both node1-1 and node1-2 (in separate terminal sessions). Adjust
/dev/ttyUSBN to the path observed on each node. Further details on the
broadcast example are here.
On node1-2 (and equivalently on node1-1):
root@node1-2:~# cd contiki/examples/rime
root@node1-2:~# make TARGET=sky example-broadcast.upload login
:
:
../../tools/sky/serialdump-linux -b115200 /dev/ttyUSB2
connecting to /dev/ttyUSB2 (115200) [OK]
Rime started with address 113.97
MAC 71:61:00:00:00:00:00:00 Contiki 3.0 started. Node id is not set.
nullsec CSMA ContikiMAC, channel check rate 8 Hz, radio channel 26
Starting 'Broadcast example'
broadcast message sent
broadcast message received from 236.74: 'Hello from node1-1'
broadcast message sent
broadcast message received from 236.74: 'Hello from node1-1'
broadcast message sent
broadcast message received from 236.74: 'Hello from node1-1'
broadcast message sent
broadcast message received from 236.74: 'Hello from node1-1'
broadcast message sent
broadcast message received from 236.74: 'Hello from node1-1'
broadcast message sent
broadcast message received from 236.74: 'Hello from node1-1'
broadcast message sent
Each node alternately prints broadcast message sent (its own transmission) and
broadcast message received from <rime-address>: 'Hello from nodeX-Y' for packets
it receives from the other mote.
dmesg | grep -i Crossbow returns a line containing Product: Crossbow Telos Rev.B, confirming the mote is detected.Hello, world — confirming successful firmware compilation and flashing.broadcast message sent and broadcast message received from <addr>: 'Hello from ...' lines, confirming bidirectional 802.15.4 communication.omf tell -a offh -t system:topo:allres
If you saved a customized image in Step 6 Option A, note its name for reuse. No
further omf save is needed unless you made additional changes.
| Symptom | Likely cause | Fix |
|---|---|---|
dmesg | grep -i Crossbow returns nothing |
TelosB not connected or node lacks IoT hardware | Use the Inventory/Status page to select a node with IEEE 802.15.4 hardware |
/dev/ttyUSBN path differs from example |
FTDI device enumerated at a different index | Note the actual path from dmesg output (ttyUSB0, ttyUSB1, etc.) and substitute it in all commands |
make TARGET=sky ... hello-world.upload fails with toolchain errors |
Missing or incompatible MSP430 toolchain packages | Re-run the apt-get install in Step 2; confirm gcc-msp430 --version succeeds |
serialdump-linux exits immediately or shows garbage |
Stale serialdump binary | Confirm the patch in Step 4 was applied (ls -la contiki/tools/sky/serialdump-linux should show the downloaded file, not the .bak) |
Broadcast experiment shows only broadcast message sent with no received messages |
Nodes too far apart, wrong channel, or one node not running the firmware | Verify both nodes are flashed and running; Contiki defaults to channel 26 on both |
openjdk-8-jdk unavailable on newer images |
Ubuntu 16.04 specific package; newer images may have different JDK versions | Try openjdk-11-jdk or consult the Contiki documentation for updated dependencies |
Author(s): COSMOS team · Last verified: Not re-tested (migrated 2026-06-20) · Tested image/release: ubuntu-16-04-64bit-rzraven.ndz / TODO: verify omf version · Tags: ieee802154, zigbee, bluetooth, contiki, telosb, iot, msp430