Part Number: CC2652R
Tool/software: Code Composer Studio
Hi, I am trying to send an "Hello World" custom packet with the AF_DataRequest commend. I'm using the zed_light and zc_switch and trying to send the packet from the light to the switch. I wait for my device to bind before i try to send my DataRequest. Here some of the code I use to send Data. I tried adding a Breakpoint in afBuildMSGIncoming but it won't hit. Thanks in advance for the Help.
if(keysPressed == KEY_RIGHT)
{
uint8 SampleLightApp_TransID=0;
test();
char theMessageData[]="Hello World";
AF_DataRequest( &zclSampleLight_DstAddr,
&zclSampleLightEpDesc,
ZCL_CLUSTER_ID_GEN_BASIC,
(byte)osal_strlen( theMessageData ) + 1,
(byte *)&theMessageData,
&SampleLightApp_TransID,
AF_DISCV_ROUTE,
AF_DEFAULT_RADIUS );
}
// Set destination address to indirect zclSampleLight_DstAddr.addrMode = (afAddrMode_t)AddrNotPresent; zclSampleLight_DstAddr.endPoint = 0; zclSampleLight_DstAddr.addr.shortAddr = 0; //Register Endpoint zclSampleLightEpDesc.endPoint = SAMPLELIGHT_ENDPOINT; zclSampleLightEpDesc.simpleDesc = &zclSampleLight_SimpleDesc; zclport_registerEndpoint(zclSampleLight_Entity, &zclSampleLightEpDesc);