How to run CoAP applications in contiki cooja simulator?

Description

To know about how to run COAP application simulates in contiki cooja network simulator tools.

   Open the Contiki OS with Vmware 
workstation. And login into 
contiki  user password: user.

1a

   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

1b

  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.

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 .

1c

   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.c

   iii. er-example-client.c

1d

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.

1e

   To create server motes.

   /home/user/contiki/examples/
er-rest-example/er-example-server.c

   Choose a file location >>
compile>> create >> choose sever

   count(optional)>> Add motes.

Here,

1f

   To create client motes .

   /home/user/contiki/examples
/er-rest-example/er-example-client.c

   Choose a file in location >>
compile >> create >> choose client

   count(optional) >> Add motes.

1g

   Now connect the serial socket
server in border router.

   In cooja, network terminal .. View
menu -choose the options you want,

   For example: mote Type, mote
ID’s, radio traffic, ...

   Left click on border router motes
>> choose: mote tools for sky1 >>
serial socket(SERVER).

   New tab will appear click : start
-> now the default port will listen.

   open one more command terminal and
set directories to this location:

   Cd contiki/ examples/ ipv6/
rpl-border-router/

   Make connect-router-cooja
the server will be connected
to router.

1h
Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit