请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC2652P 当设备以不安全的重新加入模式直接重新加入信任中心时、信任中心将不会将设备识别为"DEV_SEC_AUTH_TC_REGUING_STATUS"模式。
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.
当设备以不安全的重新加入模式直接重新加入信任中心时、信任中心将不会将设备识别为"DEV_SEC_AUTH_TC_REGUING_STATUS"模式。
您好、Aries:
您能否提供失败的重新加入流程的监听器日志? 此行为是否与 v6.30不同、或者该行为与预期相符的最新 SDK 是什么? 您是否进一步调试了 ZDSecMgrDeviceJoin 以确定器件未能加入的根本原因? 如果您在以前的 SDK 上使用了该功能、那么我想知道 ZD_sec_mgr.c 中与 DEV_SEC_AUTH_TC_REGING_STATUS 有关的区别。
此致、
Ryan
像这样修复这个问题
uint8_t ZDSecMgrNewDeviceEvent( uint16_t ShortAddr )
{
uint8_t found;
ZDSecMgrDevice_t device;
AddrMgrEntry_t addrEntry;
associated_devices_t* assoc;
ZStatus_t status;
// initialize return results
found = FALSE;
assoc = AssocGetWithShort( ShortAddr );
if ( assoc != NULL )
{
// device found
found = TRUE;
// check for preconfigured security
if ( zgPreConfigKeys == TRUE )
{
// set association status to authenticated
ZDSecMgrAssocDeviceAuth( assoc );
}
// set up device info
addrEntry.user = ADDRMGR_USER_DEFAULT;
addrEntry.index = assoc->addrIdx;
AddrMgrEntryGet( &addrEntry );
device.nwkAddr = assoc->shortAddr;
device.extAddr = addrEntry.extAddr;
device.parentAddr = NLME_GetShortAddr();
// the new device performed Secured Rejoin
if ( ( assoc->devStatus & DEV_SECURED_JOIN ) &&
( assoc->devStatus & DEV_REJOIN_STATUS ) )
{
device.secure = TRUE;
}
else
{
device.secure = FALSE;
if( assoc->devStatus & DEV_REJOIN_STATUS )
{
assoc->devStatus |= DEV_SEC_AUTH_TC_REJOIN_STATUS;
}
}
device.devStatus = assoc->devStatus;
// process new device
status = ZDSecMgrDeviceNew( &device );
if ( status == ZSuccess )
{
assoc->devStatus &= ~DEV_SEC_INIT_STATUS;
}
else
{
// Clear SECURITY bit from Address Manager
ZDSecMgrAddrClear( addrEntry.extAddr );
// Remove the Association completely
AssocRemove( addrEntry.extAddr );
}
}
return found;
}