Other Parts Discussed in Thread: Z-STACK
Hi,
I am Using Z-stack 3.0, working with Sample Light project.
Enabled 1 has ZC and 1 has ZED. after the ZED is announced in ZC I am storing its NW addr and EXT addr locally somewhere.
Now I am trying to send 1 buffer from ZC to ZED, After "AF_DataRequest()" send I was getting "AF_Return Success". But I can't find the buffer received at ZED and no events for "zclSampleLight_event_loop()" also.
Please check my code:
char *pBuf = "Hi,welcome. We both are on same network, Cheers";
endPointDesc_t *epDesc;
afAddrType_t dstAddr;
cId_t cId;
uint8 transId, txOpts, radius;
uint8 retValue = ZFailure;
uint16 dataLen, tempLen;
/ Source endpoint /
epDesc = (endPointDesc_t *)&ZDApp_epDesc;
/ ClusterId /
cId = osal_build_uint16( pBuf );
pBuf +=2;
/ TransId /
transId = *pBuf++;
/ TxOption /
txOpts = *pBuf++;
/ Radius /
radius = AF_DEFAULT_RADIUS;
/ Length /
dataLen = strlen(pBuf);
/ Destination address /
dstAddr.addrMode = Addr16Bit;
dstAddr.addr.shortAddr = deviceAnnced[0].nwkAddr;
dstAddr.panId = _NIB.nwkPanId;
retValue = AF_DataRequest(&dstAddr, epDesc, cId, dataLen, pBuf, &transId, txOpts, radius);
ZDO_DeviceAnnce_t deviceAnnced[5]. this is the array I am storing announced device info.
Please help me, I am struggling from many days.
Thanks.