ZigBee3.0_JENNIC-JN516x-ZigBeeBaseDevice_20170606_1.2

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 nodeFinding 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 endpointIdentify 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 endpointgroup 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 modeapplication 必须用BDB_vZclEventHander()ZCL event BDB_E_ZCL_EVENT_IDENTIFY Base Device
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值