高手们,知道中断64位地址,协调器如何用64位地址点播该地址的节点,实验不出来啊,急
ZLongAddr_t ZLA_t_2={0x00,0x12,0x4b,0x00,0x05,0x3c,0xec,0x38};//节点64位真实地址
ZLongAddr_t ZLA_t_3={0x00,0x12,0x4b,0x00,0x01,0x16,0xda,0x52};//节点64位真实地址
我的点播函数
void GenericApp_SendTheMessage_etx(ZLongAddr_t ZLA_t_x,uint8 clustor_x)
{
uint8 i;
afAddrType_t P2P_DstAddr;
P2P_DstAddr.addrMode = (afAddrMode_t)Addr64Bit;
P2P_DstAddr.endPoint = GENERICAPP_ENDPOINT;
for(i=0;i<8;i++)
{
P2P_DstAddr.addr.extAddr[i] =ZLA_t_x[i]; //向etx设备发送消息
}
//osal_memcpy(&P2P_DstAddr.addr.extAddr, &ZLA_t_x, 1);
if ( AF_DataRequest( &P2P_DstAddr, &GenericApp_epDesc,
clustor_x,
2,
RxBuf,
&GenericApp_TransID,
AF_DISCV_ROUTE, AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )
{
// Successfully requested to be sent.
}
else
{
// Error occurred in request to send.
}
}
GenericApp_SendTheMessage_etx(ZLA_t_2,GENERICAPP_CLUSTERID);
GenericApp_SendTheMessage_etx(ZLA_t_3,GENERICAPP_CLUSTERID);
switch ( pkt->clusterId )
{
case GENERICAPP_CLUSTERID://1
LED1=1;
我这个方法没能实现点亮灯,请问具体如何实现
byte *buf = NULL;
GenericApp_DstAddr.addrMode = (afAddrMode_t)Addr64Bit;
GenericApp_DstAddr.endPoint = GENERICAPP_ENDPOINT;
buf = GenericApp_DstAddr.addr.extAddr;
// 00 12 4B 00 03 46 E3 41
buf[0] = 0x41;
buf[1] = 0xe3;
buf[2] = 0x46;
buf[3] = 0x03;
buf[4] = 0x00;
buf[5] = 0x4b;
buf[6] = 0x12;
buf[7] = 0x00;
AF_DataRequest( &GenericApp_DstAddr, &GenericApp_epDesc,
TEST,
8,
tmp,
&GenericApp_TransID,
AF_DISCV_ROUTE, AF_DEFAULT_RADIUS );
可以使用IEEE地址单播,实测会出现严重丢包和收到重复的包,效果还不如使用0xffff广播
你的mac地址填反了,cc2530是小端,低地址对应低字节。
P2P_DstAddr.addr.extAddr[0] = 0x38;
P2P_DstAddr.addr.extAddr[1] = 0xec;
P2P_DstAddr.addr.extAddr[7] = 0x00;
you are DASHEN 级人物
好厉害啊
哥们,这种形式我做的怎么就父子节点有用,发其它节点发不出去。