Let us look into some of the major tools available in Cooja Simulator
- Network – In the network tool window, the location of all wireless sensor nodes (WSN) aka nodes; can be seen. It is mainly meant for visualization purpose and to position the nodes. It will stay empty initially but once we start loading nodes we can see them in the network tool window. We can also see individual sensor transmission range(green circle) and detection range(grey area after green circle) by enabling the radio environment feature. I would suggest exploring its different features by trying out Cooja.
- Simulation Control – It is used to Start, Stop or Reload any simulation. It also shows the Speed index of the simulation. A rule of thumb is higher the number of nodes slower will the simulation run. (Note: Upon testing, I have often noticed with 100+ nodes simulation might freeze while running or after reload because memory is not properly cleaned by cooja in background.)
- Notes – Keep your notes or comments here. But, trust me, write your notes in the diary too 😉
- Mote output – Shows every minute detail of Mote (Yup! Nodes are also called Motes). Search each node by typing in search bar ID:<node_id> say for viewing node no. 11 data type ID:11 and hit enter.
- Timeline – Timeline of simulations where message and event logs are kept.
- Breakpoints – Used to set up breakpoints in simulations to debug issues.
- Radio messages – Log of radio messages and packets as they are generated. It can be saved as .pcap file so that we can debug the messages in Wireshark later.
- Script editor – Developers can add their own custom scripts which will interact or collect data from Motes and give advance analytics data of the simulations.
- Mote duty cycle (Powertrace) – Used to check the Mote-wise sleep cycle percentage (%) separated by transmission(Tx) time and Reception(Rx) Time and their average values.
These are the few basic tools used in cooja simulator available in contiki. If you want to see how to use cooja and run a hello world program check out this Basic Hello World Tutorial or if you like to explore more check out the Advanced Hello World Tutorial.
I hope this tutorial helped! Feel free to comment if you want any further help or support from me.
Md. Saifur Rahman is a Full Stack Django and Laravel Developer. Additionally, he loves to spend time learning and researching about the Internet of Things (IoT). He loves to share his work and contribute to helping fellow developers.
Good work brother 👍
Thank you for your kind words.
Dear Saifur Rahman,
I am writing this message to kindly ask for your help.
I am a PhD student and I am working on RPL protocol.
I want to to evaluate the performance of RPL protocol in terms of latency, Energy consumption, PDR etc. I used Collect-view but this plugin doesn’t give all the necessary metrics. I am lost how to get the specific statistics into a log file (COOJA.testlog) and how to analyze this log file ?
I would be so grateful if you could help me with this matter.
Thank you very much.
Hi, sorry for the late reply. Have you tried 6LoWPAN with pcap enable. That way you can use the pcap file and analyse it in wireshark.
Hi, when I open the pcap file in wireshark the number of packets not the same number of received packets and lost packets. And how can I calculate the delay and throughput from this file.
thank you 🙂
Hi ! I am a final year student. I am working on mqtt and coAp performance analysis . I have used cooja simulator. Can you tell me how to find throughput,delay in cooja simulator?
Hello,
You can save the packets in .pcap format and analyse them in Wireshark to get the necessary details. Also, you can try Collect View in cooja.
Dear Saifur Rahman,
Need your help in designing a IDS which can work in detecting threats at two layers .Please help.
Thanks
santhosh
Hi,
Unfortunately, I don’t have much knowledge in the security domain.
Hi, I want to use a few IoT devices, such that all their communications happen via a border router only. How to implement this?
Try this https://anrg.usc.edu/contiki/index.php/RPL_Border_Router
Hi, how do I open the pcap file containing the radio messages once I save them? Wireshark is unable to open it. Please advise.
Wireshark should be able to open pcap. Have you tried any other version of wireshark?
Hi,
Please how can I force nodes route or force the connection with other specific nodes using script editor in cooja ?
Hi,
I don’t have an answer to this question. Sorry!