::'''The local-link addresses (FE80::/10)''' is used to communicate with devices in the same link (however, the link can be extended with Layer 2 switches).<br>
 
::'''The local-link addresses (FE80::/10)''' is used to communicate with devices in the same link (however, the link can be extended with Layer 2 switches).<br>
 
::'''The global addresses (everything else)''' are used for communicating devices globally.<br>
 
::'''The global addresses (everything else)''' are used for communicating devices globally.<br>
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]
+
[[File:6LoWPANWSNNetwork.png|center|frame|6LoWPAN Wireless Sensor Network]]
    
== You will learn ==
 
== You will learn ==
This tutorial will walk you through the steps of setting up Contiki to sniff real time 6LoWPAN packets and visualize a wireless sensor network (WSN) in an interactive environment of Foren6. You will deploy 2 applications Collect-view and uIPv6 Ping 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. Thus you should have atleast 3 Tmote-sky motes and system with Ubuntu/Mac OS on it. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br>
+
This tutorial will walk you through the steps of setting up Contiki to sniff real time 6LoWPAN packets and visualize a wireless sensor network (WSN) in an interactive environment of Foren6. You will deploy Collect-view application 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. Thus you should have atleast 3 Tmote-sky motes and system with Ubuntu/Mac OS on it. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br>
    
== Foren6: A 6LoWPAN Diagnosis tool ==
 
== Foren6: A 6LoWPAN Diagnosis tool ==
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]
+
[[File:ReallayoutWSN.png|right|frameless|500x600px|Real layout of WSN]]
 
Foren6 is an effort to provide a noReal layout of WSNn-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.<br><br>
 
Foren6 is an effort to provide a noReal layout of WSNn-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.<br><br>
       
Foren6 Installation:<br>
 
Foren6 Installation:<br>
[[File:Foren6.png|center|frame|500x600px|link=|Foren6]]
+
[[File:Foren6.png|center|frame|500x600px|Foren6]]
 
* Dependencies<br>
 
* Dependencies<br>
 
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre>
 
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre>
 
<pre>make TARGET=sky savetarget sniffer.upload</pre><br>
 
<pre>make TARGET=sky savetarget sniffer.upload</pre><br>
   −
== Application 1 - Collect-view ==
+
== Setting up the experiment ==
 
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br>
 
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br>
 
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre>
 
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre>
 
* Place the nodes in the environment and connect the sniffer mote to your machine.<br>
 
* Place the nodes in the environment and connect the sniffer mote to your machine.<br>
 
* Launch Foren6 and select the sniffer as input device:<br>
 
* Launch Foren6 and select the sniffer as input device:<br>
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]
+
[[File:ManageSniffers.png|right|frameless|500x600px|Foren6: Manage Sniffers]]
 
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br>
 
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br>
 
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br>
 
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br>
 
:::By default it is generally 26, but may vary between 11-26.<br>
 
:::By default it is generally 26, but may vary between 11-26.<br>
 
::* '''Type:''' select '''snif'''<br>
 
::* '''Type:''' select '''snif'''<br>
:+ Click the '''Add''' button when the above information is entered. If the device is found by the application, it will appear in the list of available device. If your device exists but you get an error at this point, is it likely that the user running Foren6 does not have permission to access that serial device. See the above instructions to grant user permissions, or launch the foren6 application as root (not recommended).<br>
+
:+ Click the '''Add''' button when the above information is entered. If the device is found by the application, it will appear in the list of available device. If your device exists but you get an error at this point, is it likely that the user running Foren6 does not have permission to access that serial device. See the above instructions to grant user permissions, or launch the foren6 application as root (not recommended) or use the command- sudo chmod 777 /dev/ttyUSBx.<br>
 
:+ Hit the '''Close''' button to return to the main window.<br>
 
:+ Hit the '''Close''' button to return to the main window.<br>
 
* Click the '''Start''' button to capture packets.<br>
 
* Click the '''Start''' button to capture packets.<br>
 
* Timeline should start ticking and new packets will appear in the Event Window. If the packets are properly formatted, the network visualiser will display the sniffed nodes, and connect them to form a reconstructed RPL graph based on the sniffed information.<br><br>
 
* Timeline should start ticking and new packets will appear in the Event Window. If the packets are properly formatted, the network visualiser will display the sniffed nodes, and connect them to form a reconstructed RPL graph based on the sniffed information.<br><br>
   Exception encountered, of type "Error"