Wednesday, March 29, 2017

Build TI Z-Stack Linux Home Gateway reference design for x86 Linux

The following steps show you hot to build TI Z-Stack Linux Home Gateway reference design for x86 Linux.

1. Download Z-Stack_Linux_Gateway-1.0.1-src-linux-installer.run from http://www.ti.com/tool/z-stack-archive.

2. Setup a 32 bit Ubuntu and run Z-Stack_Linux_Gateway-1.0.1-src-linux-installer.run to extract Z-Stack Linux Gateway source code to your Linux Home folder\Z-Stack_Linux_Gateway-1.0.1-src

3. Revise the build script package_builder_bbb (in red) under “your Linux Home folder\Z-Stack_Linux_Gateway-1.0.1-src\Source\scripts\”

...
#Target platform:
    #export TARGET_PLATFORM="BEAGLEBONE_BLACK"
    export TARGET_PLATFORM="x86"

...
    cd $NPI_SOURCE/Projects/tools/LinuxHost
    make clean
    make create_output
    #make arch-all-armBeagleBone CC_armBeagleBone=$COMPILER |& tee -a $MAKE_LOG_FILE
    make $BUILD_TYPE |& tee -a $MAKE_LOG_FILE

...
# *** Copy resources ***********************************************************************************

#cp $NPI_SOURCE/Projects/tools/LinuxHost/out/NPI_lnx_armBeagleBone_server $BINARIES_SERVERS_DIR/NPI_lnx_${PLATFORM_SUBSTRING}_server
cp $NPI_SOURCE/Projects/tools/LinuxHost/out/NPI_lnx_${PLATFORM_SUBSTRING}_server $BINARIES_SERVERS_DIR/NPI_lnx_${PLATFORM_SUBSTRING}_server


4.a Install protobuf by doing the following two apt-get install

       sudo apt-get install protobuf-c-compiler
       sudo apt-get install protobuf-compiler

4.b Create a new folder "tools" and export TCLIB to it using the following lines:
  
       cd ~
       mkdir tools
       export TCLIB=~/tools/

5. Switch to your Linux Home folder\Z-Stack_Linux_Gateway-1.0.1-src\Source\ and run ./build_all

6. The output will be at "your Linux Home folder\Z-Stack_Linux_Gateway-1.0.1-src\Source\ERROR_out\z-stack_linux_gateway_x86_binaries.tar". The build error is due to the lack of comparison file but the output binaries still work on x86 environment.

7. Copy and untar “z-stack_linux_gateway_x86_binaries.tar” to your working directory on x86 (called ). Please follow the (Z-Stack Linux Gateway User Guide.pdf, Chap 6.3) to start the application. Please note you have to specify x86 when you run zigbeeHAgw like "sudo ./zigbeeHAgw x86"

8. If you run it successfully, you will see the results like the following screen shot.


Thursday, March 9, 2017

SPI connection between LAUNCHXL-CC1310/LAUNCHXL-CC2650 and ENC28J60 to run 6lbr

You can do the following SPI connection between ENC28J60 and LAUNCHXL-CC1310/LAUNCHXL-CC2650 to run 6lbr
  • SCLK : LaunchPad DIO10
  • MOSI : LaunchPad DIO9
  • MISO : LaunchPad DIO8
  • CS : LaunchPad DIO14
  • GND :  LaunchPad GND
  • VCC : LaunchPad 3V3

6lbr SW can be built by following steps in http://sunmaysky.blogspot.tw/2017/01/build-6lbr-for-cc2650dk-or-cc1310dk.html . After run 6lbr on LAUNCHXL-CC1310/LAUNCHXL-CC2650, you can see the following UART output.



Friday, March 3, 2017

How to run Contiki udp-server/udp-client on LAUNCHXL-CC2650.

The following steps show you how to run Contiki udp-server/udp-client on LAUNCHXL-CC2650.

1. Do "make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 udp-server.bin" under /contiki/examples/ipv6/rpl-udp to build udp-server.bin and download it to one of LAUNCHXL-CC2650 using Flash Programmer 2.


2. Do "make TARGET=srf06-cc26xx BOARD=launchpad/cc2650 udp-client.bin" under /contiki/examples/ipv6/rpl-udp to build udp-client.bin and download it to another LAUNCHXL-CC2650 using Flash Programmer 2.

3. Start 6lbr on Raspberry Pi or BeagleBone and power on udp-server and udp-client on two different LAUNCHXL-CC2650. You will see two LAUNCHXL-CC2650 show on sensor list of 6lbr web page.


4. On UART output of two LAUNCHXL-CC2650, you can see udp-client sends Hello messages to udp-server.