AnsweredAssumed Answered

How to get ZDP cluster message and low power mode

Question asked by Leo xie on Mar 2, 2017
Latest reply on Mar 29, 2017 by Castaneda Lopez

Dear everyone,

 

I have a some question,Would you help me,thanks in advance.

 

Chip:JN5169

Stack:JN-AN-1189

 

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)

 

the code:

/* 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 ))
{

ZPS_tsAfZdpEvent sAfZdpEvent;
zps_bAplZdpUnpackResponse(&sStackEvent,&sAfZdpEvent);

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)
{
DBG_vPrintf(TRACE_OUTLET_NODE,"APP_MATCH_DESCRIPTOR_RESPONSE..");

}

 

if (ZDP_ACTIVE_EP_REQ_CLUSTER_ID == sAfZdpEvent.u16ClusterId)
{
DBG_vPrintf(TRACE_OUTLET_NODE,"ZDP_ACTIVE_EP_REQ_CLUSTER_ID..");
}

if (ZDP_MGMT_PERMIT_JOINING_REQ_CLUSTER_ID == sAfZdpEvent.u16ClusterId)
{
DBG_vPrintf(TRACE_OUTLET_NODE,"ZDP_DISCOVERY_CACHE_RSP_CLUSTER_ID..");
}

 

.................. 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. 

 

 

Best Regards,

Leo

QQ:2442926161

Outcomes