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.

The interoperability of Z-Stack(2.5.1.a) and Ember

Other Parts Discussed in Thread: Z-STACK, CC2530, TIMAC, CC2520

Dear all,

I am using CC2530 and Z-Stack 2.5.1.a as a ZED to communicate with Ember-based ZC. The ZigBee profile is home automation. The current issue is that the ZED can not pair(bind) with the ZC. The reason is easy because ZED uses "Match Descriptor Request (Auto Find)", but the ZC uses "Simple Descriptor Request Method". But if I programed the Z-Stack to another board and configured it as ZC, the ZED can communicate with this ZC without any problem, including pairing, ZCL commands/attributes communication.

After I discussed with the designeers of ZC, I knew that the joining message flow of ZC includes: beacon request/response, assocaition request/response, network key, device announce and active endpoint request/response, simpler descriptor request/response, and then the bind request/response.  But for TI's Z-Stack, it's seems that it does not support the beacon request/response.

Then I download the TIMAC and verify it in ZED. It works well to send beacons/assocaition requset and get response form ZC, therefore, I may have to port the beacon related functions from TIMAC to Z-Stack 2.5.1.a. I am not sure about the possibility and workload. Did anyone do it before? Could you please give some advices to me? thanks a lot!

 Or is there any other way to make the Z-Stack compatibile with the joining message flow as I said before?

Andy

 

 

 

  • Hi Andy,

    In Z-Stack 2.5.1a, it does support active endpoint request/response, simple descriptor request/response and end device bind request/response.

    1. If you want to send these request to other nodes, you can directly call the APIs defined in ZDProfiles.h (ZDP_ActiveEPReq()/ZDP_SimpleDescReq()/ZDP_EndDeviceBindReq()).
    2.  If you also want to handle the response of these requests, you can register them first in your init function. ZDO_RegisterForZDOMsg( zclSampleSw_TaskID, Active_EP_rsp ); And then add hanler funcion in zclXXX_ProcessZDOMsgs(zdoIncomingMsg_t *inMsg). I think the sample project: light/switch in Home Automation is a good example. The path is: ZStack-CC2530-2.5.1a\Projects\zstack\HomeAutomation
    3. If these requests are sent to TI nodes, Z-Stack will auto reply response for you. If you want to handle these request in application layer, please also register it first ZDO_RegisterForZDOMsg( zclSampleSw_TaskID, Active_EP_req ); and then handle it according to point 2 described.

    So in your project, please make sure who send the request. If ZC send the active end point request/simple descriptor request to ZED, the response will directly send back. If any further operation you need to do with these request in ZED, register first and then handle.

    Attached is the example of sniffer log:

  • Hi, can you guys tell me how would I handle this same issue on the expF5438A with cc2520, i see the beacon on the sniffer, a quick response, but no joining?

  • Hi Guys. I have a problem to send a response from my Device. I using Mstartech commercial gateway and a SoC (chinese device) , that running inside the SampleSw (From IT). I using Stack 2.4.0-1.4.0. My device didnt answer HA profile (0x104) CI 0x0006. (PW-ON). I need to place a ZCL msg response, like a HA Default Response. 

    My  Registers for my Endpoint just have a follow ZDOMSG:

    // Register for a test endpoint
    afRegister( &sampleSw_TestEp );

    ZDO_RegisterForZDOMsg( zclSampleSw_TaskID, End_Device_Bind_rsp );
    ZDO_RegisterForZDOMsg( zclSampleSw_TaskID, Match_Desc_rsp );

    Each parameters i need to include here?


    }

    My ZDO FUncion:

    void zclSampleSw_ProcessZDOMsgs( zdoIncomingMsg_t *inMsg )
    {
    switch ( inMsg->clusterID )
    {
    case End_Device_Bind_rsp:
    if ( ZDO_ParseBindRsp( inMsg ) == ZSuccess )
    {
    // Light LED
    HalLedSet( HAL_LED_4, HAL_LED_MODE_ON );
    }
    #if defined(BLINK_LEDS)
    else
    {
    // Flash LED to show failure
    HalLedSet ( HAL_LED_4, HAL_LED_MODE_FLASH );
    }
    #endif
    break;

    case Match_Desc_rsp:
    {
    ZDO_ActiveEndpointRsp_t *pRsp = ZDO_ParseEPListRsp( inMsg );
    if ( pRsp )
    {
    if ( pRsp->status == ZSuccess && pRsp->cnt )
    {
    zclSampleSw_DstAddr.addrMode = (afAddrMode_t)Addr16Bit;
    zclSampleSw_DstAddr.addr.shortAddr = pRsp->nwkAddr;
    // Take the first endpoint, Can be changed to search through endpoints
    zclSampleSw_DstAddr.endPoint = pRsp->epList[0];

    // Light LED
    HalLedSet( HAL_LED_4, HAL_LED_MODE_ON );
    }
    osal_mem_free( pRsp );
    }
    }
    break;
    }
    }

    Please, anybody can help me. How can i send a response from my EndDevice to my Commercial Gateway.