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.

绑定的时候无法获取到被绑定节点的短地址

协议栈版本HA1.2.2a,最近遇到一个比较奇怪的现象:我通过后台发送绑定请求到开关节点,要绑定到某一个灯节点。只有开关节点的父节点能被绑定。其他节点,都因为不能在5秒钟时间内获取到它的短地址而绑定失败。但是当我在下面代码中的ZDO_ProcessBindUnbindReq(inMsg, &bindReq)处设置断点,并等待5秒左右再往下执行,网络中的所有灯节点都能成功绑定!

#if defined ( REFLECTOR )
    case Bind_req:
    case Unbind_req:
      {
        ZDO_BindUnbindReq_t bindReq;
        ZDO_ParseBindUnbindReq( inMsg, &bindReq );
        ZDO_ProcessBindUnbindReq( inMsg, &bindReq );
      }
      break;
#endif

从Sniffer的结果看,未设置断点的时候确实被绑定的灯节点未响应短地址请求消息,但设置断点并等待大约5秒又确实会有响应消息传到开关节点。

进一步的只要我在ZDO_ProcessBindUnbindReq函数中的ZDP_NwkAddrReq之前任何地方设置断点等待5秒就可以绑定网络内的任何灯节点。

pPendingBind->srcAddr = inMsg->srcAddr;
pPendingBind->securityUse = inMsg->SecurityUse;
pPendingBind->transSeq = inMsg->TransSeq;
pPendingBind->age = MAX_TIME_ADDR_REQ;
// create an entry in Address Manager
( void )bindAddrIndexGet( &(pReq->dstAddress) );
             
ZDP_NwkAddrReq( pReq->dstAddress.addr.extAddr, ZDP_ADDR_REQTYPE_SINGLE, 0, 0 );

有人遇到过这种情况吗?能帮忙分析一下可能是哪里的原因吗?