Analyse of a real 6LoWPAN network using a Contiki-based sniffer module
- This tutorial is an introduction to IP-based sensor networks with Contiki.
- Contiki has supported IP networking, through the uIP TCP/IP stack, since its first released in 2003. In 2008, Cisco released the world's smallest IPv6 stack, called uIPv6, for Contiki.
- 6LoWPAN: is an acronym of IPv6 over Low power Wireless Personal Area Networks. The 6LoWPAN group has defined encapsulation and header compression mechanisms that allow IPv6 packets to be sent to and received over IEEE 802.15.4 based networks.
You will learn
This tutorial will walk you through the steps of setting up Contiki to sniff 6LoWPAN packets and visualize a real time wireless sensor network (WSN) in an interactive environment of Foren6. You will deploy UDP server-client IPv6 example on Tmote-Sky motes and sniff the packets on particular RF channel (1-26) (Note: In Contiki RF Channel range from 11-26) on a Tmote-Sky. You will install Foren6 and learn how to integrate a Tmote-sky with real-time diagnosis tool.
Foren6: A 6LoWPAN Diagnosis tool
Foren6 is an effort to provide a non-intrusive 6LoWPAN network analysis tool. It leverages passive sniffer devices to reconstruct a visual and textual representation of network information to support real-world Internet of Things applications where other means of debug (cabled or network-based monitoring) are too costly or impractical.
- Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.
- Foren6 captures all RPL-related information and identifies abnormal behaviors.
- Multiple sniffers can be combined for extended coverage.
- Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.
- System with Linux/MacOS X
- For the purpose of this tutorial it is assumed that you already have a working Contiki 2.7 environment set up on your system and have access to at least three Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation
- sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc
- Get the Source
- git clone https://github.com/cetic/foren6.git
- Install Foren6
- cd foren6
- sudo make install
Collect-view on Tmote-Sky
Configuring the sniffer for real time capture
- You can also use Cooja (Network Simulator) to analyze an network. In Cooja use "Radio Message with a 6LoWPAN analyzer with pcap export" to store the packet capture in pcap format. Thus you can then use Wireshark or Foren6 to visualize the network and debug it.
- References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja
- Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw