微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > 射频无线通信设计 > ZIGBEE ZDP 分析

ZIGBEE ZDP 分析

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

ZDP APIs 与远端节点的ZigBee Device Objects (ZDO) 进行交互,ZDO在应用层,它代表了节点类型,以及一些通信规则(参考ZigBee Stack User Guide)。

ZDP API包括下面三部分:

• ZDP Device Discovery API: 获得其他节点的ID

• ZDP Service Discovery API: 获得其他节点的服务

• ZDP Binding API: 用来绑定或者解除绑定节点.

这些函数的规则是:请求和回应,一个节点通过网路发出请求,能够完成实现请求的节点发出回应,回应的处理在函数JZA_vZdpResponse()里(参考ZigBee Application Development API)。

2.通用参数

下面的参数出现在许多函数中



3.ZDP状态值



4.ZDP Cluster(簇) IDs

5.响应格式

所有的响应都是通过stack调用JZA_vZdpResponse()传递给用户应用程序,响应里包含的参数存在于一个数组中,这个数组被负载传递给JZA_vZdpResponse()函数。

二、设备发现API

Device Discovery API用于获得网络设备地址,可以获得网络地址或MAC地址。

下面的函数是地址请求函数

zdpNwkAddrReq (Cluster Id: 0x00)
zdpNwkAddrRsp (Cluster Id: 0x80)
zdpIeeeAddrReq (Cluster Id: 0x01)
zdpIeeeAddrRsp (Cluster Id: 0x81)

1.zdpNwkAddrReq (Cluster Id: 0x00)
void zdpNwkAddrReq(

MAC_ExtAddr_s sExtAddr

REQUEST_TYPE eReqType,

UINT8 nStartIndex,

APS_TXOPTIONS bTxOptions);

当函数知道一个节点的MAC地址,发出一个对网络地址的请求,使用广播

参数

sExtAddr 64-bit IEEE address of the target device
eReqType One of the following:
SINGLE_DEVICE_RESPONSE: Indicates to get the network address of the target device only
EXTENDED_RESPONSE: Indicates to get the network addresses of all devices that are

associated with the network address of the target device
nStartIndex In the case where the request type is EXTENDED_RESPONSE, this is the start index of

the device list that is associated with the relative address
bTxOptions Specifies transmission options for request. The following values can be logical ORed

together:

APS_TXOPTION_NONE

SECURITY_ENABLE_TRANSMISSION

USE_NWK_KEY

ACKNOWLEDGED_TRANSMISSION

2.zdpNwkAddrRsp (Cluster Id: 0x80)

这个函数的参数的获得也是通过JZA_vZdpResponse()获得负载中的一个数组。

3.zdpIeeeAddrReq (Cluster Id: 0x01)
void zdpIeeeAddrReq(

UINT16 u16AddrInterest,

REQUEST_TYPE eReqType,

UINT8 nStartIndex,

APS_TXOPTIONS bTxOptions);

发起对一个网络地址已知的节点的MAC地址的请求,使用单播。

4.zdpIeeeAddrRsp (Cluster Id: 0x81)

这个函数的参数的获得也是通过JZA_vZdpResponse()获得负载中的一个数组。

三、Service Discovery API

Service Discovery API用来获得网络节点的信息,例如节点设备描述表中的信息

The request functions and corresponding responses are listed below

zdpNodeDescReq (Cluster Id: 0x02)请求一个节点的设备描述 ,使用单播
zdpNodeDescRsp (Cluster Id: 0x82) 参数的获得使用JZA_vZdpResponse()
zdpPowerDescReq (Cluster Id: 0x03) 获得节点的能量描述
zdpPowerDescRsp (Cluster Id: 0x83)
zdpSimpleDescReq (Cluster Id: 0x04) 获得一个节点的端口的简单设备描述
zdpSimpleDescRsp (Cluster Id : 0x84)
zdpActiveEpReq (Cluster Id: 0x05)

zdpActiveEpRsp (Cluster Id: 0x85)
zdpMatchDescReq (Cluster Id: 0x06)
zdpMatchDescRsp (Cluster Id: 0x86)
zdpUserDescReq (Cluster Id: 0x11) 获得一个节点的用户描述
zdpUserDescRsp (Cluster Id: 0x91)
zdpEndDeviceAnnce (Cluster Id: 0x13) 允许一个节点将自己的MAC和网络地址发给另一个节点,单播广播均可
zdpUserDescSet (Cluster Id: 0x14) 设定指定节点的用户描述表。
zdpUserDescConf (Cluster Id: 0x94)

四、绑定API

binding API用于绑定或解除绑定网络节点。


图片是新浪的 ,不允许外链,请调整一下

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

网站地图

Top