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.

Zigbee pro,删除指定节点通讯

Zigbee pro是自组网的,我想问一下能不将指定节点删除网络,

  • 可以在ZED上调用函数NLME_LeaveReq,实现删除该节点

  • 我还想问一下,HOLD_AUTO_START编译选项设置后,每次上电必须设置个事件触发一下,模块才会工作,比较麻烦。我想问一下能不能设置为模块第一次上电是HOLD_AUTO_START  ,在第二三次是自启动,不用触发

  • 你可以在节点入网,写一参数到NV里面,自己定义一个NV的item。

    在重新启动以后,可以去这个NV里面都数据,如果是已经加过网的,那么就自动启动了。

    在下面的函数

    void ZDApp_Init( uint8 task_id )

    / Start the device?
    if ( devState != DEV_HOLD )
    {
    ZDOInitDevice( 0 );
    }
    else
    {
    ZDOInitDevice( ZDO_INIT_HOLD_NWK_START );
    // Blink LED to indicate HOLD_START
    HalLedBlink ( HAL_LED_4, 0, 50, 500 );
    }

    在上面的代码的前面加上

    uint8 *restoreInitState = osal_mem_alloc(1);
    osal_nv_read(NV_STORE_ZDO_INIT, 0, 1, restoreInitState);
    if(*restoreInitState == TRUE)
    {
    devState = DEV_INIT;
    }

    osal_mem_free(restoreInitState);


    NV_STORE_ZDO_INIT你可以自己去定义,在入网以后写进去就可以了。