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.

不需要秘钥的重连协调器不回复秘钥

Other Parts Discussed in Thread: Z-STACK

TI的工作人员:

      你们好,我在使用Z-Stack Home 1.2.2a的时候碰到了下面的疑问。 

     当终端节点丢失父节点,尝试重试链接时,如果NLME_ReJoinRequest( ZDO_UseExtendedPANID, pChosenNwk->logicalChannel);失败或者没有响应,

     就会调用NLME_ReJoinRequestUnsecure( ZDO_UseExtendedPANID, pChosenNwk->logicalChannel);来进行重连,但是此时协调器只允许设备重连,

    但是不下发秘钥,导致终端10s后启动复位事件。

    请问,为什么协调器会不下发秘钥呢?

if ( ZG_SECURE_ENABLED && ( ZDApp_RestoreNwkKey( TRUE ) == TRUE ) )
{
rejoinStatus = NLME_ReJoinRequest( ZDO_UseExtendedPANID, pChosenNwk->logicalChannel);
}
else
{
rejoinStatus = NLME_ReJoinRequestUnsecure( ZDO_UseExtendedPANID, pChosenNwk->logicalChannel);
}

  

  • 协调器会到ZStatus_t ZDSecMgrDeviceJoin( ZDSecMgrDevice_t* device )去处理,看下程序有没有运行到

    if ( status == ZSuccess )
    {
    // Add the device to the address manager
    ZDSecMgrAddrStore( device->nwkAddr, device->extAddr, &ami );

    // Only send the key to devices that have not been authenticated
    if ( ( device->devStatus & DEV_SEC_INIT_STATUS ) &&
    ( device->secure == FALSE ) )
    {
    //send the nwk key data to the joining device
    status = ZDSecMgrSendNwkKey( device );
    }

    if ( status != ZSuccess )
    {
    ZDSecMgrAddrClear( device->extAddr );
    }
    }