How to Run CoAP Applications in Contiki Cooja Simulator?
Share
Execute CoAP Applications in Contiki Cooja Simulator
Description:
Constrained Application Protocol (CoAP) is a lightweight HTTP protocol that reads and controls the sensors deployed for IoT.It has actions like get, post, put, delete, observe, discover.So here is an example in contiki that shows how to use this CoAP based application using a border router.
Step-1
Open the Contiki OS with Vmware workstation.
And login into contiki user
password: user.
Step-2
Now open the terminal in contiki desktop and make the right directories to run the cooja simulator tools.
Cmd: cd contiki/ tools/ cooja --> press enter
ant run --> enter
After successful execution of above command. make file will build automatically and then Contiki Cooja Network simulator application tool will appear. It’s a blue color terminal.
Step-3
Open file menu on cooja and create new simulation with random seeding
It will auto-generate the seeds for every time reload the simulation.
File -new simulation (or) (ctrl+ n).
click -New random seed on reload option.
click -Create .
Step-4
After click the create option number of tabs will appear in terminal it is basic necessary to simulate applications.Open motes menu >> add motes >> create new motes type >> sky
Three files are necessary to run CoAP applications. In order to create the motes.
i. border- router.
ii. er-example-server.
iii. er-example-client.c
Step-5
To create border router motes
home/user/contiki/examples/ipv6/rpl-border-router/border-router.c
Choose the file in location >> compile >> create >> Add motes.