Hi all
i have a ZED switch and ZC light 。
when ZED join the network, i using below function to build the default banding list with the ZC 。
void AutoBuild_BindingList(void)
{
static uint16 BindClusterIds[] = { ZCL_CLUSTER_ID_GEN_ON_OFF };
zAddrType_t ZC_DstAddr;
ZC_DstAddr.addrMode = Addr16Bit;
ZC_DstAddr.addr.shortAddr = 0x0000;
bindAddEntry( local_ep,&ZC_DstAddr,
SAMPLELIGHT_ENDPOINT,1, BindClusterIds );
bindAddEntry( local_ep2,&ZC_DstAddr,
SAMPLELIGHT2_ENDPOINT,1, BindClusterIds );
bindAddEntry( local_ep3,&ZC_DstAddr,
SAMPLELIGHT3_ENDPOINT,1, BindClusterIds );
}
but it is always failed when i using below toggle cmd to control the light
zclSampleLight_DstAddr.addrMode = (afAddrMode_t)AddrNotPresent; zclSampleLight_DstAddr.endPoint = 0; zclSampleLight_DstAddr.addr.shortAddr = 0; zclGeneral_SendOnOff_CmdToggle( SAMPLELIGHT_ENDPOINT, &zclSampleLight_DstAddr, TRUE, 0 ); zclGeneral_SendOnOff_CmdToggle( SAMPLELIGHT2_ENDPOINT, &zclSampleLight_DstAddr, TRUE, 0 ); zclGeneral_SendOnOff_CmdToggle( SAMPLELIGHT3_ENDPOINT, &zclSampleLight_DstAddr, TRUE, 0 );