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.

求助:Z-Stack 2530协议栈中EndDevice断网,Beacon request的次数是否可设置?

Other Parts Discussed in Thread: Z-STACK

Z-Stack 2530协议栈中EndDevice断网后,用Sniffer抓包,看到先Orphan notification,然后每隔一秒左右都会有Beacon request,这样意外断网后EndDevice的耗电量会非常大,如何设置Beacon request这个次数?

  • 你是希望beacon request发的次数慢一点呢?还是直接将他关掉

    /* Minimum number of milliseconds to delay between each beacon request
     * in a joining cycle.
     */
    -DBEACON_REQUEST_DELAY=100

    这个变量可以让让每个beacon request时间拉长

     

  • 我希望beacon request发送一定次数后停止。

    现在的现象是:

    连好网时,EndDevice深度睡眠,只有几微安,断网后,唤醒EndDevice,EndDevice会不停搜网,电流接近30mA。

    如何能让它搜一定次数后停止搜网?

  • 强制进入深度睡眠或使用ZDApp_StopJoiningCycle(); 函数!!!

  • There is another solution in zstack.

      if( events & ZDO_REJOIN_BACKOFF )
      {
        if( devState == DEV_NWK_BACKOFF )
        {
          ZDApp_ChangeState(DEV_NWK_DISC);
          // Restart scan for rejoin
          ZDApp_StartJoiningCycle();
          osal_start_timerEx( ZDAppTaskID, ZDO_REJOIN_BACKOFF, zgDefaultRejoinScan );
        }
        else
        {
          // Rejoin backoff, silent period
          ZDApp_ChangeState(DEV_NWK_BACKOFF);
          ZDApp_StopJoiningCycle();
          osal_start_timerEx( ZDAppTaskID, ZDO_REJOIN_BACKOFF, zgDefaultRejoinBackoff );
        }
    
        return ( events ^ ZDO_REJOIN_BACKOFF);
      }
x 出现错误。请重试或与管理员联系。