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.

终端掉线后(协调器断电)然后协调器上电,终端rejoin一直发beacon request,无法恢复入网,我预编译了NV_RESTORE,怎么回事?

终端掉线后(协调器断电)然后协调器上电,终端rejoin一直发beacon request,无法恢复入网,我预编译了NV_RESTORE,怎么回事呀?

  • 参考这篇帖子:http://www.kaleidscope.cn:1020/archives/992

  • 发送完beacon request以后,如果协调器有回beacon的话,节点会调用到ZDO_beaconNotifyIndCB( NLME_beaconInd_t *pBeacon ),

    可以单步调试下有没有把获取到的网络信息,放到NwkDescList里面去。

    然后去下面的代码,有没有运行到

    case ZDO_NWK_DISC_CNF:
          if (devState != DEV_NWK_DISC)
            break;
    
          if ( ZG_BUILD_JOINING_TYPE && ZG_DEVICE_JOINING_TYPE )
          {
            // Process the network discovery scan results and choose a parent
            // device to join/rejoin itself
            networkDesc_t *pChosenNwk;
            if ( ( (pChosenNwk = ZDApp_NwkDescListProcessing()) != NULL )
  • VV

          我这边发现,寻网的终端 在 进入到 PredevState == DEV_NWK_SEC_REJOIN_ALL_CHANNEL 的时候,

          会有 清NWK 的操作。。。请问 这个会不会导致清除之后

          开启Start the reset timer for MAX UNAUTH time ,然后 MAX_DEVICE_UNAUTH_TIMEOUT 这段时间内 由于外界的因素 又没能 收到新的NWK key

         设备就把NV flash  里面的东西删除, 接着就入不了网,也就是systemreset。(此时即便是有beacon ,但是设备NV flash 里面的信息被复位擦除了,只能开permit join 才能入网,无论哪个协调器!!!)

    else if ( devState == DEV_NWK_ORPHAN ||
                <strong><span style="color:#ff0000;">devState == DEV_NWK_SEC_REJOIN_CURR_CHANNEL</span></strong> ||
                devState == DEV_NWK_TC_REJOIN_CURR_CHANNEL ||
                devState == DEV_NWK_TC_REJOIN_ALL_CHANNEL ||
                devState == DEV_NWK_SEC_REJOIN_ALL_CHANNEL )
      {
    ......................
     // results of an orphaning attempt by this device
         // results of an orphaning attempt by this device
      <strong><span style="color:#ff0000;"> if (nwkStatus == ZSuccess)</span></strong>
        {
          //When the device has successfully rejoined then reset retryCnt
          retryCnt = 0;
    
          // Verify NWK key is available before sending Device_annce
          if ( ZG_SECURE_ENABLED && ( ZDApp_RestoreNwkKey( TRUE ) == false ) )
          {
            // wait for auth from trust center
            ZDApp_ChangeState( DEV_END_DEVICE_UNAUTH );
    
            // Start the reset timer for MAX UNAUTH time
            ZDApp_ResetTimerStart( MAX_DEVICE_UNAUTH_TIMEOUT );
          }
x 出现错误。请重试或与管理员联系。