// …
case BDB_COMMISSIONING_NWK_STEERING:
if(bdbCommissioningModeMsg->bdbCommissioningStatus == BDB_COMMISSIONING_SUCCESS)
{
//YOUR JOB: //We are on the nwk, what now?
// added for SLA
zstack_zdoMatchDescReq_t req;
memset(&req, 0x00, sizeof(req));
uint16_t inClusterIDs[] = {ZCL_CLUSTER_ID_GEN_ON_OFF, ZCL_CLUSTER_ID_GEN_GROUPS};
req.dstAddr = 0xFFFD; // to devices w/ rxonidle
req.nwkAddrOfInterest = 0xFFFD; // to devices w/ rxonidle
req.n_inputClusters = 2;
req.pInputClusters = inClusterIDs;
req.n_outputClusters = 0;
req.profileID = ZCL_HA_PROFILE_ID;
Zstackapi_ZdoMatchDescReq(appServiceTaskId, &req);
// end added // …
} // …
问题1: zstack_zdoMatchDescReq_t 这个定义的原先是什么 ,3.0.2 没有找到
问题2:Zstackapi_ZdoMatchDescReq 这个函数 3.0.2 没有找到;
上面的程序是看
这个历程 的;
Alvin Chen:
ZDP_MatchDescReq( &dstAddr, NWK_BROADCAST_SHORTADDR,GENERICAPP_PROFID,GENERICAPP_MAX_CLUSTERS, (cId_t *)GenericApp_ClusterList,GENERICAPP_MAX_CLUSTERS, (cId_t *)GenericApp_ClusterList,FALSE );
user6103875:
回复 Alvin Chen:
zstack_zdoMatchDescReq_t这个定义的原型是什么?
Alvin Chen:
回复 user6103875:
在cc2530里面不具备这个,请按照上面的参数填写即可。
user6103875:
回复 Alvin Chen:
您好,上面具体的参数能举个例子 解释一下吗?
user6103875:
回复 user6103875:
还有就是 3.0.2 做 组播,如何才能出现抓包填入组 ? 我在入网成功之后添加下面的代码可以吗?
case BDB_COMMISSIONING_NWK_STEERING:if(bdbCommissioningModeMsg->bdbCommissioningStatus == BDB_COMMISSIONING_SUCCESS){uint16 inClusterIDs[] = {ZCL_CLUSTER_ID_GEN_ON_OFF, ZCL_CLUSTER_ID_GEN_GROUPS};zAddrType_treq;ZDP_MatchDescReq( &req,0xFFFD,ZCL_HA_PROFILE_ID,2, (cId_t *)inClusterIDs,2, (cId_t *)inClusterIDs,FALSE );//YOUR JOB://We are on the nwk, what now?
}else{
////See the possible errors for nwk steering procedure
////No suitable networks found
////Want to try other channels?
////try with bdb_setChannelAttribute}在 zcl_GenericApp_data.c 中
const cId_t zclGenericApp_InClusterList[] =
{ZCL_CLUSTER_ID_GEN_BASIC,ZCL_CLUSTER_ID_GEN_IDENTIFY,ZCL_CLUSTER_ID_SE_METERING,ZCL_CLUSTER_ID_GEN_ON_OFF
}
const cId_t zclGenericApp_OutClusterList[] =
{ZCL_CLUSTER_ID_GEN_BASIC,ZCL_CLUSTER_ID_GEN_IDENTIFY,ZCL_CLUSTER_ID_GEN_ON_OFF/ZCL_CLUSTER_ID_HEART
}
user6069081:
回复 user6103875:
入组应该是调用aps_AddGroup,跟ZDP_MatchDescReq没什么关系吧。