This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

长地址不能发送的问题



平时使用:

        SerialApp_TxAddr.addrMode =(afAddrMode_t) Addr16Bit;
       SerialApp_TxAddr.addr.shortAddr = 0xFFFF; 

这样广播是正常的。

但是改为这样:

        SerialApp_TxAddr.addrMode =(afAddrMode_t) Addr64Bit;//Addr16Bit;
        osal_cpyExtAddr(SerialApp_TxAddr.addr.extAddr, address64bit);
        SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;
        if(AF_DataRequest(&SerialApp_TxAddr,   (endPointDesc_t *)&SerialApp_epDesc,
                        SERIALAPP_CLUSTERID1, len, buf,  &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS)
                          == afStatus_SUCCESS)

就一直发不出。我确定address64bit的值是正确的。

期望能得到解决的方法,因为我要用长地址发送才比较方便一些。谢谢。

  • 平时使用:

            SerialApp_TxAddr.addrMode =(afAddrMode_t) Addr16Bit;
           SerialApp_TxAddr.addr.shortAddr = 0xFFFF; 

    这样广播是正常的。

    但是改为这样:

            SerialApp_TxAddr.addrMode =(afAddrMode_t) Addr64Bit;//Addr16Bit;
            osal_cpyExtAddr(SerialApp_TxAddr.addr.extAddr, address64bit);
            SerialApp_TxAddr.endPoint = SERIALAPP_ENDPOINT;
            if(AF_DataRequest(&SerialApp_TxAddr,   (endPointDesc_t *)&SerialApp_epDesc,
                            SERIALAPP_CLUSTERID1, len, buf,  &SerialApp_MsgID, 0, AF_DEFAULT_RADIUS)
                              == afStatus_SUCCESS)

    就一直发不出。我确定address64bit的值是正确的。

    期望能得到解决的方法,因为我要用长地址发送才比较方便一些。谢谢。

  • 当你用长地址发送的时候,在函数调用过程中需要通过长地址去查询短地址,也就是最终还是通过短地址来发送的。

    如果没找到的话就是INVALID_NODE_ADDR,无效的地址。

    你需要通过长地址把短地址获取到,在发送的