logo资料库

ZigBee-Specification-2006(IEEE802.15.4-ZigBee协议规范).pdf

第1页 / 共534页
第2页 / 共534页
第3页 / 共534页
第4页 / 共534页
第5页 / 共534页
第6页 / 共534页
第7页 / 共534页
第8页 / 共534页
资料共534页,剩余部分请下载后查看
ZigBee Specification
Notice of Use and Disclosure
Document History
Table of Contents
List of Tables
List of Figures
ZigBee Protocol Overview
1.1 Protocol Description
1.1.1 Scope
1.1.2 Purpose
1.1.3 Stack Architecture
1.1.4 Network Topology
1.2 Conventions and Abbreviations
1.2.1 Conventions
1.3 Acronyms and Abbreviations
1.4 Glossary
1.4.1 Definitions
1.5 References
1.5.1 ZigBee/IEEE References
1.5.2 Normative References
1.5.3 Informative References
Application Layer Specification
2.1 General Description
2.1.1 Application Support Sub-Layer
2.1.2 Application Framework
2.1.3 Addressing
2.1.4 Application Communication Fundamentals
2.1.5 Discovery
2.1.6 Binding
2.1.7 Messaging
2.1.8 ZigBee Device Objects
2.2 ZigBee Application Support (APS) Sub-Layer
2.2.1 Scope
2.2.2 Purpose
2.2.3 Application Support (APS) Sub-Layer Overview
2.2.4 Service Specification
2.2.5 Frame Formats
2.2.6 Command Frames
2.2.7 Constants and PIB Attributes
2.2.8 Functional Description
2.3 The ZigBee Application Framework
2.3.1 Creating a ZigBee Profile
2.3.2 ZigBee Descriptors
2.3.3 Functional Description
2.4 The ZigBee Device Profile
2.4.1 Scope
2.4.2 Device Profile Overview
2.4.3 Client Services
2.4.4 Server Services
2.4.5 ZDP Enumeration Description
2.4.6 Conformance
2.5 The ZigBee Device Objects (ZDO)
2.5.1 Scope
2.5.2 Device Object Descriptions
2.5.3 Layer Interface Description
2.5.4 System Usage
2.5.5 Object Definition and Behavior
2.5.6 Configuration Attributes
Network Specification
3.1 NWK Layer Status Values
3.2 General Description
3.2.1 Network (NWK) Layer Overview
3.3 Service Specification
3.3.1 NWK Data Service
3.3.2 Network Discovery
3.3.3 Network Formation
3.3.4 Allowing Devices to Join
3.3.5 Begin as a Router
3.3.6 Joining a Network
3.3.7 Joining a Device Directly to a Network
3.3.8 Leaving a Network
3.3.9 Resetting a Device
3.3.10 Receiver Synchronization
3.3.11 Information Base Maintenance
3.3.12 Route Error Reporting
3.3.13 Route Discovery
3.4 Frame Formats
3.4.1 General NPDU Frame Format
3.4.2 Format of Individual Frame Types
3.5 Command Frames
3.5.1 Route Request Command
3.5.2 Route Reply Command
3.5.3 Route Error Command
3.5.4 Leave Command
3.5.5 Route Record Command
3.5.6 Rejoin Request Command
3.5.7 Rejoin Response Command
3.6 Constants and NIB Attributes
3.6.1 NWK Constants
3.6.2 NWK Information Base
3.7 Functional Description
3.7.1 Network and Device Maintenance
3.7.2 Transmission and Reception
3.7.3 Routing
3.7.4 Scheduling Beacon Transmissions
3.7.5 Broadcast Communication
3.7.6 Multicast Communication
3.7.7 NWK Information in the MAC Beacons
Security Services Specification
4.1 Document Organization
4.2 General Description
4.2.1 Security Architecture and Design
4.2.2 MAC Layer Security
4.2.3 NWK Layer Security
4.2.4 APL Layer Security
4.2.5 Trust Center Role
4.3 MAC Layer Security
4.3.1 Frame Security
4.3.2 Security-related MAC PIB Attributes
4.4 NWK Layer Security
4.4.1 Frame Security
4.4.2 Secured NPDU Frame
4.4.3 Security-related NIB Attributes
4.5 APS Layer Security
4.5.1 Frame Security
4.5.2 Key-establishment Services
4.5.3 Transport-key Services
4.5.4 Update Device Services
4.5.5 Remove Device Services
4.5.6 Request Key Services
4.5.7 Switch Key Services
4.5.8 Command Frames
4.5.9 Security-related AIB Attributes
4.6 Common Security Elements
4.6.1 Auxiliary Frame Header Format
4.6.2 Security Parameters
4.6.3 Cryptographic Key Hierarchy
4.6.4 Implementation Guidelines (Informative)
4.7 Functional Description
4.7.1 ZigBee Coordinator
4.7.2 Trust Center Application
4.7.3 Security Procedures
CCM* Mode of Operation
A.1 Notation and Representation
A.2 CCM* Mode Encryption and Authentication Transformation
A.2.1 Input Transformation
A.2.2 Authentication Transformation
A.2.3 Encryption Transformation
A.3 CCM* Mode Decryption and Authentication Checking Transformation
A.3.1 Decryption Transformation
A.3.2 Authentication Checking Transformation
A.4 Restrictions
Security Building Blocks
B.1 Symmetric-key Cryptographic Building Blocks
B.1.1 Block-cipher
B.1.2 Mode of Operation
B.1.3 Cryptographic Hash Function
B.1.4 Keyed Hash Function for Message Authentication
B.1.5 Specialized Keyed Hash Function for Message Authentication
B.1.6 Challenge Domain Parameters
B.2 Key Agreement Schemes
B.2.1 Symmetric-key Key Agreement Scheme
B.3 Challenge Domain Parameter Generation and Validation
B.3.1 Challenge Domain Parameter Generation
B.3.2 Challenge Domain Parameter Verification
B.4 Challenge Validation Primitive
B.5 Secret Key Generation (SKG) Primitive
B.6 Block-cipher-based Cryptographic Hash Function
B.7 Symmetric-key Authenticated Key Agreement Scheme
B.7.1 Initiator Transformation
B.7.2 Responder Transformation
Test Vectors For Cryptographic Building Blocks
C.1 Data Conversions
C.2 AES Block Cipher
C.3 CCM* Mode Encryption and Authentication Transformation
C.3.1 Input Transformation
C.3.2 Authentication Transformation
C.3.3 Encryption Transformation
C.4 CCM* Mode Decryption and Authentication Checking Transformation
C.4.1 Decryption Transformation
C.4.2 Authentication Checking Transformation
C.5 Cryptographic Hash Function
C.5.1 Test Vector Set 1
C.5.2 Test Vector Set 2
C.6 Keyed Hash Function for Message Authentication
C.6.1 Test Vector Set 1
C.6.2 Test Vector Set 2
C.6.3 Specialized Keyed Hash Function for Message Authentication
C.6.4 Symmetric-key Key Agreement Scheme
C.6.5 Initiator Transformation
C.6.6 Responder Transformation
MAC and PHY Sub-Layer Clarifications
D.1 Introduction
D.1.1 Scope
D.1.2 Purpose
D.1.3 Stack Size Issues
D.1.4 MAC Association
ZigBee Specification Document 053474r13 ZIGBEE SPECIFICATION ZigBee Document 053474r13 December 1, 2006 3:10 pm Sponsored by: ZigBee Alliance Accepted by Abstract Keywords This document has not been accepted by the Alliance BOD. The ZigBee Specification describes the infrastructure and services available to applications operating on the ZigBee platform. ZigBee, Stack, Network, Application, Profile, Framework, Device description, Binding, Security December 1, 2006 Copyright © 2006 ZigBee Standards Organization. All rights reserved. 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 Copyright © 2006 ZigBee Standards Organization. All rights reserved.
ZigBee Specification Document 053474r13 i NOTICE OF USE AND DISCLOSURE The ZigBee Specification is available to individuals, companies and institutions free of charge for all non-commercial purposes (including university research, technical evaluation, and development of non-commercial software, tools, or documentation). No part of this specification may be used in development of a product for sale without becoming a member of ZigBee Alliance. Copyright © ZigBee Alliance, Inc. (2006). All rights Reserved. This information within this document is the property of the ZigBee Alliance and its use and disclosure are restricted. Elements of ZigBee Alliance specifications may be subject to third party intellectual property rights, including without limitation, patent, copyright or trademark rights (such a third party may or may not be a member of ZigBee). ZigBee is not responsible and shall not be held responsible in any manner for identifying or failing to identify any or all such third party intellectual property rights. This document and the information contained herein are provided on an “AS IS” basis and ZigBee DISCLAIMS ALL WARRANTIES EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO (A) ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OF THIRD PARTIES (INCLUDING WITHOUT LIMITATION ANY INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENT, COPYRIGHT OR TRADEMARK RIGHTS) OR (B) ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON- INFRINGEMENT. IN NO EVENT WILL ZIGBEE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR ANY OTHER DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND, IN CONTRACT OR IN TORT, IN CONNECTION WITH THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE. All Company, brand and product names may be trademarks that are the sole property of their respective owners. The above notice and this paragraph must be included on all copies of this document that are made. ZigBee Alliance, Inc. 2400 Camino Ramon, Suite 375 San Ramon, CA 94583 Copyright © 2006 ZigBee Standards Organization. All rights reserved. 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45
ii Notice of Use and Disclosure Copyright © 2006 ZigBee Standards Organization. All rights reserved. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
ZigBee Specification Document 053474r13 iii DOCUMENT HISTORY ZigBee Specification History Version Number r06 r07 r13 Date December 14, 2004 February 17, 2006 April 28, 2006 December 1, 2006 3:08 pm Comments ZigBee v.1.0 draft ratified ZigBee Specification (ZigBee document number 053474r06/07) incorporating errata and clarifications: ZigBee document numbers 053920r02, 053954r02, 06084r00, 053474r07 Changes made per Editorial comments on spreadsheet, ZigBee-2006 Specification (see letter ballot comments and resolution in ZigBee document 064112) Copyright © 2006 ZigBee Standards Organization. All rights reserved. 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45
iv Document History Copyright © 2006 ZigBee Standards Organization. All rights reserved. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
ZigBee Specification Document 053474r13 v TABLE OF CONTENTS Notice of Use and Disclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i Document History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Chapter 1 ZigBee Protocol Overview . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Protocol Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.2 Purpose. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.3 Stack Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1.4 Network Topology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Conventions and Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.1 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Acronyms and Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.5 References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.5.1 ZigBee/IEEE References . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.5.2 Normative References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.5.3 Informative References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Chapter 2 Application Layer Specification . . . . . . . . . . . . . . . . . . . 19 2.1 General Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.1.1 Application Support Sub-Layer . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.2 Application Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.1.3 Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.1.4 Application Communication Fundamentals . . . . . . . . . . . . . 22 2.1.5 Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.1.6 Binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.1.7 Messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.1.8 ZigBee Device Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.2 ZigBee Application Support (APS) Sub-Layer . . . . . . . . . . . . . . . 29 2.2.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.2.2 Purpose. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 2.2.3 Application Support (APS) Sub-Layer Overview . . . . . . . . . 29 Copyright © 2006 ZigBee Standards Organization. All rights reserved. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
vi Table of Contents 2.2.4 Service Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.2.5 Frame Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.2.6 Command Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 2.2.7 Constants and PIB Attributes. . . . . . . . . . . . . . . . . . . . . . . . . 66 2.2.8 Functional Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 2.3 The ZigBee Application Framework . . . . . . . . . . . . . . . . . . . . . . . 75 2.3.1 Creating a ZigBee Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 2.3.2 ZigBee Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 2.3.3 Functional Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 2.4 The ZigBee Device Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 2.4.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 2.4.2 Device Profile Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 2.4.3 Client Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 2.4.4 Server Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 2.4.5 ZDP Enumeration Description. . . . . . . . . . . . . . . . . . . . . . . . 199 2.4.6 Conformance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 2.5 The ZigBee Device Objects (ZDO) . . . . . . . . . . . . . . . . . . . . . . . . 200 2.5.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 2.5.2 Device Object Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . 201 2.5.3 Layer Interface Description . . . . . . . . . . . . . . . . . . . . . . . . . . 208 2.5.4 System Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 2.5.5 Object Definition and Behavior. . . . . . . . . . . . . . . . . . . . . . . 211 2.5.6 Configuration Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Chapter 3 Network Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 3.1 NWK Layer Status Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 3.2 General Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 3.2.1 Network (NWK) Layer Overview . . . . . . . . . . . . . . . . . . . . . 244 3.3 Service Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 3.3.1 NWK Data Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 3.3.2 Network Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 3.3.3 Network Formation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 3.3.4 Allowing Devices to Join. . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 3.3.5 Begin as a Router. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 3.3.6 Joining a Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 3.3.7 Joining a Device Directly to a Network. . . . . . . . . . . . . . . . . 273 3.3.8 Leaving a Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 3.3.9 Resetting a Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 3.3.10 Receiver Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Copyright © 2006 ZigBee Standards Organization. All rights reserved. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
分享到:
收藏