== 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 ==
 
<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>
 
:::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>
   −
== Results of Application 1 ==
+
== Results ==
 
[[File:CollectView-Foren6RankDepth.png|center|frame|500x600px|link=|Foren6 Rank Depth]]
 
[[File:CollectView-Foren6RankDepth.png|center|frame|500x600px|link=|Foren6 Rank Depth]]
 
[[File:CollectView-Foren6NodeTraffic1.png|center|frame|500x600px|link=|Foren6 Node Traffic 1]]
 
[[File:CollectView-Foren6NodeTraffic1.png|center|frame|500x600px|link=|Foren6 Node Traffic 1]]
 
[[File:CollectView-Foren6NodeTraffic2.png|center|frame|500x600px|link=|Foren6 Node Traffic 2]]
 
[[File:CollectView-Foren6NodeTraffic2.png|center|frame|500x600px|link=|Foren6 Node Traffic 2]]
Exception encountered, of type "Error"