如题,两个终端设备入网后,通过MAC地址发送数据,无法通信。
代码如下:
其中exAddress2是另外一个终端设备的IEEE地址。
GenericApp_DstAddr.addrMode = (afAddrMode_t)Addr64Bit;
memcpy(GenericApp_DstAddr.addr.extAddr,exAddress2,8);
// Take the first endpoint, Can be changed to search through endpoints
GenericApp_DstAddr.endPoint = GENERICAPP_ENDPOINT;
char theMessageData[] = "Hello world";
AF_DataRequest( &GenericApp_DstAddr, &GenericApp_epDesc,
GENERICAPP_CLUSTERID,
(byte)osal_strlen( theMessageData ) + 1,
(byte *)&theMessageData,
&GenericApp_TransID,
AF_DISCV_ROUTE, AF_DEFAULT_RADIUS ) ;