Manual Cooja
User Manual:
Open the PDF directly: View PDF
.
Page Count: 13
| Download | |
| Open PDF In Browser | View PDF |
Resource: http://www.contiki-os.org/start.html Get Started with Contiki This manual will help you to create your first “Hello World” example in contiki. Step 1: Grab Instant Contiki Step 2: Start Cooja Step 3: Run Contiki in simulation Step 4: Run Contiki on hardware Step 5: Now what? Step 1: Grab Instant Contiki Contiki is a very complex piece of software. Instant Contiki and Cooja makes Contiki easier to install and get started with. About Instant Contiki Instant Contiki is an entire Contiki development environment in a single download. It is an Ubuntu Linux virtual machine that runs in VMWare player and has Contiki and all the development tools, compilers, and simulators used in Contiki development installed. Instant Contiki is so convenient that even hardcore Contiki developers use it. We begin by downloading Instant Contiki, installing VMWare Player, and booting up Instant Contiki. Download Instant Contiki Download Instant Contiki. Get a coffee: it is a large file, just over 1 gigabyte. When downloaded, unzip the file, place the unzipped directory on the desktop. Download Instant Contiki » Install VMWare Player Download and install VMWare Player. It is free to download, but requires a registration. It might require a reboot of your computer, which is unfortunate but needed to get networking working. Download VMWare Player » Start Instant Contiki Boot Ubuntu Start Instant Contiki by running InstantContiki2.6.vmx. Wait for the virtual Ubuntu Linux boot up. 1 Resource: http://www.contiki-os.org/start.html Log in Log into Instant Contiki. The password is user. Congratulations! Now that we have Instant Contiki up and running, we will start Cooja. Step 2: Start Cooja About Cooja Cooja is the Contiki network simulator. Cooja allows large and small networks of Contiki motes to be simulated. Motes can be emulated at the hardware level, which is slower but allows precise inspection of the system behavior, or at a less detailed level, which is faster and allows simulation of larger networks. 2 Resource: http://www.contiki-os.org/start.html We will now compile and start Cooja, the Contiki network simulator. Open a terminal window To start Cooja, first open a terminal window. Start Cooja In the terminal window, go to the Cooja directory: cd contiki/tools/cooja Start Cooja with the command: ant run Wait for Cooja to start When Cooja first starts, it will first compile itself, which may take some time. 3 Resource: http://www.contiki-os.org/start.html When Cooja is compiled, it will start with a blue empty window. Now that Cooja is up and running, we can try it out with an example simulation. 4 Resource: http://www.contiki-os.org/start.html Step 3: Run Contiki in simulation About Cooja simulations Cooja is a highly useful tool for Contiki development as it allows developers to test their code and systems long before running it on the target hardware. Developers regularly set up new simulations both to debug their software and to verify the behavior of their systems. Create a new simulation Click the File menu and click New simulation.... Set simulation options Cooja now opens up the Create new simulation dialog. In this dialog, we may choose to give our simulation a new name, but for this example, we'll just stick with My simulation. Click the Create button. 5 Resource: http://www.contiki-os.org/start.html Simulation windows Cooja brings up the new simulation. The Network window, at the top left of the screen, shows all the motes in the simulated network - it is empty now, since we have no motes in our simulation. The Timeline window, at the bottom of the screen, shows all communication events in the simulation over time - very handy for understanding what goes on in the network. The Mote output window, on the right side of the screen, shows all serial port printouts from all the motes. The Notes window on the top right is where we can put notes for our simulation. And the Simulation control window is where we start, pause, and reload our simulation. 6 Resource: http://www.contiki-os.org/start.html Add motes to the simulation Before we can simulate our network, we must add one or more motes. We do this via the Motes menu, where we click on Add motes.... Since this is the first mote we add, we must first create a mote type to add. Click Create new mote type... and select one of the available mote types. For this example, we click Sky mote... to create an emulated Tmote Sky mote type. 7 Resource: http://www.contiki-os.org/start.html Create a new mote type Cooja opens the Create Mote Type dialog, in which we can choose a name for our mote type as well as the Contiki application that our mote type will run. For this example, we stick with the suggested name, and instead click on the Browse... button on the right hand side to choose our Contiki application. Find example Contiki application We go to the directory /home/user/contiki/examples/ipv6/simple-udp-rpl. This directory holds a number of Contiki applications that provide examples for how to do simple UDP communication over IPv6. 8 Resource: http://www.contiki-os.org/start.html Specify application C source file Choose the file broadcast-example.c. This file contains a simple Contiki application that randomly broadcasts a UDP packet to its neighbors. Click the Open button to choose the file. 9 Resource: http://www.contiki-os.org/start.html Compile Contiki and the application Now Cooja will verify that the selected Contiki application compiles for the platform that we have selected. Click the Compile button. The compilation output will show up in the white panel at the bottom of the window. Click the Create button to create the mote type. The window will close. 10 Resource: http://www.contiki-os.org/start.html Add motes to simulation Cooja will now ask us if we want to add motes from the newly created mote type to the simulation. We change the number of motes to add in the Number of motes field to 8. We click the Add motes button to add the motes to the simulation. 11 Resource: http://www.contiki-os.org/start.html Start the simulation We can now see the 8 motes we added to the simulation in the Network window. Click the Start button to start the simulation. Pause the simulation We see printouts from the simulated motes appearing in the Mote output window. The Network window shows communication going on in the network. The Timeline window shows communication and radio events over time - the small gray lines are ContikiMAC periodically waking the radio up. We can click the Pause button to pause the simulation. 12 Resource: http://www.contiki-os.org/start.html Done! Congratulations! We have now created your first Cooja simulation with Contiki nodes that send periodic IPv6/UDP packets with ContikiMAC sleepy router functionaliy. Source code To dive into the Contiki source code, you can download the latest release or grab the current development version with git: Download » Community To engage with the Contiki developer community, go to the Contiki community page: Community » License To read the legal details of the Contiki open source license, go to the Contiki license page: Open source » Resources Read more about further Contiki resources: Resources » 13
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.4 Linearized : No Page Count : 13 Page Layout : SinglePage Page Mode : UseNone XMP Toolkit : XMP toolkit 2.9.1-13, framework 1.6 About : uuid:8c1edf88-30cd-11e8-0000-149dfb695ce1 Producer : PDFCreator 3.1.2.10844 Keywords : Modify Date : 2018:03:23 10:13:20+02:00 Create Date : 2018:03:23 10:13:20+02:00 Creator Tool : PDFCreator 3.1.2.10844 Document ID : uuid:8c1edf88-30cd-11e8-0000-149dfb695ce1 Format : application/pdf Title : Manual Creator : E909444 Description : Author : E909444 Subject :EXIF Metadata provided by EXIF.tools