即日起在codingBlog上分享您的技术经验即可获得积分,积分可兑换现金哦。

ZigBee3.0_JENNIC-JN516x-ZigBeeBaseDevice_20170606_1.2

编程语言 YL_CSDN_ID 13℃ 0评论

2.2.4
Finding and Binding

  1. Finding and Binding mode允许两个node之间配对。
  1. 通过attribute
    u8bdbCommissioningMode
    来使能。
  2. A node can have one of two roles:
    1. Initiator: node
      可以与远端的endpoint建立绑定或者请求远端的endpoint加入到group
    2. Targer: This node identifies itself, and receives and responds to requests from the initator
  1. Local endpoint所扮演的role决定了Finding
    and Binding process
    的方法。

 

2.2.4.1
Initiator Node

  1. 调用BDB_eFbTriggerAsInitiator()函数来启动initiator
    node
    Finding and Binding
  2. Initiator
    会保持Finding and Binding mode
    一段时间;通过constant
    BDBC_MIN_COMMISSIONING_TIME设置。
  3. 如果规定时间内没完成,在APP_vBdbCallback()函数返回BDB_EVENT_FB_TIMEOUT事件。
  4. 一旦Finding and Binding
    开始,initiator node通过在一定时间内broadcasting(广播)一个Identify
    Query command
    搜索target endpoints,时间由BDB_FB_RESEND_IDENTIFY_QUERY_TIME设置。
  5. 如果initiator收到remote
    endpoint
    Identify Query responseapplication
    必须把ZCL event BDB_E_ZCL_EVENT_IDENTIFY_QUERYBDB_vZclEventHandler()函数送到Base
    Device
  6. Base Device会向相关的endpoint发送一个simple
    Descriptor request
  7. 如果收到response,并且检查与initiator
    cluster
    一致,APP_vBdbCallback()返回BDB_EVENT_FB_HANDLE_SIMPLE_DESC_RESP_OF_TARGET事件。
  8. 如果cluster匹配,initiator动作如下:
    1. 如果要求bindingattribute
      u16bdbCommissioningGroupID = 0xFFFF),initiatorremote
      endpoint
      加入local binding table
    2. 如果要求groupingu16bdbCommissioningGroupID
      = 16-bit group address
      ),initiator会要求target
      endpoint
      group address
      加入Group Address tabel
  1. Binding

BDB_EVENT_FB_BIND_CREATED_FOR_TARGETfor success;

BDB_EVENT_FB_ERR_BINDING_FAILEDfor failure;

Grouping:

BDB_EVENT_FB_GROUP_ADDED_TO_TARGETfor success;

BDB_EVENT_FB_ERR_GROUPING_FAILEDfor failure;

  1. Target node可以调用eCLD_IdentifyCommandIdentifyRequestSend()函数来终止identification
    mode
  2. initiator可以调用BDB_vFbExitAsInitiator()函数来终止Finding
    and Binding

    过程,推荐在APP_vBdbCallback()中配合事件调用。

 

2.2.4.2 Target Node

  1. Finding and Binding
    也可以在target node上调用BDB_eFbTriggerAsTarget()来启动。
  2. Target node
    在固定时间段内用Identify cluster进入identification
    mode
    。时间用u16IdentifyTime设置。
  3. identification modethe
    cluster
    能够响应Identify Query commandsFinding
    and Binding commands

  4. 固定时间一到,cluster不能处理Identify
    Query commands

    但是可以响应来自initiatorbinding/grouping
    commands
  5. A target node
    退出Finding and Binding
    过程有以下两种方式:

    1. 调用BDB_vFbExitAsTarget();
    2. Remote application ( initiator)
      可以调用Identify cluster function
      Ecld_IdentifyCommandIdentifyRequestSend()函数来请求终止identification
      mode
      application
      必须用BDB_vZclEventHander()ZCL
      event

      BDB_E_ZCL_EVENT_IDENTIFY
      Base Device

转载请注明:CodingBlog » ZigBee3.0_JENNIC-JN516x-ZigBeeBaseDevice_20170606_1.2

喜欢 (0)or分享 (0)
发表我的评论
取消评论

*

表情