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 question about binding method

Other Parts Discussed in Thread: Z-STACK

Hi  all

         there is a question of  the ZigBee Device Object End Device Bind Request !

         as the Z-Stack developer‘ Guide files shows 

         

         it seems  that   ZED1 and ZED2 want to  binding with each other .  So  they  using  the ZDP_EndDeviceBindReq() function to send the message。

          

        and  we  can see  that  the Parameter detail of  the ZDP_EndDeviceBindReq() function  is  like  below :

       

 

         but  as the light sample of the zstack  shows  that  is so strange  as like below:

        

...
#else // NOT EZ-Mode
    {
      zAddrType_t dstAddr;
      HalLedSet ( HAL_LED_4, HAL_LED_MODE_OFF );

      // Initiate an End Device Bind Request, this bind request will
      // only use a cluster list that is important to binding.
      dstAddr.addrMode = afAddr16Bit;
      dstAddr.addr.shortAddr = 0;   // Coordinator makes the match
      ZDP_EndDeviceBindReq( &dstAddr, NLME_GetShortAddr(),
                           SAMPLELIGHT_ENDPOINT,
                           ZCL_HA_PROFILE_ID,
                           ZCLSAMPLELIGHT_BINDINGLIST, bindingInClusters,
                           0, NULL,   // No Outgoing clusters to bind
                           TRUE );
    }
#endif // ZCL_EZMODE

in  the case  : ZED1 and ZED2 want to binding with each other

      1. why does it set  the coordinator address as  the destination address ?(why not  the ZED1 or ZED2 address?)

          

      2.  NLME_GetShortAddr() will return  the device short address, why set this vaule as  the LocalCoordinator ?

      3.  how  to using  this binding method?

BR!

      

 

  • 1. You had posted "2 devices can tell the coordinator that they would like to setup a binding table record. The coordinator will make the match up and create the binding table entries in the 2 devices." and this is the answer.
    2. I think Local Coordinator is typo. It should be short address of device.
    3. You have to trigger ZDP_EndDeviceBindReq from two devices that you want to do end device binding and coordinator would make the match up and create the binding table entries in the 2 devices.
  • 1.  So  ZDP_EndDeviceBindReq() function  should be used in two device which want to binding each other   at  same  time 。

    2.  the binding table will be builed in  two device (not only one of them  also not  be build in ) ,is that right ?

    3.  Local Coordinator is not good for understand and  its  detail also make me so confused

        

    LocalCoordinator – Known 16 bit network address of the device’s parent coordinator.

       so do you mean it should be  local device short  address ?

    4.  but  you have not tell me why does  it set  the coordinator address in the first  parameter of  the ZDP_EndDeviceBindReq()?

          

    Prototype
    
    afStatus_t ZDP_EndDeviceBindReq( zAddrType_t *dstAddr,
    uint16 LocalCoordinator,
    byte ep,
    uint16 ProfileID,
    byte NumInClusters, byte *InClusterList,
    byte NumOutClusters, byte *OutClusterList,
    byte SecuritySuite );
    
    Parameter Details
    DstAddr - The destination address.

  • 1. Yes.
    2. The destination address would only be added to binding table of binding source node.
    3. Yes, I mean local device short address.
    4. Coordinator helps to do hand shaking of two end device binding so the destination address of ZDP_EndDeviceBindReq is set to 0x0000.