Home 1.2.2
1.我们想发送自己的数据,是不是发送的参数有问题
单播到目的地址,这个设置是正确的
zclSampleLight_OnOff=0x10;
endPointDesc_t *epDesc;
epDesc = afFindEndPointDesc( SAMPLESW_ENDPOINT );
AF_DataRequest( (afAddrType_t *)&zclSampleLight_DstAddr, epDesc, ZCL_CLUSTER_ID_GEN_BASIC, 1, (uint8 *)&zclSampleLight_OnOff,
&zcl_TransID, AF_TX_OPTIONS_NONE, AF_DEFAULT_RADIUS );
2.接收端case ZCL_INCOMING_MSG:打断点,收不到数据
Alvin Chen:
char theMessageData[] = "Hello World";if ( AF_DataRequest( &GenericApp_DstAddr, &GenericApp_epDesc,GENERICAPP_CLUSTERID,(byte)osal_strlen( theMessageData ) + 1,(byte *)&theMessageData,&GenericApp_TransID,AF_DISCV_ROUTE, AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )
user5367314:
回复 Alvin Chen:
GenericApp_epDesc这个参数是怎么定义和赋值的?
YiKai Chen:
zclSampleLight_DstAddr填了什麼
Alvin Chen:
回复 user5367314:
建议你遇见不懂得变量先右键go to declaration 里面的注释很清晰。
typedef struct
{uint8 endPoint;uint8 epType;uint8 *task_id;// Pointer to location of the Application task ID.SimpleDescriptionFormat_t *simpleDesc;afNetworkLatencyReq_t latencyReq;
} endPointDesc_t;