I have a some question,Would you help me,thanks in advance.
1、how could I get the ZDP cluster callback or message in application layer,
for example, I want to get these cluser message in application layer,So I try to collect stack event,but it's didn't work...
#define ZDP_NWK_ADDR_RSP_CLUSTER_ID (0x8000)
#define ZDP_IEEE_ADDR_RSP_CLUSTER_ID (0x8001)
#define ZDP_NODE_DESC_RSP_CLUSTER_ID (0x8002)
#define ZDP_POWER_DESC_RSP_CLUSTER_ID (0x8003)
#define ZDP_SIMPLE_DESC_RSP_CLUSTER_ID (0x8004)
#define ZDP_ACTIVE_EP_RSP_CLUSTER_ID (0x8005)
#define ZDP_MATCH_DESC_RSP_CLUSTER_ID (0x8006)
#define ZDP_COMPLEX_DESC_RSP_CLUSTER_ID (0x8010)
#define ZDP_USER_DESC_RSP_CLUSTER_ID (0x8011)
/* Collect stack Events */
else if ( OS_eCollectMessage(APP_msgZpsEvents, &sStackEvent) == OS_E_OK)
// when I gateway send some ZDP cluster req, It's can't come over here.
DBG_vPrintf(TRACE_OUTLET_NODE, "Stack Event type: %d\n", sStackEvent.eType);
/*Request response event, call the child age logic */
if((ZPS_EVENT_APS_DATA_INDICATION == sStackEvent.eType) &&
(0 == sStackEvent.uEvent.sApsDataIndEvent.u8DstEndpoint ))
DBG_vPrintf(TRACE_OUTLET_NODE, "APP: vCheckStackEvent: ZPS_EVENT_APS_ZDP_REQUEST_RESPONSE, Cluster = %x\n", sAfZdpEvent.u16ClusterId );
if (ZDP_MATCH_DESC_RSP_CLUSTER_ID == sAfZdpEvent.u16ClusterId)
if (ZDP_ACTIVE_EP_REQ_CLUSTER_ID == sAfZdpEvent.u16ClusterId)
if (ZDP_MGMT_PERMIT_JOINING_REQ_CLUSTER_ID == sAfZdpEvent.u16ClusterId)
.................. do the same as above
2、When dose the end-device should into sleep.
The HA stack seem to must stop all timer before into sleep mode,but what time the decive should into sleep mode after device awake.
I try to decrease APP_PollTimer and APP_TickTimer period and set KEEPALIVETIME=20,but when the gateway is power down( no other router ),the device can't find the network vanish and get on/off command from gateway.