This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

New Z-Stack Linux Gateway release announced

Other Parts Discussed in Thread: Z-STACK, CC2531, CC2530, CC3200, CC2591, CC2538

Hi Z-Stack fans,

I am excited to announce the release of our Z-Stack Linux Gateway software product.

It is a Linux SW package, running on BeagleBone black and featuring Sitara AM335x processor, which provides a very simple to use and abstracted API that accelerates the integration and development of application that use ZigBee Home Automation as connectivity technology in Linux.

Giving a socket level interface to the applications, our Linux gateway middleware implements a ZigBee to IP translation, enabling other TCP/IP based application to easily connect with it.

The middleware is an integrated sub-system, providing features like serial boot loader capability for in-field upgrade of the local ZigBee firmware as well as OTA server for upgrade of remote nodes.

Combined with embedded CC253x ZNP, the whole solution is flexible and versatile for the control and monitor of any kind of Home Automation device.

The Z-Stack Linux gateway SDK is an Ubuntu installer SDK, which bundles the gateway sub-system middleware, a feature-rich application that uses it and several documents that guide you through the first step of the install and the development of your application.

Please visit www.ti.com/tool/z-stack and download the Z-STACK-LINUX-GATEWAY SDK.

Stay tuned for more news and enjoy our Z-Stack Linux gateway product!

Thanks,

TheDarkSide

  • TheDarkSide, I have a client looking to commercialize this system in some form, very good work. It also took us a while to cut through the initial confusions related to the .run file, etc. however. We should have the basics up and running with the help of this forum soon, and we definitely want to use this as the basis of a new product, but please see what you can do to avoid the mistakes Dresden Elektronik made with their RasPi gateway. They too, have a similar system, but the inability/lack of interest to license important parts of the code they use (deCONZ) killed our prospects to use their system as a basis for a product. We spent MANY hours working with that system , fooled by a BSD license for most of it, adding important UI additions/functions only to find out at the end of the day that they would not work with my client because of their "very important and valuable" software component ...Please TI, work with us, let us buy your hardware , use your references, get great products to market...don't cripple us like these others do at every turn? Anyhow , what in the devil do we need to do to with TI to make this happen? Don't be another Dresden? What good is a great reference like this if nobody can use it for product development because of one "very important and valuable" software component? We're charging on with our plans, let us know what we can do to keep this from being another Dresden-like dead end please!
  • Hi,

    I have installed Z-Stack_Linux_Gateway_1_0_1_installer.run on my 32 bits Ubuntu PC successfully. I found the sample application is for BeagleBone Black Board. If I would like to use my Ubuntu PC as gateway (i.e. plug CC2531 USB dongle into Ubuntu PC instead of BeagleBone Black Board), what should I do?

    Thanks.

    Best regards,

    Erison

  • There are source files under /opt/Z-Stack_Linux_Gateway-1.0.1. You can build the binary by yourself to run on Ubuntu PC.
  • Hi YiKai,

    It seems that there is no source code for those servers. My Ubuntu PC is x86 platform. How to migrate those servers to x86 Ubuntu PC?

    By the way, I can start the demo application on BBB, but it cannot find my sensor(SmartThings Presence Sensor). How to make sensor appear in Devices list of demo application? Thanks.

    Best regards,
    Erison

  • What folders do you see in your Ubuntu folder /opt/Z-Stack_Linux_Gateway-1.0.1?
  • There is a source code for the sample client application. Source code for the server is not given. You had to request from TI and sign some agreement with them for that as far as I know.

    The server binary given is only for ARM for Beaglebone Black.
  • Hi Cyclonmaster,

    Thanks for your answer. Do you know how to make my sensor appear in DEVICES list of gateway demo app? Do I need to change configs or take some actions first? By the way, I plugged CC2531 usb dongle in Windows PC and Packet Sniffer tool  can get the packet from sensor.

  • To add device, you can refer to section 6.3.3.1 Adding Devices in Z-Stack Linux Gateway User Guide.pdf

    6.3.3.1 Adding Devices
    After you bring up the sample application and it has established connection to all the servers (“NGO” visible
    in the Application Status and Network Status indicates “ACTIVE”), the network is ready to accept
    connections from ZigBee devices. In the “ACTIONS” section, use the spacebar to navigate to the “Permit
    Join” (shortcut key “P”) to open the network up for joining devices. You can change the time for which the
    network remains open by pressing +/- key. The “NETWORK” section will indicate a State of “OPEN” with a
    countdown timer.
  • I have tried to Permit Join, but nothing happened. I also modified the channel to "DEFAULT_CHANLIST = 0x00002000 // 13 - 0x0D" because I can use Packet Sniffer with channel 0x0D to get the packet from SmartThing Presence Sensor, it still failed to appear in DEVICES list. Do you have any other suggestion for me to solve this issue? Thanks.
  • Can you provide sniffer log to me?

  • Hi YiKai,

    Attached please find the packet sniffer log. Thanks.

    SmartThings_PresenceSensor.zip

  • I can see a device is sending beacon requests but no coordinator responses. I think your linux gateway doesn't init coordinator properly.
  • Hi YiKai,

    I have only one CC2531 usb dongle, so the gateway is offline when I capture the packet by my Windows PC with CC2531. If I plugged CC2531 into BBB to start linux gateway, can I sniffer the packet from my ubuntu PC or BBB at the same time? If yes, how to do it? By the way, I borrow a PIR sensor from vendor and it can appear in DEVICES list successfully. I have one more question, does the linux gateway support to control Philips Hue? Thanks.

  • When you do sniffer, you have to plugin CC2531 USB dongle to BBB. So, you have to buy another dongle.
  • Hi,

    How about hal_board_cfg.h ?
    Do I still need to change
    #define xHAL_PA_LNA to #define HAL_PA_LNA ?
  • If you don't use PA/LNA, you don't have to change this.
  • Hi,DarkSide

    Could Z-Stack_Linux_Gateway_1_0_1_installer.run runs on Ubuntu (PC Vitualbox) + CC2531 USBDongle ?

    Or we have to use BeagleBone platform?

  • The script Z-Stack_Linux_Gateway_1_0_1_installer.run should be run on a Ubuntu PC and you would get Z-Stack_Linux_Gateway_1.0.1 folder installed on your Ubuntu. Under the folder, there is Precompiled_arm folder which contains binary for running Z-Stack Linux Home GW on BBB. If you want to run Z-Stack Linux Home GW on a Linux Desktop, you have to sign SLA with TI to get its full source code and compile by yourself.
  • Can I run this directly on a stock BBB rev c?

    I downloaded the

    Z-Stack_Linux_Gateway_1_0_1_installer.run file onto my Mac and scp'd the file to my headless bbb, did a chmod +x on the .run and tried to execute. says cannot execute binary file. Can anyone help me get going? Is there more information somewhere about running this software from the command line?

  • As I replied in previous post, script Z-Stack_Linux_Gateway_1_0_1_installer.run can only be run on a Ubuntu 32 Bit OS.
  • How do you execute this .run file if it were on an Ubuntu system?

  • After you copy it to Ubuntu, you use "./Z-Stack_Linux_Gateway_1_0_1_installer.run" to run it.
  • Hi,
    you just copy the installer to an Ubuntu 32-bit, run it and will find docs and ARM-ready runnables that you'll have to copy over to your BBB. They run out of the box for me.
    Regards,
    Asier.
  • @TheDarkSide
    You were supposed to check few things for releasing binaries for x86 platform. What happened?
    It would be really nice and much more easier if we could check out the performance and stability in a computer rather than fooling around with a BBB board.
    I'm surprised you haven't done it by now.
    If it's possible I would like to check the stack out in a x86 computer (say Ubuntu 32bit)

    By the way I contacted a representative here in the united states and after spending some time answering questions turns out I'm not gonna get the source code and apparently it's for big companies ...
  • Hi,

    we won't able to release binaries for x86.

    However, we lightened up the terms for releasing the full source code to customers. Maybe your request was done several months ago.

    I suggest you contact again your local TI representative to get it.

    I apologize for the inconvenience so far.

    Thanks,

    TheDarkSide

  • Hi,

    I am looking for the full source code, and contacted the TI representative for SLA, they are unaware of it. Please let me know what exactly need to be asked or move further if they are unaware of SLA thing.

    If possible please provide any references of the TI representatives.

    My organization is are located in Hyderabad, India.

    Regards,
    Chenna
  • Try to send a friend request to TheDarkSide and see if he can help you.
  • I did sent him a friend request.
  • Another choice is Hector whom you can also send a friend request too.
  • You guys didn't mention on what distribution this stack works.
    I mean there are many distributions out there for BeagleBone Black like Ubuntu, Debian, Angstrome, ...
    For example I want to order a BBB with a 7" LCD which uses Debian but I'm not sure is it a good idea or not ?
    Unfortunately there are not many LCD options for BBB out there.
  • I have test Z-Stack Linux Home GW wiht bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb on my BBB.
  • Well what about other boards out there ?
    I mean BBB is based on a Cortex-A8 CPU with ARMv7 processor and I have other powerful boards with ARMv7 processors (mostly Cortex-A9) but from different silicone vendors like Samsung.
    Should the stack be compatible to these boards or you used some sort of hardware based features in BBB ?
    OR if there was ever a problem is it more safe to say that it was because of the Linux distribution running on that board rather than the processor itself?
    Because I checked and binaries are fine but there seems to be other problems. It was not a debian distro by the way.
    (I know this is not something officially supported but I'm just asking out of curiosity)
  • If you intend to run Z-Stack Linux Home GW reference design on different platform, I suggest you to contact TI Local representative to sign SLA to get full source code and rebuild it.

  • #>chmod a+x file.run
    #>./file.run

  • Is there "Z-Stack Linux Gateway Developer's Guide" in source code release that one might get from a local distributor after signing a SLA?
    Because it's not in the binary package. I figured it might be in the source code package.
  • As I know, there is no such "Z-Stack Linux Gateway Developer's Guide" in source code release.
  • Well is there such a document at all ?

  • I am afraid there is no such document. You might need to study source code directly to know details. Anyway, you can try to contact TI representative to know if they can provide some insider information.
  • Because someone has quoted here

    e2e.ti.com/.../1583208

    that "You need to sign SLA with TI to get the GW SDK including source code and Developer's Guide, it can not be downloaded on TI public web site."

    It has been quoted some places else too:

    https://e2e.ti.com/support/wireless_connectivity/zigbee_6lowpan_802-15-4_mac/f/158/p/399724/1414668#1414668

  • I had signed SLA and got full source code. However, I don't remember there is extra document other than those already available for public download from Z-Stack Linux Home Gateway reference design.
  • Really?
    That's weird !
  • It's my mistake. After checking my full source code package, I see there is Z-Stack Linux Gateway Developer's Guide.pdf.

  • You are welcome.
  • I tried to compile demo project located in Z-Stack_Linux_Gateway-1.0.1\Source\Projects\zstack\linux\demo directory by running make command just like the way the build_sample_app script does. But I get a weird error telling me that "nwkmgr.pb-c.h" file is missing when it wants to compile socket_interface.c file and it reaches the line:

    #include "nwkmgr.pb-c.h"

    While it is right there in "nwkmgr" directory and this directory is included to the make file this way :

    INCLUDE = -I$(PROJ_DIR) -I../engines -I../framework -I$(PROTOINC) -I../../nwkmgr -I../../hagateway -I../../otaserver


    So why am I getting this error: 

    ./../framework/socket_interface.c:52:25: fatal error: nwkmgr.pb-c.h: No such file or directory

  • I replaced

    #include "nwkmgr.pb-c.h"

    with

    #include "../../nwkmgr/nwkmgr.pb-c.h"

    in every sources that included this header and it worked just fine. I still don't know why considering the path was added in this line of demo project makefile as you see:

    INCLUDE = -I$(PROJ_DIR) -I../engines -I../framework -I$(PROTOINC) -I../../nwkmgr -I../../hagateway -I../../otaserver

  • Have you get full source code from TI when you do this?
  • No I tried on the one that is downloadable from TI website. I presume the procedure is the same. I wanted to understand how the demo example works and then I want to change it for my specific purpose.

    But I don't know how it works. I mean look at the main.c file in demo project for example. There is not much code in there and I couldn't figure out how it works. Although I have a pretty good idea. Correct me if I'm wrong :

    1- The zigbeeHAgw scripts runs some precompiled servers at the background and they open a socket.
    2- The start_application script runs main application (main.bin) given the address and port number of that opened socket. 
    3- The way that main application makes contact to the servers is through the opened socket and TCP protocol. All functions in user application (main application) send and receive their own data using TCP packets and it communicates with the servers using that opened socket. And I guess it's something we don't care about much because it's happening underneath and we're just supposed to use the provided functions. Right ?

  • If you intend to build nwkmgr, I think you have to get full source code from TI.
  • No it's not. I've build it as it is. Like I said I rebuild main.bin application from scratch and it worked just fine. There are precompiled servers and all I had to do was building the main application. Now I want to make my application.

    Could you please answer latest questions I asked before ?