afAddrInfo.aClusterId[0] = (mDataClusterId_c & 0xFF); afAddrInfo.aClusterId[1] = (mDataClusterId_c >> 8); afAddrInfo.srcEndPoint = appEndPoint; //afAddrInfo.dstAddrMode = gZbAddrMode64Bit_c; //Copy8Bytes(afAddrInfo.dstAddr.aIeeeAddr, deviceid); afAddrInfo.dstAddrMode = gZbAddrMode16Bit_c; Copy2Bytes(afAddrInfo.dstAddr.aNwkAddr, aBroadcast); //gaBroadcastAddress); afAddrInfo.dstEndPoint = gZbBroadcastEndPoint_c; //Set2Bytes(addrInfo.aClusterId, gZclClusterIdentify_c); //addrInfo.srcEndPoint = srcEndPoint; /* Turn on security and leave it on. Harmless In a non-secure network. */ afAddrInfo.txOptions = 0; afAddrInfo.radiusCounter = afDefaultRadius_c;
以上就寻址模式和源程序有所区别,我设置为广播模式。
以下网址体现了一个和我类似的问题。 http://group.ednchina.com/673/11288.aspx 另一个问题是:我想用64位地址发送数据,但是采用64bitmode时,实际上zigbee还是采用了16位网络地址发送,前提是实现调用了 void ASL_NWK_addr_req ( zbCounter_t *pSequenceNumber, /* IN: The sequence number used to send the request. */ zbNwkAddr_t aDestAddress, /* IN: The destination address where to send the request. */ zbIeeeAddr_t aIeeeAddr, /* IN: The IEEE address to be matched by the Remote Device */ uint8_t requestType, /* IN: Request type for this command: 0x00 ?Single device response 0x01 ?Extended response 0x02-0xFF ?reserved */ index_t startIndex /* IN: If the Request type for this command is Extended response, the StartIndex provides the starting index for the requested elements of the associated devices list */ ) 这个函数,通过64位IEEE地址来获取16位地址,但是这个函数在实际应用中怎么调用,主要是不知道psequencenumber、requesttype和startindex怎么用!