Practical - 9 Name : GOHIL AJAYKUMAR SHANKARBHAI Roll No : 16BIT058 Subject & Course Code: IoT (CE671) Aim: To Simulate CoAP protocol in Cooja Simulator Methodology : 1. Start cooja simulator and Create new simulation. 2. Create new sky mote and browse c file for RPL Border Router implementation /home/user/contiki-2.7/examples /IPV6/rpl-border-router Open border-router.c file complie it and click create button and the mote will be added. 3. Create new sky mote and browse c file for CoAP server /home/user/contiki-2.7/examples/er-rest-example/er-example-server.c Open er-example-server.c file complie it and click create button and add two motes. Figure 1 4. Arrange motes that 1 and 2 are in the range and 2 and 3 are in the range of each other Figure 2 5. Start serial socket for mote 1 Figure 3 6. Type following commands in terminal Figure 4 7. Then start simulation Figure 5 8. Now to access the mote from internet open browser and type the mote address with coap:// protocol (I have used 2nd mote with IP aaaa::212:7402:2:202) then click GET button so it will display the mote information. Figure 6 9. Now right click on the mote 2 and enable show LED option 10. Then go back to browser and post 1 in actuators>toggle Figure 7 11. Go back to cooja simulator and open the LED window. There RED LED is on. Figure 8 Conclusion : After performing this practical I have learnt how to simulate CoAP protocol using Cooja simulator in Contiki OS. I have also learnt configuration of motes like RPL router (Server mote) and CoAP (client mote). Then how to control that virtual mote from the browser using CoAP protocols GET & POST methods.