http://anrg.usc.edu/contiki/api.php?action=feedcontributions&user=Ygoyal&feedformat=atomContiki - User contributions [en]2024-03-28T15:46:47ZUser contributionsMediaWiki 1.26.2http://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1559Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T03:41:01Z<p>Ygoyal: /* Results */</p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Setting up the experiment ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results ==<br />
* The left pane is Node information window contains information such as 802.15.4 Mac address, IPv6 addresses, RPL configuration, RPL operational data, Statistics, Errors and Routing table.<br><br />
* Window tool-bar can help you add dockable packet dissector and dockable event widget in the Foren6 GUI.<br><br />
* By default the background is white, but you can load layouts of your environment and manually place the motes in its location.<br><br />
[[File:CollectView-Foren6RankDepth.jpeg|center|frame|350x450px|Foren6 Rank Depth]]<br><br />
* Real time network visualization in Foren6 with Overlay Rank Depth.<br />
[[File:CollectView-Foren6NodeTraffic1.jpeg|center|frame|350x450px|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.jpeg|center|frame|350x450px|Foren6 Node Traffic 2]]<br />
* Real time network visualization in Foren6 with Overlay Node Traffic.<br><br />
<br />
== Conclusion == <br />
* Foren6 is a powerful 6LoWPAN diagnosis tool. We can exploit it to understand the working of RPL and how control messages flows in the WSN. <br><br />
* Other features like '''Overlays''' in Foren6 allow to customize the network visualizer according to a certain metric or parameter. This helps in understanding and debugging the network.<br><br />
* As tcpdump is powerful tool in wired networks, packet sniffing can be considered as equivalent tool in WSN.<br><br><br />
<br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br />
* Use multiple sniffers and experiment to visualize the real time flow of packets in wireless sensor networks. This will increase robustness and coverage area of the network. <br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1558Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T03:27:52Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Setting up the experiment ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results ==<br />
[[File:CollectView-Foren6RankDepth.jpeg|center|frame|350x450px|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.jpeg|center|frame|350x450px|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.jpeg|center|frame|350x450px|Foren6 Node Traffic 2]]<br />
== Conclusion == <br />
* Foren6 is a powerful 6LoWPAN diagnosis tool. We can exploit it to understand the working of RPL and how control messages flows in the WSN. <br><br />
* Other features like '''Overlays''' in Foren6 allow to customize the network visualizer according to a certain metric or parameter. This helps in understanding and debugging the network.<br><br />
* As tcpdump is powerful tool in wired networks, packet sniffing can be considered as equivalent tool in WSN.<br><br><br />
<br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br />
* Use multiple sniffers and experiment to visualize the real time flow of packets in wireless sensor networks. This will increase robustness and coverage area of the network. <br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1557Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T03:24:59Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|link=|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Setting up the experiment ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results ==<br />
[[File:CollectView-Foren6RankDepth.jpeg|center|frame|350x450px|link=|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.jpeg|center|frame|350x450px|link=|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.jpeg|center|frame|350x450px|link=|Foren6 Node Traffic 2]]<br />
== Conclusion == <br />
* Foren6 is a powerful 6LoWPAN diagnosis tool. We can exploit it to understand the working of RPL and how control messages flows in the WSN. <br><br />
* Other features like '''Overlays''' in Foren6 allow to customize the network visualizer according to a certain metric or parameter. This helps in understanding and debugging the network.<br><br />
* As tcpdump is powerful tool in wired networks, packet sniffing can be considered as equivalent tool in WSN.<br><br><br />
<br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br />
* Use multiple sniffers and experiment to visualize the real time flow of packets in wireless sensor networks. This will increase robustness and coverage area of the network. <br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:CollectView-Foren6NodeTraffic2.jpeg&diff=1556File:CollectView-Foren6NodeTraffic2.jpeg2014-11-10T03:23:36Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:CollectView-Foren6NodeTraffic1.jpeg&diff=1555File:CollectView-Foren6NodeTraffic1.jpeg2014-11-10T03:23:15Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:CollectView-Foren6RankDepth.jpeg&diff=1554File:CollectView-Foren6RankDepth.jpeg2014-11-10T03:22:51Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1553Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T03:22:36Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|link=|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Setting up the experiment ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results ==<br />
[[File:CollectView-Foren6RankDepth.jpeg|center|frame|500x600px|link=|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.jpeg|center|frame|500x600px|link=|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.jpeg|center|frame|500x600px|link=|Foren6 Node Traffic 2]]<br />
== Conclusion == <br />
* Foren6 is a powerful 6LoWPAN diagnosis tool. We can exploit it to understand the working of RPL and how control messages flows in the WSN. <br><br />
* Other features like '''Overlays''' in Foren6 allow to customize the network visualizer according to a certain metric or parameter. This helps in understanding and debugging the network.<br><br />
* As tcpdump is powerful tool in wired networks, packet sniffing can be considered as equivalent tool in WSN.<br><br><br />
<br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br />
* Use multiple sniffers and experiment to visualize the real time flow of packets in wireless sensor networks. This will increase robustness and coverage area of the network. <br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1552Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T02:33:41Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|link=|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Setting up the experiment ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results ==<br />
[[File:CollectView-Foren6RankDepth.png|center|frame|500x600px|link=|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.png|center|frame|500x600px|link=|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.png|center|frame|500x600px|link=|Foren6 Node Traffic 2]]<br />
== Conclusion == <br />
* Foren6 is a powerful 6LoWPAN diagnosis tool. We can exploit it to understand the working of RPL and how control messages flows in the WSN. <br><br />
* Other features like '''Overlays''' in Foren6 allow to customize the network visualizer according to a certain metric or parameter. This helps in understanding and debugging the network.<br><br />
* As tcpdump is powerful tool in wired networks, packet sniffing can be considered as equivalent tool in WSN.<br><br><br />
<br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br />
* Use multiple sniffers and experiment to visualize the real time flow of packets in wireless sensor networks. This will increase robustness and coverage area of the network. <br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1551Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T02:31:45Z<p>Ygoyal: /* Conclusion */</p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|link=|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Setting up the experiment ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results ==<br />
[[File:CollectView-Foren6RankDepth.png|center|frame|500x600px|link=|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.png|center|frame|500x600px|link=|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.png|center|frame|500x600px|link=|Foren6 Node Traffic 2]]<br />
== Conclusion == <br />
* Foren6 is a powerful 6LoWPAN diagnosis tool. We can exploit it to understand the working of RPL and how control messages flows in the WSN. <br><br />
* Other features like '''Overlays''' in Foren6 allow to customize the network visualizer according to a certain metric or parameter. This helps in understanding and debugging the network.<br><br />
* As tcpdump is powerful tool in wired networks, packet sniffing can be considered as equivalent tool in WSN.<br><br><br />
<br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br />
* Use multiple sniffers and experiment to visualize the real time flow of packets in wireless sensor networks. This will increase robustness and coverage area of the network. <br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1550Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T02:29:50Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|link=|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Setting up the experiment ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results ==<br />
[[File:CollectView-Foren6RankDepth.png|center|frame|500x600px|link=|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.png|center|frame|500x600px|link=|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.png|center|frame|500x600px|link=|Foren6 Node Traffic 2]]<br />
== Conclusion == <br />
* Foren6 is a powerful 6LoWPAN diagnosis tool. We could exploit this to understand the working of RPL and how the control messages flow in the network. <br><br />
* Other features like '''Overlays''' in Foren6 allows to customize the network visualizer according to a certain metric or parameter. This helps in understanding and debugging the network.<br><br />
* As tcpdump is powerful tool in conventional networking, packet sniffing can be considered as equivalent tool in WSN.<br><br><br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br />
* Use multiple sniffers and experiment to visualize the real time flow of packets in wireless sensor networks. This will increase robustness and coverage area of the network. <br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1549Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T00:26:39Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<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 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><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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 3 Tmote-Sky motes. Otherwise follow this link - http://anrg.usc.edu/contiki/index.php/Installation<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|center|frame|500x600px|link=|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 2 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results of Application 1 ==<br />
[[File:CollectView-Foren6RankDepth.png|center|frame|500x600px|link=|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.png|center|frame|500x600px|link=|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.png|center|frame|500x600px|link=|Foren6 Node Traffic 2]]<br />
== Application 2 - uIPv6 Ping ==<br />
== Results of Application 2 == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:Foren6.png&diff=1548File:Foren6.png2014-11-10T00:16:45Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1547Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T00:16:00Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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 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. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
[[File:Foren6.png|right|frameless|500x600px|link=|Foren6]]<br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 3 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results of Application 1 ==<br />
[[File:CollectView-Foren6RankDepth.png|center|frame|500x600px|link=|Foren6 Rank Depth]]<br />
[[File:CollectView-Foren6NodeTraffic1.png|center|frame|500x600px|link=|Foren6 Node Traffic 1]]<br />
[[File:CollectView-Foren6NodeTraffic2.png|center|frame|500x600px|link=|Foren6 Node Traffic 2]]<br />
== Application 2 - uIPv6 Ping ==<br />
== Results of Application 2 == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1546Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T00:10:12Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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 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. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide for Contiki and Foren6 ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 3 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results of Application 1 ==<br />
== Application 2 - uIPv6 Ping ==<br />
== Results of Application 2 == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1545Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T00:07:50Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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 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. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 3 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command $ ls /dev/<br><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:ManageSniffers.png&diff=1544File:ManageSniffers.png2014-11-10T00:06:49Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1543Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T00:06:33Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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 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. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 3 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
[[File:ManageSniffers.png|right|frameless|500x600px|link=|Foren6: Manage Sniffers]]<br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command<br />
:::<pre>ls /dev/</pre><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1542Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-10T00:03:44Z<p>Ygoyal: /* Application 1 - Collect-view */</p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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 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. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 3 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command<br />
:::<pre>ls /dev/</pre><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select '''snif'''<br><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><br />
:+ Hit the '''Close''' button to return to the main window.<br><br />
* Click the '''Start''' button to capture packets.<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><br />
<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1541Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T23:59:49Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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 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. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 3 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command<br />
:::<pre>ls /dev/</pre><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL</pre><br />
:::<pre>#define RF_CHANNEL 26</pre><br />
:::<pre>#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary between 11-26.<br><br />
::* '''Type:''' select snif<br><br />
<br />
<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1540Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T23:58:49Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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 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. You will install Foren6 and learn how to integrate a Tmote-sky sniffer with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Configuring the sniffer for real time capture ==<br />
* Setting user permissions:<br><br />
:On Linux, you should configure permissions for the user to access the USB serial devices – it is much better practice then launching Foren6 as root. To grant access to a user account, add that user to the 'dialout’ group:<br><br />
<pre>sudo adduser <username> dialout</pre><br />
:Then, restart your session to apply the modifications.<br><br />
* Programming the sniffer:<br><br />
:Download the sniffer source<br><br />
<pre>git clone https://github.com/cetic/contiki<br />
cd contiki<br />
git checkout sniffer</pre><br />
* Connect Tmote-sky and upload the sniffer application<br><br />
<pre>make TARGET=sky savetarget sniffer.upload</pre><br><br />
<br />
== Application 1 - Collect-view ==<br />
* Follow the below tutorial and program one Tmote-sky as udp-sink and 3 as udp-senders.<br><br />
<pre>http://anrg.usc.edu/contiki/index.php/Collect_View</pre><br />
* Place the nodes in the environment and connect the sniffer mote to your machine.<br><br />
* Launch Foren6 and select the sniffer as input device:<br><br />
:+ Open the 'Manage Sources’ dialog by clicking the Manage Sources button in the Toolbar or from the 'File’ menu.<br><br />
:+ In this dialog, remove any existing entries in the top section by selecting each individual element and hitting the 'Remove’ button.<br><br />
:+ Next, add a new source by specifying the three fields as shown below:<br><br />
::* '''Target:''' type the path to the USB device (example: /dev/ttyUSB0)<br><br />
:::Tip: You can find out about the device by the command<br />
:::<pre>ls /dev/</pre><br />
::* '''Channel:''' the integer value of the Channel you want to snif (1 to 26)<br><br />
:::Tip: To find out the channel the collect-view Tmote-sky platform is using, go to the file contiki/platform/sky/contiki-conf.h and search for the following<br><br />
:::<pre>#ifndef RF_CHANNEL<br />
:::#define RF_CHANNEL 26<br />
:::#endif /* RF_CHANNEL */</pre><br />
:::By default it is generally 26, but may vary betwType:een 11-26.<br />
::* '''Type:''' select snif<br><br />
<br />
<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1539Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T21:58:55Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br />
* 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<br><br><br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Collect-view on Tmote-Sky ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1538Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T21:56:48Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::<pre>FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123</pre><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br><br />
* 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<br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
<pre>sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc</pre><br />
* Get the Source<br><br />
<pre>git clone https://github.com/cetic/foren6.git</pre><br />
* Install Foren6<br><br />
<pre>cd foren6<br />
make<br />
sudo make install</pre><br />
<br />
== Collect-view on Tmote-Sky ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:6LoWPANWSNNetwork.png&diff=1537File:6LoWPANWSNNetwork.png2014-11-09T21:42:07Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1536Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T21:41:54Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123<br><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br />
[[File:6LoWPANWSNNetwork.png|center|frame|link=|6LoWPAN Wireless Sensor Network]]<br />
<br />
== You will learn ==<br />
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.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<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><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br><br />
* 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<br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
:sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc<br><br><br />
* Get the Source<br><br />
:git clone https://github.com/cetic/foren6.git<br><br><br />
* Install Foren6<br><br />
:cd foren6<br><br />
:make<br><br />
:sudo make install<br><br><br />
<br />
== Collect-view on Tmote-Sky ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1535Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T21:38:33Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* '''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. <br><br />
* '''Basics of working with IPv6:'''<br><br />
:+ First thing to know is the fact that IPv6 addresses contain several zeros that can be shortened in several forms, such as-<br><br />
::FE80:0000:0000:0000:0000:0000:0000:F123 = FE80:0:0:0:0:0:0:F123 = FE80::F123<br><br />
:+ Additionally, the huge address space of IPv6 allows devices to have serverl addresses used for various purposes (for example, local communication, global communication)<br><br />
::'''The loopback address (::1)''' is a similar address than 127.0.0.0 in IPv4 used to check the status of the interface (is good for checking if you have enabled IPv6 in your OS). <br><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><br />
::'''The global addresses (everything else)''' are used for communicating devices globally.<br><br><br />
<br />
== You will learn ==<br />
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.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<br />
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.<br><br><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br><br />
* 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<br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
:sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc<br><br><br />
* Get the Source<br><br />
:git clone https://github.com/cetic/foren6.git<br><br><br />
* Install Foren6<br><br />
:cd foren6<br><br />
:make<br><br />
:sudo make install<br><br><br />
<br />
== Collect-view on Tmote-Sky ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1534Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T21:30:48Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
* This tutorial is an introduction to IP-based sensor networks with Contiki. <br><br />
* 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. <br><br />
* 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. <br><br />
<br />
<br />
== You will learn ==<br />
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.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<br />
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.<br><br><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br><br />
* 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<br />
<br />
Foren6 Installation:<br><br />
* Dependencies<br><br />
:sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc<br><br><br />
* Get the Source<br><br />
:git clone https://github.com/cetic/foren6.git<br><br><br />
* Install Foren6<br><br />
:cd foren6<br><br />
:make<br><br />
:sudo make install<br><br><br />
<br />
== Collect-view on Tmote-Sky ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
== Future Scope == <br />
* 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. <br><br />
:References: https://github.com/ejoerns/contiki-inga/wiki/Using-Wireshark-with-Contiki-and-Cooja<br><br />
:::http://sourceforge.net/p/contiki/mailman/message/30604147/<br><br />
:Tip: You will find the pcap file in contiki/tools/cooja/build/radiolog-xxxxxxx.pcap<br><br><br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
http://cnds.eecs.jacobs-university.de/courses/adsl-2009/presentation-3.pdf<br><br />
Understanding 6LoWPAN network: http://www.embedded.com/electronics-blogs/embedded-cloud-talkers/4236873/How-to-setup-a-6LoWPAN-network<br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1532Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T20:07:50Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
<br />
== You will learn ==<br />
In this tutorial you will enable 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 multiple Tmote-Sky and sniff the communication channel on one of the Tmote-Sky. You will install Foren6 and learn how to integrate a Tmote-sky with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<br />
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.<br><br><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Foren6 Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br><br />
<br />
Installation:<br><br />
* Dependencies<br><br />
:sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc<br><br><br />
* Get the Source<br><br />
:git clone https://github.com/cetic/foren6.git<br><br><br />
* Install Foren6<br><br />
:cd foren6<br><br />
:make<br><br />
:sudo make install<br><br><br />
<br />
== Collect-view on Tmote-Sky ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1531Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T20:07:00Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
<br />
== You will learn ==<br />
In this tutorial you will enable 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 multiple Tmote-Sky and sniff the communication channel on one of the Tmote-Sky. You will install Foren6 and learn how to integrate a Tmote-sky with real-time diagnosis tool.<br><br><br />
<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|link=|Real layout of WSN]]<br />
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.<br><br><br />
<br />
* Foren6 uses sniffers to capture 6LoWPAN traffic and renders the network state it in a GUI.<br><br />
* Foren6 captures all RPL-related information and identifies abnormal behaviors.<br><br />
* Multiple sniffers can be combined for extended coverage.<br><br />
* Rewind the packet capture history, replay a previous packet trace and navigate through different overlays to pinpoint problems.<br><br><br><br />
<br />
== Foren6 Installation guide ==<br />
Requirements:<br><br />
* System with Linux/MacOS X <br><br><br />
<br />
Installation:<br><br />
* Dependencies<br><br />
:sudo apt-get install -y libqt4-dev qt4-qmake cmake make libexpat1-dev tshark libpcap0.8-dev libc6-dev g++ gcc<br><br><br />
* Get the Source<br><br />
:git clone https://github.com/cetic/foren6.git<br><br><br />
* Install Foren6<br><br />
:cd foren6<br><br />
:make<br><br />
:sudo make install<br><br><br />
<br />
== Collect-view on Sky motRPL DODAGes ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
More about Foren6, Video: https://www.youtube.com/watch?v=oildt3x6htw<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1530Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T19:49:51Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
<br />
== You will learn ==<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px]]<br />
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.<br><br><br />
<br />
== Foren6 Installation guide ==<br />
== Collect-view on Sky motRPL DODAGes ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1529Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T19:49:15Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
<br />
== You will learn ==<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|right|frameless|500x600px|Real layout of WSN]]<br />
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.<br><br><br />
<br />
== Foren6 Installation guide ==<br />
== Collect-view on Sky motRPL DODAGes ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:ReallayoutWSN.png&diff=1528File:ReallayoutWSN.png2014-11-09T19:42:56Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1527Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T19:38:33Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
<br />
== You will learn ==<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
[[File:ReallayoutWSN.png|center|frame|Real layout of WSN]]<br />
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.<br><br><br />
<br />
== Foren6 Installation guide ==<br />
== Collect-view on Sky motRPL DODAGes ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br><br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Analyse_of_a_real_6LoWPAN_network_using_a_Contiki-based_sniffer_module&diff=1357Analyse of a real 6LoWPAN network using a Contiki-based sniffer module2014-11-09T05:31:20Z<p>Ygoyal: Created page with " Back to Contiki Tutorials __TOC__ == Introduction == == You will learn == == Foren6: A 6LoWPAN Diagnosis tool == == Foren6 Installation guide == == C..."</p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
== Introduction ==<br />
== You will learn ==<br />
== Foren6: A 6LoWPAN Diagnosis tool ==<br />
== Foren6 Installation guide ==<br />
== Collect-view on Sky motes ==<br />
== Configuring the sniffer for real time capture ==<br />
== Results == <br />
<br />
== References ==<br />
http://cetic.github.io/foren6/index.html<br><br />
http://cetic.github.io/foren6/example2.html<br><br />
http://cetic.github.io/foren6/install.html<br?<br />
http://en.wikipedia.org/wiki/6LoWPAN<br><br />
http://anrg.usc.edu/contiki/index.php/Collect_View<br><br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&diff=1351Contiki tutorials2014-11-09T05:20:56Z<p>Ygoyal: </p>
<hr />
<div>[[Main_Page | Back to Main Page]]<br />
<br />
== List of Tutorials ==<br />
<br />
Completed<br />
# [[Installation]]<br />
# [[Hello World]]<br />
# [[Broadcast Example]]<br />
# [[Collect View]]<br />
# [[Contiki build system]]<br />
# [[Interfacing with Python]]<br />
# [[Sensor acquisition]] (light, temperature, humidity)<br />
<br />
Need review<br />
# [[Timers]] Tim, Leo<br />
# [[CFS-Coffee]] Kevin<br />
<br />
Starting<br />
# [[Tutornet]] Pedro, Kwame<br />
# [[Cooja Simulator]] (Getting started, debugging) Pedro<br />
# [[Network Stack]] Yash<br />
# [[CSMA]] Tim, Leo<br />
# [[RSS measurement]]<br />
# [[RPL objective function modification and simulation in cooja ]] Ashwini Telang<br />
# [[RPL UDP]] Jiahao Liang<br />
# [[MAC protocols in ContikiOS]] Pedro<br />
# [[RPL Border Router]] Chhavi<br />
# [[REST example running on Cooja and Sky motes]] Mrunal Muni <br />
# [[Trickle library]] Subhashini Sundaresan<br />
# [[Packetbuffer Basics]] Pradipta<br />
# [[Antelope(Database Management System) - Contiki]] Gopi Krishna<br />
# [[Mobility of Nodes in Cooja]] Pratyush Deshpande<br />
# [[Contiki Shell]] Abhilash Nagaraj Hegde<br />
# [[Contiki Coffee File System]] Zhikun Liu<br />
# [[Contiki Programming Guide]] Haimo Bai<br />
# [[Analyse of a real 6LoWPAN network using a Contiki-based sniffer module]] Yash Goyal<br />
<!--[[Processes]] Yash --><br />
<br />
<br />
<br />
<!--# [[Collect-view Code Details]] Pradipta --><br />
<br />
<pre style="color: red">Be sure to include references in your tutorials, especially if you quote material from other sites!</pre></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Network_Stack&diff=492Network Stack2014-10-27T09:06:43Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== Contiki Netstack ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
'''Four Layers'''<br><br />
1. Network layer - NETSTACK_RADIO<br><br />
2. MAC (Medium Access Control) layer - NETSTACK_MAC<br><br />
3. RDC (Radio Duty Cycling) layer - NETSTACK_RDC<br><br />
4. Radio layer - NETSTACK_RADIO<br><br><br />
<br />
'''The packet buffer - packetbuf'''<br><br />
* One buffer, holds a single packet.<br><br />
* All layers of the netstack operate on the packetbuf.<br><br />
* Large enough to hold a single radio packet - PACKETBUF_CONF_LEN<br><br><br />
<br />
'''Queue buffers - queuebuf'''<br><br />
* The packetbuf only holds the current packet.<br><br />
* To store packets on queues, use a queuebuf.<br><br />
* Use a list to keep track of them.<br><br><br />
<br />
'''uIP packet buffer - uip_buf'''<br><br><br />
<br />
'''Framers - NETSTACK_FRAMER'''<br><br />
* The framer module converts link-layer headers to packet attributes - '''parse()'''<br><br />
* And packet attributes to link-layer headers - '''create()'''<br><br />
<br><br />
<br />
== Network & Routing Layer ==<br />
<br />
* Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
* RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
* DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, DAG version number etc.<br><br />
[[File:NF1.png|center|frame|5 nodes Network]]<br><br />
[[File:NF2.png|center|frame|DIO message sent by root node]]<br><br />
[[File:NF3.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF4.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF5.png|center|frame|Rank of the nodes with respect to the root]]<br><br />
* The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
<br />
<br />
== Adaptation Layer ==<br />
<br />
== MAC Layer ==<br />
* The simplest layer in the IoT/IP stack.<br><br />
* Avoid collisions, back-off if there is traffic.<br><br />
* CSMA/CA: Carrier Sense Multiple Access with Collision Avoidance<br><br />
:+ Sense the medium before sending.<br><br />
:+ Back-off if someone else is sending.<br><br />
:+ Timing depends on RDC layer.<br><br />
:+ Network layer decided number of transmissions.<br><br />
* nullmac: Forwards packets from the upper layer to the radio driver and vice versa.<br><br><br />
<br />
== RDC Layer ==<br />
<br />
== Radio Layer ==<br />
<br />
<br />
== References ==<br />
http://www.slideshare.net/ADunkels/building-day-2-upload-building-the-internet-of-things-with-thingsquare-and-contiki-day-2-part-3<br><br />
http://www.slideshare.net/ADunkels/building-the-internet-of-things-with-thingsquare-and-contiki-day-1-part-2?related=1<br><br />
https://tools.ietf.org/html/rfc6550<br><br />
http://www.slideshare.net/ADunkels/building-day-2-upload-1?next_slideshow=1<br><br />
http://www.slideshare.net/ADunkels/advanced-internet-of-things-firmware-engineering-with-thingsquare-and-contiki-day-1-part-2<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Network_Stack&diff=491Network Stack2014-10-27T08:42:04Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== Contiki Netstack ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
'''Four Layers'''<br><br />
1. Network layer - NETSTACK_RADIO<br><br />
2. MAC (Medium Access Control) layer - NETSTACK_MAC<br><br />
3. RDC (Radio Duty Cycling) layer - NETSTACK_RDC<br><br />
4. Radio layer - NETSTACK_RADIO<br><br><br />
<br />
'''The packet buffer - packetbuf'''<br><br />
* One buffer, holds a single packet.<br><br />
* All layers of the netstack operate on the packetbuf.<br><br />
* Large enough to hold a single radio packet - PACKETBUF_CONF_LEN<br><br><br />
<br />
'''Queue buffers - queuebuf'''<br><br />
* The packetbuf only holds the current packet.<br><br />
* To store packets on queues, use a queuebuf.<br><br />
* Use a list to keep track of them.<br><br><br />
<br />
'''uIP packet buffer - uip_buf'''<br><br><br />
<br />
'''Framers - NETSTACK_FRAMER'''<br><br />
* The framer module converts link-layer headers to packet attributes - '''parse()'''<br><br />
* And packet attributes to link-layer headers - '''create()'''<br><br />
<br><br />
<br />
== Network & Routing Layer ==<br />
<br />
* Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
* RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
* DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, DAG version number etc.<br><br />
[[File:NF1.png|center|frame|5 nodes Network]]<br><br />
[[File:NF2.png|center|frame|DIO message sent by root node]]<br><br />
[[File:NF3.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF4.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF5.png|center|frame|Rank of the nodes with respect to the root]]<br><br />
* The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
* <br />
<br />
<br />
== References ==<br />
http://www.slideshare.net/ADunkels/building-day-2-upload-building-the-internet-of-things-with-thingsquare-and-contiki-day-2-part-3<br><br />
http://www.slideshare.net/ADunkels/building-the-internet-of-things-with-thingsquare-and-contiki-day-1-part-2?related=1<br><br />
https://tools.ietf.org/html/rfc6550<br><br />
http://www.slideshare.net/ADunkels/building-day-2-upload-1?next_slideshow=1<br><br />
http://www.slideshare.net/ADunkels/advanced-internet-of-things-firmware-engineering-with-thingsquare-and-contiki-day-1-part-2<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Network_Stack&diff=490Network Stack2014-10-27T08:41:07Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== Contiki Netstack ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
'''Four Layers'''<br><br />
1. Network layer - NETSTACK_RADIO<br><br />
2. MAC (Medium Access Control) layer - NETSTACK_MAC<br><br />
3. RDC (Radio Duty Cycling) layer - NETSTACK_RDC<br><br />
4. Radio layer - NETSTACK_RADIO<br><br><br />
<br />
'''The packet buffer - packetbuf'''<br><br />
* One buffer, holds a single packet.<br><br />
* All layers of the netstack operate on the packetbuf.<br><br />
* Large enough to hold a single radio packet - PACKETBUF_CONF_LEN<br><br><br />
<br />
'''Queue buffers - queuebuf'''<br><br />
* The packetbuf only holds the current packet.<br><br />
* To store packets on queues, use a queuebuf.<br><br />
* Use a list to keep track of them.<br><br><br />
<br />
'''uIP packet buffer - uip_buf'''<br><br><br />
<br />
'''Framers - NETSTACK_FRAMER'''<br><br />
* The framer module converts link-layer headers to packet attributes - '''parse()'''<br><br />
* And packet attributes to link-layer headers - '''create()'''<br><br />
<br />
<br />
<br><br><br><br />
== Network & Routing Layer ==<br />
<br />
* Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
* RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
* DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, DAG version number etc.<br><br />
[[File:NF1.png|center|frame|5 nodes Network]]<br><br />
[[File:NF2.png|center|frame|DIO message sent by root node]]<br><br />
[[File:NF3.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF4.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF5.png|center|frame|Rank of the nodes with respect to the root]]<br><br />
* The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
* <br />
<br />
<br />
== References ==<br />
http://www.slideshare.net/ADunkels/building-day-2-upload-building-the-internet-of-things-with-thingsquare-and-contiki-day-2-part-3<br><br />
http://www.slideshare.net/ADunkels/building-the-internet-of-things-with-thingsquare-and-contiki-day-1-part-2?related=1<br><br />
https://tools.ietf.org/html/rfc6550<br><br />
http://www.slideshare.net/ADunkels/building-day-2-upload-1?next_slideshow=1<br><br />
http://www.slideshare.net/ADunkels/advanced-internet-of-things-firmware-engineering-with-thingsquare-and-contiki-day-1-part-2<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Network_Stack&diff=489Network Stack2014-10-27T08:39:38Z<p>Ygoyal: Created page with " Back to Contiki Tutorials __TOC__ The Contiki netstacks<br><br> '''Three network stacks'''<br> 1. IPv6<br> 2. IPv4<br> 3. Rime<br><br> == The Con..."</p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
The Contiki netstacks<br><br><br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== The Contiki netstack ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
'''Four Layers'''<br><br />
1. Network layer - NETSTACK_RADIO<br><br />
2. MAC (Medium Access Control) layer - NETSTACK_MAC<br><br />
3. RDC (Radio Duty Cycling) layer - NETSTACK_RDC<br><br />
4. Radio layer - NETSTACK_RADIO<br><br><br />
<br />
'''The packet buffer - packetbuf'''<br><br />
* One buffer, holds a single packet.<br><br />
* All layers of the netstack operate on the packetbuf.<br><br />
* Large enough to hold a single radio packet - PACKETBUF_CONF_LEN<br><br><br />
<br />
'''Queue buffers - queuebuf'''<br><br />
* The packetbuf only holds the current packet.<br><br />
* To store packets on queues, use a queuebuf.<br><br />
* Use a list to keep track of them.<br><br><br />
<br />
'''uIP packet buffer - uip_buf'''<br><br><br />
<br />
'''Framers - NETSTACK_FRAMER'''<br><br />
* The framer module converts link-layer headers to packet attributes - '''parse()'''<br><br />
* And packet attributes to link-layer headers - '''create()'''<br><br />
<br />
<br />
<br><br><br><br />
== Network & Routing Layer ==<br />
<br />
* Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
* RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
* DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, DAG version number etc.<br><br />
[[File:NF1.png|center|frame|5 nodes Network]]<br><br />
[[File:NF2.png|center|frame|DIO message sent by root node]]<br><br />
[[File:NF3.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF4.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF5.png|center|frame|Rank of the nodes with respect to the root]]<br><br />
* The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
* <br />
<br />
<br />
== References ==<br />
http://www.slideshare.net/ADunkels/building-day-2-upload-building-the-internet-of-things-with-thingsquare-and-contiki-day-2-part-3<br><br />
http://www.slideshare.net/ADunkels/building-the-internet-of-things-with-thingsquare-and-contiki-day-1-part-2?related=1<br><br />
https://tools.ietf.org/html/rfc6550<br><br />
http://www.slideshare.net/ADunkels/building-day-2-upload-1?next_slideshow=1<br><br />
http://www.slideshare.net/ADunkels/advanced-internet-of-things-firmware-engineering-with-thingsquare-and-contiki-day-1-part-2<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&diff=488Contiki tutorials2014-10-27T08:35:12Z<p>Ygoyal: /* List of Tutorials */</p>
<hr />
<div>[[Main_Page | Back to Main Page]]<br />
<br />
== List of Tutorials ==<br />
<br />
Completed<br />
# [[Installation]]<br />
# [[Hello World]]<br />
# [[Broadcast Example]]<br />
# [[Collect View]]<br />
# [[Contiki build system]]<br />
# [[Interfacing with Python]]<br />
# [[Sensor acquisition]] (light, temperature, humidity)<br />
<br />
Need review<br />
# [[Timers]] Tim, Leo<br />
# [[CFS-Coffee]] Kevin<br />
<br />
Starting<br />
# [[Tutornet]] Pedro, Kwame<br />
# [[Cooja Simulator]] (Getting started, debugging) Pedro<br />
# [[Network Stack]]<br />
# [[CSMA]] Tim, Leo<br />
# [[RSS measurement]]<br />
# [[RPL objective function modification and simulation in cooja ]] Ashwini Telang<br />
# [[RPL UDP]] Jiahao Liang<br />
# [[MAC protocols in ContikiOS]] Pedro<br />
# [[RPL Border Router]] Chhavi<br />
# [[REST example running on Cooja and Sky motes]] Mrunal Muni <br />
# [[Simple-udp-rpl on collect view and cooja]] Subhashini Sundaresan<br />
<!--[[Processes]] Yash --><br />
<br />
<br />
<pre style="color: red">Be sure to include references in your tutorials, especially if you quote material from other sites!</pre></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Protocols_stack&diff=487Protocols stack2014-10-27T08:34:28Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
The Contiki netstacks<br><br><br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== The Contiki netstack ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
'''Four Layers'''<br><br />
1. Network layer - NETSTACK_RADIO<br><br />
2. MAC (Medium Access Control) layer - NETSTACK_MAC<br><br />
3. RDC (Radio Duty Cycling) layer - NETSTACK_RDC<br><br />
4. Radio layer - NETSTACK_RADIO<br><br><br />
<br />
'''The packet buffer - packetbuf'''<br><br />
* One buffer, holds a single packet.<br><br />
* All layers of the netstack operate on the packetbuf.<br><br />
* Large enough to hold a single radio packet - PACKETBUF_CONF_LEN<br><br><br />
<br />
'''Queue buffers - queuebuf'''<br><br />
* The packetbuf only holds the current packet.<br><br />
* To store packets on queues, use a queuebuf.<br><br />
* Use a list to keep track of them.<br><br><br />
<br />
'''uIP packet buffer - uip_buf'''<br><br><br />
<br />
'''Framers - NETSTACK_FRAMER'''<br><br />
* The framer module converts link-layer headers to packet attributes - '''parse()'''<br><br />
* And packet attributes to link-layer headers - '''create()'''<br><br />
<br />
<br />
<br><br><br><br />
== Network & Routing Layer ==<br />
<br />
* Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
* RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
* DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, DAG version number etc.<br><br />
[[File:NF1.png|center|frame|5 nodes Network]]<br><br />
[[File:NF2.png|center|frame|DIO message sent by root node]]<br><br />
[[File:NF3.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF4.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF5.png|center|frame|Rank of the nodes with respect to the root]]<br><br />
* The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
* <br />
<br />
<br />
== References ==<br />
http://www.slideshare.net/ADunkels/building-day-2-upload-building-the-internet-of-things-with-thingsquare-and-contiki-day-2-part-3<br><br />
http://www.slideshare.net/ADunkels/building-the-internet-of-things-with-thingsquare-and-contiki-day-1-part-2?related=1<br><br />
https://tools.ietf.org/html/rfc6550<br><br />
http://www.slideshare.net/ADunkels/building-day-2-upload-1?next_slideshow=1<br><br />
http://www.slideshare.net/ADunkels/advanced-internet-of-things-firmware-engineering-with-thingsquare-and-contiki-day-1-part-2<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Protocols_stack&diff=486Protocols stack2014-10-27T08:19:19Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
The Contiki netstacks<br><br><br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== '''The Contiki netstack''' ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
Four Layers<br><br />
1. Network layer<br><br />
2. MAC (Medium Access Control) layer<br><br />
3. RDC (Radio Duty Cycling) layer<br><br />
4. Radio layer<br><br><br />
<br />
<br><br><br><br />
== Network & Routing Layer ==<br />
<br />
* Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
* RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
* DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, DAG version number etc.<br><br />
[[File:NF1.png|center|frame|5 nodes Network]]<br><br />
[[File:NF2.png|center|frame|DIO message sent by root node]]<br><br />
[[File:NF3.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF4.png|center|frame|DIO message broadcasted by receiving nodes]]<br><br />
[[File:NF5.png|center|frame|Rank of the nodes with respect to the root]]<br><br />
* The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
* <br />
<br />
<br />
== References ==<br />
http://www.slideshare.net/ADunkels/building-day-2-upload-building-the-internet-of-things-with-thingsquare-and-contiki-day-2-part-3<br><br />
http://www.slideshare.net/ADunkels/building-the-internet-of-things-with-thingsquare-and-contiki-day-1-part-2?related=1<br><br />
https://tools.ietf.org/html/rfc6550<br><br />
http://www.slideshare.net/ADunkels/building-day-2-upload-1?next_slideshow=1<br><br />
http://www.slideshare.net/ADunkels/advanced-internet-of-things-firmware-engineering-with-thingsquare-and-contiki-day-1-part-2<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:NF4.png&diff=485File:NF4.png2014-10-27T08:06:52Z<p>Ygoyal: Ygoyal uploaded a new version of &quot;File:NF4.png&quot;</p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Protocols_stack&diff=484Protocols stack2014-10-27T08:06:36Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
The Contiki netstacks<br><br><br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== '''The Contiki netstack''' ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
Four Layers<br><br />
1. Network layer<br><br />
2. MAC (Medium Access Control) layer<br><br />
3. RDC (Radio Duty Cycling) layer<br><br />
4. Radio layer<br><br><br />
<br />
<br><br><br><br />
== Network & Routing Layer ==<br />
<br />
Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, etc.<br><br />
[[File:NF1.png]]<br>[[File:NF2.png]]<br>[[File:NF3.png]]<br>[[File:NF4.png]]<br>[[File:NF5.png]]<br><br />
The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:NF5.png&diff=483File:NF5.png2014-10-27T08:04:34Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:NF4.png&diff=482File:NF4.png2014-10-27T08:04:20Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:NF3.png&diff=481File:NF3.png2014-10-27T08:04:04Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:NF2.png&diff=480File:NF2.png2014-10-27T08:03:46Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=File:NF1.png&diff=479File:NF1.png2014-10-27T08:03:27Z<p>Ygoyal: </p>
<hr />
<div></div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Protocols_stack&diff=478Protocols stack2014-10-27T08:03:12Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
The Contiki netstacks<br><br><br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== '''The Contiki netstack''' ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
Four Layers<br><br />
1. Network layer<br><br />
2. MAC (Medium Access Control) layer<br><br />
3. RDC (Radio Duty Cycling) layer<br><br />
4. Radio layer<br><br><br />
<br />
<br><br><br><br />
== Network & Routing Layer ==<br />
<br />
Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, etc.<br><br />
[[File:NF1.png]][[File:NF2.png]][[File:NF3.png]][[File:NF4.png]][[File:NF5.png]]<br />
The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyalhttp://anrg.usc.edu/contiki/index.php?title=Protocols_stack&diff=477Protocols stack2014-10-27T07:58:55Z<p>Ygoyal: </p>
<hr />
<div>[[Contiki_tutorials | Back to Contiki Tutorials]]<br />
<br />
__TOC__<br />
<br />
<br />
The Contiki netstacks<br><br><br />
<br />
'''Three network stacks'''<br><br />
1. IPv6<br><br />
2. IPv4<br><br />
3. Rime<br><br><br />
<br />
<br />
== '''The Contiki netstack''' ==<br />
[[File:Contikinetstack.png|frame|Contiki Network Stack]]<br><br><br />
<br />
Four Layers<br><br />
1. Network layer<br><br />
2. MAC (Medium Access Control) layer<br><br />
3. RDC (Radio Duty Cycling) layer<br><br />
4. Radio layer<br><br><br />
<br />
<br><br><br><br />
== Network & Routing Layer ==<br />
<br />
Contiki automatically forms a wireless IPv6 network with the help of routing protocol called RPL (Routing Protocol for Low-power and Lossy Networks (LLNs)).<br><br />
RPL forms routing graph from root node or AP (Access Point). It builds acyclic graph from root node called DODAG (Destination Oriented Directed Acyclic Graph).<br><br />
[[File:RPLDODAG.png|center|frame|RPL DODAG]]<br><br />
DIO (DODAG Information Object) messages are broadcast by all nodes starting from the root node. It includes the node's rank, ETX, etc.<br><br />
[[File:NF1.png|center|Network Formation]]<br><br />
The node selects a parent based on the received DIO messages and calculates its rank.<br><br />
<br />
<br />
[[Contiki_tutorials | Back to Contiki Tutorials]]</div>Ygoyal