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.
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
A fully featured TI Design page for this product is available here:
ZigBee Home Automation Gateway reference design
This page provides Gerber files, layout, schematics, block diagrams and BOM references, in addition to the complete and scalable Linux-based software solution introduced above.
An overview of this design is also available on the ConnecTIng Wirelessly blog, under Connected gateways for the IoT – ZigBee Home Automation.
- OD
Is there a wiki or manual regarding the Z-Stack_Linux_Gateway_1_0_1_installer.run, especially on the API of the middle-ware? I downloaded the Z-Stack_Linux_Gateway_1_0_1_installer.run, there is nothing else out there?
Sincerely,
Jerry
Hi YiKai,
Thanks for your quick reply.
I tried to run the .run file on my host, the shell returns but nothing was output.
zb@zb-d:~/work/zigbee$ uname -a Linux zb-d 3.2.0-64-generic #97-Ubuntu SMP Wed Jun 4 22:04:21 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux zb@zb-d:~/work/zigbee$ ./Z-Stack_Linux_Gateway_1_0_1_installer.run zb@zb-d:~/work/zigbee$
Does it support 64-bit host system?
Sincerely,
Jerry
Hi,
yes it is a Ubuntu installer package built for 32-bit systems.
Do you see this like a huge limiting factor?
Thanks,
TheDarkSide
I still use 32-bit system however I suggest to provide script for 64bit system. There are lots of 64 bit system now.
Hi,
That's great news! Congratulations!
It looks like the perfect fit for one of our projects but I've got some questions for which I cannot find documentation, maybe because I'm unable to install the SDK. Would you be so kind to help me? Here they are:
1.- Is the SW supposed to work only on BBone Black? or will the white suffice? (that's the one I've got for testing) Is this the reason why I can't install the binary (the architecture maybe)?
2.- Is the SW supposed to be installed directly on the 'bone or is it an installer for a PC which contains images and docs?
3.- Once running, is it only for the HA profile? or can it be used with a custom profile?
4.- Is the cc2531 the standard ZNP hex image or a specific HA one?
Thanks a lot for your support, I'm willing to run this!
Regards,
Asier.
1. The SW is tested on BBB but it should work on white one. However, I can't be sure.
2. The SW is installed on PC.
3. It only supports HA profile.
4. It is a standard ZNP hex image.
Thanks YiKai,
1 & 2.-I guess #2 explains why #1 failed ;-)
I'll try on a PC, although I don't think I have a 32-bits one around, maybe a VM will do it.
3.- Is there a way to get broader support for the full Z-stack or custom profiles?
Thanks again, regards,
Asier.
For 64-bit ubuntu, you can try first installing ia32-lib and then install the Ti Z-Stack linux gateway
$ sudo apt-get install ia32-libs $ ./Z-Stack_Linux_Gateway_1_0_1_installer.run
Hope this helps for installing on 64-bit linux PC.
Thanks
Anand Singh
Hi
In the SDK there are servers which are pre-compiled for arm, can you suggest me where are the source code for these servers.
Are these servers compiled from the Z-STACK-HOME.
Will appreciate your help in this regard.
Thanks
Anand
Hi,
no the server source code is not available on the web for re-compilation for the moment, only as a binary for BBB - debian distribution.
The application that uses the API is delivered in source code so the gateway sub-system evaluation can be done on that platform.
Please contact a local TI representative and, after reviewing the information you provide, will be able to help you out in getting access to the source code of the servers.
Thanks,
TheDarkSide
Hi TheDarkSide
Thanks for the reply.
But can I know what is the reason for source code not available and only binaries and that too only for ARM.
It's very weird that the whole Z-stack and mac is available for access but these server which will basically an part of application is not available.
Is there any plan that in next release it will be available .
I was able to compile the demo application for ubuntu, and it would be great I were able to verify the gateway functionality on PC itself and so I could make an decision to customized and port it on ARM platform as per my use case. :( but it seems it's not possible with this.
Thanks
Anand
Hi Anand,
I understand. The gateway abstraction layer we created, which integrates ZigBee into IP, is a highly valuable piece of SW which we wanted to protect, at least at launch.
We are listening to customer feedback and I can't commit to a full source release on the web of linux code now; in the future we may decide to fully open it up.
I would really recommend your company contact the local TI folks in your region to start working on an SLA if you are interested in getting the entire source code. In the meantime BBB is a good platform for evaluating the solution and it is a cheap one.
Thanks for your understanding.
TheDarkSide
Hi TheDarkSide
I understand for unavailability of source code.
Can we have the access to i386 pre-complied binaries, is it something feasible for TI to provide.
Thanks
Anand
Thanks a lot Anand, it worked.
I know I've asked for custom profiles use, and the answer is no, as it's for HA profiles only.
But, looking at the architecture, is there a way to customize it for custom profiles, maybe just developing a new gateway server that talks to the network server?
I've tried to include my endpoints for my profile in the gateway_config.tlg file, but I don't seem to find the proper definition as the network server is unable to start.
I guess that, because the HA profile restriction, the sample app cannot see my devices in the network, which properly joins the network created by the SW. Am I right?
And then I can't neither test the OTA functionality, for instance. Is it because the HA profile? or is it a different implementation from the standard OTA functionality included in TI's z-stack? (which I have implemented and working)
Being able to customize this gateway sw can save me a lot of development and testing hours so it would be great if having a helping hand. ;-) From the architecture it looks feasible to me, but I don't want to spend time hitting my head against a wall (or developing something that TI may release in the near future ;-) )
Thanks a lot,
Asier.
Hi Asier,
- Z-Stack Linux Gateway supports only HA 1.2. Yes, the architecture is such so that we can add more profiles in future if needed, but for now it is designed and tested for HA 1.2
- OTA is supported in current release.Please consult users guide (section 6.3.3.7 ) on how to use OTA server to upgrade firmware. Prebuilt CC2530 firmware hex (for OTA testing) is also provided with the package. OTA endpoint is registered as HA profile endpoint with input cluster OTA.
Thanks,
Saurabh
HI Anand,
as for the the release of server binaries for x86 platform, let us check few things internally first.
In the meantime, did you try to contact local TI office in your region?
Thanks,
TheDarkSide
Hi Asier
Yes I have the similar thought, I would not like to spend my effort in developing which is something already done. So what's your plan for going forward.
Hi TheDarkSide.
If I can't get the source code could you guide or help me about the internal architecture of these servers and is there an way where I can implement an minimal subset of these to proceed further.
Thanks
Anand
Hi gents,
Tested with few zigbee devices (SW HA1.2) , works pretty well.
Any plans to get this gateway combined with any web server like what was done between NinjaBlocks and ZLL?
Regards,
Amjad
Hi Amjad,
TI Z-Stack Linux Gateway architecture supports cloud connectivity and most of the end products will have that support. We do foresee cloud apps ported on Gateway in near future as it becomes more popular, but we can't comment on the schedule. Stay tuned :)
Thanks,
Saurabh
Hi,
Is it possible to get binaries compiled for the Raspberry Pi ? At the moment there is basically no supply of beagle bone blacks so you guys have chosen to target a platform that basically no-one can currently buy ??
I've previously managed to compile the Zigbee Gateway software on an RPi and it was not difficult (source from here:git://git.ti.com/iot-gateway/zigbee-gateway.git).
I understand why you may not want to release your source but it would be fantastic if binaries for an easy to purchase platform were released as releasing it on the BBB means that anyone who does not already own one can't actually use the binaries...
Cheers,
Dave
Hi,
we hear you. There's no plan unfortunately to release binaries for Raspberry Pi but we are looking into other options to enable the community to use our great Linux ZigBee Home Automation SW with greater flexibility.
By the way, I just looked it up at beagleboard.org website and I noticed that while the bone is out of stock for certain distributors, it is in stock (and shipping is immediate) for other popular ones.
Thanks,
TheDarkSide
Hi TheDarkSide,
I just spoke to my local element14 distributor in Australia and they won't have the BBB in stock till September. I'm not sure where you were looking but the BBB is on backorder basically everywhere that would ship to Australia.
Will your binaries work on the BeagleBone dev board as opposed to the BeagleBone Black ?
Thanks,
Dave
Hi Dave,
I've been also unable to find it in Europe, but the good news is that it runs on the old BeagleBone, if that's what you mean by "BeagleBone dev board".
Though I've been unable to fully test the functionality as I don't have HA profile devices.
Hope this helps,
Asier.
hi all,
i'm trying to install the .run on an ubuntu 64bit system but also installing the ia32-libs
lib32z1 lib32ncurses5 lib32bz2-1.0 nothing seems to happen, it seems the system does something, but nothing else. someone could help me?
thanks
Giuseppe,
It depends on ubuntu version that you are running. Since our systems support 32-bit apps, we haven't experienced this issue. In case you are running one of the more recent Ubuntu versions, checkout following link and see if it helps: http://askubuntu.com/questions/363878/how-to-install-32-bit-matlab-in-ubuntu-64-bit/363879#363879
Saurabh
Is there a less expensive hardware implementation of a ZigBee Internet gateway than the CC2531 and the BeagleBone Black platform for small quantity production of a home automation network? Or an implementation that makes more sense?
Thanks in advance.
Bill Woody
Hi Bill,
You can consider using CC3200 with CC2530 to implement Zigbee gateway that is for Home Automation application connecting to internet.
Hello,
I'd like to build a CC2530ZNP image that is just like the one used here; compatible with HA1.2. Which compile flags are used to enable HA1.2 compatibility?
Thanks,
Derek
Hi TheDarkSide,
I tested Z-Stack Linux Gateway on BBB and CC2531 by launching >./start application.
The application brings up the User Interface and I am able to control CC2531 coordinator.
I have associated in this PAN 2 nodes, the first is a NETVOX sensor IR and the second an zigbee thermostat Freescale. As sniffer capture file shows the association is successful in my PAN, but on terminal I see only the HA GW coordinator CC2531.
How can I get the other nodes?
Best regards,
Derek,
-Install Z-Stack ™ HA 1.2.1 http://www.ti.com/tool/z-stack.. In case Z-Stack ™ HA 1.2.1 is installed at the default path, open znp.eww using IAR (8051).
-For IAR Project CC2530-ProdHex, go to options->C/C++Compiler->Preprocessor->Defined symbols' and define ENABLE_MT_SYS_RESET_SHUTDOWN. Build and flash .
Built image is compatible with Z-Stack Linux gateway
Saurabh
Simone,
Z-Stack Linux Gateway does a service discovery after new device is added and notifies the application about new device only after the completion of service discovery procedure. please consult NWK_ZIGBEE_DEVICE_IND in Z-Stack Linux Gateway API document .
Saurabh
Hi Saurabh,
I used a thermostat with the last version of ZigBee HA 1.2.1 and now I am able to see it on HA Linux Gateway user interface panel.
At this point I am ready to develop a my application on Linux ZigBee framework. In order to debug the code in BBB, I have to use CCS6 o CCS5 with SDK LINUX EZSDK-SITARA v7.0.
Could you confirm me, that this SDK is compatible on Debian distribution of Linux HA Gateway ?
Because until now I used SDK v5.x for angstrom Linux distribution.
Best regards,
Simone
Hi Simone,
We used Linaro CC on Linux machine to compile Gateway application
http://software-dl.ti.com/sitara_linux/esd/AM335xSDK/latest/index_FDS.html
Sample app source code is at :
Z-Stack_Linux_Gateway-1.0.1\Source\Projects\zstack\linux\demo
It is terminal app and we didn't have to hook up CCS to debug it . Please check in CCS e2e forum for the CCS version compatible with BBB . This might be helpful: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/364948.aspx
Z-Stack Linux gateway is compatible with Debian Distribution ( details in documents released with the installer),
Thanks,
Saurabh
Hello,
Right now I am trying to modify the Sample Application to get it to reply to IAS Zone Enroll Requests.
I do get the IAS Zone Enroll Request, and when I try to send an IAS Zone Enroll Response the Gateway Server replies with an ACK. However at the zigbee layer my sniffer sees nothing. I do not understand what is happening and I do not get any log from the server, moreover I cannot look into the source code or add debug. Is the Gateway Server Really supporting IAS Zone or is it some stubs that do nothing?
My changes are :
in the gateway_config.tlg
#define IASZone 0x0500
#define IASZone_TestAttrId_d 0x0001
endpoint { 7, IASZoneEpDef, IASZoneAttrList }
endpointdef IASZoneEpDef { ha_profile, 0x0402, 0, IASZoneInputClusters, IASZoneOutputClusters }
clusterlist IASZoneInputClusters { basic, identify, groups, scenes, onoff, IASZone }
clusterlist IASZoneOutputClusters { basic, identify, groups, scenes, onoff, IASZone }
attr IASZone_Test { IASZone, IASZone_TestAttrId_d, uint8, rdonly }
attrlist IASZoneAttrList {
IASZone_Test
}
in system_engines.c
void
ias_zone_enroll_request(pkt_buf_t *pkt) {
UI_PRINT_LOG("Received an IAS Zone enroll message");
DevZoneEnrollmentReqInd *msg = dev_zone_enrollment_req_ind__unpack(NULL, pkt->header.len, pkt->packed_protobuf_packet);
DevZoneEnrollmentRsp resp = DEV_ZONE_ENROLLMENT_RSP__INIT;
resp.sequencenumber = msg->sequencenumber;
GwAddressStructT dstaddress = GW_ADDRESS_STRUCT_T__INIT;
dstaddress.addresstype = NWK_ADDRESS_TYPE_T__UNICAST;
dstaddress.addresstype = true;
dstaddress.ieeeaddr = msg->srcaddress->ieeeaddr;
dstaddress.has_ieeeaddr = true;
dstaddress.endpointid = msg->srcaddress->endpointid;
resp.dstaddress = &dstaddress;
resp.enrollmentresponsecode = 0;
resp.zoneid = 1;
int len = dev_zone_enrollment_rsp__get_packed_size(&resp);
pkt_buf_t *rsp_pkt = malloc(sizeof(pkt_buf_hdr_t) + len);
if (rsp_pkt) {
rsp_pkt->header.len = len;
rsp_pkt->header.subsystem = Z_STACK_GW_SYS_ID_T__RPC_SYS_PB_GW;
rsp_pkt->header.cmd_id = GW_CMD_ID_T__DEV_ZONE_ENROLLMENT_RSP;
si_set_confirmation_timeout_for_next_request(SI_SERVER_ID_GATEWAY, RESET_CONFIRMATION_TIMEOUT);
dev_zone_enrollment_rsp__pack(&resp, rsp_pkt->packed_protobuf_packet);
if (si_send_packet(rsp_pkt, NULL, NULL) != 0) {
UI_PRINT_LOG("ias_zone_enroll_request: Error: Could not send msg.");
}
free(rsp_pkt);
} else {
UI_PRINT_LOG("ias_zone_enroll_request: Error: Could not pack msg.");
}
dev_zone_enrollment_req_ind__free_unpacked(msg, NULL);
}
and in socket_interface.c [void si_gateway_incoming_data_handler(pkt_buf_t * pkt, int len]:
case GW_CMD_ID_T__DEV_ZONE_ENROLLMENT_REQ_IND:
ias_zone_enroll_request(pkt);
break;
Could you tell me if I did something wrong here?
Hello DarkSide
I simulate this gateway with Z-Light Devices using the C-based sample application. I add, control, remove devices etc.
Is there any reference Android Application for this gateway?
I connect this gateway to an Access Point, and it takes IP, for example 192.168.2.247. Which port number do i have to use for connection from a Java socket?
Best Regards
Cagdas KOKSAL
ZNP project from Z-Stack Home 1.2.1 can use with beaglebone linux gateway? I'll try.
Hi ,
To make HA 1.2.1 ZNP image work with Gateway , do the following :
- Open ZNP project workspace in IAR 8051 - C:\Texas Instruments\Z-Stack Home 1.2.1\Projects\zstack\ZNP\CC253x\znp.eww
- Since you need to enable CC2531 + PA LNA , For IAR Project CC2531-ProdHex , define compiler option ENABLE_MT_SYS_RESET_SHUTDOWN (for Gateway ) and HAL_PA_LNA ( in case of CC2591 front end) and compile
- Connect CC Debugger to CC2531 and flash C:\Texas Instruments\Z-Stack Home 1.2.1\Projects\zstack\ZNP\CC253x\dev\CC2531ZNP-Prod.hex
Saurabh
Hi Saurabh,
I have a custom board with CC2538 as ZNP device. What all changes do i need to make in Z-Stack Home 1.2.1 CC2538ZNP source code inorder to make CC2538ZNP work with linux gateway.
i am getting following errors when i compile with ENABLE_MT_SYS_RESET_SHUTDOWN
Error[Pe020]: identifier "STIF" is undefined C:\Users\VVDN123\Desktop\Z-StackHome1.2.1\Components\mt\MT_SYS.c 1686 Error[Pe020]: identifier "SLEEPCMD" is undefined C:\Users\VVDN123\Desktop\Z-StackHome1.2.1\Components\mt\MT_SYS.c 1695 Error[Pe020]: identifier "PMODE" is undefined C:\Users\VVDN123\Desktop\Z-StackHome1.2.1\Components\mt\MT_SYS.c 1695 Error[Pe020]: identifier "PCON" is undefined C:\Users\VVDN123\Desktop\Z-StackHome1.2.1\Components\mt\MT_SYS.c 1701 Error[Pe020]: identifier "halSleepPconValue" is undefined C:\Users\VVDN123\Desktop\Z-StackHome1.2.1\Components\mt\MT_SYS.c 1701 Error while running C/C++ Compiler
I did follow your guide without PA_LNA enable. Select CC2531 - ProdHex.
Not change the default, just add ENABLE_MT_SYS_RESET_SHUTDOWN into compile option. This all the compile option now:
FEATURE_SYSTEM_STATS
CC2531ZNP
POWER_SAVING
ASSERT_RESET
FAKE_CRC_SHDW
ENABLE_MT_SYS_RESET_SHUTDOWN
Now flash the files which is in:
Projects\zstack\ZNP\CC253x\CC2531-ProdHex\Exe\CC2531.hex
into CC2531. This one is normal TI CC2531 without PA-LNA.
Plug into beaglebone black. check lsusb, no dongle detected. Linux Gateway not working.
Tested given CC2531-GW-ZNP_38724.hex working with no issue.
Can you share the .hex file? With & without PA-LNA for CC2531 that work with Beaglebone Black Linux Gateway?
Thank you.
Hi,
You are not flashing correct binary . You need to flash C:\Texas Instruments\Z-Stack Home 1.2.1\Projects\zstack\ZNP\CC253x\dev\CC2531ZNP-Prod.hex
Saurabh