首页 > 代码库 > 《ZigBee Wireless Networking》学习笔记【2】

《ZigBee Wireless Networking》学习笔记【2】

ZigBee Wireless Networking这本书对ZigBee技术阐释地比较全面,强烈推荐各位同仁阅读!

这本书的电子版请点击下面链接下载:

http://yunpan.cn/cg7SjbsXsM79r   访问密码0821

1,ZigBee术语大集合:


2,图解ZigBee架构:


ZigBee does not exactly fit the OSI 7-layer networking model, but it does have some of 
the same elements, including the PHY (physical), MAC (link layer), and NWK (network) 
layers. Layers 4–7 (transport, session, presentation, and application) are wrapped up in 
the APS and ZDO layers in the ZigBee model. 

层与层之间通过服务访问(SAP)联系,SAP提供了一系列的API,使每一个孤立的层与它的上一层或下一层进行交互。原文描述如下:

Between the layers are Service Access Points (SAPs). SAPs provide an API that isolates 
the inner workings of that layer from the layers above and below. Like the IEEE 802.15.4 
specification, ZigBee uses a two-SAP approach per layer, one for data and one for 
management. For example, all data communications to and from the network layer go 
through the Network Layer Data Entity Service Access Point (NLDE-SAP). Why the data 
SAP for the MAC layer is called MAC Common Part Service SAP (MCPS-SAP) instead 
of the MLDE-SAP is confusing to me, but it is. You’ll see commands in the ZigBee 
specification that look like APSDE-DATA.request. Now you know that is a request to 
send data out the radio, but initiated just above APS layer. 
The two lowest layers, the MAC and PHY, are defined by the IEEE 802.15.4 
specification. The PHY layer simply translates packets into over-the-air bits and back 
again. The MAC layer provides the concept of a network, including a PAN ID, and 
networking discovery through beacon requests and responses. It also provides per-hop 
acknowledgments and some of the commands for joining and forming a network. The 
MAC does not multi-hop or mesh. 
The NWK layer is responsible for mesh networking, which includes broadcasting packets 
across the network, determining routes for unicasting packets, and generally making sure 
packets are sent reliably from one node to another. The network layer also has a set of 
commands for security purposes, including secure joining and rejoining. ZigBee networks 
are all secured at the NWK layer, and the entire payload of the NWK frame is encrypted. 
The APS layer is responsible for application meaning. It acts as a filter for the 
applications running above it on endpoints to simplify the logic in those applications. 
It understands what clusters and endpoints mean, and checks to see if the endpoint is a 
member of the Application Profile and (if present) group before sending the message on 
up. The APS layer also filters out duplicate messages that may have been sent up by the 
NWK layer. The APS layer keeps a local binding table, a table which indicates the nodes 
or groups in the network that this node wishes to speak to. 
The ZDO layer (which includes the ZigBee Device Profile, ZDP), is responsible for local 
and over-the-air management of the network. It provides services to discover other nodes 
and services in the network, and is directly responsible for the current state of this node 
on the network. 
The Application Framework contains the ZigBee Cluster Library and provides a 
framework within which applications run. Endpoints are the mechanism used to 
distinguish one application from another. 

The security services are used by a variety of layers, and can be used by ZDO, APS, or 
the NWK layer, hence it’s off to the side. 
All layers have what is called an information base. At the MAC layer, this is called a PAN 
Information Base (or PIB). At the network layer it’s called a Network Information Base 
(or NIB), and of course there is an AIB for the APS layer. All “ information base ” means 
is the current settings of that layer. How many retries are required? What is the current 
PAN ID or network address of a particular node? The fields in the information base 
are generally either set by higher layers or through the use of management commands 
through the management SAPs. 
Notice there is nothing in here about interaction with any hardware within a given ZigBee 
device other than the radio. There is nothing that talks to LEDs, the LCD, speaker, GPIO 
ports, non-volatile or flash memory. ZigBee is exclusively concerned with the networking 
protocol and over-the-air behavior. The ZigBee test suites reflect this fact. Since all 
the over-the-air messages can be interpreted correctly by any other ZigBee node, this 
approach allows vendors to innovate while still providing complete compatibility between 
vendors. 

3,ZigBee其实是一个缩写,它的全称如下:


4,如何评价一个平台供应商(ZigBee联盟对平台的定义是射频模块MCUZigBee协议栈软件的集合)?


5,一个ZigBee节点只能和同一个网络中的另一个节点进行数据交换。一个单一的ZigBee网络被称为个人局域网(PAN)。ZigBee PAN是由ZigBee协调器产生的,只有协调器能创建网络,路由器和终端设备只能加入由协调器创建的网络。原文描述如下:


6,PAN ID用来区别不同的ZigBee网络,PAN ID是0x0000~0x3fff之间的16bits的数字。

《ZigBee Wireless Networking》学习笔记【2】