Wednesday, September 9, 2015

How to build Contiki 6lbr Slip Radio on CC2650 SensorTag or SmartRF06EB+CC2650EM

Do the following steps to build Contiki 6lbr Slip Radio for CC2650 SensorTag+CC-DEVPACK-DEBUGGER.

1. Change "#if BOARD_CONF_DEBUGGER_DEVPACK" to "#if 1" in \contiki\platform\srf06-cc26xx\sensortag\cc2650\board.h.

2. do "make clean".

3. do "make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 slip-radio.bin".

4. Download slip-radio.bin to CC2650 SensorTag and connect CC2650 SensorTag+CC-DEVPACK-DEBUGGER to 6lbr router (could be Raspberry Pi or BeagleBone Black).

5. On 6lbr router, do "sudo vi /etc/6lbr/6lbr.conf" and make sure "DEV_RADIO=/dev/ttyACM0".

6. On 6lbr router, start 6lbr with "sudo service 6lbr start"


Do the following steps to build Contiki 6lbr Slip Radio for SmartRF06EB+CC2650EM.

1. do "make clean".

2. do "make TARGET=srf06-cc26xx BOARD=srf06/cc26xx slip-radio.bin".

3. Download slip-radio.bin to SmartRF06EB+CC2650EM and connect FT232 Serial-to-USB dongle to P412 on SmartRF06EB. Connect FT232 to 6lbr router (could be Raspberry Pi or BeagleBone Black).

4. On 6lbr router, do "sudo vi /etc/6lbr/6lbr.conf" and make sure "DEV_RADIO=/dev/ttyUSB0".

5. On 6lbr router, start 6lbr with "sudo service 6lbr start"


Monday, September 7, 2015

Build 6LowPAN Contiki SubG Hz Sniffer for CC1350

Use the following steps to build 6LowPAN Contiki SubG Hz Sniffer for CC1350.
1. Go to  contiki/examples/cc2538dk/sniffer.
2. Add the followinges into project-conf.h.
    #define BOARD_CONF_DEBUGGER_DEVPACK        0
    #define PROP_MODE_CONF_SNIFFER                    1
    #define CC26XX_UART_CONF_BAUD_RATE    460800
    #define RF_CORE_CONF_CHANNEL                 25
3. make TARGET=srf06-cc26xx BOARD=srf06/cc13xx sniffer.bin.
4. Download sniffer.bin to CC1350EM and connect FT232 Serial-to-USB cable to P412 on SmartRF06EB.
5. Refer to steps here about Wireshark part.





Thursday, September 3, 2015

Contiki SubG Hz 6LowPAN on CC1350

To test on Contiki SubG Hz 6LowPAN on CC1350, I use SmartRF06EB+CC1350EM with FT232 USB-to-Serial dongle to act as Slip Radio which is connected to Raspberry Pi (It also works on BeagleBone Black too).

1. Git the latest Contiki source code by using "git clone --recursive https://github.com/contiki-os/contiki".

2. Open /examples/ipv6/slip-radio/project-conf.h. Comment out the QUEUEBUF_CONF_NUM and UIP_CONF_BUFFER_SIZE and add "#define RF_CORE_CONF_CHANNEL 25"

#ifndef PROJECT_CONF_H_
#define PROJECT_CONF_H_
/*
 #undef QUEUEBUF_CONF_NUM
 #define QUEUEBUF_CONF_NUM          4

 #undef UIP_CONF_BUFFER_SIZE
 #define UIP_CONF_BUFFER_SIZE    140
*/

#define RF_CORE_CONF_CHANNEL                 25
#undef UIP_CONF_ROUTER
#define UIP_CONF_ROUTER                 0

3. Bulid slip-radio.bin using the following steps.
cd examples/ipv6/slip-radio
make clean
make TARGET=srf06-cc26xx BOARD=srf06/cc13xx slip-radio.bin

4. Flash slip-radio.bin to SmartRF06EB+CC1350EM using SmartRF Flash programmer 2.0.

5. Connect FT232 USB-to-Serial dongle to UART pins on SmartRF06EB and plug FT232 USB dongle to Raspberry Pi. You should see "ttyUSB0" get listed under /dev.

6. Refer to "Setup 6lbr to run 6LowPAN with CC2531 USB dongle on Raspberry Pi 2B" and revise "DEV_RADIO=/dev/ttyACM0" to "DEV_RADIO=/dev/ttyUSB0" in /etc/6lbr/6lbr.conf.

7. Use "sudo service 6lbr start" to start 6lbr and you can use Firefox to access to 6lbr web page ([bbbb:100]).




Then, I use anther SmartRF06EB+CC1350EM and a CC1350 SensorTag to act as Contiki SubG Hz 6LowPAN devices.

1. Build cc26xx-web-demo.bin for SmartRF06EB+CC1350EM and CC1350 SensorTag.
cd ../examples/cc26xx/cc26xx-web-demo
make clean
make TARGET=srf06-cc26xx BOARD=srf06/cc13xx cc26xx-web-demo.bin

2. Flash cc26xx-web-demo.bin to SmartRF06EB+CC1350EM and CC1350 SensorTag using SmartRF Flash programmer 2.0.


3. Check 6lbr Sensors web page and you will see these two device on it.