<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://anrg.usc.edu/contiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ppdeshpa</id>
		<title>Contiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://anrg.usc.edu/contiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ppdeshpa"/>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php/Special:Contributions/Ppdeshpa"/>
		<updated>2026-07-23T04:43:24Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=EE_652_projects&amp;diff=1662</id>
		<title>EE 652 projects</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=EE_652_projects&amp;diff=1662"/>
				<updated>2014-12-17T11:08:04Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;EE 652 2014 Projects&lt;br /&gt;
&lt;br /&gt;
== Scheduling algorithms for IEEE 802.15.4e networks - Pedro ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Repository&amp;#039;&amp;#039;&amp;#039;: http://neptune.usc.edu:8081/pdasilva/tsch-schedulers/&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;How to compile&amp;#039;&amp;#039;: gcc -std=gnu99 -o Scheduling util/*.c graphs/*.c mcc/*.c tasa/*.c main.c&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;How to execute&amp;#039;&amp;#039;: ./Scheduling &amp;lt;sink_id&amp;gt; &amp;lt;algorithm&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where: 	&amp;lt;sink_id&amp;gt; = Sink identification (starting at 0) and &amp;lt;algorithm&amp;gt; = 0 if MCC and 1 if TASA&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Output&amp;#039;&amp;#039;: you will find files ext_schedule.h and topology.c, which should be used according to the project report&lt;br /&gt;
&lt;br /&gt;
The execution will consider data/prr55.txt file as input for PRR statistics. You need to create the file with tree description before running TASA. You can easily do that first running MCC for a given sink id (e.g. 3) and then running TASA for the same sink id.&lt;br /&gt;
&lt;br /&gt;
== Backpressure Control Protocol on IPv6 stack of Contiki - Mrunal &amp;amp; Chhavi ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Repository&amp;#039;&amp;#039;&amp;#039;: https://github.com/chhavikapoor/EE652_Final&lt;br /&gt;
&lt;br /&gt;
Use the branch final_project from the repository.&lt;br /&gt;
&lt;br /&gt;
Follow the README-BCP in the final_project repository to simulate the implementation of BCP on IPv6 stack in COOJA.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;: &lt;br /&gt;
&lt;br /&gt;
BCP is an implementation of dynamic backpressure routing in which the routing and forwarding decisions are made on per packet basis that takes into consideration the backpressure weight of each of its neighbors. The ubiquitous use of TCP/IP protocol suite in web applications, peer to peer networking over the internet etc motivated us to implement the Backpressure Collection Protocol on the IPv6 Stack of Contiki. We implemented a functional version of BCP on the IPv6 stack of Contiki OS.&lt;br /&gt;
In our implementation, BCP Sink by default has the node_id = 1.&lt;br /&gt;
&lt;br /&gt;
== Modifications to RPL for Mobility - Pratyush Deshpande, Gopi Marella and Abhilash Hegde ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Repository&amp;#039;&amp;#039;&amp;#039;: https://github.com/pratyush18/contiki-new.git&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
Routing Protocol for Low power and lossy networks (RPL) has been recently adopted  IETF routing protocol standard for low power  wireless sensor networks and Internet of Things applications. Originally RPL is designed for static networks with no support for mobility. But, several IoT applications involve mobile nodes and thus there is a need to modify RPL for supporting mobile node scenarios. In RPL, routing takes place by formationof Destination Oriented Acyclic Graph (DODAG). Several control messages like DODAG Information Objects (DIOs), DODAG Information Solicitation and DODAG Advertisement Objects (DAOs) are exchanged for the DODAG formation. These control messages propagate throughout the network and collaboratively work to form the DODAG. The &lt;br /&gt;
control messages in RPL are controlled by several timers. These control message timers need to be modified for mobile node scenarios. The timers need to be optimized based on mobility of nodes in the network. In this paper we have modified the existing implementation of RPL protocol in Contiki Operating system to improve its performance for scenarios where mobile nodes are involved. We have also developed a test-bed for simulating mobile nodes in COOJA simulator and evaluating performance metrics like Packet delivery ratio, Power consumption and Average latency per packet.&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1297</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1297"/>
				<updated>2014-11-09T03:56:20Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* VANET Simulation on Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing positions.dat file ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
=== Changing core plugin files ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; folder&lt;br /&gt;
&lt;br /&gt;
== VANET Simulation on Cooja ==&lt;br /&gt;
&lt;br /&gt;
I have simulated mobile nodes scenario for Vehicular Ad-Hoc Networks (VANETs)&lt;br /&gt;
&lt;br /&gt;
Here is a youtube link:&lt;br /&gt;
&lt;br /&gt;
http://youtu.be/iPolAZ-asaw&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1296</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1296"/>
				<updated>2014-11-09T03:55:45Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* VANET Simulation on Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing positions.dat file ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
=== Changing core plugin files ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; folder&lt;br /&gt;
&lt;br /&gt;
== VANET Simulation on Cooja ==&lt;br /&gt;
&lt;br /&gt;
I have simulated a mobile nodes scenario for Vehicular Ad-hoc networks&lt;br /&gt;
&lt;br /&gt;
Here is a youtube link:&lt;br /&gt;
&lt;br /&gt;
http://youtu.be/iPolAZ-asaw&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1295</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1295"/>
				<updated>2014-11-09T03:52:40Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing positions.dat file ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
=== Changing core plugin files ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; folder&lt;br /&gt;
&lt;br /&gt;
== VANET Simulation on Cooja ==&lt;br /&gt;
&lt;br /&gt;
http://youtu.be/iPolAZ-asaw&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1261</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1261"/>
				<updated>2014-11-09T02:32:20Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file or plugin files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing positions.dat file ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
=== Changing core plugin files ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; folder&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1260</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1260"/>
				<updated>2014-11-09T02:31:51Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing core plugin files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing positions.dat file ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
=== Changing core plugin files ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility folder&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1259</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1259"/>
				<updated>2014-11-09T02:31:32Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
=== Changing positions.dat file ===&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
= Changing core plugin files =&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility folder&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1257</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1257"/>
				<updated>2014-11-09T02:31:04Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file or plugin files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
= Changing positions.dat file =&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
= Changing core plugin files =&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility folder&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1256</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1256"/>
				<updated>2014-11-09T02:30:11Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file or plugin files ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you want to change the core plugin files for your requirements. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes and modifying files. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility folder&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1253</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1253"/>
				<updated>2014-11-09T02:28:28Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
If you change the core plugin files you need to execute. &lt;br /&gt;
&lt;br /&gt;
After implementing your changes. You need to execute &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant clean&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Inside the &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility folder&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1192</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1192"/>
				<updated>2014-11-09T01:11:20Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Downloading the Plugin ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1191</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1191"/>
				<updated>2014-11-09T01:10:22Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now and the nodes will start moving according to new position specifications.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1190</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1190"/>
				<updated>2014-11-09T01:09:17Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Positions.dat File structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 (mote 1) at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Note: Here node 0 is the &amp;#039;mote 1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for &amp;#039;mote 2&amp;#039;&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually mote (n+1) on Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1187</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1187"/>
				<updated>2014-11-09T01:07:44Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Positions.dat File structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;#node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1186</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1186"/>
				<updated>2014-11-09T01:06:08Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL--&lt;br /&gt;
&lt;br /&gt;
--You have to create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1185</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1185"/>
				<updated>2014-11-09T01:05:39Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
--Note you need to replicate the directory and file structure at the given URL&lt;br /&gt;
You can create directories and save files individually from the URL--&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1184</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1184"/>
				<updated>2014-11-09T01:05:13Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
\**Note you need to replicate the directory and file structure at the given URL&lt;br /&gt;
You can create directories and save files individually from the URL&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1183</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1183"/>
				<updated>2014-11-09T01:04:57Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
**Note you need to replicate the directory and file structure at the given URL&lt;br /&gt;
You can create directories and save files individually from the URL**&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1182</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1182"/>
				<updated>2014-11-09T01:04:38Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
**Note you need to replicate the directory and file structure at the given URL&lt;br /&gt;
You can create directories and save files individually from the URL&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1181</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=1181"/>
				<updated>2014-11-09T01:03:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Note you need to replicate the directory and file structure at the given URL&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=956</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=956"/>
				<updated>2014-11-07T22:31:59Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Plugins for Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&amp;diff=955</id>
		<title>Contiki tutorials</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&amp;diff=955"/>
				<updated>2014-11-07T22:24:41Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* List of Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Main_Page | Back to Main Page]]&lt;br /&gt;
&lt;br /&gt;
== List of Tutorials ==&lt;br /&gt;
&lt;br /&gt;
Completed&lt;br /&gt;
# [[Installation]]&lt;br /&gt;
# [[Hello World]]&lt;br /&gt;
# [[Broadcast Example]]&lt;br /&gt;
# [[Collect View]]&lt;br /&gt;
# [[Contiki build system]]&lt;br /&gt;
# [[Interfacing with Python]]&lt;br /&gt;
# [[Sensor acquisition]] (light, temperature, humidity)&lt;br /&gt;
&lt;br /&gt;
Need review&lt;br /&gt;
# [[Timers]] Tim, Leo&lt;br /&gt;
# [[CFS-Coffee]] Kevin&lt;br /&gt;
&lt;br /&gt;
Starting&lt;br /&gt;
# [[Tutornet]] Pedro, Kwame&lt;br /&gt;
# [[Cooja Simulator]] (Getting started, debugging) Pedro&lt;br /&gt;
# [[Network Stack]]&lt;br /&gt;
# [[CSMA]] Tim, Leo&lt;br /&gt;
# [[RSS measurement]]&lt;br /&gt;
# [[RPL objective function modification and simulation in cooja  ]] Ashwini Telang&lt;br /&gt;
# [[RPL UDP]] Jiahao Liang&lt;br /&gt;
# [[MAC protocols in ContikiOS]] Pedro&lt;br /&gt;
# [[RPL Border Router]] Chhavi&lt;br /&gt;
# [[REST example running on Cooja and Sky motes]] Mrunal Muni &lt;br /&gt;
# [[Trickle library]] Subhashini Sundaresan&lt;br /&gt;
# [[Packetbuffer Basics]] Pradipta&lt;br /&gt;
# [[Antelope(Database Management System) - Contiki]] Gopi Krishna&lt;br /&gt;
# [[Mobility of Nodes in Cooja]] Pratyush Deshpande&lt;br /&gt;
# [[Contiki Mote Shell]] Abhilash Nagaraj Hegde&lt;br /&gt;
&amp;lt;!--[[Processes]] Yash --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--# [[Collect-view Code Details]] Pradipta --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;Be sure to include references in your tutorials, especially if you quote material from other sites!&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&amp;diff=954</id>
		<title>Contiki tutorials</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&amp;diff=954"/>
				<updated>2014-11-07T22:07:48Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* List of Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Main_Page | Back to Main Page]]&lt;br /&gt;
&lt;br /&gt;
== List of Tutorials ==&lt;br /&gt;
&lt;br /&gt;
Completed&lt;br /&gt;
# [[Installation]]&lt;br /&gt;
# [[Hello World]]&lt;br /&gt;
# [[Broadcast Example]]&lt;br /&gt;
# [[Collect View]]&lt;br /&gt;
# [[Contiki build system]]&lt;br /&gt;
# [[Interfacing with Python]]&lt;br /&gt;
# [[Sensor acquisition]] (light, temperature, humidity)&lt;br /&gt;
&lt;br /&gt;
Need review&lt;br /&gt;
# [[Timers]] Tim, Leo&lt;br /&gt;
# [[CFS-Coffee]] Kevin&lt;br /&gt;
&lt;br /&gt;
Starting&lt;br /&gt;
# [[Tutornet]] Pedro, Kwame&lt;br /&gt;
# [[Cooja Simulator]] (Getting started, debugging) Pedro&lt;br /&gt;
# [[Network Stack]]&lt;br /&gt;
# [[CSMA]] Tim, Leo&lt;br /&gt;
# [[RSS measurement]]&lt;br /&gt;
# [[RPL objective function modification and simulation in cooja  ]] Ashwini Telang&lt;br /&gt;
# [[RPL UDP]] Jiahao Liang&lt;br /&gt;
# [[MAC protocols in ContikiOS]] Pedro&lt;br /&gt;
# [[RPL Border Router]] Chhavi&lt;br /&gt;
# [[REST example running on Cooja and Sky motes]] Mrunal Muni &lt;br /&gt;
# [[Trickle library]] Subhashini Sundaresan&lt;br /&gt;
# [[Packetbuffer Basics]] Pradipta&lt;br /&gt;
# [[Antelope(Database Management System) - Contiki]] Gopi Krishna&lt;br /&gt;
# [[Mobility in Cooja]] Pratyush Deshpande&lt;br /&gt;
# [[Contiki Mote Shell]] Abhilash Nagaraj Hegde&lt;br /&gt;
&amp;lt;!--[[Processes]] Yash --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--# [[Collect-view Code Details]] Pradipta --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;Be sure to include references in your tutorials, especially if you quote material from other sites!&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&amp;diff=953</id>
		<title>Contiki tutorials</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Contiki_tutorials&amp;diff=953"/>
				<updated>2014-11-07T22:07:01Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* List of Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Main_Page | Back to Main Page]]&lt;br /&gt;
&lt;br /&gt;
== List of Tutorials ==&lt;br /&gt;
&lt;br /&gt;
Completed&lt;br /&gt;
# [[Installation]]&lt;br /&gt;
# [[Hello World]]&lt;br /&gt;
# [[Broadcast Example]]&lt;br /&gt;
# [[Collect View]]&lt;br /&gt;
# [[Contiki build system]]&lt;br /&gt;
# [[Interfacing with Python]]&lt;br /&gt;
# [[Sensor acquisition]] (light, temperature, humidity)&lt;br /&gt;
&lt;br /&gt;
Need review&lt;br /&gt;
# [[Timers]] Tim, Leo&lt;br /&gt;
# [[CFS-Coffee]] Kevin&lt;br /&gt;
&lt;br /&gt;
Starting&lt;br /&gt;
# [[Tutornet]] Pedro, Kwame&lt;br /&gt;
# [[Cooja Simulator]] (Getting started, debugging) Pedro&lt;br /&gt;
# [[Network Stack]]&lt;br /&gt;
# [[CSMA]] Tim, Leo&lt;br /&gt;
# [[RSS measurement]]&lt;br /&gt;
# [[RPL objective function modification and simulation in cooja  ]] Ashwini Telang&lt;br /&gt;
# [[RPL UDP]] Jiahao Liang&lt;br /&gt;
# [[MAC protocols in ContikiOS]] Pedro&lt;br /&gt;
# [[RPL Border Router]] Chhavi&lt;br /&gt;
# [[REST example running on Cooja and Sky motes]] Mrunal Muni &lt;br /&gt;
# [[Trickle library]] Subhashini Sundaresan&lt;br /&gt;
# [[Packetbuffer Basics]] Pradipta&lt;br /&gt;
# [[Antelope(Database Management System) - Contiki]] Gopi Krishna&lt;br /&gt;
# [[Simulation of Mobile Nodes in Cooja]] Pratyush Deshpande&lt;br /&gt;
# [[Contiki Mote Shell]] Abhilash Nagaraj Hegde&lt;br /&gt;
&amp;lt;!--[[Processes]] Yash --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--# [[Collect-view Code Details]] Pradipta --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;color: red&amp;quot;&amp;gt;Be sure to include references in your tutorials, especially if you quote material from other sites!&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=952</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=952"/>
				<updated>2014-11-07T21:31:32Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Positions.dat File structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=951</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=951"/>
				<updated>2014-11-07T21:30:19Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Click Save&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=941</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=941"/>
				<updated>2014-11-07T12:06:05Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Testing the Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot9.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=939</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=939"/>
				<updated>2014-11-07T12:04:56Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Testing the Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=938</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=938"/>
				<updated>2014-11-07T12:04:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Testing the Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot7.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot8.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=937</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=937"/>
				<updated>2014-11-07T12:02:26Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Testing the Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot5.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot6.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=936</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=936"/>
				<updated>2014-11-07T12:01:37Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Testing the Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot4.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=935</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=935"/>
				<updated>2014-11-07T11:58:14Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot13.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot13.png&amp;diff=934</id>
		<title>File:Snapshot13.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot13.png&amp;diff=934"/>
				<updated>2014-11-07T11:57:24Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=933</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=933"/>
				<updated>2014-11-07T11:52:47Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot16.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=929</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=929"/>
				<updated>2014-11-07T11:42:20Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot3.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=927</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=927"/>
				<updated>2014-11-07T11:40:47Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
[[File:snapshot2.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=925</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=925"/>
				<updated>2014-11-07T11:40:01Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:snapshot1.png|center|450px]]&lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot9.png&amp;diff=924</id>
		<title>File:Snapshot9.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot9.png&amp;diff=924"/>
				<updated>2014-11-07T11:36:20Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot8.png&amp;diff=923</id>
		<title>File:Snapshot8.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot8.png&amp;diff=923"/>
				<updated>2014-11-07T11:36:02Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot7.png&amp;diff=922</id>
		<title>File:Snapshot7.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot7.png&amp;diff=922"/>
				<updated>2014-11-07T11:35:13Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot6.png&amp;diff=921</id>
		<title>File:Snapshot6.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot6.png&amp;diff=921"/>
				<updated>2014-11-07T11:32:50Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot5.png&amp;diff=920</id>
		<title>File:Snapshot5.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot5.png&amp;diff=920"/>
				<updated>2014-11-07T11:32:34Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot4.png&amp;diff=919</id>
		<title>File:Snapshot4.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot4.png&amp;diff=919"/>
				<updated>2014-11-07T11:32:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot3.png&amp;diff=918</id>
		<title>File:Snapshot3.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot3.png&amp;diff=918"/>
				<updated>2014-11-07T11:28:54Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot2.png&amp;diff=917</id>
		<title>File:Snapshot2.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot2.png&amp;diff=917"/>
				<updated>2014-11-07T11:28:23Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=File:Snapshot1.png&amp;diff=915</id>
		<title>File:Snapshot1.png</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=File:Snapshot1.png&amp;diff=915"/>
				<updated>2014-11-07T11:27:55Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=912</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=912"/>
				<updated>2014-11-07T10:06:29Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=909</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=909"/>
				<updated>2014-11-07T09:43:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Enabling the Mobility Plugin in Cooja */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Go the end of this field DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=908</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=908"/>
				<updated>2014-11-07T09:42:19Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. &lt;br /&gt;
&lt;br /&gt;
Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	<entry>
		<id>http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=906</id>
		<title>Mobility of Nodes in Cooja</title>
		<link rel="alternate" type="text/html" href="http://anrg.usc.edu/contiki/index.php?title=Mobility_of_Nodes_in_Cooja&amp;diff=906"/>
				<updated>2014-11-07T09:40:12Z</updated>
		
		<summary type="html">&lt;p&gt;Ppdeshpa: /* Changing positions.dat file */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial teaches you how to enable mobility in Cooja Simulator. This feature can be used to simulate and test mobile ad-hoc network protocols in the Cooja Simulator. After following all the steps mentioned in this tutorial you will be able to sucessfully simulate mobile nodes in your Cooja simulator. &lt;br /&gt;
&lt;br /&gt;
== You Will Learn ==&lt;br /&gt;
&lt;br /&gt;
* How to download and enable mobility plugin in Cooja&lt;br /&gt;
* How to use the plugin&lt;br /&gt;
&lt;br /&gt;
== Plugins for Cooja ==&lt;br /&gt;
&lt;br /&gt;
The mobility plugin for cooja can be found at this URL&lt;br /&gt;
&lt;br /&gt;
Create a new directory at&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;mkdir mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download and Save all the files into this mobility folder&lt;br /&gt;
&lt;br /&gt;
Now, you have successfully downloaded all the files needed for this plugin&lt;br /&gt;
&lt;br /&gt;
The next thing we need to do is enable this plugin in Cooja&lt;br /&gt;
&lt;br /&gt;
== Building the plugin ==&lt;br /&gt;
&lt;br /&gt;
Navigate to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant jar&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This will build the plugin&lt;br /&gt;
&lt;br /&gt;
== Enabling the Mobility Plugin in Cooja ==&lt;br /&gt;
&lt;br /&gt;
Start Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Cooja,&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings &amp;gt; External Tools Path…&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Edit Settings Screen will pop-up&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to DEFAULT_PROJECTDIRS&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This field is used to specify paths to all the plugins in Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Here you have to add a path to the downloaded plugin. We do this for linking the plugin with Cooja Simulator&lt;br /&gt;
&lt;br /&gt;
Now, we need to append the plugin’s path to the existing plugin paths &lt;br /&gt;
&lt;br /&gt;
Go the end of this field DEFAULT_PROJECTDIRS&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Insert ‘ ; ‘ symbol&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add the plugin’s path&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;[CONTIKI_DIR]/tools/cooja/apps/mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Save&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Close Cooja Simulator and Start it again. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cd contiki/tools/cooja/&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;sudo ant run&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now go to &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Settings&amp;gt;Cooja Extensions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Cooja Extensions Window will pop-up. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Scroll down to mobility select it and click on “Apply for the session”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Under the Tools tab in Cooja you should see a new “Mobility…” option now&lt;br /&gt;
&lt;br /&gt;
== Testing the Plugin ==&lt;br /&gt;
&lt;br /&gt;
Start a new simulation&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;File &amp;gt; New Simulation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Add a test mote to your simulation to test the new plugin&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Motes &amp;gt; Add Mote &amp;gt; Create a new mote type &amp;gt; Sky Mote …&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Compile a simple hello-world.c code on this mote. Now create the mote&lt;br /&gt;
&lt;br /&gt;
Now, we will test our plugin on this mote&lt;br /&gt;
&lt;br /&gt;
Under Tools tab click on mobility&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Tools &amp;gt; Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Browse and Navigate to&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contiki/tools/cooja/apps/mobility/positions.dat&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
We have instructed our mobility plugin to get the positional information from this positions.dat file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Click Open&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
A small window will pop-up as shown below&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Now, Click on “Start Simulation”&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Voila! Your mote will start start moving according to the specified positions.dat file&lt;br /&gt;
&lt;br /&gt;
== Positions.dat File structure ==&lt;br /&gt;
&lt;br /&gt;
Position.dat file contains this information&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 1.0 10 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 2.0 10 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 3.0 0 0&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 4.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The first column specifies the node number&lt;br /&gt;
The second column is the time-stamp&lt;br /&gt;
The third column is the x-coordinate&lt;br /&gt;
The fourth column is the y-coordinate&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;node time(s) x y&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;0 0.0 0 10&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This line means node 0 at 0.0sec will be at position co-ordinates (0, 10)&lt;br /&gt;
&lt;br /&gt;
Here node 0 is the node ‘1’ on your cooja simulator&lt;br /&gt;
&lt;br /&gt;
If you specify node 1 in the first column it is for node 2&lt;br /&gt;
&lt;br /&gt;
So positions.dat node (n) is actually node (n+1)&lt;br /&gt;
&lt;br /&gt;
== Changing positions.dat file ==&lt;br /&gt;
&lt;br /&gt;
If you want to change the position.dat file. Replace position.dat file with the new file&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Under Tools&amp;gt;Mobility&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The new positions will be loaded now. Add the required number of nodes in the simulator and start your simulation.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
This Mobility Plugin is listed in the official Contiki wiki and can be found at these links&lt;br /&gt;
&lt;br /&gt;
https://github.com/contiki-os/contiki/wiki&lt;br /&gt;
&lt;br /&gt;
http://sourceforge.net/p/contikiprojects/code/HEAD/tree/sics.se/mobility/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Contiki_tutorials | Back to Contiki Tutorials]]&lt;br /&gt;
&lt;br /&gt;
Edited by: Pratyush Deshpande&lt;/div&gt;</summary>
		<author><name>Ppdeshpa</name></author>	</entry>

	</feed>