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协议栈建立网络问题

Other Parts Discussed in Thread: Z-STACK

协议栈使用的是Z-Stack Home 1.2.2a.44539,在系统建立网络的时候,能建立正确的PANID,但是信道号始终为0x00,经在线调试发现,协议栈能执行

ZDO_StartDevice()函数里的 ret = NLME_NetworkFormationRequest( zgConfigPANID, zgApsUseExtendedPANID, runtimeChannel,
zgDefaultStartingScanDuration, beaconOrder,
superframeOrder, false ),且执行时,runtimeChannel值为0x01,将其值更换为0x07fff800,依然不成功,。之后系统没有执行ZDO_NetworkFormationConfirmCB(ZStatus_t Status )这个函数,请问专家们,该如何配置网络,出现这种问题的原因在哪?

  • 应该在f8wConfig.cfg中修改。

    9.1 Configuring channel
    Every device must have a DEFAULT_CHANLIST (in f8wConfig.cfg) that controls the channel selection. For a
    ZigBee Coordinator, this list will be used to scan for a channel with the least amount of noise. For ZigBee Routers
    and End Devices, this list will be used to scan for existing networks to join.

  • 谢谢。更改您提的那个地方之后,把程序中被屏蔽的zclInit()和zcl_event_loop加上了就正常了,请问一下,这两个函数对系统的正常运行起什么作用?

  • /*********************************************************************
    * @fn zcl_Init
    *
    * @brief Initialization function for the zcl layer.
    *
    * @param task_id - ZCL task id
    *
    * @return none
    */
    void zcl_Init( uint8 task_id )
    {
    zcl_TaskID = task_id;

    plugins = (zclLibPlugin_t *)NULL;
    attrList = (zclAttrRecsList *)NULL;
    clusterOptionList = (zclClusterOptionList *)NULL;
    }

    /*********************************************************************
    * @fn zcl_event_loop
    *
    * @brief Event Loop Processor for zcl.
    *
    * @param task_id - task id
    * @param events - event bitmap
    *
    * @return unprocessed events
    */