Sunday, February 9, 2014

Contiki OS: RPL Network Setup 1

One mote can be used as a Border Router to bridge the wireless IPv6 network (e.g., LLN) to a PC via serial link. By which, the IPv6 network traffic can reach outside network, and the Internet.

InstantContiki 2.7 or any machine with Contiki-2.7 and TI MSP430 toolchain (See here)

1. Border router (mote 1)
#cd contiki-2.7/examples/ipv6/rpl-border-router
#make TARGET=sky
#sudo make TARGET=sky border-router.upload

2. UDP servers (motes 2..n) or any IPv6 service
#cd contiki-2.7/examples/ipv6/rpl-udp
#make TARGET=sky
#sudo make TARGET=sky udp-server.upload

3. Host machine 

- Linux using tunslip6 (with mote 1 connected as ttyUSB0)

#cd contiki-2.7/tools
#make tunslip6
#sudo ./tunslip6 -s /dev/ttyUSB0 aaaa::1/64

Cooja: sudo ./tunslip6 -a 127.0.0.1 aaaa::1/64
(enable Serial  Socket Server in the Cooja node used as the wireless interface)

- Windows using wpcapslip6 (with mote 1 connected as COM5)
Run cmd (Admin)
ifconfig /all --> find a working network interface (e.g.,Virtual Box Network Interface), MAC address: 00-50-56-C0-00-01
cd tools\stm32w\wpcapslip6
wpcapslip6 -s /dev/com5 -b aaaa:: -a aaaa::1/64 00-50-56-C0-00-01 (COM5 is where the mote is connected, check in Device Manager)

4. Test
ping6 aaaa::212:7400:13cb:44 (mote 1, border router)
ping6 aaaa::212:7400:13ca:fee4 (mote 2)
ping6 aaaa::212:7400:13cb:34fa (mote 3)


Firefox: http://[aaaa::212:7400:13cb:44]

4 comments:

  1. Do You have any help on implementing CoAP Application on Cooja.
    I have set up Border Router, REST server and CoAP client and able to ping all the nodes through tunslip6 or "connect router cooja" command. I am not able to access the resources via Firefox plugin Copper for CoAP..

    Please any help or advice?

    ReplyDelete
  2. Hi All,

    I am Huma doing master in Computer system engineering.I am working on my thesis and performing simulation on contiki but there are some issues kindly help me to resolve them. my issues are:
    1) I want to plot the graph of power consumption, delay and packet Rx and Tx using different protocols on contiki.
    2) I want to use Sky Mote, Z1 Mote, Cooja Mote on UDP protocols.
    So please guide me how to do these simulation on cooja.

    ReplyDelete