Saturday, July 23, 2016

Run OpenThread on CC2538DK

Since Thread Protocol is discussed more and more recently and we see open source OpenThread is release, I try to test OpenThread.The following steps shows you how to run OpenThread on CC2538DK

To save your time to setup GCC for building this example, you can use InstantContiki 3.0 running on VMPlayer.

1. git clone --recursive https://github.com/openthread/openthread
2. cd openthread
3. run "./bootstrap"
4. do "make -f examples/Makefile-cc2538" and you will get arm-none-eabi-ot-cli.bin under /output/bin
5. Download arm-none-eabi-ot-cli.bin to two CC2538DK using Flash Programmer 2.
6. On one of CC2538DK, you can run Cli command "start" to create OpenThread network
   > start
   start
   Done
   > state
   state
   leader
   Done

7.  On another CC2538DK, you can run Cli command "start" to start OpenThread router when there is a OpenThread network existed.
   > start
   start
   Done
   > state
   router
   Done
 
8. On leader node, you can use "scan" to see get the router node and use "ping" to ping the router.
 9. On router node, you can use "scan" to see get the leader node and use "ping" to ping the leader.

Wednesday, July 20, 2016

How to use CC2650DK, CC2650 LaunchPad, or CC2650STK as Contiki 6LowPAN Sniffer.

The following steps show you how to use CC2650DK, CC2650 LaunchPad, or CC2650STK as Contiki 6LowPAN Sniffer.

1. git clone --recursive https://github.com/contiki-os/contiki

2. Change directory to /contiki/examples/sensniff

3. Use the following three make command to build sensniff.bin for CC2650DK, CC2650 LaunchPad, or CC2650ST.

    a. make TARGET=srf06-cc26xx BOARD=srf06/cc26xx sensniff.bin   -->CC2650DK
    b. make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 sensniff.bin --> CC2650LP
    c. make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 sensniff.bin --> CC2650STK



4. Use Flash Programmer 2 to download sensniff.bin to CC2650DK, CC2650 LaunchPad, or CC2650ST.



5. Download latest sensniff.py from https://github.com/g-oikonomou/sensniff  and refer to here for running Wireshark to sniff packets.

How to use CC2650DK, CC2650 LaunchPad, or CC2650STK as Contiki 6LowPAN Sniffer.

The following steps show you how to use CC2650DK, CC2650 LaunchPad, or CC2650STK as Contiki 6LowPAN Sniffer.

1. git clone --recursive https://github.com/contiki-os/contiki

2. Change directory to /contiki/examples/sensniff

3. Use the following three make command to build sensniff.bin for CC2650DK, CC2650 LaunchPad, or CC2650ST.

    a. make TARGET=srf06-cc26xx BOARD=srf06/cc26xx sniffer.bin   -->CC2650DK
    b. make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 sniffer.bin --> CC2650LP
    c. make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 sensniff.bin --> CC2650STK



4. Use Flash Programmer 2 to download sensniff.bin to CC2650DK, CC2650 LaunchPad, or CC2650ST.



5. Download latest sensniff.py from https://github.com/g-oikonomou/sensniff  and refer to here for running Wireshark to sniff packets.