Difference between revisions of "Cooja Simulator"

From Contiki
Jump to: navigation, search
(Undo revision 344 by Pedro (talk))
Line 3: Line 3:
 
__TOC__
 
__TOC__
  
 +
== Introduction ==
 +
 +
This tutorial aims at introducing the Cooja Simulator and guiding the reader in a simple debugging exercise. We are going to work with Hello World example for the debugging process. You can also study the Hello World tutorial to get familiar with this simple example.
 +
 +
== You Will Learn ==
 +
 +
* How to upload an introductory code for UDP source and sink.
 +
* How to program nodes and collect data through the collect-view GUI.
 +
* Things to see on the collect-view GUI.
 +
 +
== Relevant Directories ==
 +
 +
* /contiki/examples/collect/ - This has the shell code for collect view and the various targets.
 +
* /contiki/examples/ipv6/rpl-collect/ - This has the codes which are to be uploaded to the source and sink motes for UDP communication.
 +
* /contiki/tools/collect-view/ - This contains the java file for the collect view GUI.
 +
* /contiki/apps/collect-view/ - This contains the codes corresponding to the targets mentioned in the examples folder.
 +
 +
== Connect the Tmote Sky ==
 +
 +
Before continuing with the tutorial, plug 2 Tmote Sky into the computer's USB port, one for the source and the other for the sink.
 +
 +
In order to transfer the ownership of the contiki directories use the following command.
 +
 +
<code><nowiki> sudo chown :user /dev/ttyUSB0 </nowiki></code>
 +
 +
<code><nowiki> sudo chown :user /dev/ttyUSB1 </nowiki></code>
 +
 +
== Using the Source Code ==
 +
 +
=== Step 1 ===
 
How to run Cooja simulator?
 
How to run Cooja simulator?
  

Revision as of 19:16, 24 March 2014

Back to Contiki Tutorials

Introduction

This tutorial aims at introducing the Cooja Simulator and guiding the reader in a simple debugging exercise. We are going to work with Hello World example for the debugging process. You can also study the Hello World tutorial to get familiar with this simple example.

You Will Learn

  • How to upload an introductory code for UDP source and sink.
  • How to program nodes and collect data through the collect-view GUI.
  • Things to see on the collect-view GUI.

Relevant Directories

  • /contiki/examples/collect/ - This has the shell code for collect view and the various targets.
  • /contiki/examples/ipv6/rpl-collect/ - This has the codes which are to be uploaded to the source and sink motes for UDP communication.
  • /contiki/tools/collect-view/ - This contains the java file for the collect view GUI.
  • /contiki/apps/collect-view/ - This contains the codes corresponding to the targets mentioned in the examples folder.

Connect the Tmote Sky

Before continuing with the tutorial, plug 2 Tmote Sky into the computer's USB port, one for the source and the other for the sink.

In order to transfer the ownership of the contiki directories use the following command.

sudo chown :user /dev/ttyUSB0

sudo chown :user /dev/ttyUSB1

Using the Source Code

Step 1

How to run Cooja simulator?

cd contiki/tools/cooja ant run


Back to Contiki Tutorials