ZigBee Device Object End Device Bind Request--协调器与终端之间的绑定

这里主要讲述协调器和终端之间的绑定。

This mechanism uses a button press or other similar action at the selected devices to bind within a specific timeout period.  The End Device Bind Request messages are collected at the coordinator within the timeout period and a resulting Binding Table entry is created based on the agreement of profile ID and cluster ID. The default end device binding timeout (APS_DEFAULT_MAXBINDING_TIME) is16 seconds (defined in nwk_globals.h), but can be changed if added to f8wConfig.cfg or as a compile flag.

绑定表的创建时间应该是在允许绑定时间结束之后开始的。协议默认的绑定时间为16s。

All sample applications have a function that handles key events [for example, TransmitApp_HandleKeys() in

TransmitApp.c].  This function calls ZDApp_SendEndDeviceBindReq() [in ZDApp.c], which gathers all the

information for the application’s endpoint and calls  ZDP_EndDeviceBindReq() [ZDProfile.c] to send the

message to the coordinator.  Or, as in SampleLight and SampleSwitch,  ZDP_EndDeviceBindReq() is called

directly with only the cluster IDs relevant to the lamp On/Off functions.

所有的应用中均有处理绑定的按键事件,具体的看看代码就知道了。

下面的这段话不是很理解,暂时贴在这里,求高手作答。蓝色部分求高手看了之后留言讲解。

Coordinator end device binding is a toggle process.  Meaning that the first time your go through the process, it will

create a binding entry in the requesting devices.  Then, when you go through the process again, it will remove the

bindings in the requesting devices.  That’s why, in the following process, it will send an unbind, and wait to see if

the unbind was successful.  If the unbind was successful, the binding entry must have existed and been removed,

otherwise it sends a binding request to make the entry.

When the coordinator receives 2 matching End Device Bind Requests, it will start the process of creating source

binding entries in the requesting devices.  The coordinator follows the following process, assuming matches were

found in the ZDO End Device Bind Requests:

1.  Send a ZDO Unbind Request to the first device.  The End Device Bind is toggle process, so the unbind

is sent first to remove an existing bind entry.

2.  Wait for the ZDO Unbind Response, if the response status is ZDP_NO_ENTRY, send a ZDO Bind

Request to make the binding entry in the  source device.  If the response status is ZDP_SUCCESS,

move on to the cluster ID for the first device (the unbind removed the entry – toggle).

3.  Wait for the ZDO Bind Response.  When received, move on to the next cluster ID for the first device.

4.  When the first device is done, do the same process with the second device.

5.  When the second device is done, send the ZDO End Device Bind Response messages to both the first

and second device.

时间: 2024-10-14 13:14:47

ZigBee Device Object End Device Bind Request--协调器与终端之间的绑定的相关文章

「2014-5-31」Z-Stack - Modification of Zigbee Device Object for better network access management

写一份赏心悦目的工程文档,是很困难的事情.若想写得完善,不仅得用对工具(use the right tools),注重文笔,还得投入大把时间,真心是一件难度颇高的事情.但,若是真写好了,也是善莫大焉:既可让人明白「为何如此设计」,即「知其然更知其所以然」:也能剥离一些琐碎的细节,让更多没那么多时间与精力.或者背景知识不足的朋友,对核心方法和思路,多一点理解,即,给人提供一种「纲举目张提纲挈领抽丝剥茧」的可能性. 机缘巧合,俺今天就决定抛砖引玉,写一篇不那么好的工程文档.也期望对本文话题感兴趣的朋

ZigBee中协调器如何向子节点发消息?

注意:以下所有内容均以TI公司的CC2530和Z-Stack为硬软件平台为实验背景讲述. 在一般的ZigBee教程中,子节点如何向协调器发送消息已经被描述的非常清楚了:即子节点直接使用API向地址为0x0000的协调器发送消息即可.用到的函数如下: afStatus_t AF_DataRequest( afAddrType_t *dstAddr, endPointDesc_t *srcEP,uint16 cID, uint16 len, uint8 *buf, uint8 *transID,ui

Zigbee协议栈是怎样分别执行协调器、路由器、终端的任务的?

这个问题虽然简单,却困扰了差不多一个星期,归根结底还是自己对协议栈的不熟悉. 废话不多说! 假如组网后,协调器需要执行的任务是:组播,终端要执行的任务是:单播.那协议栈是怎么做到协调器只执行组播的任务,而不知执行单播的任务,终端又是怎样只执行单播的任务而不执行组播的任务呢? 下面是官方给出的代码 1 // Received whenever the device changes state in the network 2 case ZDO_STATE_CHANGE://网络状态发生改变 3 S

解决 Error:No suitable device found: no device found for connection "System eth0"

一.背景 我们安装好了一个虚拟机,我想做分布式集群,想模拟几台服务器,这时就想直接复制已经有的安装好的虚拟机,这样比较省事,不要在重复的安装虚拟机并配置JAVA环境,省掉做同样的事情,这时直接复制,这样之前配置的JAVA环境都有了. 二.问题 这时我复制好的虚拟机,启动登陆进去(用户名和密码跟之前那台是一样的),修改好IPADDR,然后网卡重启出现问题? #service network restart 出现问题:Error:No suitable device found: no device

Error:No suitable device found: no device found for connection “System eth1″

centos 6.8 背景:在vcenter上克隆完毕一台虚拟机 要在新克隆的虚拟机上配置静态ip 配置静态ip完毕,运行service network restart 报错 Error:No suitable device found: no device found for connection "System eth1″ 问题不在解释,直接上解决办法 ifconfig 显示 网卡是 eth1 但是在 /etc/sysconfig/network-scripts/ 下 没有eth1文件,只有

解决Error:No suitable device found: no device found for connection "Syst

一.背景 之前已经安装好虚拟机,想修改虚拟机linux的网卡从仅主机模式变为NAT模式,方便笔记本没有使用网线的时候也能连接虚拟机内的linux. 二.问题 修改完网卡的配置文件后重启网卡服务  service network restart 出现问题如下: error:No suitable device found: no device found for connection "System eth0" 启动网卡eth0也报错相同 三.解决问题 检查虚拟机配置的网卡上MAC地址与

如何解决虚拟机克隆导致"Bringing up interface eth0: Error: No suitable device found: no device found for connection 'System eth0'."

在VMware的虚拟机中克隆CentOS,在重启网卡的时候报错: Bringing up interface eth0:  Error: No suitable device found: no device found for connection 'System eth0'. Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: E

Error:No suitable device found: no device found for connection "System eth0"

故障说明: 在克隆几台虚拟机,发现启动后不能配置IP地址等信息,使用linux命令: “ifup eth0”也不能激活网卡, 而在使用"service network restart",出现错误: Error:No suitable device found: no device found for connection "System eth0" 解决方法: 基于这个错误,在网上查找了一下,发现有很多朋友都遇到过,这次错误使用第2种方式解决. 1.删除/etc/u

克隆虚拟机重启服务时 Error:No suitable device found: no device found for connection "System eth0"

故障说明: 在克隆几台虚拟机,发现启动后不能配置IP地址等信息,使用linux命令: “ifup eth0”也不能激活网卡, 而在使用"service network restart",出现错误: Error:No suitable device found: no device found for connection "System eth0" 解决方法: 基于这个错误,在网上查找了一下,发现有很多朋友都遇到过,这次错误使用第2种方式解决. 1.删除/etc/u