Thursday, April 19, 2018

How to build and run Contiki-NG cc26xx-web-demo running on LAUNCHXL-CC1310 and rpl-border-router on Raspberry Pi with slip radio running on LAUNCHXL-CC1310

The following steps show how to build and run Contiki-NG cc26xx-web-demo running on LAUNCHXL-CC1310 (or LAUNCHXL-CC2650) and rpl-border-router on Raspberry Pi with slip radio running on LAUNCHXL-CC1310 (or LAUNCHXL-CC2650) .

1. Do "git clone --recursive https://github.com/contiki-ng/contiki-ng" on your InstantContiki or Cygwin (you can build Cygwin develop environment according to here)

2. Build slip radio for LAUNCHXL-CC1310

  • 2.1 Change directory to contiki-ng/examples/slip-radio
  • 2.2 Add "#define IEEE802154_CONF_DEFAULT_CHANNEL 25" to project-conf.h
  • 2.3 Build slip-radio.bin by "make TARGET=srf06-cc26xx BOARD=launchpad/cc1310 slip-radio.bin"
  • 2.4 Download slip-radio.bin to one of LAUNCHXL-CC1310 to act as slip radio for usage of rpl-border-router.
3. Build cc26xx-web-demo for LAUNCHXL-CC1310

  • 3.1 Change directory to contiki-ng/examples/platform-specific/cc26xx/cc26xx-web-demo
  • 3.2 Make sure "#define IEEE802154_CONF_DEFAULT_CHANNEL 25" is defined in project-conf.h
  • 3.3 Build cc26xx-web-demo.bin by "make TARGET=srf06-cc26xx BOARD=launchpad/cc1310 cc26xx-web-demo.bin"
  • 3.4 Download cc26xx-web-demo.bin to another of LAUNCHXL-CC1310 to connect with rpl-border-router later.
4. Build and run rpl-border-router on Raspberry Pi
  • 4.1 Do "git clone --recursive https://github.com/contiki-ng/contiki-ng" on your Raspberry Pi.
  • 4.2 Change directory to contiki-ng/examples/rpl-border-router
  • 4.3 Build border-router.native by "make TARGET=native all"
  • 4.4 Connect LAUNCHXL-CC1310 (running slip radio) to Raspberry Pi and make sure it emulates ttyACM0.
  • 4.5 Run rpl-border-router by "sudo ./border-router -native fd00::1/64 -s /dev/ttyACM0"

5. You can type "help" on rpl-border-router console to know more available commands.



6. You can login to Raspberry Pi using another terminal and do "ping6 fd00::212:4b00:e00:cc00" to see reply from rpl-border-router.


6. Power on cc26xx-web-demo on another LAUNCHXL-CC1310. The green led on LAUNCHXL-CC1310 should blink fast in the beginning. When you see green led blinking slows down, it means cc26xx-web-demo joins rpl-border-router.

7. You can type "ip-nbr" on rpl-border-router console to know reachable nodes.



8. Now, you can do "ping6 fd00::212:4b00:a27:f319" (fd00::212:4b00:a27:f319 is the IPv6 address of cc26xx-web-demo) and see reply from cc26xx-web-demo.




5 comments:

  1. Hi I followed the exact same steps to create a border router but i get error sudo: ./border-router: command not found
    how can i fix this ??

    ReplyDelete
    Replies
    1. Do you see any build error when doing "make TARGET=native all"?

      Delete
    2. I got the same error and found that the file to run is border-router.native, so just give the "sudo ./border-router.native fd00::1/64 -s /dev/ttyACM0"

      Delete
  2. I believe I managed to run everything, but when I run the border router I get a "SIOCSIFADDR: Permission denied" message between "ifconfig tun0 add fd00:1/64" and "ifconfig tun0".
    Also, I cannot ping and the web-demo device never seems to connect.
    Can you help with that? Thank you!

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete