微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > ZIGBEE3.0 beacon request问题

ZIGBEE3.0 beacon request问题

时间:10-02 整理:3721RD 点击:

IT大神们

  你好!

    我在SampleLight的路由工程中添加NWK_AUTO_POLL编译选项后,在代码中添加ZDApp_StartJoiningCycle()后,也不能让节点发出beacon request,请问如何处理?谢谢!

有木有大神回一下呀?难道我的问题太简单了?

3.0协议栈,入网的启动时由BDB来控制的,你可以看下关于按键的处理。

请问入网的问题解决了吗

zigbee 3.0的入网似乎是有些问题的,同样的设备和固件,多刷几次,不是每次都能成功组网,两边用的都是bdb提供的API

你是怎么写设备入网的呢

1、

bdb_RegisterCommissioningStatusCB注册回调函数,在函数里面处理BDB_COMMISSIONING_SUCCESS消息;

收到消息后:调用bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING | bdbCommissioningModeMsg->bdbRemainingCommissioningModes);

2、

程序初始化完毕,直接调用如下实现组网,同时会调用 NLME_PermitJoiningRequest(0xFF),两边设备流程是一样的:

bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_FORMATION | BDB_COMMISSIONING_MODE_NWK_STEERING | BDB_COMMISSIONING_MODE_FINDING_BINDING | BDB_COMMISSIONING_MODE_INITIATOR_TL);

为什么你的bdb_StartCommissioning要把所有的commissioning mode或者 state都往里面填写了呢

Z-Stack给的所有参考设计里面都是如此给的,不过一定要注册回调函数bdb_RegisterCommissioningStatusCB( zclSampleLight_ProcessCommissioningStatus ); ,不然只有beacon request,没有Device announce的

static void zclSampleLight_ProcessCommissioningStatus(bdbCommissioningModeMsg_t *bdbCommissioningModeMsg)
{
  switch(bdbCommissioningModeMsg->bdbCommissioningMode)
  {
    case BDB_COMMISSIONING_FORMATION:
      if(bdbCommissioningModeMsg->bdbCommissioningStatus == BDB_COMMISSIONING_SUCCESS)
      {
        //After formation, perform nwk steering again plus the remaining commissioning modes that has not been process yet
        bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING | bdbCommissioningModeMsg->bdbRemainingCommissioningModes);
      }
      else
      {
        //Want to try other channels?
        //try with bdb_setChannelAttribute
      }
    break;
    case BDB_COMMISSIONING_NWK_STEERING:
      if(bdbCommissioningModeMsg->bdbCommissioningStatus == BDB_COMMISSIONING_SUCCESS)
      {
        //YOUR JOB:
        //We are on the nwk, what now?
      }
      else
      {
        //See the possible errors for nwk steering procedure
        //No suitable networks found
        //Want to try other channels?
        //try with bdb_setChannelAttribute
      }
    break;
    case BDB_COMMISSIONING_FINDING_BINDING:
      if(bdbCommissioningModeMsg->bdbCommissioningStatus == BDB_COMMISSIONING_SUCCESS)
      {
        //YOUR JOB:
      }
      else
      {
        //YOUR JOB:
        //retry?, wait for user interaction?
      }
    break;
    case BDB_COMMISSIONING_INITIALIZATION:
      //Initialization notification can only be successful. Failure on initialization 
      //only happens for ZED and is notified as BDB_COMMISSIONING_PARENT_LOST notification
      
      //YOUR JOB:
      //We are on a network, what now?
      
    break;
#if ZG_BUILD_ENDDEVICE_TYPE    
    case BDB_COMMISSIONING_PARENT_LOST:
      if(bdbCommissioningModeMsg->bdbCommissioningStatus == BDB_COMMISSIONING_NETWORK_RESTORED)
      {
        //We did recover from losing parent
      }
      else
      {
        //Parent not found, attempt to rejoin again after a fixed delay
        osal_start_timerEx(zclSampleLight_TaskID, SAMPLEAPP_END_DEVICE_REJOIN_EVT, SAMPLEAPP_END_DEVICE_REJOIN_DELAY);
      }
    break;
#endif 
  }
  
  UI_UpdateComissioningStatus(bdbCommissioningModeMsg);
}

请问  bdb 是不是 取代了之前 的ZDApp 的code?

应该是这样的,不过不是很清楚,Z-Stack 3.0提供的bdb接口,实现了早期协议栈的诸如建立网络,加入网络等等操作,@VV 是不是这样

你好, 你的问题解决了吗? CC2530  Z-Stack 3.0.0, 我的问题是终端不能入网。

协调器组网成功了:

bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_FORMATION);
NLME_PermitJoiningRequest(0xFF);

终端不能入网:

bdb_StartCommissioning(BDB_COMMISSIONING_MODE_NWK_STEERING);
NLME_PermitJoiningRequest(5531.aa.psd0xFF);

请教一下是什么原因?  在ZDO_STATE_CHANGE中, 最后的状态是 DEV_HOLD。

请问您的问题解决了吗?我也遇到了同样的问题 

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top