Step 1: Download Instant Contiki
Download Instant Contiki here. It is a large file, just over 1GB. When downloaded, unzip the file, place the unzipped directory on the opt.
Step2: Start Instant Contiki
To Start contiki first open the terminal by click Ctrl+t (in Ubuntu)
” ls ” to view and conform the files inside the contiki
In the terminal window, go to the Cooja directory:
Start Cooja with the command:
Wait for Simulator to start
When Cooja first starts, it will first compile itself, which may take some time.
When its compiled, it will start with a blue empty window.
Step 3: Run simulation
Create new simulation
Click the File menu and click New simulation….Click the Create button.
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.
Motes–>Add Motes–>Create new mote type–>sky mote…
Browse and find contiki example /opt/contiki-3.0/examples and select a .c file…
for example am selected /opt/contiki-3.0/examples/collect-view/collect-view.c
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. This will take some time the first time around, expect it to take a minute at least. The compilation output will show up in the white panel at the bottom of the window.
Create the mote type
Click the Create button to create the mote type. The window will close.
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 5. And click add motes.
Start the simulation
We can now see the 5 motes we added to the simulation in the Network window. Click the Start button to start the simulation.
we can pause the simulation by clicking pause button.
Collect view : Tools–>collect view–>sky 1
In collect window click start collect button to start collect the mote info…
Congratulations! We have now created our first Cooja simulation with Contiki nodes that collect packets.