Tuesday, December 1, 2015

How to do porting of TI Z-Stack Linux Home Gateway to Raspberry Pi

The following steps show you how to do porting of TI Z-Stack Linux Home Gateway to Raspberry Pi.

1. Sign SLA with TI to get source code installer "Z-Stack_Linux_Gateway-1.0.1-src-linux-installer.run"

2. Run "chmod +x Z-Stack_Linux_Gateway-1.0.1-src-linux-installer.run".

4. Run "./Z-Stack_Linux_Gateway-1.0.1-src-linux-installer.run" in VirtualBox 32 Bit Ubuntu to install source code to "/home/yk/Z-Stack_Linux_Gateway-1.0.1-src".

5. Run "sudo apt-get install git" to install git first and run "git clone https://github.com/raspberrypi/tools" to get cross compiler and tool chain for Raspberry Pi.

6. vi .bashrc under /home folder and add the following two lines

     export PATH=$PATH:~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
     export TCLIB=~/tools/arm-bm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/lib/

7. Restart terminal to make .bashrc deployed.

8. Change directory to /home/yk/Z-Stack_Linux_Gateway-1.0.1-src/Source and run "./build_all"

9. After build complete, you will get z-stack_linux_gateway_arm_binaries_.tar under /home/yk/Z-Stack_Linux_Gateway-1.0.1-src/Source/out/Precompiled_arm.

10. scp  z-stack_linux_gateway_arm_binaries_.tar to you Raspberry Pi and plugin CC2531 USB dongle with FW CC2531-GW-ZNP_38724.hex.

11. Open 2 SSH client shells on your host PC and connect them to Raspberry Pi.

12. In one of SSH login, untar Z-Stack Linux Gateway Binaries
      $ cd ~
      $ mkdir z-stack_linux_gateway_arm_binaries
      $ tar xvf z-stack_linux_gateway_arm_binaries_.tar -C z-stack_linux_gateway_arm_binaries

13. In the same SSH login, run the following commands to start Z-Stack Linux Gateway servers.

      $cd ~/z-stack_linux_gateway_arm_binaries
      $cp protobuf/libprotobuf-c.so.0 /usr/lib/
      $cd servers
      $chmod +x ./zigbeeHAgw
      $./zigbeeHAgw beaglebone

14. On another SSH login, run the following commands to start Z-Stack Linux Gateway application
      $ cd ~/z-stack_linux_gateway_arm_binaries/servers
      $ chmod +x ./start_application
      $ ./start_application

14 comments:

  1. 我想要这个Z-Stack_Linux_Gateway-1.0.1-src文件,可以发给我没吗。yy-fly@163.com

    ReplyDelete
    Replies
    1. You have to contact TI to sign SLA to get this source code.

      Delete
  2. Hi. I'm a big fan of z-stack
    Could you please send this source file to my email? mostafanfs@gmail.com

    ReplyDelete
    Replies
    1. You have to contact TI to sign SLA to get this source code.

      Delete
    2. Thank you. I couldn't get it for now. Seems there are some problems in the way.
      Then could you please send its compiled files (binaries) for X86 platform ?
      I want to give it a try on my Ubuntu PC. I have the CC2531 module but I don't have a BBB board. If you could just send its binaries for X86 it would really help me out.

      Delete
  3. Hi there
    If you could please explain how to compile this source code for x86 platform that would be really great. What do you say?

    ReplyDelete
  4. Hi. I did it to 8th step, but i don't see "build_all" file, and i can not run "./build_all". What was i missing?

    ReplyDelete
    Replies
    1. i downloaded Z-Stack_Linux_Gateway-1.0.1-src-linux-installer.run from
      http://www.ti.com/tool/z-stack

      Delete
    2. You have to get full source code from TI.

      Delete
    3. thanks.
      if i use cc2530 with raspberry pi, what do i need to do?

      Delete
  5. You can refer to another post at http://sunmaysky.blogspot.tw/2016/01/how-to-run-ti-z-stack-linux-home.html?m=1 and do similar thing to raspberry Pi.

    ReplyDelete
  6. Hi,

    can you refer to a person who handled your SLA case ? I am member of the TI community and cannot find the responsible person

    ReplyDelete