Zigbee Smart Energy Profile Specification
Zigbee Smart Energy Profile Specification
Zigbee Smart Energy Profile Specification
Document 075356r15
Abstract
Keywords
December 1, 2008
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
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
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
ii
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
TABLE OF CONTENTS
Notice of Use and Disclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Document History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1 References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1 ZigBee Alliance Documents . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.2 External Reference Documents . . . . . . . . . . . . . . . . . . . . . . . 4
Chapter 3 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1 Conformance Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 ZigBee Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Chapter 4 Acronyms and Abbreviations . . . . . . . . . . . . . . . . . . . . . 7
Chapter 5 Profile Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.1 A ZigBee Smart Energy Network. . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2 ZigBee Stack Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5.2.1 ZigBee Coordinator and Trust Center Recommendations. . . 12
5.3 Startup Attribute Set (SAS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.3.1 Startup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.3.2 Join Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.3.3 Security Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.3.4 End Device Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3.5 Link Status Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3.6 Concentrator Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3.7 APS Transport Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.3.8 APS Fragmentation Parameters . . . . . . . . . . . . . . . . . . . . . . 17
5.3.9 Binding Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.4 Smart Energy Profile Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.4.1 Joining with Preinstalled Trust Center Link Keys. . . . . . . . . 18
Copyright 2008 ZigBee Standards Organization. All rights reserved.
iii
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
iv
Table of Contents
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
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
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
vii
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
viii
Table of Contents
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
ix
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
Table of Contents
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
LIST OF TABLES
Table 1.1 Document Revision Change History . . . . . . . . . . . . . . . . . xix
Table 5.1 Startup Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 5.2 Join Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 5.3 Security Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 5.4 End Device Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 5.5 Link Status Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 5.6 Concentrator Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 5.7 APS Transport Parameters . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 5.8 APS Fragmentation Parameters . . . . . . . . . . . . . . . . . . . . . 17
Table 5.9 Binding Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 5.10 Security Key Assignments per Cluster . . . . . . . . . . . . . . 23
Table 5.11 Devices Specified in the Smart Energy Profile . . . . . . . . 63
Table 5.12 Clusters Used in the Smart Energy Profile . . . . . . . . . . . 65
Table 6.1 Clusters Common to All Devices . . . . . . . . . . . . . . . . . . . . 67
Table 6.2 Common Features and Functions Configuration for a
Smart Energy Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Table 6.3 Clusters Supported by the Energy Service Portal . . . . . . . 71
Table 6.4 Clusters Supported by the Metering Device . . . . . . . . . . . 72
Table 6.5 Clusters Supported by the In-Premise Display Device . . . 73
Table 6.6 Clusters Supported by the PCT . . . . . . . . . . . . . . . . . . . . . 74
Table 6.7 Clusters Supported by the Load Control Device . . . . . . . . 75
Table 6.8 Clusters Supported by the Smart Appliance Device . . . . . 76
Table 6.9 Clusters Supported by the Prepayment Terminal Device . 77
Table A.1 Additional Time Cluster Data Type . . . . . . . . . . . . . . . . . 79
Table A.2 New Unsigned Integer Data Types . . . . . . . . . . . . . . . . . . 80
Table B.1 Parameters of the INTRP-DATA.request . . . . . . . . . . . . . 84
Table B.2 Parameters of the INTRP-DATA.confirm . . . . . . . . . . . . 85
Table B.3 Parameters of the INTRP-DATA.indication . . . . . . . . . . . 87
Table C.1 Clusters Specified for the Secure Communication
Functional Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Table C.2 Key Establishment Attribute Sets . . . . . . . . . . . . . . . . . . . 102
Table C.3 Key Establishment Attribute Sets . . . . . . . . . . . . . . . . . . . 103
Table C.4 Values of the KeyEstablishmentSuite Attribute . . . . . . . . 103
xi
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
xii
List of Tables
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
Table D.27
Table D.28
Table D.29
Table D.30
Table D.31
Table D.32
Table D.33
Table D.34
Table D.35
Table D.36
Table D.37
Table D.38
Table D.39
xiii
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
xiv
List of Tables
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
LIST OF FIGURES
Figure 5.1 Utility Private HAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 5.2 Utility Private NAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 5.3 Customer Private HAN . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 5.4 Successful Join and Registration . . . . . . . . . . . . . . . . . . . 22
Figure 5.5 Node Communication with Other Nodes on the
Network Using APS Layer Encryption . . . . . . . . . . . . . . . . . . . . 26
Figure 5.6 Smart Energy Device Installation Code Process . . . . . . . 27
Figure 5.7 Installation Code Use with the Trust Center . . . . . . . . . . 27
Figure B.1 ZigBee Stack with Stub APS . . . . . . . . . . . . . . . . . . . . . . 82
Figure B.2 Normal ZigBee Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Figure B.3 Inter-PAN ZigBee Frame . . . . . . . . . . . . . . . . . . . . . . . . . 89
Figure B.4 Stub NWK Header Format . . . . . . . . . . . . . . . . . . . . . . . 89
Figure B.5 Format of the NWK Frame Control Field . . . . . . . . . . . . 89
Figure B.6 Stub APS Header Format . . . . . . . . . . . . . . . . . . . . . . . . . 90
Figure B.7 Format of the APS Frame Control Field . . . . . . . . . . . . . 90
Figure B.8 Inter-PAN Typical Usage . . . . . . . . . . . . . . . . . . . . . . . . 94
Figure C.1 Overview of General Exchange . . . . . . . . . . . . . . . . . . . . 98
Figure C.2 Typical Usage of the Key Establishment Cluster . . . . . . 100
Figure C.3 Key Establishment Command Exchange . . . . . . . . . . . . 101
Figure C.4 Format of the Initiate Key Establishment
Request Command Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Figure C.5 Format of the Confirm Key Request Command Payload 105
Figure C.6 Format of the Terminate Key Establishment Command
Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Figure C.7 Format of the Ephemeral Data Request
Command Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Figure C.8 Format of the Initiate Key Establishment Response
Command Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Figure C.9 Format of the Ephemeral Data Response
Command Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Figure C.10 Format of the Confirm Key Response
Command Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Figure C.11 Format of the Terminate Key Establishment
Command Payload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Copyright 2008 ZigBee Standards Organization. All rights reserved.
xv
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
xvi
List of Figures
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
PARTICIPANTS
Contact Information
Much of the information in this document is preliminary and subject to change.
Members of the ZigBee Working Group are encouraged to review and provide
inputs for this proposal. For document status updates, please contact:
Phil Jamieson
Philips, Cross Oak Lane,
Redhill, Surrey, RH1 5HA, UK
E-Mail: [email protected]
Phone: +44 1293 815265
Fax: +44 1293 815050
You can also submit comments using the ZigBee Alliance reflector. Its web site
address is:
www.zigbee.org
The information on this page should be removed when this document is accepted.
xvii
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
xviii
Participants
Participants
The following is a list of those who were members of the ZigBee Alliance
Application Framework Working Group leadership when this document was
released:
Phil Jamieson: Chair
Don Sturek: Editor-in-chief
Drew Gislason: Secretary
When the document was released, the Smart Energy Profile Task Group
leadership was composed of the following members:
Robby Simpson: Chair
Tim Gillman: Vice Chair
Dan Lohman: Technical Editor
Matt Maupin: Program Manager
Contributions were made to this document by the following members:
Mads Westergreen
Skip Aston
Michel Veillette
Rick Bojahra
Jeff Mathews
Rob Alexander
John Buffington
Jeff Hugghins
Robert Cragie
John Cowburn
Juan Ag Martn
John Prater
Donald Hasson
Yuri Shteinman
Gary Birk
Zachary Smith
Damon Corbin
Jakob Thomsen
Wally Barnum
John Knuth
Michael G. Stuber
Don Sturek
Howard Ng
Tim Enwall
Christopher Leidigh
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
DOCUMENT HISTORY
Table 1.1 shows the change history for this specification.
Table 1.1 Document Revision Change History
Revision
Version
Description
Original version.
Additional changes:
Usual grammar and spelling changes
Load Profile commands have been updated.
Added Attributes to support the latest partial LP interval.
Load Control rules for DR/LC Randomization
ESP Historical Attributes. changes in Simple Metering cluster
Changes to the Get Current Price command
PDF version of 07
10
xix
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
xx
Document History
11
12
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
xxi
14
15
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
xxii
Chapter 1
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
H A P T E R
1
CHAPTER 1INTRODUCTION
1.1 Scope
This profile defines device descriptions and standard practices for Demand
Response and Load Management Smart Energy applications needed in a Smart
Energy based residential or light commercial environment. Installation scenarios
range from a single home to an entire apartment complex. The key application
domains included in this initial version are metering, pricing and demand
response and load control applications. Other applications will be added in future
versions.
1.2 Purpose
This specification provides standard interfaces and device definitions to allow
interoperability among ZigBee devices produced by various manufacturers of
electrical equipment, meters, and Smart Energy enabling products.
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
Chapter 1
Introduction
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
H A P T E R
2
CHAPTER 2REFERENCES
2.1 References
The following standards and specifications contain provisions, which through
reference in this document constitute provisions of this specification. All the
standards and specifications listed are normative references. At the time of
publication, the editions indicated were valid. All standards and specifications are
subject to revision, and parties to agreements based on this specification are
encouraged to investigate the possibility of applying the most recent editions of
the standards and specifications indicated below.
1.
CCB 964
Copyright 2008 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
Chapter 2
References
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
H A P T E R
3
CHAPTER 3DEFINITIONS
3.1 Conformance Levels
Expected: A key word used to describe the behavior of the hardware or software
in the design models assumed by this Profile. Other hardware and software design
models may also be implemented.
May: A key word indicating a course of action permissible within the limits of the
standard (may equals is permitted).
Shall: A key word indicating mandatory requirements to be strictly followed in
order to conform to the standard; deviations from shall are prohibited (shall
equals is required to).
Should: A key word indicating that, among several possibilities, one is
recommended as particularly suitable, without mentioning or excluding others;
that a certain course of action is preferred but not necessarily required; or, that (in
the negative form) a certain course of action is deprecated but not prohibited
(should equals is recommended that).
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
Chapter 3
Definitions
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
H A P T E R
4
CHAPTER 4ACRONYMS AND ABBREVIATIONS
AES
AMI
BPL
CA
Certificate Authority
CBKE
CT
Commissioning Tool
ECDSA
ECMQV
EMS
EPID
ESP
EUI64
GPRS
HA
Home Automation
HAN
IHD
In-Home Display
IVR
MAC
MAC
MRD
NAN
PAN
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
Chapter 4
Acronyms and Abbreviations
PKKE
PCT
PID
PAN Identifier
RFD
SAS
SE
Smart Energy
SKKE
TC
Trust Center
TOU
Time of Use
UKE
UTF-8
ZCL
ZDP
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
H A P T E R
5
CHAPTER 5PROFILE DESCRIPTION
5.1 A ZigBee Smart Energy Network
The Smart Energy market requires two types of ZigBee networks for metering and
energy management. These include neighborhood area networks for meters, using
ZigBee for sub-metering within a home or apartment, and using ZigBee to
communicate to devices within the home. Different installations and utility
preferences will result in different network topologies and operation and this
profile must allow for these differences. However, each of these networks will
operate using the same Basic Principles to ensure interoperability.
Because of the type of data and control within the Smart Energy network,
application security is a key requirement. The application will use link keys which
are optional in the ZigBee and ZigBee Pro stack profiles but are required within a
Smart Energy network. The Trust Center and all devices on the Smart Energy
network must support the installation and use of these keys as described in the
security section.
Other devices within a home may also be capable of receiving public pricing
information and messages from the metering network. These devices may not
have or need all the capabilities required to join a Smart Energy network.
Mechanisms are provided to publish public pricing data and messages to these
devices without requiring they join the Smart Energy network. These mechanisms
are described in the sections describing both the public pricing and message
exchanges.
Metering networks are primarily installed by specialized service personnel, but
other devices in the network may be added by home owners, or home automation
professionals who may not have any ZigBee expertise. Installation concepts must
be easy and uniform across Smart Energy device manufacturers.
Smart Energy networks could include both ZigBee 2007 and ZigBee 2007 Pro
nodes. It is recommended the majority of the nodes in the network should be
Copyright 2008 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
10
Chapter 5
Profile Description
based on one stack profile or the other to get consistent performance. ZigBee
Smart Energy certified products must be based upon a ZigBee Compliant
Platform (ZCP). If the Smart Energy profile resides in conjunction with a private
profile, the product should be ZigBee Manufacturer Specific Profile (MSP)
certified and must be Smart Energy ZCP certified. This additional certification
provides a reassurance that the underlying stack is behaving properly and the
application is not abusive to the network.
Smart Energy networks will not interact with a consumer ZigBee Home Area
Network unless a device is used to perform an application level bridge between
the two profiles or the HA devices satisfy the Smart Energy profile security
requirements. This is due to the higher security requirements on the Smart Energy
network that are not required on a Home network. However, it is expected that
Home Automation devices that are extended to include the Smart Energy profile
can still operate in a home network.
The ZigBee Smart Energy Network makes possible networks such as the
following:
Utility Private HAN
Customer
Utility
Cu
Non-ZigBee
Link to Uitility
sto
me
g
Usa
ea
P
nd
S
rice
ign
als
Shared
In Home Display
Control
AMI Server
Message
Energy Service
Portal
Load Control
Device
Figure 5.1
Utility Private HAN might include an in-home display, or a load control device
working in conjunction with energy service portal, but it would not include any
customer controlled devices.
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
Customer
Utility
AMI
ata
ID
AM
Non-ZigBee
Link to Uitility
Shared
Data
Energy Service
Portal
Energy Service
Portal
AMI
Data
Energy Service
Portal
AMI Server
AMI Data
Energy Service
Portal
Figure 5.2
Energy Service
Portal
Utility Private ZigBee network might also be used as a NAN, where ZigBee
provided the primary communications for a Smart Energy deployment.
Customer Private HAN with ESP
Customer
Utility
Cu
Non-ZigBee
Link to Uitility
sto
Custo
AMI Server
me
g
Usa
mer U
ea
sage
P
nd
and P
ric
ig
eS
nals
Shared
In Home Display
rice S
ignals
Energy Service
Portal
Control Me
Home Energy
Management Console
Figure 5.3
ssages
Smart
Appliance
ESP provided by utility, but limited to the role of information provider (Usage and
Pricing) into a customer HAN that utilizes an Energy Management Console for
conveying or controlling local devices. An example is controlling a smart
appliance based upon a pricing signal.
11
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
12
Chapter 5
Profile Description
once per 7.5 seconds, especially when the device normally only
communicates due to user interaction. To further clarify, except for one
condition in the Simple Metering cluster (refer to DD.3.3), all cluster
interactions that read or write attributes, or cause command exchanges
should limit transactions to once every 30 seconds.
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
Parameter
Value
Short Address
E PANiD
0x0000000000000000 or installer
specified.
PAN ID
Channel Mask
Protocol Version
Stack Profile
Startup Control
2 (two) if un-commissioned, so it
will join network by association
when join command is indicated.
Comment
Master Key
0x0000000000000000 or installer
specified.
13
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
14
Chapter 5
Profile Description
0x000000000000000000000000000
00001 if the Key Establishment
Cluster is being used to install a link
key
Installer provided if using
preconfigured link keys
Network Key
0x000000000000000000000000000
00001 if no pre-installed key present
Use Insecure
Join
0x00 (False)
Parameter
ScanAttempts
Value
Comment
At boot time or when instructed to join a network, the device
should complete up to three (3) scan attempts to find a ZigBee
Coordinator or Router with which to associate. If it has not been
commissioned, this means that when the user presses a button or
uses another methodology to join a network, it will scan all of the
channels up to three times to find a network that allows joining. If
it has already been commissioned, it should scan up to three times
to find its original PAN to join. (ZigBee Pro devices should scan
for their original extended PAN ID and ZigBee (2007) devices can
only scan for their original PAN ID).
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
15
1 second
RejoinInterval
60
seconds
or shorter
MaxRejoinInte
rval
15
minutes
Parameter
Value
SecurityTim
eoutPeriod
TrustCenter
NetworkKey
Comment
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
16
Chapter 5
Profile Description
Parameter
Value
Comment
IndirectPollRa
te
Set by
stack
profile
This is how often a device will poll its parent for new data. It is
recommended that an end device that is designed to receive data
should poll its parent every 60 seconds.
Parameter
Value
LinkStatusPeriod
RouterAgeLimit
RepairThreshold
Comment
Parameter
Value
Comment
ConcentratorFlag
Set by stack
profile
ConcentratorRadius
11 (eleven)
ConcentratorDiscoveryTime
Set by stack
profile
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
Parameter
Value
Comment
MaxFrameRetries
Set by stack
profile
AckWaitDuration
Set by stack
profile
Parameters
Identifier
Type
Value
Description
apsInterframe
Delay
0xc9
Integer
50
apsMaxWindo
wSize
0xcd
Integer
In addition the Maximum Incoming Transfer Size Field in the Node descriptor
defines the largest ASDU that can be transferred using fragmentation. For the
Smart Energy Profile the default value shall be set to 128 bytes. Maximum ASDU
size allowed is specified in [B4] and dictated by solution needs and RAM
capacities of the communicating devices.
It is highly recommended all devices first query the Node Descriptor of the device
it will communicate with to determine the Maximum incoming transfer size (if
ASDU size is greater 128 bytes). This will establish the largest ASDU that can be
supported with fragmentation. The sending device must use a message size during
fragmentation that is smaller than this value.
17
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
18
Chapter 5
Profile Description
Parameter
Value
Comment
EndDeviceBindTimeout
60 seconds
network.
2 The trust center link key for a device that is to be joined is provided to the local
key-transport key derived for the preinstalled trust center link key. The
procedure for doing this is detailed in Annex F, also reference [B4] section
4.5.4 on key-transport keys and [B4] section 4.4.1 on frame security for the
APS layer.
5 The trust center must update the pre-configured trust center link key in the
joining device using the Key Establishment Cluster after completion of the
joining procedure.
6 The trust center of the network has the option of later updating the trust center
link keys with devices in the network as desired by the application using the
Key Establishment Cluster. Updating security keys should be an infrequent
operation.
Copyright 2008 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
19
7 If devices leave the network, the trust center shall update remove the network
When a device is re-joining a secured network, the following steps are used:
1 Permit joining is not required to be on in the network.
2 The device shall attempt a rejoin using the procedure detailed in [B4] Section
3.6.1.4.2 with network security. The network key and sequence number used
will be the ones previously obtained from the trust center.
3 If the secured rejoin is successful, nothing more is required from the device.
4 If the secured rejoin fails, the device shall attempt a rejoin using the procedure
to leave the network it may employ the Joining using the Key Establishment
Cluster procedure.
5.4.2.2
When the trust center receives notification that a device has rejoined the network,
the following steps are used:
1 If the device performed a secured rejoin the trust center is not required to take
any action.
2 If the device performed an unsecured rejoin the trust center shall determine if
the device is authorized to be on the network. If the trust center has a link key
with the device that was established using the key establishment cluster then it
shall be allowed back on the network. The trust center should send out an
updated copy of the network key encrypted with the corresponding link key.
3 If the trust center determines that the device is not authorized to be on the
network, it shall send an APS remove device command to the parent of the
rejoining device, with the target address of the rejoining devices IEEE address.
The parent will then remove that device from its child table.
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
20
Chapter 5
Profile Description
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
have the current network key and need to use their link key to obtain an updated
copy during a rejoin.
When the trust center deems that a particular link key should no longer be used, it
shall mark the key as stale. A stale key shall not be used to send data messages.
Devices that receive a message using a stale key should discard the message and
shall not send an APS acknowledgement to the sender.
Devices shall accept and process APS commands that are encrypted with a stale
key.
When the trust center receives a message encrypted with a stale link key, it shall
initiate the key establishment procedure to negotiate a new link key. Upon
successful establishment of the new link key with the device, the device shall
clear the stale indicator for that key.
Devices that are not acting as the trust center may utilize their own policy for
retiring and updating application link keys with other devices that are not the trust
center. Those devices are not required to keep around retired keys and therefore
may delete them prior to establishing a updated link key using the key
establishment cluster.
5.4.5.1
21
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
22
Chapter 5
Profile Description
Head end
Smart Energy
Device
ESP
Established Secure Link
Out of Band
Initiation
Out of Band Initiation
Allow Joining
Device attempts to Join
Network
Network Key
(Encrypted)
Service Discovery
(Key Establishment)
Service Discovery
Response
Link Keys Assigned (Key
Establishment Cluster)
Registration Process
Service Discovery
Bind Services
Figure 5.4
Please note: After joining the network and acquiring a Network Key, the Smart
Energy End Device shall initiate the Service Discovery process to locate the Key
Establishment Cluster. As recommended best practice, the ESP should support a
fault tolerant behavior by initiating Key Establishment Cluster service discovery
process whenever it detects the Smart Energy End Device fails to do2 so.
2.
CCB 965
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
Functional Domain
Cluster Name
Security Key
General
Basic
Network Key
General
Identify
Network Key
General
Alarms
Network Key
General
Time
General
Commissioning
General
Power Configuration
Network Key
General
Key Establishment
Network Key
Smart Energy
Price
Smart Energy
Smart Energy
Simple Metering
Smart Energy
Message
Smart Energy
Smart Energy
Pre-Payment
Once a Registered SE device has an Application Link Key established with the ESP, it
may also establish Application Link Keys with any other device on the SE Network.
This is accomplished by using the ZigBee service and device discovery process
(employing the Network Key). Regardless of the communication paths, all SE
applications shall use and validate the Security key assignment as listed in listed in
Table 5.10. If incorrect key usage is found the application shall generate a ZCL
Default Response, employing the Network Key, with a FAILURE (0x01) status code.
23
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
24
Chapter 5
Profile Description
5.4.7.1
Joining
5.4.7.2
Trust Center
The Trust Center should keep track of whether a particular device has negotiated a
CBKE Trust Center Link Key, or whether only a preconfigured Trust Center Link
Key exists. The Trust Center should not use the preconfigured link key to send
encrypted APS Data messages to the device. The Trust Center should discard any
APS encrypted APS Data messages that use the preconfigured link key, and it
should not send APS Acks for those messages.
The Trust Center shall accept and send APS Data messages that do not use APS
Encryption to a device that has not negotiated a CBKE Trust Center Link key
provided that the security usage for that cluster only allows using Network layer
security (encrypted with the Network Key). See sub-clause 5.4.6, Cluster Usage
of Security Keys.
5.4.7.3
During Joining
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
security. The ESP should accept valid APS encrypted message using that new
link key.
If a device never establishes a trust center link key after joining, the trust center
may send it a network leave command. This is only done for non-security
reasons, such as encouraging a well-behaved device that it is not on the correct
network. Malicious nodes will never leave the network once they have the
network key and there is no practical way to force them off the network. However
if the above mentioned security policies are adhered to, then the malicious node
will be unable to communicate with other devices since it will not have access to
an authorized link key.
5.4.7.4
After Joining
After a node has joined, been authenticated using key establishment, and obtained
an authorized link key, it may need to communicate with other nodes on the
network using APS layer encryption.
Rather than use key establishment with each node on the network, it would be
advantageous to leverage the ESP to broker trust with other devices on the
network. If two nodes have both obtained link keys with the ESP using key
establishment then they both trust the ESP. Both nodes will use the ESP to request
a link key with each other. The trust center will respond to each node individually,
sending a randomly generated link key. Each message will be encrypted using the
individual nodes' link keys. The ESP would not send a link key to either node if
one of the nodes has not authenticated using key establishment.
Both nodes are required to request a link key with the other node, rather than have
a single node requesting the key. This added requirement insures that both nodes
are online and ready to receive a key (i.e. not sleeping) and insures that a node is
not forced to accept a key it cannot support or did not want.
The originating node would start this process by sending a bind request command
with APS ack to the key establishment cluster of the destination device. If a bind
confirm is received with a status of success, the initiating device will perform a
request key of the trust center (for an application link key using the EUI of the
other device in the pair). The trust center will then send a link key to each device
using the key transport. If the bind confirm is received with a status other than
success, the request key should not be sent to the trust center.
This functionality is optional however support of this is required for ESP devices
acting as trust centers. All devices sending the request key command and the trust
center should have a timeout of 5 seconds.
25
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
26
Chapter 5
Profile Description
ESP
3. Request Link Key,
Partner: IHD
1. Bind Request
Meter
2. Bind Response
Figure 5.5
In Home
Display
(IHD)
The advantages of using the stack primitives to request keys rather than key
establishment are that devices can forego the expensive ECC operations. Small
microprocessors have extremely limited resources and requiring full key
establishment with all devices where link keys are required is overly burdensome.
In addition, ESPs may have other security policies in place (such as node
blacklists or certificate revocation lists) that individual nodes do not have
knowledge of, or have the resources to keep track of.
Nodes that are not the trust center would not be allowed to initiate key
establishment with another device that is not the Trust Center. If a device receives
an Initiate Key Establishment Request from a device that is not the Trust Center,
and it is not the Trust Center, it shall terminate the key establishment immediately
with a status of NO_RESOURCES. This insures that the ESP authenticates all
devices with key establishment after joining, and limits the use of key
establishment in the network.
Other ESP devices on the network that are not the trust center would have to go
through the same procedure as above, contacting the ESP trust center, in order to
send/receive messages that require APS layer encryption with another node.
This section describes the out of band process for establishing pre-configured
Trust Center link keys, the format of the Installation Code required, and the
hashing function used to derive the pre-configured link key from the Installation
Code.
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
Figure 5.6
As portrayed in Figure 5.7, during the installation process the initial Trust Center
Link Key is derived from the Installation Code and sent via an out of band
communication channel to the Trust center (ESP). The Trust center uses this Key
as the Trust Center Link Key to subsequently configure the Network Key of the
associating device.
Step #1: The Installation Code is sent out of band
Step #2: The Pre-configured Link Key is derived from the
Installation Code using the Matyas-Meyer-Oseas
hash function
Trust Center
27
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
28
Chapter 5
Profile Description
Note: The Octet order of the CRC code in the printed Installation code is Least
Significant Octet followed by Most Significant Octet, giving the printed result
of 2B70.3
64 Bit example:
Installation Code of 83FE D340 7A93 9738 C552
Where values 0x83, 0x FE, 0xD3, 0x40, 0x 7A, 0x93, 0x 97, and 0x38 are used
to calculate the CRC16 with the result returning 0x52C5.4
96 Bit example:
Installation Code of 83FE D340 7A93 9723 A5C6 39FF 4C12
Where values 0x83, 0xFE, 0xD3, 0x40, 0x7A, 0x93, 0x97, 0x23, 0xA5, 0xC6,
0x39 and 0xFF are used to calculate the CRC16 with the result returning
0x124C.5
128 Bit example:
Installation Code of 83FE D340 7A93 9723 A5C6 39B2 6916 D505 C3B5
Where values 0x83, 0xFE, 0xD3, 0x40, 0x7A, 0x93, 0x97, 0x23, 0xA5, 0xC6,
0x39, 0xB2, 0x69, 0x16, 0xD5, and 0x05 are used to calculate the CRC16 with
the result returning 0xB5C3.6
5.4.8.1.1.1
As stated earlier, the Installation Code CRC calculation is based upon the CRC
16-CCITT algorithm and uses the following parameters:
Length : 16
Polynomial : x16 + x12 + x5 + 1 (0x1021)
Initialization method : Direct
Initialization value : 0xFFFF
Final XOR value : 0xFFFF
Reflected In : True
Reflected Out : True
The following free code example, copied from http://zorc.breitbandkatze.de/
crctester.c can be referenced at http://zorc.breitbandkatze.de/crc.html. The code
example has been modified to match the parameters needed for the Smart Energy
Profile Installation code examples. The example is:
// ---------------------------------------------------------------------------// CRC Test V1.3 was copied from URL:
3.
4.
5.
6.
CCB 980
CCB 980
CCB 980
CCB 980
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
29
// ---------------------------------------------------------------------------// CRC tester v1.3 written on 4th of February 2003 by Sven Reifegerste (zorc/reflex)
// This is the complete compilable C program, consisting only of this .c file.
// No guarantee for any mistakes.
//
// changes to CRC tester v1.2:
//
// - remove unneccessary (!(polynom&1)) test for invalid polynoms
// (now also XMODEM parameters 0x8408 work in c-code as they should)
//
// changes to CRC tester v1.1:
//
// - include an crc&0crcmask after converting non-direct to direct initial
// value to avoid overflow
//
// changes to CRC tester v1.0:
//
// - most int's were replaced by unsigned long's to allow longer input strings
// and avoid overflows and unnecessary type-casting's
// ---------------------------------------------------------------------------// includes:
#include <string.h>
#include <stdio.h>
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
30
Chapter 5
Profile Description
// 'order' [1..32] is the CRC polynom order, counted without the leading '1' bit
// 'polynom' is the CRC polynom without leading '1' bit
// 'direct' [0,1] specifies the kind of algorithm: 1=direct, no augmented zero bits
// 'crcinit' is the initial CRC value belonging to that algorithm
// 'crcxor' is the final XOR value
// 'refin' [0,1] specifies if a data byte is reflected before processing (UART) or not
// 'refout' [0,1] specifies if the CRC will be reflected before XOR
// CRC parameters used for the ZigBee Smart Energy Profile Installation Codes:
const int order = 16;
const unsigned long polynom = 0x1021;
const int direct = 1;
const unsigned long crcinit = 0xffff;
const unsigned long crcxor = 0xffff;
const int refin = 1;
const int refout = 1;
// Data character string
//The following test string should provide a check result of 0x906E
//const unsigned char string[] = {"123456789"};
//The following string values are from the Smart Energy Profile Installation code
examples.
//The strings are constructed from the Installation Code values without the CRC Check,
plus the strings are null terminated.
const unsigned char string[] = {0x83, 0xFE, 0xD3, 0x40, 0x7A, 0x93, 0x00};
// The above should provide a check result of: 0x702B
//const unsigned char string[] = {0x83, 0xFE, 0xD3, 0x40, 0x7A, 0x93, 0x97, 0x38,
0x00};
// The above should provide a check result of: 0x52C5
//const unsigned char string[] = {0x83, 0xFE, 0xD3, 0x40, 0x7A, 0x93, 0x97, 0x23,
0xA5, 0xC6, 0x39, 0xFF, 0x00};
Copyright 2008 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
31
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
32
Chapter 5
Profile Description
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
33
if (!refin) while (len--) crc = ((crc << 8) | *p++) ^ crctab[ (crc >> (order-8)) &
0xff];
else while (len--) crc = ((crc >> 8) | (*p++ << (order-8))) ^ crctab[ crc & 0xff];
if (!refin) while (++len < order/8) crc = (crc << 8) ^ crctab[ (crc >> (order-8))
& 0xff];
else while (++len < order/8) crc = (crc >> 8) ^ crctab[crc & 0xff];
if (refout^refin) crc = reflect(crc, order);
crc^= crcxor;
crc&= crcmask;
return(crc);
}
unsigned long crcbitbybit(unsigned char* p, unsigned long len) {
// bit by bit algorithm with augmented zero bytes.
// does not use lookup table, suited for polynom orders between 1...32.
unsigned long i, j, c, bit;
unsigned long crc = crcinit_nondirect;
for (i=0; i<len; i++) {
c = (unsigned long)*p++;
if (refin) c = reflect(c, 8);
for (j=0x80; j; j>>=1) {
bit = crc & crchighbit;
crc<<= 1;
if (c & j) crc|= 1;
if (bit) crc^= polynom;
}
}
for (i=0; i<order; i++) {
bit = crc & crchighbit;
crc<<= 1;
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
34
Chapter 5
Profile Description
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
35
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
36
Chapter 5
Profile Description
crc<<= 1;
if (bit) crc^= polynom;
}
crc&= crcmask;
crcinit_direct = crc;
}
else {
crcinit_direct = crcinit;
crc = crcinit;
for (i=0; i<order; i++) {
bit = crc & 1;
if (bit) crc^= polynom;
crc >>= 1;
if (bit) crc|= crchighbit;
}
crcinit_nondirect = crc;
}
// call CRC algorithms using the CRC parameters above and print result to the
console
printf("\n");
printf("CRC tester v1.1 written on 13/01/2003 by Sven Reifegerste (zorc/
reflex)\n");
printf("-----------------------------------------------------------------------\n");
printf("\n");
printf("Parameters:\n");
printf("\n");
printf(" polynom
printf(" order
printf(" crcinit
crcinit_nondirect);
printf(" crcxor
: 0x%x\n", polynom);
: %d\n", order);
: 0x%x direct, 0x%x nondirect\n", crcinit_direct,
: 0x%x\n", crcxor);
printf(" refin
: %d\n", refin);
printf(" refout
: %d\n", refout);
printf("\n");
printf(" data string
*)string));
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
37
printf("\n");
printf("Results:\n");
printf("\n");
printf(" crc bit by bit
strlen((const char *)string)));
7.
8.
CCB 980
CCB 981
Copyright 2008 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
38
Chapter 5
Profile Description
5.4.8.1.2.1
The following code example can be used to validate key creation derived from
Installation codes:
/
*********************************************************************
**********
* hashing-cli.c
*
* This program hashes the Zigbee Smart Energy install code and CRC and
* prints the result. It is designed to reproduce the same results
* as specified in the Zigbee Smart Energy specification.
*
* The Zigbee Matyas-Meyer-Oseas Hash function (MMO Hash) is implemented here,
* along with the CRC-16 functionality. AES-128 is a prerequisite for
* MMO Hash but is not provided here, instead please reference the Rijndael
implementation
* which is in the public domain, and can be obtained here:
* http://csrc.nist.gov/archive/aes/rijndael/wsdindex.html
*
* Author(s): Robert Alexander <[email protected]>
*
*********************************************************************
*********/
#include <stdio.h>
#include <stdlib.h> // for malloc()
#include <stdarg.h> // for va_list, va_start()
#define __USE_GNU
#include <string.h> // for strncpy(), strnlen()
#include <assert.h> // for assert()
// Assume the rijndael headers are on the include path
#include "rijndael-api-fst.h"
#include "rijndael-alg-fst.h"
//------------------------------------------------------------------------------
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
39
// Globals
typedef unsigned char byte;
#define SECURITY_BLOCK_SIZE 16
static const char* usage[] =
{
"Usage: hashing-cli [arguments]",
"",
" This program calculates the CRC-16 and MMO hash of a Zigbee Smart
Energy",
" install code.",
"",
"REQUIRED ARGUMENTS",
"",
"-i, --install-code <code>",
" The 6, 8, 12, or 16 byte install code in ASCII hex.",
"
e.g. 83FED3407A939723A5C639FF",
"",
"OPTIONAL ARGUMENTS",
"",
"-c, --crc <data>",
" The 16-bit CRC in big-endian ASCII hex. If passed in it will be",
" compared against the calculated CRC value.",
"",
"-g, --ignore-bad-crc",
" Ignore a bad CRC value passed in, use it in the hash anyway.",
"",
"-t, --test"
" Test the AES-128 and MMO Hash by executing internal test vectors.",
" If this is specified the tests are run and nothing else.",
"",
"-h, --help",
" Print this usage information.",
"",
Copyright 2008 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
40
Chapter 5
Profile Description
NULL,
};
static byte installCode[16];
static int installCodeLength = 0;
static int crc = 0;
static int ignoreBadCrc = 0;
static int DEBUG = 0;
#define TRUE 1
#define FALSE 0
static cipherInstance myCipher;
static int runTestVectors = FALSE;
//-----------------------------------------------------------------------------// Forward Declarations
static int parseArguments(int argc, char* argv[]);
static int parseHexByteString(char* argumentName,char* inputString, byte*
returnData, int maxByteLength);
static byte convertHexCharToByte(unsigned char c);
static void convertByteToHexChars(byte data, char result[2]);
static void printHexBytes(byte* data, int length);
static char* convertBytesToHexString(byte* data, int length);
static void printUsage(void);
#define WARNING 0
#define ERROR 1
static void warn(char *string, ...);
static void error(char *string, ...);
static void debugPrint(char* formatString, ...);
static void aesHash(byte *data, byte totalLength, byte *result);
Copyright 2008 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
41
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
42
Chapter 5
Profile Description
warn(message,0);
calculatedCrc = crc;
}
else
{
error(message, 0);
return -1;
}
}
}
memcpy(installCodeAndCrc, installCode, installCodeLength);
installCodeAndCrc[installCodeLength] = (byte)(calculatedCrc & 0xFF);
installCodeAndCrc[installCodeLength+1] = (byte)(calculatedCrc >> 8);
printf("Byte Concatenation: ");
printHexBytes(installCodeAndCrc, installCodeLength + 2);
printf("\n");
aesHash(installCodeAndCrc, installCodeLength + 2, hashResult);
printf("Hash Result: ");
printHexBytes(hashResult, SECURITY_BLOCK_SIZE);
printf("\n");
return 0;
}
static int parseArguments(int argc, char* argv[])
{
int c = 1;
int optionIndex = 0;
int installCodeIsSet = TRUE;
int noArguments = TRUE;
int printHelp = FALSE;
while ((c < argc) && (argc > 1))
{
Copyright 2008 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
43
noArguments = FALSE;
if ((!strcmp(argv[c],"-c")) || (!strcmp(argv[c],"--crc")))
{
c++;
int crcLength = 0;
byte crcData[2];
if (argv[c] == NULL)
{
error("The '-c' option requires an argument.", 0);
return -1;
}
crcLength = parseHexByteString("CRC", argv[c], crcData, 2);
if (crcLength == 0)
{
// Error message already printed
return -1;
}
else if (crcLength != 2)
{
error("CRC must be 2 bytes.\n", 0);
return -1;
}
crc = ((int)(crcData[0] << 8) | (int)crcData[1]);
c++;
}
else if ((!strcmp(argv[c],"-i")) ||(!strcmp(argv[c],"--install-code")))
{
c++;
if (argv[c] == NULL)
{
error("The '-i' option requires an argument.", 0);
return -1;
}
installCodeLength = parseHexByteString("Install Code", argv[c],
installCode, 16);
if (installCodeLength == 0)
Copyright 2008 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
44
Chapter 5
Profile Description
{
return -1;
}
else if (!(installCodeLength == 6|| installCodeLength == 8 ||
installCodeLength == 12 || installCodeLength == 16))
{
error("Install code must be 6, 8, 12, or 16 bytes in length.\n", 0);
return -1;
}
installCodeIsSet = TRUE;
c++;
}
else if ((!strcmp(argv[c],"-g")) ||(!strcmp(argv[c],"--ignore-bad-crc")))
{
c++;
ignoreBadCrc = TRUE;
}
else if ((!strcmp(argv[c],"-t")) ||(!strcmp(argv[c],"--test")))
{
c++;
runTestVectors = TRUE;
}
else if ((!strcmp(argv[c],"-h")) ||(!strcmp(argv[c],"--help")))
{
c++;
printHelp = TRUE;
}
}
if (noArguments || printHelp)
{
printUsage();
return (-1);
}
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
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
46
Chapter 5
Profile Description
{
returnData[byteArrayIndex] = (a << 4) | b;
byteArrayIndex++;
}
else
{
error("Invalid hex character '%C' for %s\n", (a == 0xFF? inputString[i]:
inputString[i+1]), argumentName);
return 0;
}
}
return length / 2;
}
static byte convertHexCharToByte(unsigned char c)
{
if (c >= 'A' && c <= 'F') return c - 'A' + 0x0A;
else if (c >= 'a' && c <= 'f') return c - 'a' + 0x0A;
else if (c >= '0' && c <= '9') return c - '0';
return 0xFF;
}
static void convertByteToHexChars(byte data, char result[2])
{
char string[3];// we need 3 bytes due to the '\0' added by
sprintf(string,"%02X",data);
memcpy(result, string, 2); // but we don't want to pass back the '\0'
}
static void warn(char* formatString, ...)
{
va_list vargs;
fprintf(stderr, "Warning: ");
va_start(vargs, formatString);
vfprintf(stderr, formatString, vargs);
Copyright 2008 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
47
va_end(vargs);
}
static void error(char* formatString, ...)
{
va_list vargs;
fprintf(stderr, "Error: ");
va_start(vargs, formatString);
vfprintf(stderr, formatString, vargs);
va_end(vargs);
}
static void debugPrint(char* formatString, ...)
{
if (DEBUG)
{
va_list vargs;
printf("Debug: ");
va_start(vargs, formatString);
vprintf(formatString, vargs);
va_end(vargs);
}
}
static void printHexBytes(byte* data, int length)
{
char* string = convertBytesToHexString(data, length);
printf("%s", string);
free(string);
}
static char* convertBytesToHexString(byte* data, int length)
{
char* string = (char*)malloc((length * 2) + 1);
int i;
assert(string);
Copyright 2008 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
48
Chapter 5
Profile Description
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
49
{
byte i;
byte key[SECURITY_BLOCK_SIZE];
memcpy(key, result, SECURITY_BLOCK_SIZE);
memcpy(result, block, SECURITY_BLOCK_SIZE);
standAloneEncryptBlock(key, result);
for (i = 0; i < SECURITY_BLOCK_SIZE; i++)
result[i] ^= block[i];
}
// The hashed data must be in the following form
// ... data ... 0x80 0x00 ... 0x00 LOW_BYTE(dataBits) HIGH_BYTE(dataBits)
// where enough 0x00's are added to make the entire length be a multiple
// of 16.The last two bytes give the size of the original data in bits.
static void aesHash(byte *data, byte totalLength, byte *result)
{
byte temp[SECURITY_BLOCK_SIZE];
byte moreDataLength = totalLength;
memset(result, 0, SECURITY_BLOCK_SIZE);// Hash of 0 is all zeros
for (; SECURITY_BLOCK_SIZE <= moreDataLength; data +=
SECURITY_BLOCK_SIZE, moreDataLength -= SECURITY_BLOCK_SIZE)
aesHashNextBlock(data, result);
memset(temp, 0, SECURITY_BLOCK_SIZE);
memcpy(temp, data, moreDataLength);
temp[moreDataLength] = 0x80;
if (SECURITY_BLOCK_SIZE - moreDataLength < 3)
{
aesHashNextBlock(temp, result);
memset(temp, 0, SECURITY_BLOCK_SIZE);
Copyright 2008 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
50
Chapter 5
Profile Description
}
temp[SECURITY_BLOCK_SIZE - 2] = totalLength >> 5;
temp[SECURITY_BLOCK_SIZE - 1] = totalLength << 3;
aesHashNextBlock(temp, result);
}
// The single entry point into the implementation specific method
// of performing AES-128.In this case I use the Rijndael implementation.
static void standAloneEncryptBlock(byte key[SECURITY_BLOCK_SIZE], byte
block[SECURITY_BLOCK_SIZE])
{
static int cipherInitialized = FALSE;
byte outBlock[SECURITY_BLOCK_SIZE];
keyInstance myKey;
// Key is expected to be in ASCII hex
char keyMaterial[SECURITY_BLOCK_SIZE * 2];
char* string = convertBytesToHexString(key, SECURITY_BLOCK_SIZE);
strncpy(keyMaterial, string, SECURITY_BLOCK_SIZE * 2);
free(string);
if (!cipherInitialized)
{
// ZigBee defines the IV for AES Encrypt to be zero, per the Spec. section
// B.1 Block-Cipher-Based Cryptographic Hash Function
assert(cipherInit(&myCipher, MODE_CBC, NULL)); // Initialization Vector
cipherInitialized = TRUE;
}
assert(0 <= makeKey(&myKey, DIR_ENCRYPT, SECURITY_BLOCK_SIZE * 8,
keyMaterial));
assert(0 <= blockEncrypt(&myCipher, &myKey, block, SECURITY_BLOCK_SIZE *
8,outBlock));
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
51
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
52
Chapter 5
Profile Description
/
*********************************************************************
*****
//
// crc16() - generate a 16 bit crc
//
//
// PURPOSE
//This routine generates the 16 bit remainder of a block of
//data using the ccitt polynomial generator.
//
// CALLING SEQUENCE
//crc = crc16(data, len);
//
// PARAMETERS
//data<-- address of start of data block
//len <-- length of data block
//
// RETURNED VALUE
//crc16 value. data is calcuated using the 16 bit ccitt polynomial.
//
// NOTES
//The CRC is preset to all 1's to detect errors involving a loss
//of leading zero's.
//The CRC (a 16 bit value) is generated in LSB MSB order.
//Two ways to verify the integrity of a received message
//or block of data:
//1) Calculate the crc on the data, and compare it to the crc
// calculated previously. The location of the saved crc must be
// known.
/ 2) Append the calculated crc to the end of the data. Now calculate
// the crc of the data and its crc. If the new crc equals the
// value in "crc_ok", the data is valid.
//
// PSEUDO CODE:
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
53
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
54
Chapter 5
Profile Description
crc = ~crc;
return ((unsigned short)crc);
}
static void testHashing(void)
{
printf("Testing AES-128\n");
// These values were found in FIPS 197 Appendix C - Example Vectors,
// C.1 AES-128
byte plainText[] ={ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
byte aesKeyTest[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F };
byte encryptOutput[] = { 0x69, 0xC4, 0xE0, 0xD8, 0x6A, 0x7B, 0x04, 0x30, 0xD8,
0xCD, 0xB7, 0x80, 0x70, 0xb4, 0xC5, 0x5A };
printf("Plain Text: ");
printHexBytes(plainText, SECURITY_BLOCK_SIZE);
printf("\n");
printf("AES Key:");
printHexBytes(aesKeyTest, SECURITY_BLOCK_SIZE);
printf("\n");
printf("Expected Output: ");
printHexBytes(encryptOutput, SECURITY_BLOCK_SIZE);
printf("\n");
standAloneEncryptBlock(aesKeyTest, plainText);
printf("Actual Output: ");
printHexBytes(plainText, SECURITY_BLOCK_SIZE);
printf("\n");
assert(0 == memcmp(plainText, encryptOutput, SECURITY_BLOCK_SIZE));
printf("\nTesting MMO-Hash\n");
// These values were specified in the ZigBee Spec Rev17,
// C.5 Cryptographic Hash Function (Test Vector Set 1 and 2)
byte testIn0[] = { 0xC0 };
Copyright 2008 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
byte testOut0[] = { 0xAE, 0x3A, 0x10, 0x2A, 0x28, 0xD4, 0x3E, 0xE0, 0xD4, 0xA0,
0x9E, 0x22, 0x78, 0x8B, 0x20, 0x6C };
byte testIn1[] = { 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9,
0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF };
byte testOut1[] = { 0xA7, 0x97, 0x7E, 0x88, 0xBC, 0x0B, 0x61, 0xE8, 0x21, 0x08,
0x27, 0x10, 0x9A, 0x22, 0x8F, 0x2D };
byte* testInput[] ={ testIn0, testIn1 };
byte testSizes[] = { sizeof(testIn0), sizeof(testIn1) };
byte* testOutput[] = { testOut0, testOut1 };
byte result[SECURITY_BLOCK_SIZE];
int i;
memset(result, 0, SECURITY_BLOCK_SIZE);
for (i = 0; i < 2; i++)
{
printf("Input %d: ", (i+1));
printHexBytes(testInput[i], testSizes[i]);
printf("\n");
aesHash(testInput[i], testSizes[i], result);
printf("Expected Output: ");
printHexBytes(testOutput[i], SECURITY_BLOCK_SIZE);
printf("\n");
printf("Actual Output: ");
printHexBytes(result, SECURITY_BLOCK_SIZE);
printf("\n");
assert(0 == memcmp(testOutput[i], result, SECURITY_BLOCK_SIZE));
}
printf("\nAll tests passed.\n");
}9
9.
CCB 981
Copyright 2008 ZigBee Standards Organization. All rights reserved.
55
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
56
Chapter 5
Profile Description
5.4.8.2
The following sections identify the recommended best practices for managing
Authorized devices and the initiating the processes required for device
management.
5.4.8.2.1 Best Practices for Tracking Registered Devices
In order to properly track Smart Energy Devices and communicate device
registration status to upstream systems, Trust Centers (ESPs) should maintain a
list of authorized devices. Its also recommended Trust Centers maintain the
following items for each of the registered devices:
1 Client EUI64
2 Client Installation Code
3 Registration Status
4 Time and Date Stamps
Although this information is not exposed through the ZigBee network, device
binding is expected to be used to track and understand ZigBee network
connectivity.
5.4.8.2.2 Initiating Registration
To initiate the Registration process to authorize a device, the Client device should
call the Initiate Key Establishment command of the Key Establishment cluster.
The Trust Center (ESP) should call the Initiate Key Establishment Response
command of the Key Establishment cluster in response.
Prior to this activity, the Trust Center enables joining by calling the NLMEPERMIT-JOINING.request primitive. Joining must be managed for an appropriate
amount of time but not left on forever. The appropriate amount of time will be
dictated by the overall performance of the system and business processes driving
the registration and device authorization activities. Be aware Joining has an
internal time out within the ZigBee stack, therefore joining may need to be
enabled multiple times during the overall Registration and device authorization
process.
Please refer to Annex F and [B4] section 5.4.3 for more details around the Joining
processes.
Once Registration is completed, the list of authorized devices in the Trust Center
should be updated, please refer to sub-clause 5.4.8.2.1.
5.4.8.2.3 Initiating Re-registration
To initiate the re-registration process for a device, the Trust Center (ESP) would
invalidate the Link keys for that device and subsequently cause a re-authentication
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
/ authorization to re-establish Link Keys. The processes required for this activity
are:
1 The Trust Center invalidates the Link key by using the APSME-SET primitive.
2 When the Client device detects communication errors due via APS error results
primitive.
2 The Trust Center (ESP) informs the Client device to leave the network by
5.5 Commissioning
Many, if not all of the devices described in this document, will require some form
of commissioning, even if the user or installer doesnt see it. This is because, for
example, a load control device needs to be bound to some sort of control device in
order to perform its function and, even if the required initializations are done at
the factory before the device is installed, the required operations are virtually the
same as is the outcome.
Copyright 2008 ZigBee Standards Organization. All rights reserved.
57
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
58
Chapter 5
Profile Description
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
5.5.4.1
Under a neighborhood area network, other meters such as gas or water meters
may join electric meters that form a backbone of the network. The process of
joining the network is separate from the process for device binding where the
device billing information is configured for a particular dwelling unit. It may be
desirable to allow the meter to join an adjacent dwelling unit from a network
standpoint to ensure proper connectivity. The application level will handle the
configuration of the billing information later.
1 There are two methods for joining such a device onto an existing network:
a The device is commissioned using a tool with the necessary network and
joins this network and undergoes joining and authentication as any newly
joined device.
2 Once joined and authenticated by the security requirements of the existing
59
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
60
Chapter 5
Profile Description
dwelling unit for billing purposes. This information may be associated at the
backend database where the data is collected, or may be sent to the device so it
is aware of its association. Note that under this method, devices may route data
through devices in adjacent dwelling units that are part of the neighborhood
area network.
5.5.4.2
This is done through an out of band means which could include a web login,
phone call to a service center, or handheld tool. Using this methodology the
existing network is made aware of the device ID and security information
appropriate for the device (per the Key Establishment Cluster described in
Annex C).
2 The Smart Energy network is put into permit joining ON for a period of time.
3 The installer/homeowner is prompted to press a button or complete a menu
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
61
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
62
Chapter 5
Profile Description
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
Smart Energy
Generi
c
Device
Device ID
Range Extender
0x0008
0x0500
Metering Device
0x0501
In-Premise Display
0x0502
0x0503
0x0504
Smart Appliance
0x0505
Prepayment Terminal
0x0506
Reserved
0x0507 0x5FF
63
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
64
Chapter 5
Profile Description
Devices shall use the ZCL default response error handing. Typical examples of
this are:
"When receiving commands that don't have data collected such as Get
Scheduled Events, Get Current Price, Get Scheduled Prices, and Get Last
Message, devices shall respond using the ZCL default response with a status
code of NOT_FOUND.
"When receiving requests for unsupported commands, devices shall respond
using the ZCL default response with a status code of
UNSUP_CLUSTER_COMMAND.
"When receiving malformed commands, devices shall respond using the ZCL
default response with a status code of MALFORMED_COMMAND.
"When receiving requests for accessing unsupported attributes, devices shall
respond using the ZCL default response with a status code of
UNSUPPORTED_ATTRIBUTE.
Please refer to [B2] for additional status codes support in the ZCL default
response.
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
Functional
Domain
Cluster Name
Cluster
ID
General
Basic
0x0000
General
Identify
0x0003
General
Alarms
0x0009
General
Time
0x000A
General
Commissioning
0x0015
General
Power Configuration
0x0001
General
Key Establishment
0x0800
Smart Energy
Price
0x0700
Smart Energy
0x0701
Smart Energy
Simple Metering
0x0702
Smart Energy
Message
0x0703
Smart Energy
0x0704
Smart Energy
Pre-Payment
0x0705
5.11.1.1
65
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
66
Chapter 5
Profile Description
devices need to rejoin or re-register on the network. Again, the desire is to keep
time synchronization traffic to a minimum.
Further, implementers must be aware that network communication delays will
cause minor differences in time between devices. The Smart Energy profile
expectations are that this will be a minor issue given the use cases its fulfilling. It
will not nor does it recommend implementers develop an NTP or equivalent
scheme to compensate for network delays. These methods are viewed as having
the potential to cause excessive network communications.
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
H A P T E R
6
CHAPTER 6DEVICE SPECIFICATIONS
6.1 Common Clusters
Support for certain clusters is common to all the devices in this profile. The
clusters shown in Table 6.1 shall be supported by all devices in this profile as
mandatory or optional according to the designation given here. Individual device
descriptions may place further restrictions on support of the optional clusters
shown here. If a cluster is not listed as mandatory or optional in the following
common table or in the individual devices table that follows, then that cluster
shall be prohibited on the Smart Energy endpoint.
Table 6.1 Clusters Common to All Devices
Server Side
Client Side
Mandatory
Basic
None
Key Establishment
Key Establishment
Optional
Clusters with reporting capability
Power Configuration
Inter-PAN Communication
Alarms
Commissioning
Commissioning
Nonea
Identify
Manufacturer-specific
(see sub-clause 6.1.2 for details)
Manufacturer-specific
(see sub-clause 6.1.2 for details)
a. CCB 966
67
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
68
Chapter 6
Device Specifications
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
Join
(end
devices
and
routers
only)
Form
Network
(coordina
tor only)
Restor
e to
Factor
y
Fresh
Setting
s
Pair
Devices
(End
Device
Bind
Request)
Bind
Manager
(End
Device
Bind
Respons
eCoordina
tor only)
Enable
Identif
y Mode
Allow Smart
Energy
devices to
join the
Network
(routers and
coordinators
only)
Mandato
ry/
Optional
Oa
Ob
Device
Type/
Feature
or
function
Service
discove
ry
(Match
Descrip
tor
Request
)
ZDP
Bind
Response
ZDP
Unbin
d
Respo
nse
End
Device
Annce/
device
annce
Service
Discover
y
response
(Match
Descript
or
Respons
e)
High
Securit
y
Suppor
ted
(ZigBe
e PRO
only)
Inter-PAN
Communicat
ion
Mandato
ry/
Optional
Oc
N/A
a. CCB 967
b. CCB 967
c. CCB 967
69
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
70
Chapter 6
Device Specifications
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
6.3.1.1
Supported Clusters
In addition to those specified in Table 6.1, the Energy Service Portal device shall
support the clusters listed in Table 6.3. If a cluster is not listed as mandatory or
optional in the following table or in the common table, then that cluster shall be
prohibited on an ESP device endpoint.
Table 6.3 Clusters Supported by the Energy Service Portal
Server Side
Client Side
Mandatory
Message
Price
Demand Response/Load Control
Time
Optional
Smart Energy Tunneling
(Complex Metering)
Simple Metering
Prepayment
Simple Metering
Prepayment
Please Note: Both the Prepayment and Smart Energy Tunneling Cluster
definitions are TBD. The information in those sections is not complete and
references to them in Table 6.3 should be viewed as place holders until they are
completely defined.
71
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
72
Chapter 6
Device Specifications
6.3.1.2
The Energy Service Portal device shall have the features and functions listed in
Table 6.2.
6.3.2.1
Supported Clusters
In addition to those specified in Table 6.1, the Metering Device shall support the
clusters listed in Table 6.4. If a cluster is not listed as mandatory or optional in the
following table or in the common table, then that cluster shall be prohibited on a
Metering device endpoint.
Table 6.4 Clusters Supported by the Metering Device
Server Side
Client Side
Mandatory
Simple Metering
Optional
Smart Energy Tunneling
(Complex Metering)
Time
Prepayment
Price
Message
Please Note: Both the Prepayment and Smart Energy Tunneling Cluster
definitions are TBD. The information in those sections is not complete and
references to them in Table 6.4 should be viewed as place holders until they are
completely defined.
6.3.2.2
The Metering Device shall have the features and functions listed in Table 6.2.
Copyright 2008 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
6.3.3.1
Supported Clusters
In addition to those specified in Table 6.1, the In-Premise Display device shall
support the clusters listed in Table 6.5. If a cluster is not listed as mandatory or
optional in the following table or in the common table, then that cluster shall be
prohibited on an In-Premise Display device endpoint.
Table 6.5 Clusters Supported by the In-Premise Display Device
Server Side
Client Side
Mandatory
Optional
Demand Response and Load Control
Time
Prepayment
Price
Simple Metering
Message
The device should state that at least one of the optional client clusters (Price,
Simple Metering, or Messaging) must be implemented.
Please Note: Both the Prepayment and Smart Energy Tunneling Cluster
definitions are TBD. The information in those sections are not complete and
references to them in Table 6.5 should be viewed as place holders until they are
completely defined.
73
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
74
Chapter 6
Device Specifications
6.3.3.2
The In-Premise Display device shall have the features and functions listed in
Table 6.2.
6.3.4.1
Supported Clusters
In addition to those specified in Table 6.1, the PCT device shall support the
clusters listed in Table 6.6. If a cluster is not listed as mandatory or optional in the
following table or in the common table, then that cluster shall be prohibited on a
PCT device endpoint.
Table 6.6 Clusters Supported by the PCT
Server Side
Client Side
Mandatory
Demand Response and Load Control
Time
Optional
Prepayment
Price
Simple Metering
Message
Please Note: Both the Prepayment and Smart Energy Tunneling Cluster
definitions are TBD. The information in those sections is not complete and
references to them in Table 6.6 should be viewed as place holders until they are
completely defined.
6.3.4.2
The PCT device shall have the features and functions listed in Table 6.2.
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
6.3.5.1
Supported Clusters
In addition to those specified in Table 6.1, the Load Control device shall support
the clusters listed in Table 6.7.
Table 6.7 Clusters Supported by the Load Control Device
Server Side
Client Side
Mandatory
Demand Response and Load Control
Time
Optional
Price
6.3.5.2
The Load Control Device shall support the features and functions listed in
Table 6.2.
6.3.6.1
Supported Clusters
The Range Extender device shall only support the mandatory common clusters
listed in Table 6.1.
75
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
76
Chapter 6
Device Specifications
6.3.6.2
The Range Extender device shall have the features and functions listed in
Table 6.2.
6.3.7.1
Supported Clusters
In addition to those specified in Table 6.1 the Smart Appliance device shall
support the clusters listed in Table 6.8. If a cluster is not listed as mandatory or
optional in the following table or in the common table, then that cluster shall be
prohibited on a Smart Appliance device endpoint.
Table 6.8 Clusters Supported by the Smart Appliance Device
Server Side
Client Side
Mandatory
Price
Time
Optional
Demand Response and Load Control
Message
The device should state that at least one of the optional client clusters (Demand
Response and Load Control, Price or Messaging) must be implemented.
6.3.7.2
The Smart Appliance device shall have the features and functions listed in
Table 6.2.
Copyright 2008 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
6.3.8.1
Supported Clusters
In addition to those specified in Table 6.1, the Prepayment Terminal device shall
support the clusters listed in Table 6.9. If a cluster is not listed as mandatory or
optional in the following table or in the common table, then that cluster shall be
prohibited on a Prepayment Terminal device endpoint.
Table 6.9 Clusters Supported by the Prepayment Terminal Device
Server Side
Client Side
Mandatory
Price
Time
Prepayment
Prepayment
Optional
Demand Response and Load Control
Simple Metering
Message
6.3.8.2
The Prepayment Terminal device shall have the features and functions listed in
Table 6.2.
77
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
78
Chapter 6
Device Specifications
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
N N E X
A
ANNEX ACANDIDATE ZCL MATERIAL FOR USE
WITH THIS PROFILE
The candidate material in this annex, when approved, will be merged into the
Foundation document of the ZigBee Cluster Library (ZCL) by the Cluster Library
Development Board.
Type Class
Time
Data Type ID
Data Type
Length of
Data (Octets)
Invalid
Number
Analog /
Discrete
0xe2
UTCTime
0xfffffffff
0xe3 0xe7
Reserved
79
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
80
Annex A
Candidate ZCL Material for Use with This
A.2.1.1
UTCTime
Type
Class
Unsigned
Integer
A.2.2.1
Data
Type
ID
Data Type
Length of Data
(Octets)
Invalid
Number
Analog /
Discrete
0x24
Unsigned 40 Bit
Integer
0xffffffffff
0x25
Unsigned 48 Bit
Integer
0xffffffffffff
0x26
0x27
Reserved
This type represents an unsigned integer with a decimal range of 0 to 240-1. The
value that represents an invalid value of this type is 0xffffffffff.
A.2.2.2
This type represents an unsigned integer with a decimal range of 0 to 248-1. The
value that represents an invalid value of this type is 0xffffffffffff.
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
N N E X
B
ANNEX BINTER-PAN TRANSMISSION MECHANISM
B.1 Scope and Purpose
This annex defines a mechanism whereby ZigBee devices can perform limited,
insecure, and possibly anonymous exchanges of information with devices in their
local neighborhood without having to form or join the same ZigBee network. The
mandate for this feature comes from the Energy Management / Smart Energy
market requirement to send pricing information to very low cost devices. The
particular data exchange required by the Smart Energy Application Profile is the
request for anonymous public energy pricing information. The typical example is
the extremely low cost Refrigerator Magnet device that simply informs
customers of current energy costs through some visual method (LCD, LEDs,
etc.).
The intended destination for the mechanism described here is not the ZigBee
specification [B1], but the relevant application profile documents for applications
that make use of the feature in particular, the Smart Energy Profile
Specification.
The material used to create Annex B is derived from [B7].
81
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
82
Annex B
Inter-PAN Transmission Mechanism
Figure B.1
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
B.3.1.1
INTRP-DATA.request
{
SrcAddrMode
DstAddrMode
DstPANId
DstAddress
ProfileId
ClusterId
ASDULength
ASDU
ASDUHandle
}
83
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
84
Annex B
Inter-PAN Transmission Mechanism
Name
Type
Valid Range
SrcAddrMode
Integer
0x03
Description
The addressing mode for the source
address used in this primitive. This
parameter shall only reference the use
of the 64-bit extended address:
0x03 = 64-bit extended address
DstAddrMode
Integer
0x01 0x03
DstPANID
16-bit PAN
Id
0x0000 0xffff
DstAddress
16-bit or
64-bit
address
As specified by the
AddrMode parameter
ProfileId
Integer
0x0000 0xffff
ClusterId
Integer
0x0000 0xffff
ASDULength
Integer
0x00
(aMaxMACFrameSiz
e - 9)
Set of octets
Integer
0x00 0xff
ASDU
ASDUHandle
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
B.3.1.2
When Generated
B.3.1.3
Effect on Receipt
On receipt of the INTRP-DATA.request primitive by the stub APS, the stub APS
will construct and transmit a frame containing the given ASDU and other
parameters using the MCPS-DATA.request primitive of the MAC sub-layer, as
described in sub-clause sub-clause B.5.1, and, once the corresponding MCPSDATA.confirm primitive is received, Generate the INTRP-DATA.confirm
primitive with a status value reflecting the status value returned by the MAC.
B.3.2.1
{
ASDUHandle
Status
}
Name
Type
Valid Range
ASDUHandle
Integer
0x00 0xff
Enumeration
Status
Description
85
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
86
Annex B
Inter-PAN Transmission Mechanism
B.3.2.2
When Generated
This primitive is generated by the stub APS on a ZigBee device and passed to the
application in response to the receipt of a MCPS-DATA.confirm primitive that is a
confirmation of a previous MCPS-DATA.request issued by the stub APS.
B.3.2.3
Effect on Receipt
B.3.3.1
{
SrcAddrMode
SrcPANId
SrcAddress
DstAddrMode
DstPANId
DstAddress
ProfileId
ClusterId
ASDULength
ASDU
LinkQuality
}
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
Name
Type
Valid Range
SrcAddrMode
Integer
0x03
Description
The addressing mode for the
source address used in this
primitive. This parameter shall
only reference the use of the 64bit extended address:
0x03 = 64-bit extended address
SrcPANId
16-bit
PAN Id
0x0000 0xffff
SrcAddress
64-bit
address
As specified by the
SrcAddrMode parameter
DstAddrMode
Integer
0x01 0x03
DstPANID
16-bit
PAN Id
0x0000 0xffff
DstAddress
16-bit or
64-bit
address
As specified by the
DstAddrMode parameter
ProfileId
Integer
0x0000 0xffff
ClusterId
Integer
0x0000 0xffff
87
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
88
Annex B
Inter-PAN Transmission Mechanism
Integer
0x00
(aMaxMACFrameSize - 9)
ASDU
Set of
octets
LinkQuality
Integer
0x00 0xff
B.3.3.2
When Generated
This primitive is generated and passed to the application in the event of the
receipt, by the stub APS, of a MCPS-DATA.indication primitive from the MAC
sub-layer, containing a frame that was generated by the stub APS of a peer ZigBee
device, and that was intended for the receiving device.
B.3.3.3
Effect on Receipt
Figure B.2
Briefly, the frame contains the familiar headers controlling the operation of the
MAC sub-layer, the NWK layer and the APS. Following these, there is a payload,
formatted as specified in [B2].
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
Since most of the information contained in the NWK and APS headers is not
relevant for inter-PAN transmission, the inter-PAN frame, shown in Figure B.3,
contains only a stub of the NWK header the APS header, which provide the
information required by the stub APS shown in Figure B.4 to do its job.
Figure B.3
Octets: 2
NWK frame
control
Figure B.4
The format of the frame control field of the stub NWK header is formatted as
shown in Figure B.5.
Bits: 0-1
2-5
6-15
Frame type
Protocol
version
Remaining sub-fields == 0
Figure B.5
89
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
90
Annex B
Inter-PAN Transmission Mechanism
Octets: 1
APS frame control
0/2
Group address
Cluster identifier
Profile identifier
Addressing fields
Figure B.6
The stub APS header contains only 4 fields totaling a maximum of 7 octets in
length.
The APS frame control field shall be 1 octet in length and is identical in format to
the frame control field of the general APDU frame in [B4] (see Figure B.7).
Bits: 0-1
2-3
Frame type
Delivery Mode
Reserved
Security
ACK request
Extended
Header
Present
Figure B.7
The fields of the frame control field have the following values:
The frame type sub-field shall have a value of 0b11, which is a reserved frame
type with respect to the [B4].
The delivery mode sub-field may have a value of 0b00, indicating unicast,
0b10, indicating broadcast or 0b11 indicating group addressing.
Security is never enabled for Inter-Pan transmissions. This sub-field shall be a
value of 0.
The ACK request sub-field shall have a value of 0, indicating no ACK request.
No APS ACKs are to be used with Inter-Pan transmissions.
The extended header present sub-field shall always have a value of 0,
indicating no extended header.
The optional group address shall be present if and only if the delivery mode field
has a value of 0x0b11. If present if shall contain the 16-bit identifier of the group
to which the frame is addressed.
The cluster identifier field is 2 octets in length and specifies the identifier of the
cluster to which the frame relates and which shall be made available for filtering
and interpretation of messages at each device that takes delivery of the frame.
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
The profile identifier is two octets in length and specifies the ZigBee profile
identifier for which the frame is intended and shall be used during the filtering of
messages at each device that takes delivery of the frame.
91
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
92
Annex B
Inter-PAN Transmission Mechanism
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
93
value of 0x03.
0x02, if the DstAddrMode parameter of the INTRP-DATA.indication has a
value of 0x02
The value of the DstPANId parameter of the INTRP-DATA.indication shall
reflect the value of the DstPANId parameter of the MCPS-DATA.indication.
If the DstAddrMode parameter of the INTRP-DATA.indication has a value of
0x01, indicating group addressing then the DstAddress parameter of the
INTRP-DATA.indication shall reflect the value of the group address field of
the stub APS header. Otherwise, the value of the DstAddress parameter of the
INTRP-DATA.indication shall reflect the value of the DstAddr parameter of
the MCPS-DATA.indication.
The value of the ProfileId parameter shall be the same as the value of the
profile identifier field of the stub APS header.
The value of the ClusterId parameter shall be the same as the value of the
cluster identifier field of the stub APS header.
The ASDULength field shall contain the number of octets in the stub APS
frame payload.
The ASDU shall be the stub APS payload itself.
The value of the LinkQuality parameter shall reflect the value of the
mpduLinkQuality parameter of the MCPS-DATA.indication.
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
94
Annex B
Inter-PAN Transmission Mechanism
Figure B.8
The first task of the HAN device in this scenario is to discover devices in the area
that are capable of publishing pricing information. It could do this using an interPAN broadcast, i.e. a broadcast employing both the broadcast address and the
broadcast PAN ID, but in doing this it runs the risk of confusing the non-ZigBee
foreign device. As an alternative, the HAN device uses standard ZigBee
network discovery (see [B4]) in order to find ZigBee PANs.
Once at least one ZigBee PAN is discovered, the HAN device sends a request for
public pricing information using the INTRP-DATA SAP. Typically, the first time
this request is sent, it will be sent as a broadcast to each discovered ZigBee PAN.
Receiving devices that implement the INTRP-DATA SAP will process it and, if
any such device is able to respond, it will respond directly to the requestor. After
receiving at least one response the requestor may store the PAN ID and device
address of one or more responders so that it may query them directly in future.
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
N N E X
C
ANNEX CKEY ESTABLISHMENT CLUSTER
The candidate material in this annex, when approved, will be merged into the
Foundation document of the ZigBee Cluster Library (ZCL) by the Cluster Library
Development Board.
95
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
96
Annex C
Key Establishment Cluster
agreement
4 Confirmation of the secret keying material.
There are two basic types of key establishment which can be implemented:
Symmetric Key Key Establishment
Public Key Key Establishment
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
97
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
98
Annex C
Key Establishment Cluster
Initator
Responder
SV,EV
3
MACU = MACMacKey(AU, SU, SV, EU, EV)
4
Verify MACV
Figure C.1
Verify MACU
C.2.6.1
Figure C.1 shows static data SU and SV. For PKKE schemes, this represents a
combination of the 64-bit device address [B8] and the device's static public key.
The identities are needed by the MAC scheme and the static public keys are
needed by the key agreement scheme.
Figure C.1 also shows ephemeral data EU and EV. For PKKE schemes, this
represents the public key of a randomly generated key pair.
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
The static and ephemeral data SU and EU are sent to V and the static and
ephemeral data SV and EV and are sent to U.
C.2.6.2
Figure C.1 shows the KeyBitGen function for generating the key bitstream. The
function's four parameters are the identifiers and the ephemeral data for both
devices. This ensures the same key is generated at both ends.
For PKKE schemes, this is the ECMQV key agreement schemes specified in
Section 6.2 of SEC1 [B15]. The static data SU represents the static public key
Q1,U of party U, the static data SV represents the static public key Q1,V of party V,
the ephemeral data EU represents the ephemeral public key Q2,U of party U and
the ephemeral data EV represents the ephemeral public key Q2,V of party V.
C.2.6.3
Figure C.1 shows the KDF (KeyDerivation Function) for generating the MAC
Key and key data. The MAC Key is used with a keyed hash message
authentication function to generate a MAC and the key data is shared secret, e.g.
the link key itself required for frame protection.
For PKKE schemes, this is the key derivation function is as specified in Section
3.6.1 of SEC1 [B15]. Note there is no SharedInfo parameter of the referenced
KDF, i.e. it is a null octet string of length 0.
Figure C.1 also shows generation of the MAC using the MAC Key derived using
the KDF using a message comprised of both static data SU and SV and ephemeral
data EU and EV plus an additional component A which is different for initiator and
responder.
For PKKE schemes, this is the MAC scheme specified in section 3.7 of SEC1
[B15]. The MAC in the reference is the keyed hash function for message
authentication specified in sub-clause C.4.2.2.6 and the message M is a
concatenation of the identity (the 64-bit device address [B8]) of U, the identity of
V and point-compressed octet-string representations of the ephemeral public keys
of parties U and V. The order of concatenation depends on whether it is the
initiator or responder. The additional component A is the single octet 0216 for the
initiator and 0316 for the responder.
C.2.6.4
99
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
100
Annex C
Key Establishment Cluster
Cluster Name
Description
Key Establishment
Initiator
Responder
C = Client
Figure C.2
S = Server
Overview
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
Initiator
Responder
APS Ack
Initiate Key Establishment Response
APS Ack
Ephemeral Data Request
APS Ack
Ephemeral Data Response
APS Ack
Confirm Key Request
APS Ack
Confirm Key Response
APS Ack
Figure C.3
As depicted above, all Key Establishment messages should be sent with APS
retries enabled. A failure to receive an ACK in a timely manner can be seen as a
failure of key establishment. No Terminate Key Establishment should be sent to
the partner of device that has timed out the operation.
The initiator can initiate the key establishment with any active endpoint on the
responder device that supports the key establishment cluster. The endpoint can be
either preconfigured or discovered, for example, by using ZDO Match-Desc-req.
A link key successfully established using key establishment is valid for all
endpoints on a particular device. The responder shall respond to the initiator
using the source endpoint of the initiator's messages as the destination endpoint of
the responder's messages.
It is expected that the time it takes to perform the various cryptographic
computations of the key establishment cluster may vary greatly based on the
101
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
102
Annex C
Key Establishment Cluster
device. Therefore rather than set static timeouts, the Initiate Key Establishment
Request and Response messages will contain approximate values for how long the
device will take to generate the ephemeral data and how long the device will take
to generate confirm key message.
A device performing key establishment can use this information in order to
choose a reasonable timeout for its partner during those operations. The timeout
should also take into consideration the time it takes for a message to traverse the
network including APS retries. A minimum transmission time of 2 seconds is
recommended.
For the Initiate Key Establishment Response message, it is recommended the
initiator wait at least 2 seconds before timing out the operation. It is not expected
that generating an Initiate Key Establishment Response will take significant time
compared to generating the Ephemeral Data and Confirm Key messages.
C.3.1.2
Server
C.3.1.2.1 Dependencies
The Key Establishment server cluster has no dependencies.
C.3.1.2.2 Attributes
For convenience, the attributes defined in this specification are arranged into sets
of related attributes; each set can contain up to 16 attributes. Attribute identifiers
are encoded such that the most significant three nibbles specify the attribute set
and the least significant nibble specifies the attribute within the set. The currently
defined attribute sets are listed in Table C.2.
Table C.2 Key Establishment Attribute Sets
Attribute Set
Identifier
Description
0x000
Information
0x001 0xfff
Reserved
C.3.1.2.2.1 Information
The Information attribute set contains the attributes summarized in Table C.3.
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
Identifier
0x0000
Name
Type
Range
Access
Default
Mandatory/
Optional
KeyEstablis
hmentSuite
16-bit
Enumeration
0x0000 0xFFFF
Read
only
0x0000
Bits
Description
1-15
Reserved
Description
Mandatory/
Optional
0x00
0x01
0x02
0x03
0x04 0xFF
Reserved
103
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
104
Annex C
Key Establishment Cluster
Octets
48
Data
Type
16-bit BitMap
Unsigned 8-bit
Integer
Unsigned 8-bit
Integer
Octets (non-ZCL
Data Type)
Key
Establishment
suite
Ephemeral Data
Generate Time
Confirm Key
Generate Time
Identity (IDU)
Field
Name
Figure C.4
Key Establishment Suite: This will be the type of Key Establishment that the
initiator is requesting for the Key Establishment Cluster. For CBKE-ECMQV this
will be 0x0001.
Ephemeral Data Generate Time14: This value indicates approximately how
long the initiator device will take in seconds to generate the Ephemeral Data
Request command. The valid range is 0x00 to 0xFE.
Confirm Key Generate Time15: This value indicates approximately how long
the initiator device will take in seconds to generate the Confirm Key Request
command. The valid range is 0x00 to 0xFE.
Identity field: For KeyEstablishmentSuite = 0x0001 (CBKE), the identity field
shall be the block of octets containing the implicit certificate CERTU as specified
in sub-clause C.4.2.
C.3.1.2.3.1.2 Effect on Receipt
If the device does not currently have the resources to respond to a key
establishment request it shall send a Terminate Key Establishment command with
the result value set to NO_RESOURCES and the Wait Time field shall be set to an
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
approximation of the time that must pass before the device will have the resources
to process a new Key Establishment Request.
If the device can process this request, it shall check the Issuer field of the device's
implicit certificate. If the Issuer field does contain a value that corresponds to a
known Certificate Authority, the device shall send a Terminate Key Establishment
command with the result set to UNKNOWN_ISSUER.
If the device accepts the request it shall send an Initiate Key Establishment
Response command containing its own identity information.
C.3.1.2.3.2 Confirm Key Request Command
The Confirm Key command allows the initiator sending device to confirm the key
established with the responder receiving device based on performing a
cryptographic hash using part of the generated keying material and the identities
and ephemeral data of both parties.
C.3.1.2.3.2.1 Payload Format
The Confirm Key command payload shall be formatted as illustrated in
Figure C.5.
Octets
16
Data Type
Octet string
Field Name
Figure C.5
105
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
106
Annex C
Key Establishment Cluster
If the two match the responder shall send back MACV by generating an
appropriate Confirm Key Response command. If the two do not match, the
responder shall send back a Terminate Key Establishment with a result of BAD
_KEY_CONFIRM and terminate the key establishment.
C.3.1.2.3.3 Terminate Key Establishment Command
The Terminate Key Establishment command may be sent by either the initiator or
responder to indicate a failure in the key establishment exchange.
C.3.1.2.3.3.1 Payload Format
The Terminate Key Establishment command payload shall be formatted as
illustrated in Figure C.6.
Octets
Data
Type
8-bit
Enumeration
Unsigned 8-bit
Integer
16-bit BitMap
Field
Name
Status Code
Wait Time
KeyEstablishmentSuite
Figure C.6
Status Field: The Status field shall be one of the error codes in Table C.6.
Table C.6 Terminate Key Establishment Command Status Field
Enumeration
Value
Description
0x00
Reserved
UNKNOWN_ISSUER
0x01
BAD_KEY_CONFIR
M
0x02
The device could not confirm that it shares the same key
with the corresponding device and has terminated the key
establishment.
BAD_MESSAGE
0x03
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
107
Enumeration
Value
Description
NO_RESOURCES
0x04
UNSUPPORTED_SUI
TE
0x05
0x06 0xFF
Reserved
Wait Time: This value indicates the minimum amount of time in seconds the
initiator device should wait before trying to initiate key establishment again. The
valid range is 0x00 to 0xFE.
KeyEstablishmentSuite: This value will be set the value of the
KeyEstablishmentSuite attribute. It indicates the list of key exchange methods
that the device supports.
C.3.1.2.3.3.2 Effect on Receipt
On receipt of the Terminate Key Establishment command the device shall
terminate key establishment with the sender. If the device receives a status of
BAD_MESSAGE or NO_RESOURCES it shall wait at least the time specified in
the Wait Time field before trying to re-initiate Key Establishment with the device.
If the device receives a status of UNKNOWN_SUITE it should examine the
KeyEstablishmentSuite field to determine if another suite can be used that is
supported by the partner device. It may re-initiate key establishment using that
one of the supported suites after waiting the amount of time specified in the Wait
Time field. If the device does not support any of the types in the
KeyEstablishmentSuite field, it should not attempt key establishment again with
that device.
If the device receives a status of UNKNOWN_ISSUER or
BAD_KEY_CONFIRM the device should not attempt key establishment again
with the device, as it is unlikely that another attempt will be successful.
C.3.1.2.3.4 Ephemeral Data Request Command
The Ephemeral Data Request command allows a device to communicate its
ephemeral data to another device and request that the device send back its own
ephemeral data.
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
108
Annex C
Key Establishment Cluster
Figure C.7
Octets
22
Data Type
Field Name
C.3.1.3
Client
C.3.1.3.1 Dependencies
The Key Establishment client cluster has no dependencies.
C.3.1.3.2 Attributes
For convenience, the attributes defined in this specification are arranged into sets
of related attributes; each set can contain up to 16 attributes. Attribute identifiers
are encoded such that the most significant three nibbles specify the attribute set
and the least significant nibble specifies the attribute within the set. The currently
defined attribute sets are listed in Table C.7.
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
Attribute Set
Identifier
Description
0x000
Information
0x001 0xfff
Reserved
C.3.1.3.2.1 Information
The Information attribute set contains the attributes summarized in Table C.8.
Table C.8 Attributes of the Information Attribute Set
Identifier
0x0000
Name
Type
Range
Access
Default
Mandatory/
Optional
KeyEstablis
hmentSuite
16-bit
Enumeration
0x0000
0xFFFF
Read
only
0x0000
KeyEstablishmentSuite
Description
1-15
Reserved
109
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
110
Annex C
Key Establishment Cluster
Table C.10 Received Command IDs for the Key Establishment Cluster Client
Command
Identifier
Field Value
Description
Mandatory
/ Optional
0x00
0x01
0x02
0x03
0x04 - 0xFF
Reserved
Octets
Data Type
Field
Name
48
16-bit BitMap
Unsigned 8-bit
Integer
Unsigned 8-bit
Integer
Requested Key
Establishment suite
Ephemeral Data
Generate Time
Confirm Key
Generate Time
Identity (IDU)
Figure C.8
16Requested
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
Ephemeral Data Generate Time: This value indicates approximately how long
in seconds the responder device takes to generate the Ephemeral Data Response
message. The valid range is 0x00 to 0xFE.
Confirm Key Generate Time: This value indicates approximately how long the
responder device will take in seconds to generate the Confirm Key Response
message. The valid range is 0x00 to 0xFE.
Identity field: For KeyEstablishmentSuite = 0x0001 (CBKE), the identity field
shall be the block of Octets containing the implicit certificate CERTU as specified
in sub-clause C.4.2.
C.3.1.3.3.1.2 Effect on Receipt
If the device is not currently in the middle of negotiating Key Establishment with
the sending device when it receives this message, it shall send back a Terminate
Key Establishment message with a result of BAD_MESSAGE. If the device is in
the middle of Key Establishment with the sender but did not receive this message
in response to an Initiate Key Establishment Request command, it shall send back
a Terminate Key Establishment message with a result of BAD_MESSAGE.
On receipt of this command the device shall check the Issuer field of the device's
implicit certificate. If the Issuer field does contain a value that corresponds to a
known Certificate Authority, the device shall send a Terminate Key Establishment
command with the status value set to UNKNOWN_ISSUER. If the device does
not currently have the resources to respond to a key establishment request it shall
send a Terminate Key Establishment command with the status value set to
NO_RESOURCES and the Wait Time field shall be set to an approximation of the
time that must pass before the device has the resources to process the request.
If the device accepts the response it shall send an Ephemeral Data Request
command.
C.3.1.3.3.2 Ephemeral Data Response Command
The Ephemeral Data Response command allows a device to communicate its
ephemeral data to another device that previously requested it.
C.3.1.3.3.2.1 Payload Format
Figure C.9
Octets
22
Data Type
Field Name
111
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
112
Annex C
Key Establishment Cluster
Octets
0/16
Data Type
Field Name
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
On receipt of the Confirm Key Response command the initiator device shall
compare the received MACV value with its own reconstructed version of the
MACV. If the two match then the initiator can consider the key establishment
process to be successful. If the two do not match, the initiator should send a
Terminate Key Establishment command with a result of BAD_KEY_CONFIRM.
C.3.1.3.3.4 Terminate Key Establishment Command
The Terminate Key Establishment command may be sent by either the initiator or
responder to indicate a failure in the key establishment exchange.
C.3.1.3.3.4.1 Payload Format
Octets
Data Type
8-bit Enumeration
16-bit BitMap
Field Name
Status Code
Wait Time
KeyEstablishmentSuite
Status field: The Status field shall be one of the following error codes.
Table C.11 Terminate Key Establishment Command Status Field
Enumeration
Value
Description
0x00
Reserved
UNKNOWN_I
SSUER
0x01
BAD_KEY_CO
NFIRM
0x02
The device could not confirm that it shares the same key with
the corresponding device and has terminated the key
establishment.
BAD_MESSA
GE
0x03
113
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
114
Annex C
Key Establishment Cluster
Enumeration
Value
Description
NO_RESOURC
ES
0x04
UNSUPPORTE
D_SUITE
0x05
0x06 0xFF
Reserved
Wait Time: This value indicates the minimum amount of time in seconds the
initiator device should wait before trying to initiate key establishment again. The
valid range is 0x00 to 0xFE.
KeyEstablishmentSuite: This value will be set the value of the
KeyEstablishmentSuite attribute. It indicates the list of key exchange methods
that the device supports.
C.3.1.3.3.4.2 Effect on Receipt
On receipt of the Terminate Key Establishment command the device shall
terminate key establishment with the sender. If the device receives a status of
BAD_MESSAGE or NO_RESOURCES it shall wait at least the time specified in
the Wait Time field before trying to re-initiate Key Establishment with the device.
If the device receives a status of UNKNOWN_SUITE it should examine the
KeyEstablishmentSuite field to determine if another suite can be used that is
supported by the partner device. It may re-initiate key establishment using that
one of the supported suites after waiting the amount of time specified in the Wait
Time field. If the device does not support any of the types in the
KeyEstablishmentSuite field, it should not attempt key establishment again with
that device.
If the device receives a status of UNKNOWN_ISSUER or
BAD_KEY_CONFIRM the device should not attempt key establishment again
with the device, as it is unlikely that another attempt will be successful.
C.3.1.3.4 Commands Generated
The client generates the commands detailed in sub-clause C.3.1.2.3, as well as
those used for reading and writing attributes.
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
115
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
116
Annex C
Key Establishment Cluster
CA's private key. A CA uses its private key to sign digital certificates and the CA
root key is used to verify these signatures. The trustworthiness of a public key is
confirmed by verifying the CA's signature of the digital certificate. Certificates
can be issued either by the device manufacturer, the device distributor, or the end
customer. For example, in practical situations, the CA may be a computer (with
appropriate key management software) that is kept physically secure at the end
customer's facility or by a third-party.
At the end of successful completion of the CBKE protocol the following security
services are offered:
Both devices share a secret link key
Implicit Key Authentication: Both devices know with whom they share this
link key.
Key Confirmation: Each device knows that the other device actually has
computed the key correctly
No Unilateral Key Control: No device has complete control over the shared
link key that is established.
Perfect Forward Secrecy: if the public key gets compromised none of future
and past communications are exposed
Known Key Security resilience: Each shared link key created per session is
unique
C.4.2.1
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
C.4.2.2
The following cryptographic primitives and data elements are defined for use with
the CBKE protocol specified in this document.
C.4.2.2.1 Elliptic-Curve Domain Parameters
The elliptic curve domain parameters used in this specification shall be those for
the curve ansit163k1 as specified in section 3.4.1 of SEC2 [B16].
All elliptic-curve points (and operations hereon) used in this specification shall be
(performed) on this curve.
C.4.2.2.2 Elliptic-Curve Point Representation
All elliptic-curve points shall be represented as point compressed octet strings as
specified in sections 2.3.3 and 2.3.4 of SEC1 [B15]. Thus, each elliptic-curve
point can be represented in 22 bytes.
C.4.2.2.3 Elliptic-Curve Key Pair
An elliptic-curve-key pair consists of an integer d and a point Q on the curve
determined by multiplying the generating point G of the curve by this integer (i.e.,
Q=dG) as specified in section 3.2.1 of SEC1 [B15]. Here, Q is called the public
key, whereas d is called the private key; the pair (d, Q) is called the key pair. Each
private key shall be represented as specified in section 2.3.7 of SEC1 [B15]. Each
public key shall be represented as defined in sub-clause C.4.2.1.2 of this
document.
C.4.2.2.4 ECC Implicit Certificates
The exact format of the 48-byte implicit certificate ICU used with CBKE scheme
shall be specified as follows:
ICU = PublicReconstrKey || Subject || Issuer || ProfileAttributeData
Where,
1 PublicReconstrKey: the 22-byte representation of the public-key reconstruction
117
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
118
Annex C
Key Establishment Cluster
ZigBee profile for any purpose. The first two bytes of this sequence is reserved
as a profile identifier, which must be defined by another ZigBee standard.
5 The string IU as specified in Step 6 of the actions of the CA in the implicit
C.4.2.2.5 Block-Cipher
The block-cipher used in this specification shall be the Advanced Encryption
Standard AES-128, as specified in FIPS Pub 197 [B13]. This block-cipher has a
key size that is equal to the block size, in bits, i.e., keylen= 128.
C.4.2.2.6 Cryptographic Hash Function
The cryptographic hash function used in this specification shall be the blockcipher
based cryptographic hash function specified in Annex B.6 in [B4], with the
following instantiations:
1 Each entity shall use the block-cipher E as specified in sub-clause B.1.1 in
[B4].
2 All integers and octets shall be represented as specified in sub-clause C.4.2.1.
clause C.4.2.2.6;
2 The block size B shall have the integer value 16 (this block size specifies the
length of the data integrity key, in bytes, that is used by the keyed hash
function, i.e., it uses a 128-bit data integrity key). This is also MacKeyLen, the
length of MacKey.
3 The output size HMAClen of the HMAC function shall have the same integer
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
119
C.4.2.3
Certificate-Based Key-Establishment
The CBKE method is used when the authenticity of both parties involved has not
been established and where implicit authentication of both parties is required prior
to key agreement.
The CBKE protocol has an identical structure to the PKKE protocol, except that
implicit certificates are used rather than manual certificates. The implicit
certificate protocol used with CBKE shall be the implicit certificate scheme with
associated implicit certificate generation scheme and implicit certificate
processing transformation as specified in SEC4 [B15], with the following
instantiations:
1 Each entity shall be a DEV;
2 Each entitys identifier shall be its 64-bit device address [B8]; the parameter
clause C.4.2.2.6;
The following additional information shall have been unambiguously established
between devices operating the implicit certificate scheme:
1 Each entity shall have obtained information regarding the infrastructure that
will be used for the operation of the implicit certificate scheme including a
certificate format and certificate generation and processing rules (see SEC4
[B15]);
2 Each entity shall have access to an authentic copy of the elliptic-curve public
keys of one or more certificate authorities that act as CA for the implicit
certificate scheme (SEC4 [B15]).
The methods by which this information is to be established are outside the scope
of this standard.
The methods used during the CBKE protocol are described below. The parameters
used by these methods are described in Table C.12.
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
120
Chapter C
Key Establishment Cluster
Parameter
Size (Octets)
Description
CERTU
48
CERTV
48
QEU
22
QEV
22
MACU
16
MACV
16
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
121
C.4.2.3.1.2 Responder
The responder device's implicit certificate CERTV and a newly generated
ephemeral public key QEV are transferred to the initiator device using the Initiate
Key Establishment response command via the Key Establishment Cluster Server.
C.4.2.3.2 Validate Implicit Certificates
C.4.2.3.2.1 Initiator
The initiator devices Key Establishment Cluster Client processes the Initiate Key
Establishment response command. The initiator device examines CERTV
(formatted as ICV as described in sub-clause C.4.2.2.4), confirms that the Subject
identifier is the purported owner of the certificate, and runs the certificate
processing steps described in section SEC4 [B16].
C.4.2.3.2.2 Responder
The responder devices Key Establishment Cluster Server processes the Initiate
Key Establishment command. The responder device examines CERTU (formatted
as ICU as described in sub-clause C.4.2.2.4), confirms that the Subject identifier is
the purported owner of the certificate, and runs the certificate processing steps
described in section SEC 4 [B16].
C.4.2.3.3 Derive Keying Material
C.4.2.3.3.1 Initiator
The initiator performs the Elliptic Curve MQV scheme as specified in section 6.2
of SEC1 [B15] with the following instantiations:
1 The elliptic curve domain parameters shall be as specified in sub-
clause C.4.2.2.1;
2 The KDF shall use the cryptographic hash function specified in sub-
clause C.4.2.2.2;
3 The static public key Q1,U shall be the static public key of the initiator;
4 The ephemeral public key Q2,U shall be an ephemeral public key of the initiator
5 The static public key Q1,V shall be the static public key of the responder
6 The ephemeral public key Q2,V shall be based on the point-compressed octet
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
122
Chapter C
Key Establishment Cluster
The initiator device derives the keying material MacKey and KeyData from the
output K as specified in section 3.6.1 of SEC1 [B15] by using MacKey as the
leftmost MacKeyLen octets of K and KeyData as the rightmost KeyDataLen octets
of K. KeyData is used subsequently as the shared secret and MacKey is used for
key confirmation.
C.4.2.3.3.2 Responder
The responder performs the Elliptic Curve MQV scheme as specified in section
6.2 of SEC1 [B15] with the following instantiations:
1 The elliptic curve domain parameters shall be as specified in sub-
clause C.4.2.2.1;
2 The KDF shall use the cryptographic hash function specified in sub-
clause C.4.2.2.2;
3 The static public key Q1,U shall be the static public key of the initiator obtained
4 The ephemeral public key Q2,U shall be based on the point-compressed octet
5 The static public key Q1,V shall be the static public key of the responder;
6 The ephemeral public key Q2,V shall be an ephemeral public key of the
The responder device derives the keying material MacKey and KeyData from the
output K as specified in section 3.6.1 of SEC1 [B15] by using MacKey as the
leftmost MacKeyLen octets of K and KeyData as the rightmost KeyDataLen octets
of K. KeyData is used subsequently as the shared secret and MacKey is used for
key confirmation.
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
123
C.5.1.1
CA Public Key
C.5.1.2
Responder Data
The following is the certificate for device 1. The device has an IEEE of
(>)0000000000000001, and will be the responder.
03 04 5F DF C8 D8 5F FB
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
124
Chapter C
Key Establishment Cluster
8B 39 93 CB 72 DD CA A5
5F 00 B3 E8 7D 6D 00 00
00 00 00 00 00 01 54 45
53 54 53 45 43 41 01 09
00 06 00 00 00 00 00 00
03 04 5F DF C8 D8 5F FB 8B 39 93 CB 72 DD CA A5
Subject (IEEE)
00 00 00 00 00 00 00 01
Issuer
54 45 53 54 53 45 43 41
Attributes
01 09 00 06 00 00 00 00 00 00
5F 00 B3 E8 7D 6D
C.5.1.3
Initiator Data
02 06 15 E0 7D 30 EC A2
DA D5 80 02 E6 67 D9 4B
C1 B4 22 39 83 07 00 00
00 00 00 00 00 02 54 45
53 54 53 45 43 41 01 09
00 06 00 00 00 00 00 00
02 06 15 E0 7D 30 EC A2 DA D5 80 02 E6 67 D9
4B C1 B4 22 39 83 07
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
Subject (IEEE)
00 00 00 00 00 00 00 02
Issuer
54 45 53 54 53 45 43 41
Attributes
01 09 00 06 00 00 00 00 00 00
125
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
126
Chapter C
Key Establishment Cluster
Initiator
Responder
Initiate Key Establishment Request
APS Ack
time
APS Ack
Ephemeral Data
Request
APS Ack
Ephemeral Data esponse
R
APS Ack
Confirm Key Request
APS Ack
Confirm Key Response
APS Ack
C.5.2.1
The following is the APS message sent by the initiator (device 2) to the responder
(device 1) for the initiate key establishment request.
40 0A 00 08 09 01 0A 01
01 00 00 01 00 03 06 02
06 15 E0 7D 30 EC A2 DA
D5 80 02 E6 67 D9 4B C1
B4 22 39 83 07 00 00 00
00 00 00 00 02 54 45 53
54 53 45 43 41 01 09 00
06 00 00 00 00 00 00
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
APS Header
Frame Control
0x40
Destination Endpoint
0x0A
Cluster Identifier
0x0800
Profile ID
0x0109
Source Endpoint
0x0A
APS Counter
0x01
ZCL Header
Frame Control
0x01
Sequence Number
0x00
Command Identifier
0x00
0x0001
ECMQV
0x03
0x06
Identity (IDU)
C.5.2.2
Client to Server
The following is the APS message sent by the responder (device 1) to the initiator
(device 2) for the initiate key establishment response.
40 0A 00 08 09 01 0A 01
09 00 00 01 00 03 06 03
04 5F DF C8 D8 5F FB 8B
39 93 CB 72 DD CA A5 5F
00 B3 E8 7D 6D 00 00 00
00 00 00 00 01 54 45 53
54 53 45 43 41 01 09 00
06 00 00 00 00 00 00
127
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
128
Chapter C
Key Establishment Cluster
APS Header
Frame Control
0x40
Destination Endpoint
0x0A
Cluster Identifier
0x0800
Profile ID
0x0109
Source Endpoint
0x0A
APS Counter
0x01
ZCL Header
Frame Control
0x09
Sequence Number
0x00
Command Identifier
0x00
0x0001
ECMQV
0x03
0x06
Identity (IDV)
C.5.2.3
Server to Client
The following is the APS message sent by the initiator to the responder for the
ephemeral data request.
40 0A 00 08 09 01 0A 02
01 01 01 03 00 E1 17 C8
6D 0E 7C D1 28 B2 F3 4E
90 76 CF F2 4A F4 6D 72
88
APS Header
Frame Control
0x40
Destination Endpoint
0x0A
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
Cluster Identifier
0x0800
Profile ID
0x0109
Source Endpoint
0x0A
APS Counter
0x02
ZCL Header
Frame
Control
0x01
Client to Server
Sequence
Number
0x01
Command
Identifier
0x01
Ephemeral
Data (QEU)
03 00 E1 17 C8 6D 0E 7C
D1 28 B2 F3 4E 90 76 CF
F2 4A F4 6D 72 88
C.5.2.4
The following is the APS message sent by the responder to the initiator for the
ephemeral data response.
40 0A 00 08 09 01 0A 02
09 01 01 03 06 AB 52 06
22 01 D9 95 B8 B8 59 1F
3F 08 6A 3A 2E 21 4D 84
5E
APS Header
Frame Control
0x40
Destination Endpoint
0x0A
Cluster Identifier
0x0800
Profile ID
0x0109
Source Endpoint
0x0A
APS Counter
0x02
129
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
130
Chapter C
Key Establishment Cluster
ZCL Header
Frame Control
0x09
Server to Client
Sequence
Number
0x01
Command
Identifier
0x01
Ephemeral
Data (QEV)
03 06 AB 52 06 22 01 D9
95 B8 B8 59 1F 3F 08 6A
3A 2E 21 4D 84 5E
C.5.2.5
The following is the APS message sent by the initiator to the responder for the
confirm key request.
40 0A 00 08 09 01 0A 03
01 02 02 B8 2F 1F 97 74
74 0C 32 F8 0F CF C3 92
1B 64 20
APS Header
Frame Control
0x40
Destination Endpoint
0x0A
Cluster Identifier
0x0800
Profile ID
0x0109
Source Endpoint
0x0A
APS Counter
0x02
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
ZCL Header
Frame Control
0x01
Sequence
Number
0x02
Command
Identifier
0x02
Secure
Message
Authentication
Code (MACU)
B8 2F 1F 97 74 74 0C 32
F8 0F CF C3 92 1B 64 20
C.5.2.6
Client to Server
The following is the APS message sent by the responder to the initiator for the
confirm key response.
40 0A 00 08 09 01 0A 03
09 02 02 79 D5 F2 AD 1C
31 D4 D1 EE 7C B7 19 AC
68 3C 3C
APS Header
Frame Control
0x40
Destination Endpoint
0x0A
Cluster Identifier
0x0800
Profile ID
0x0109
Source Endpoint
0x0A
APS Counter
0x02
ZCL Header
Frame Control
0x09
Server to Client
131
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
132
Chapter C
Key Establishment Cluster
Sequence Number
0x02
Command Identifier
0x02
79 D5 F2 AD 1C 31 D4 D1
EE 7C B7 19 AC 68 3C 3C
Initiator
Responder
M(U)
M(V)
ID(U)
ID(V)
E(U)
E(V)
E-P(U)
E-P(V)
CA
Cert(U)
Initiator's Certificate
Cert(V)
Responder's Certificate
Private(U)
Private(V)
Shared Data
A shared secret
C.5.3.1
ECMQV Primitives
It is assumed that an ECC library is available for creating the shared secret given
the local private key, local ephemeral public & private key, remote device's
certificate, remote device's ephemeral public key, and the certificate authority's
Copyright 2008 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
public key. Further it is assumed that this library has been separately validated
with a set of ECC test vectors. Those test vectors are outside the scope of this
document.
C.5.3.2
C.5.3.3
Initiator Transform
Upon receipt of the responder's ephemeral data response, the initiator has all the
data necessary to calculate the shared secret and derive the data for the confirm
key request (SMAC).
C.5.3.3.1 Ephemeral Data
Public Key
03 00 E1 17 C8 6D 0E 7C D1 28 B2 F3 4E 90 76 CF F2 4A F4 6D
72 88
Private Key
00 13 D3 6D E4 B1 EA 8E 22 73 9C 38 13 70 82 3F 40 4B FF 88
62
CA )
2 Derive the Keying data
a Hash-1 = Z || 00 00 00 01 || SharedData
b Hash-2 = Z || 00 00 00 02 || SharedData
3 Parse KeyingData as follows
a MacKey = First 128 bits (Hash-1) of KeyingData
b KeyData = Second 128 bits (Hash-2) of KeyingData
1 Create MAC(U)
a MAC(U) = MAC(MacKey) { M(U) || ID(U) || ID(V) || E(U) || E(V) }
2 Send MAC(U) to V.
3 Receive MAC(V) from V.
4 Calculate MAC(V)'
a MAC(V) = MAC(MacKey) { M(V) || ID(V) || ID(U) || E(V) || E(U) }
Copyright 2008 ZigBee Standards Organization. All rights reserved.
133
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
134
Chapter C
Key Establishment Cluster
CA )
00 E0 D2 C3 CC D5 C1 06 A8 9C 4F 6C C2 6A 5F 7E
C9 DF 78 A7 BE
Concatenation
00 E0 D2 C3 CC D5 C1 06 A8 9C 4F 6C C2 6A 5F 7E
C9 DF 78 A7 BE 00 00 00 01
Hash
90 F9 67 B2 2C 83 57 C1 0C 1C 04 78 8D E9 E8 48
b Hash-2 = Z || 00 00 00 02 || SharedData
Concatenation
00 E0 D2 C3 CC D5 C1 06 A8 9C 4F 6C C2 6A 5F 7E
C9 DF 78 A7 BE 00 00 00 02
Hash
86 D5 8A AA 99 8E 2F AE FA F9 FE F4 96 06 54 3A
Concatenation
02
01
CF
B8
00
03
F2
B8
00
00
4A
59
00
E1
F4
1F
00
17
6D
3F
00
C8
72
08
00
6D
88
6A
00
0E
03
3A
02
7C
06
2E
00
D1
AB
21
00
28
52
4D
00
B2
06
84
00
F3
22
5E
00
4E
01
88
00
90
D9
00
00
76
95
10
Hash
B8 2F 1F 97 74 74 0C 32 F8 0F CF C3 92 1B 64 20
5 Send MAC(U) to V.
6 Receive MAC(V) from V.
Copyright 2008 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
135
7 Calculate MAC(V)'
a MAC(V) = MAC(MacKey) { M(V) || ID(V) || ID(U) || E(V) || E(U) }
Concatenation
03
02
6A
28
00
03
3A
B2
00
06
2E
F3
00
AB
21
4E
00
52
4D
90
00
06
84
76
00
22
5E
CF
00
01
03
F2
01
D9
00
4A
00
95
E1
F4
00
B8
17
6D
00
B8
C8
72
00
59
6D
88
00
1F
0E
88
00
3F
7C
00
00
08
D1
10
Hash
79 D5 F2 AD 1C 31 D4 D1 EE 7C B7 19 AC 68 3C 3C
C.5.3.4
Responder Transform
Upon receipt of the initiator's confirm key request, the responder has all the data
necessary to calculate the shared secret, validate the initator's confirm key
message, and derive the data for the confirm key response (SMAC).
C.5.3.4.1 Ephemeral Data
Public Key
03 06 AB 52 06 22 01 D9 95 B8 B8 59 1F 3F 08 6A 3A 2E 21
4D 84 5E
Private Key
03 D4 8C 72 10 DD BC C4 FB 2E 5E 7A 0A A1 6A 0D B8 95 40
82 0B
CA )
2 Derive the Keying data
a Hash-1 = Z || 00 00 00 01 || SharedData
b Hash-2 = Z || 00 00 00 02 || SharedData
3 Parse KeyingData as follows
a MacKey = First 128 bits (Hash-1) of KeyingData
b KeyData = Second 128 bits (Hash-2) of KeyingData
4 Create MAC(V)
a MAC(V) = MAC(MacKey) { M(V) || ID(V) || ID(U) || E(V) || E(U) }
Copyright 2008 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
136
Chapter C
Key Establishment Cluster
5 Calculate MAC(U)'
a MAC(U) = MAC(MacKey) { M(U) || ID(U) || ID(V) || E(U) || E(V) }
6 Verify MAC(U)' is the same as MAC(U).
7 Send MAC(V) to U.
CA )
00 E0 D2 C3 CC D5 C1 06 A8 9C 4F 6C C2 6A 5F 7E
C9 DF 78 A7 BE
Concatenation
00 E0 D2 C3 CC D5 C1 06 A8 9C 4F 6C C2 6A 5F 7E
C9 DF 78 A7 BE 00 00 00 01
Hash
90 F9 67 B2 2C 83 57 C1 0C 1C 04 78 8D E9 E8 48
b Hash-2 = Z || 00 00 00 02 || SharedData
Concatenation
00 E0 D2 C3 CC D5 C1 06 A8 9C 4F 6C C2 6A 5F 7E
C9 DF 78 A7 BE 00 00 00 02
Hash
86 D5 8A AA 99 8E 2F AE FA F9 FE F4 96 06 54 3A
Concatenation
03
02
6A
28
00
03
3A
B2
00
06
2E
F3
00
AB
21
4E
00
52
4D
90
00
06
84
76
00
22
5E
CF
00
01
03
F2
01
D9
00
4A
00
95
E1
F4
00
B8
17
6D
00
B8
C8
72
00
59
6D
88
00
1F
0E
88
00
3F
7C
00
00
08
D1
10
Hash
Copyright 2008 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
137
79 D5 F2 AD 1C 31 D4 D1 EE 7C B7 19 AC 68 3C 3C
5 Calculate MAC(V)'
a MAC(U) = MAC(MacKey) { M(U) || ID(U) || ID(V) || E(U) || E(V) }
Concatenation
02
01
CF
B8
00
03
F2
B8
00
00
4A
59
00
E1
F4
1F
00
17
6D
3F
00
C8
72
08
00
6D
88
6A
00
0E
03
3A
02
7C
06
2E
00
D1
AB
21
00
28
52
4D
00
B2
06
84
00
F3
22
5E
00
4E
01
88
00
90
D9
00
00
76
95
10
Hash
B8 2F 1F 97 74 74 0C 32 F8 0F CF C3 92 1B 64 20
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
138
Chapter C
Key Establishment Cluster
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
N N E X
D
ANNEX DSMART ENERGY CLUSTER DESCRIPTIONS
The candidate material in this annex describing the Smart Energy Clusters, when
approved, will be merged into the Foundation document of the ZigBee Cluster
Library (ZCL) by the Cluster Library Development Board.
139
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
140
Annex D
Smart Energy Cluster Descriptions
or necessary for use in conjunction with other fields, the whole message can be
ignored.
To enable future growth and ensure backwards compatibility, any existing devices
which encounter any fields applied after the end of a command shall treat them as
reserved fields. The future addition of fields applied after the end of defined
cluster commands are reserved solely for ZigBee specifications, Manufacturers
shall not add fields after the end of commands.18
Smart Energy
Device
ESP
S
C = Client
Figure D.1
S = Server
Demand Response/Load Control Cluster Client Server Example
Please note the ESP is defined as the Server due to its role in acting as the proxy
for upstream demand response/load control management systems and subsequent
data stores.
D.2.2 Server
By default the ESP will be labeled as the Server side in the cluster descriptions,
being able to initiate load control commands to other devices in the network.
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
D.2.2.1
Dependencies
Events carried using this cluster include a timestamp with the assumption that
target devices maintain a real time clock. Devices can acquire and synchronize
their internal clocks with the ESP as described in sub-clause 5.11.1.1.
If a device does not support a real time clock, its assumed the device will ignore
all values within the Time field except the Start Now value within the Time
field.
Additionally, for devices without a real time clock, its assumed those devices will
utilize a method (i.e. ticks, countdowns, etc.) to approximate the correct duration
period.
D.2.2.2
Attributes
There are no attributes for the Demand Response and Load Control Cluster server.
D.2.2.3
Commands Generated
The command IDs generated by the Demand Response and Load Control cluster
server are listed in Table D.1.
Table D.1 Command IDs for the Demand Response and Load Control Server
Command Identifier
Field Value
Description
Mandatory/
Optional
0x00
0x01
0x02
0x03 0xff
Reserved
141
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
142
Annex D
Smart Energy Cluster Descriptions
Octets
Data
Type
Unsigned
32-bit
integer
16-bit
BitMap
Unsigned
8-bit
integer
UTC
Time
Unsigned
16-bit
integer
Unsigned
8-bit
integer
Unsigned
8-bit
integer
Field
Name
Issuer
Event ID
(M)
Device
Class
(M)
Utility
Enrolme
nt Group
(M)
Start
Time (M)
Duration
In
Minutes
(M)
Criticalit
y Level
(M)
Cooling
Temperat
ure
Offset
(O)
Octets
Data
Type
Unsigned
8-bit
integer
Signed
16-bit
integer
Signed
16-bit
integer
Signed
8-bit
integer
Unsigned
8-bit
integer
8-bit
BitMap
Field
Name
Heating
Temperat
ure
Offset
(O)
Cooling
Temperat
ure Set
Point (O)
Heating
Temperat
ure Set
Point (O)
Average
Load
Adjustme
nt
Percenta
ge (O)
Duty
Cycle
(O)
Event
Control
(M)
Figure D.2
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
thermostat itself is not subject to load shed but controls devices that are subject to
load shed.) The encoding of this field is in Table D.2:
Table D.2 Device Class Field BitMap/Encoding
Bit
Description
Water Heater
Pool Pump/Spa/Jacuzzi
Smart Appliances
Irrigation Pump
Exterior Lighting
Interior Lighting
10
Electric Vehicle
11
Generation Systems
12 to 15
Reserved
Device manufacturers shall recognize the Device Class or set of Devices Classes
that corresponds to its functionality. For example, a thermostat (PCT) may react
when Bit 0 is set since it controls the HVAC and/or furnace. Another example is a
device that acts like an EMS where it controls exterior lights, interior lights, and
simple misc. load control devices. In this case the EMS would react when Bits 7,
8, or 9 are set individually or in combination.
Utility Enrolment Group (mandatory): The Utility Enrolment Group field can
be used in conjunction with the Device Class bits. It provides a mechanism to
direct Load Control Events to groups of Devices. Example, by assigning two
different groups relating to either Demand Response programs or geographic
areas, Load Control Events can be further directed for a sub-set of Device Classes
(i.e. Device Class Bit 0 and Utility Enrolment Group #1 vs. Device Class Bit0 and
Utility Enrolment Group #2). 0x00 addresses all groups, and values 0x01 to 0xFF
address individual groups that match. Please refer to sub-clause D.2.3.2.1 for
further details.
If the Device Class and/or Utility Enrolment Group fields dont apply to your End
Device, the Load Control Event command is ignored.
Copyright 2008 ZigBee Standards Organization. All rights reserved.
143
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
144
Annex D
Smart Energy Cluster Descriptions
Criticality Level
Level Description
Participation
Reserved
Green
Voluntary
Voluntary
Voluntary
Voluntary
Voluntary
Voluntary
Emergency
Mandatory
Planned Outage
Mandatory
Service Disconnect
Mandatory
0x0A to 0x0F
Utility Defined
Utility Defined
0x10 to 0xFF
Reserved
The criticality level 0x0 and 0x10 to 0xFF are reserved for future profile changes
and not used.
Green event, level 0x01, may be used to denote that the energy delivered uses
an abnormal amount from non-green sources. Participation in this event is
voluntary.
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
145
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
146
Annex D
Smart Energy Cluster Descriptions
Cooling Temperature Set Point (optional): Requested cooling set point in 0.01
degrees Celsius.
Heating Temperature Set Point (optional): Requested heating set point in 0.01
degrees Celsius.
Cooling and heating temperature set points will be defined and calculated per the
LocalTemperature attribute in the Thermostat Cluster [B2].
These fields represent the temperature in degrees Celsius, as follows:
Cooling Temperature Set Point / 100 = temperature in degrees Celsius
Where -273.15C <= temperature <= 327.66C, corresponding to a Cooling and/
or Heating Temperature Set Point in the range 0x954d to 0x7fff.
The maximum resolution this format allows is 0.01C.
A Cooling or Heating Temperature Set Point of 0x8000 indicates that the
temperature set point is not used.
If a temperature is sent that exceeds the temperature limit boundaries that are
programmed into the thermostat, the thermostat should respond by setting the
temperature at the limit.
The thermostat shall not use a Cooling or Heating Temperature Set Point that
causes the device to use more energy than the normal setting.
When both a Temperature Offset and a Temperature Set Point are provided, the
thermostat may use either as defined by the device manufacturer. The thermostat
should use the setting that provides the lowest energy consumption.
Average Load Adjustment Percentage (optional): Defines a maximum energy
usage limit as a percentage of the client implementations specific average energy
usage. The load adjustment percentage is added to 100% creating a percentage
limit applied to the client implementations specific average energy usage. A -10%
load adjustment percentage will establish an energy usage limit equal to 90% of
the client implementations specific average energy usage. Each load adjustment
percentage is referenced to the client implementations specific average energy
usage. There are no cumulative effects.
The range of this field is -100 to +100 with a resolution of 1 percent. A -100%
value equals a total load shed. A +100% value will limit the energy usage to the
client implementations specific average energy usage.
A value of 0x80 indicates the field is not used. All other values are reserved for
future use.
Duty Cycle (optional): Defines the maximum On state duty cycle as a percentage
of time. Example, if the value is 80, the device would be in an on state for 80%
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
of the time for the duration of the event. Range of the value is 0 to 100. A value of
0xFF indicates the field is not used. All other values are reserved for future use.
Duty cycle control is a device specific issue and shall be managed by the device
manufacturer. It is expected that the duty cycle of the device under control will
span the shortest practical time period in accordance with the nature of the device
under control and the intent of the request for demand reduction. For typical
Device Classes, one minute for each 10% of duty cycle is recommended. It is
expected that the off state will precede the on state.
Event Control (mandatory): Identifies additional control options for the event.
The BitMap for this field is described in Table D.4.
Table D.4 Event Control Field BitMap
Bit
Description
2 to 7
Reserved
Note: The randomization attribute will be used in combination with two bits to
determine if the Event Start and Stop Times are randomized. By default devices
will randomize the start and stop of an event. Refer to sub-clause D.2.3.2.2 and
sub-clause D.2.3.2.3 for the settings of these values.
D.2.2.3.1.1.2 When Generated
This command is generated when the ESP wants to control one or more load
control device(s), usually as the result of an energy curtailment command from the
Smart Energy network.
D.2.2.3.1.1.3 Responses to Load Control Event
The server receives the cluster specific commands detailed in subclause D.2.3.3.1.
D.2.2.3.2 Cancel Load Control Event
D.2.2.3.2.1 Payload Format
The Cancel Load Control Event command payload shall be formatted as
illustrated in Figure D.3.
147
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
148
Annex D
Smart Energy Cluster Descriptions
Octets
Data Type
Field
Name
Unsigned
32-bit integer
16-bit BitMap
Issuer Event
ID
Device Class
(M)
Figure D.3
Unsigned
8-bit integer
8-bit BitMap
UTCTime
Utility
Enrollment
Group (M)
Cancel
Control
Effective
Time
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
Bit
Description
To be used when the Event is currently in process and acted upon as specified by
the Effective Time field of the Cancel Load Control Event command.
A value of Zero (0) indicates that randomization is overridden and the event
should be terminated immediately at the Effective Time.
A value of One (1) indicates the event should end using randomization settings in
the original event.
1 to 7
Reserved
149
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
150
Annex D
Smart Energy Cluster Descriptions
Figure D.4
Octets
Data Type
8-bit BitMap
Field Name
Cancel Control
Bit
Description
1 to 7
Reserved
D.2.3 Client
This section identifies the attributes and commands provided by Client devices.
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
D.2.3.1
Dependencies
Devices receiving and acting upon Load Control Event commands must be
capable of storing and supporting at least three unique instances of events. As a
highly recommended recovery mechanism, when maximum storage of events has
been reached and additional Load Control Events are received that are unique (not
superseding currently stored events), devices should ignore additional Load
Control Events and when storage becomes available, utilize the
GetScheduledEvents command to retrieve any previously ignored events.
Events carried using this cluster include a timestamp with the assumption that
target devices maintain a real time clock. Devices can acquire and synchronize
their internal clocks with the ESP as described in sub-clause 5.11.1.1.
If a device does not support a real time clock, its assumed the device will ignore
all values within the Time field except the Start Now value within the Time
field.
Additionally, for devices without a real time clock its assumed those devices will
utilize a method (i.e. ticks, countdowns, etc.) to approximate the correct duration
period.
D.2.3.2
Identifier
Name
Type
Range
Access
Default
Mandatory/
Optional
0x0000
UtilityEnrolmentG
roup
Unsigned
8 bit
Integer
0x00 to
0xFF
Read/
Write
0x00
0x0001
StartRandomizeMi
nutes
Unsigned
8 bit
Integer
0x00 to
0x3C
Read/
Write
0x1E
0x0002
StopRandomizeMi
nutes
Unsigned
8 bit
Integer
0x00 to
0x3C
Read/
Write
0x1E
0x0003
DeviceClassValue
Unsigned
16 bit
Integer
0x00 to
0xFF
Read
0x0004 to
0xFFFF
Reserved
151
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
152
Annex D
Smart Energy Cluster Descriptions
The
The
The
D.2.3.3
Commands Generated
The command IDs generated by the Demand Response and Load Control client
cluster are listed in Table D.8.
Table D.8 Generated Command IDs for the Demand Response
Description
Mandatory/
Optional
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
153
0x01
0x02 0xff
Reserved
Octets
Data
Type
Unsigned
32-bit
integer
Unsigned
8-bit
integer
UTCTime
Unsigned
8-bit
integer
Unsigned
16-bit
integer
Unsigned
16-bit
integer
Issuer Event
ID (M)
Event
Status (M)
Event
Status
Time (M)
Criticality
Level
Applied
(M)
Cooling
Temperature
Set Point
Applied (O)
Heating
Temperatur
e Set Point
Applied (O)
Octets
42
Data
Type
Signed
8-bit
integer
Unsigned
8-bit
integer
8-bit
BitMap
Unsigned
8-bit
integer
Duty
Cycle
Applied
(O)
Event
Control
(M)
Signature
Type
Signature (M)
Field
Name
Average
Load
Adjustment
Percentage
Applied (O)
Field
Name
Figure D.5
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
154
Annex D
Smart Energy Cluster Descriptions
Event Status (mandatory): Table D.9 lists the valid values returned in the Event
Status field.
Table D.9 Event Status Field Values
Value
Description
0x00
0x01
0x02
Event started
0x03
Event completed
0x04
User has chosen to "Opt-Out", user will not participate in this event
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B to 0xF7
0xF8
0xF9
0xFA
Reserved
0xFB
Rejected - Event was received after it had expired (Current Time > Start Time +
Duration)
0xFC
0xFD
0xFE
0xFF
Should a device issue one or more OptOut or OptIn RES commands during
an event that is eventually cancelled, the event shall be recorded as a cancelled
event (Status = 0x06) at its effective time.
Should a device issue one or more OptOut or OptIn RES commands during
an event that is not cancelled, the event shall be recorded as partially completed
based on the last RES command sent (Status = 0x08 or 0x09).
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
Signature Type
0x00
Reserved
0x01
ECDSA
0x02 to 0xFF
Reserved
155
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
156
Annex D
Smart Energy Cluster Descriptions
Report Event Status command (listed in Figure D.5) through ECDSA using the
device's ECC Private Key, generating the signature (r,s). Note: ECDSA
internally uses the MMO hash function in place of the internal SHA-1 hash
function.
2 Concatenate ECDSA signature components (r,s) and place into the Signature
field within the Report Event Status command. Note: the lengths of r and s are
implicit, based on the curve used. Verifying the signature will require breaking
the signature field back into the discrete components r and s, based on the
length.
D.2.3.3.1.2 When Generated
This command is generated when the client device detects a change of state for an
active Load Control event. (The transmission of this command should be delayed
after a random delay between 0 and 5 seconds, to avoid a potential storm of
packets.)
D.2.3.3.2 Get Scheduled Events Command
This command is used to request that all scheduled Load Control Events, starting at or
after the supplied Start Time, are re-issued to the requesting device. When received by
the Server, one or more Load Control Event commands (see sub-clause D.2.2.3.1) will
be sent covering both active and scheduled Load Control Events.
D.2.3.3.2.1 Payload Format
The Get Scheduled Events command payload shall be formatted as illustrated in
Figure D.6
Octets
UTCTime
Unsigned
8-bit integer
Start
Time (M)
Number of
Events (M)
Data Type
Field Name
Figure D.6
Start Time (mandatory): UTC Timestamp representing the starting time for any
scheduled events to be re-sent.
Copyright 2008 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
D.2.3.4
Commands Received
The client receives the cluster specific commands detailed in sub-clause D.2.2.
D.2.3.5
Attribute Reporting
Attribute reporting is not expected to be used for this cluster. The Client side
attributes are not expected to be changed by the Client, only used during Client
operations.
157
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
158
Annex D
Smart Energy Cluster Descriptions
D.2.4.1
D.2.4.1.1 Load Control Server, Identifying Use of SetPoint and Offset Fields
The use of the fields, Heating and Cooling Temperature Set Points and Heating
and Cooling Temperature Offsets is optional. All fields in the payload must be
populated. Non-use of these fields by the Server is indicated by using the
following values: 0x8000 for Set Points and 0xFF for Offsets. When any of these
four fields are indicated as optional, they shall be ignored by the client.
D.2.4.1.2 Load Control Server, Editing of Scheduled Events
Editing of a scheduled demand response event is not allowed. Editing of an active
demand response event is not allowed. Nested events and overlapping events are
not allowed. The current active event will be terminated if a new event is started.
D.2.4.2
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
When ending a load control event, the load control device will support the same
randomization features as provided in the start load control event.
D.2.4.2.2 Editing of DR Control Parameters
In Load Control Device and energy management systems, editing of the demand
response control parameters while participating in an active demand response
event is not allowed.
D.2.4.2.3 Response to Price Events + Load Control Events
The residential systems response to price driven events will be considered in
addition to the residential systems response to demand response events. Demand
response events which require that the residential system is turned off have
priority over price driven events. Demand response events which require that the
residential system go to a fixed setting point have priority over price driven
events. In this case, the thermostat shall not use a Cooling or Heating Temperature
Set Point that causes the device to use more energy than the price driven event
setting.
D.2.4.2.4 Thermostat/HVAC Controls
A residential HVAC system will be allowed to change mode, from off to Heat, off
to Cool, Cool to Heat, or Heat to Cool, during a voluntary event which is currently
active. The HVAC control must acknowledge the event, as if it was operating, in
that mode, at the start of the event. The HVAC control must obey the event rules
that would have been enforced if the system had been operating in that mode at
the start of the active event.
An event override message, opt-out, will be sent by the load control device or
energy management system if the operator chooses not to participate in a demand
response event by taking action to override the programmed demand reduction
response. The override message will be sent at the start of the event. In the case
where the event has been acknowledged and started, the override message will be
sent when the override occurs.
D.2.4.2.5 Demand Response and Load Control Transaction Examples
The following example in Figure D.7 depicts the transactions that would take
place for two events, one that is successful and another that is overridden by the
user.
159
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
160
Annex D
Smart Energy Cluster Descriptions
Head
End
AMI
Device
ESP
Load Curtailment ID=6
LoadControlEvent ( EventID=6, StartTime=1:00pm, Duration=60 min )
ReportEventStatus ( EventID=6, EventCode=CommandReceived )
User
Override
ReportEventStatus ( EventID=7, EventCode=OptOut )
Figure D.7
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
The example in Figure D.8 depicts the transactions that would take place when an
event is superseded by an event that is eventually cancelled.
Head
End
END
Device
ESP
Load Curtailment ID=8
LoadControlEvent ( EventID=8, StartTime=1:00pm, Duration=60 min )
ReportEventStatus ( EventID=8, EventCode=CommandReceived )
Figure D.8
Please refer to Annex E for more information regarding the management and
behavior of overlapping events.
161
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
162
Annex D
Smart Energy Cluster Descriptions
advanced forms or data sets from metering devices will be supported in the Smart
Energy Tunneling Cluster, which will be defined in sub-clause D.6.
The following figures identify three configurations as examples utilizing the
Simple Metering Cluster.
PCT
C
ESP
Metering Device
C
S
End Point ID=
In-Home Display
C
C = Client
Figure D.9
S = Server
Standalone ESP Model with Mains Powered Metering Device
The example above shown in Figure D.9, the metering device is the source of
information provided via the Simple Metering Cluster Server.
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
PCT
ESP
C
S
C
End Point ID=
Metering Device
S
End Point ID =
In-Home Display
C
C = Client
S = Server
Figure D.10 Standalone ESP Model with Battery Powered Metering Device
In the example above shown in Figure D.10, the metering device is running on
battery power and its duty cycle for providing information is unknown. Its
expected the ESP will act like mirrored image or a mailbox (Client) for the
metering device data, allowing other Smart Energy devices to gain access to the
metering devices data (provided via an image of its Simple Metering Cluster).
163
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
164
Annex D
Smart Energy Cluster Descriptions
PCT
S
End Point ID=
Metering Device
S
In-Home Display
C
C = Client
S = Server
In the example above shown in Figure D.11, much like the previous example in
Figure D.10, where the external metering device is running on battery power and
its duty cycle for providing information is unknown. Its expected the ESP will act
like a Client side mailbox for the external metering device data, allowing other
Smart Energy devices to gain access to the metering devices data (provided via
an image of its Simple Metering Cluster). Since the ESP can also contain an
integrated metering device where its information is also conveyed through the
Simple Metering Cluster, each device (external metering device mailbox and
integrated meter) will be available via independent EndPoint IDs. Other Smart
Energy devices that need to access the information must understand the ESP
cluster support by performing service discoveries. It can also identify if an
Endpoint ID is a mailbox/mirror of a metering device by reading the
MeteringDeviceType attribute (refer to sub-clause D.3.2.2.5.7).
In the above examples (Figure D.10 and Figure D.11), its expected the ESP
would perform Attribute Reads (or configure Attribute Reporting) and use the
GetProfile command to receive the latest information whenever the Metering
Device (EndPoint Z) wakes up. When received, the ESP will update its mailbox
(EndPoint ID Y in Figure D.10 and Figure D.11) to reflect the latest data
available.
Copyright 2008 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
Other Smart Energy devices can access EndPoint Y in the ESP to receive the
latest information just as it would to access information in the ESPs integrated
Electric meter (as in Figure D.11, EndPoint X) and other Metering devices (as in
Figure D.9, EndPoint A).
D.3.2 Server
D.3.2.1
Dependencies
D.3.2.2
Attributes
For convenience, the attributes defined in this specification are arranged into sets
of related attributes; each set can contain up to 256 attributes. Attribute identifiers
are encoded such that the most significant Octet specifies the attribute set and the
least significant Octet specifies the attribute within the set. The currently defined
attribute sets are listed in the following Table D.10.
Table D.10 Simple Metering Attribute Sets
Description
0x00
0x01
0x02
Meter Status
0x03
Formatting
0x04
0x05
0x06
Supply Limita
0x07 to 0xFF
Reserveda
a. CCB 974
165
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
166
Annex D
Smart Energy Cluster Descriptions
Likewise, the term Received refers to the quantity of Energy, Gas, or Water that
was received by the utility from the customer.
Table D.11 Reading Information Attribute Set
Defaul
t
Man.
/Opt.
Read
Only
0x000000000000
to
0xFFFFFFFFFFFF
Read
Only
Unsigned
48 bit
Integer
0x000000000000
to
0xFFFFFFFFFFFF
Read
Only
CurrentMaxDem
andReceived
Unsigned
48 bit
Integer
0x000000000000
to
0xFFFFFFFFFFFF
Read
Only
0x04
DFTSummation
Unsigned
48 bit
Integer
0x000000000000
to
0xFFFFFFFFFFFF
Read
Only
0x05
Daily Freeze
Time
Unsigned
16 bit
Integer
0x0000 to 0x183C
Read
Only
0x0000
0x06
PowerFactor
Signed 8
bit
Integer
-100 to +100
Read
Only
0x00
0x07
ReadingSnapSho
tTime
UTCTim
e
Read
Only
0x08
CurrentMaxDem
andDeliveredTi
me
UTCTim
e
Read
Only
0x09
CurrentMaxDem
andReceivedTim
e
UTCTim
e
Read
Only
0x10 to
0xFF
Reserved
Identifier
Name
Type
Range
Access
0x00
CurrentSummati
onDelivered
Unsigned
48 bit
Integer
0x000000000000
to
0xFFFFFFFFFFFF
0x01
CurrentSummati
onReceived
Unsigned
48 bit
Integer
0x02
CurrentMaxDem
andDelivered
0x03
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
167
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
168
Annex D
Smart Energy Cluster Descriptions
CurrentTier1Sum
mationDelivered
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x01
CurrentTier1Sum
mationReceived
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x02
CurrentTier2Sum
mationDelivered
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x03
CurrentTier2Sum
mationReceived
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x04
CurrentTier3Sum
mationDelivered
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFF
Read Only
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
169
CurrentTier3Sum
mationReceived
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x06
CurrentTier4Sum
mationDelivered
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x07
CurrentTier4Sum
mationReceived
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x08
CurrentTier5Sum
mationDelivered
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x09
CurrentTier5Sum
mationReceived
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x0A
CurrentTier6Sum
mationDelivered
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x0B
CurrentTier6Sum
mationReceived
Unsigned
48 bit
Integer
0x000000000000 to
0xFFFFFFFFFFFF
Read Only
0x0C
to
0xFF
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
170
Annex D
Smart Energy Cluster Descriptions
Identifier
Name
Type
Range
Access
Default
Man.
/ Opt.
0x00
Status
8 bit BitMap
0x00 to 0xFF
Read Only
0x00
0x01 to
0xFF
Reserved
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Reserved
Service
Disconnect
Open
Leak
Detect
Power
Quality
Power
Failure
Tamper
Detect
Low
Battery
Check
Meter
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
171
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
172
Annex D
Smart Energy Cluster Descriptions
Following table shows examples which demonstrate the relation between these
attributes.
Table D.15
Attribute
Example 1
Example 2
Example 3
52003
617
23629
UnitofMeasure
kWh
CCF
kWh
Multiplier
Divisor
1000
100
10000
False
False
True
Displayed value
00052
0012.34
14.177
Identifier
Name
Type
Range
Access
Default
Man./
Opt.
0x00
UnitofMeasure
8-bit
Enumeration
0x00 to
0xFF
Read
Only
0x00
0x01
Multiplier
Unsigned 24
bit Integer
0x000000
to
0xFFFFFF
Read
Only
0x02
Divisor
Unsigned 24
bit Integer
0x000000
to
0xFFFFFF
Read
Only
0x03
SummationFormattin
g
8 bit BitMap
0x00 to
0xFF
Read
Only
0x04
DemandFormatting
8 bit BitMap
0x00 to
0xFF
Read
Only
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
173
Identifier
Name
Type
Range
Access
Default
Man./
Opt.
0x05
HistoricalConsumpti
onFormatting
8 bit BitMap
0x00 to
0xFF
Read
Only
0x06
MeteringDeviceType
8 bit BitMap
0x00 to
0xFF
Read
Only
0x07 to
0xFF
Reserved
Values
Description
0x00
0x01
m3 (Cubic Meter) & m3/h (Cubic Meter per Hour) in pure Binary format.
0x02
ft3 (Cubic Feet) & ft3/h (Cubic Feet per Hour) in pure Binary format.
0x03
ccf ((100 or Centum) Cubic Feet) & ccf/h ((100 or Centum) Cubic Feet per
Hour) in pure Binary format.
0x04
US gl (US Gallons) & US gl/h (US Gallons per Hour) in pure Binary format.
0x05
IMP gl (Imperial Gallons) & IMP gl/h (Imperial Gallons per Hour) in pure
Binary format.
0x06
0x07
0x08
0x09
0x0A to 0x7F
0x80
0x81
m3 (Cubic Meter) & m3/h (Cubic Meter per Hour) in BCD format
0x82
ft3 (Cubic Feet) & ft3/h (Cubic Feet per Hour) in BCD format
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
174
Annex D
Smart Energy Cluster Descriptions
Values
Description
0x83
ccf ((100 or Centum) Cubic Feet) & ccf/h ((100 or Centum) Cubic Feet per
Hour) in BCD format
0x84
US gl (US Gallons) & US gl/h (US Gallons per Hour) in BCD format
0x85
IMP gl (Imperial Gallons) & IMP gl/h (Imperial Gallons per Hour) in BCD
format
0x86
0x87
0x88
0x89
0x8A to 0xFF
Please Note: When using BCD for meter reads, the values A to F are special
values or indicators denoting Opens, Shorts, and etc. conditions when reading
meter register hardware. Any SE device displaying the BCD based values to end
users should use a non-decimal value to replace the A to F. In other words, a
device could use an * in place of the special values or indicators.
D.3.2.2.4.2 Multiplier Attribute
provides a value to be multiplied against a raw or uncompensated sensor
count of Energy, Gas, or Water being measured by the metering device. If present,
this attribute must be applied against all summation, consumption and demand
values to derive the delivered and received values expressed in the unit of measure
specified. This attribute must be used in conjunction with the Divisor Attribute.
Multiplier
SummationFormatting
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
175
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
176
Annex D
Smart Energy Cluster Descriptions
Values
Description
Electric Metering
Gas Metering
Water Metering
Pressure Metering
Heat Meteringb
Cooling Meteringc
7d to 127
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
177
Values
Description
128
129
130
131
132
133
134 to 255
a. CCB 986
b. CCB 986
c. CCB 986
d. CCB 986
e. CCB 986
f. CCB 986
Note: Heat and cooling meters are used for measurement and billing of heat (and
cooling) delivered through liquid (water) based central heating systems. The
consumers are typically billed by the kWh, calculated from the flow and the
temperatures in and out.19
D.3.2.2.5 ESP Historical Consumption
The ESP Historical Attribute Set is defined in Table D.19.
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
178
Annex D
Smart Energy Cluster Descriptions
Identifier
Name
Type
Range
Access
Default
Man./
Opt.
0x00
InstantaneousDemand
Signed 24
bit Integer
0x000000
to
0xFFFFFF
Read
Only
0x00
0x01
CurrentDayConsumpti
onDelivered
Unsigned
24 bit
Integer
0x000000
to
0xFFFFFF
Read
Only
0x02
CurrentDayConsumpti
onReceived
Unsigned
24 bit
Integer
0x000000
to
0xFFFFFF
Read
Only
0x03
PreviousDayConsumpt
ionDelivered
Unsigned
24 bit
Integer
0x000000
to
0xFFFFFF
Read
Only
0x04
PreviousDayConsumpt
ionReceived
Unsigned
24 bit
Integer
0x000000
to
0xFFFFFF
Read
Only
0x05
CurrentPartialProfileIn
tervalStartTimeDeliver
ed
UTCTime
Read
Only
0x06
CurrentPartialProfileIn
tervalStartTimeReceiv
ed
UTCTime
0x000000
to
0xFFFFFF
Read
Only
0x07
CurrentPartialProfileIn
tervalValueDelivered
Unsigned
24 bit
Integer
0x000000
to
0xFFFFFF
Read
Only
-a
Ob
0x08
CurrentPartialProfileIn
tervalValueReceived
Unsigned
24 bit
Integer
0x000000
to
0xFFFFFF
Read
Only
-c
Od
0x09 to
0xFF
Reserved
a. CCB 982
b. CCB 982
c. CCB 982
d. CCB 982
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
the premise where negative values indicate demand received from the premise.
InstantaneousDemand is updated continuously as new measurements are made.
The frequency of updates to this field is specific to the metering device, but
should be within the range of once every second to once every 5 seconds.
D.3.2.2.5.2 CurrentDayConsumptionDelivered Attribute
CurrentDayConsumptionDelivered represents the summed value of Energy, Gas,
or Water generated and delivered to the premise since midnight local time. If
optionally provided, CurrentDayConsumptionDelivered is updated continuously
as new measurements are made.
D.3.2.2.5.3 CurrentDayConsumptionReceived Attribute
CurrentDayConsumptionReceived represents the summed value of Energy, Gas,
or Water generated and received from the premise since midnight local time. If
optionally provided, CurrentDayConsumptionReceived is updated continuously
as new measurements are made.
D.3.2.2.5.4 PreviousDayConsumptionDelivered Attribute
PreviousDayConsumptionDelivered represents the summed value of Energy, Gas,
or Water generated and delivered to the premise within the previous 24 hour
period starting at midnight local time. If optionally provided,
CurrentDayConsumptionDelivered is updated every midnight local time.
D.3.2.2.5.5 PreviousDayConsumptionReceived Attribute
PreviousDayConsumptionReceived represents the summed value of Energy, Gas,
or Water generated and received from the premise within the previous 24 hour
period starting at midnight local time. If optionally provided,
CurrentDayConsumptionReceived is updated is updated every midnight local
time.
D.3.2.2.5.6 CurrentPartialProfileIntervalStartTimeDelivered Attribute
CurrentPartialProfileIntervalStartTimeDelivered represents the start time of the
current Load Profile interval being accumulated for commodity delivered.
D.3.2.2.5.7 CurrentPartialProfileIntervalStartTimeReceived Attribute
CurrentPartialProfileIntervalStartTimeReceived represents the start time of the
current Load Profile interval being accumulated for commodity received.
179
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
180
Annex D
Smart Energy Cluster Descriptions
Identifier
Name
Type
Range
Access
Default
Man./
Opt.
0x00
MaxNumberOfPeriodsD
elivered
Unsigned 8
bit Integer
0x00 to
0xFF
Read
Only
0x18
0x01 to
0xFF
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
Default
Man /
Opt
Identifier
Name
Type
Range
Access
0x00
CurrentDemand
Delivered
Unsigned 24
bit Integer
0x000000 to
0xFFFFFF
Read
only
0x01
DemandLimit
Unsigned 24
bit Integer
0x000000 to
0xFFFFFF
Read
only
0x02
DemandIntegrat
ion Period
Unsigned 8
bit Integer
0x01 to
0xFF
Read
only
0x03
NumberOfDem
and
Subintervals
Unsigned 8
bit Integer
0x01 to
0xFF
Read
only
0x04 - 0xFF
Reserved
D.3.2.2.7.1 CurrentDemandDelivered
CurrentDemandDelivered represents the current Demand of Energy, Gas, or
Water delivered at the premise. CurrentDemandDelivered may be continuously
updated as new measurements are acquired, but at a minimum
CurrentDemandDelivered must be updated at the end of each integration subperiod, which can be obtained by dividing the DemandIntegrationPeriod by the
NumberOfDemandSubintervals.
This attribute shall be adjusted using the Multiplier and Divisor attributes found in
the Formatting Attribute Set and can be formatted using the DemandFormatting
attribute. The final result represents an engineering value in the unit defined by
the UnitofMeasure attribute.
D.3.2.2.7.2 DemandLimit
DemandLimit reflects the current supply demand limit set in the meter. This value
can be compared to the CurrentDemandDelivered attribute to understand if limits
are being approached or exceeded.
Adjustment and formatting of this attribute follow the same rules as the
CurrentDemandDelivered.
D.3.2.2.7.3 DemandIntegrationPeriod
DemandIntegrationPeriod is the number of minutes over which the
CurrentDemandDelivered attribute is calculated. Valid range is 0x01 to 0xFF.
0x00 is a reserved value.
Copyright 2008 ZigBee Standards Organization. All rights reserved.
181
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
182
Annex D
Smart Energy Cluster Descriptions
D.3.2.2.7.4 NumberOfDemandSubintervals
NumberOfDemandSubintervals represents the number of subintervals used within
the DemandIntegrationPeriod. The subinterval duration (in minutes) is obtained
by dividing the DemandIntegrationPeriod by the NumberOfDemandSubintervals.
The CurrentDemandDelivered attribute is updated at the each of each subinterval.
Valid range is 0x01 to 0xFF. 0x00 is a reserved value.
As a Rolling Demand example, DemandIntegrationPeriod could be set at 30 (for
30 minute period) and NumberOfDemandSubintervals could be set for 6. This
would provide 5 minute (30/6 = 5) subinterval periods.
As a Block Demand example, DemandIntegrationPeriod could be set at 30 (for
30 minute period) and NumberOfDemandSubintervals could be set for 1. This
would provide a single 30 minute subinterval period21.
D.3.2.3
Server Commands
Command Identifier
Field Value
Description
Mandatory /
Optional
0x00
0x01
Request Mirror
0x02
Remove Mirror
0x03 0xff
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
Octets
Data
Type
Field
Name
Variable
UTC
Time
8-bit
Enumeration
8-bit
Enumeration
Unsigned 8-bit
Integer
Series of
Unsigned
24 bit
Integers
EndTime
Status
ProfileIntervalPeriod
NumberOfPeriodsDe
livered
Intervals
Value
Description
0x00
Success
0x01
0x02
0x03
0x04
0x05
0x06 to 0xFF
183
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
184
Annex D
Smart Energy Cluster Descriptions
Enumerated Value
Timeframe
Daily
60 minutes
30 minutes
15 minutes
10 minutes
7.5 minutes
5 minutes
2.5 minutes
8 to 255
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
185
D.3.2.4
Client Commands
Command Identifier
Field Value
Description
Mandatory /
Optional
0x00
Get Profile
0x01
Request Mirror
Response
0x02
Remove Mirror
0x03 0xff
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
186
Annex D
Smart Energy Cluster Descriptions
Octets
Data Type
Unsigned 8-bit
Integer
UTCTime
Field Name
Interval
Channel
End Time
NumberOfPeriods
Bit
Description
Consumption Delivered
Consumption Received
2 to 255
Not used
EndTime: 32 bit value (in UTCTime) used to select an Intervals block from all
the Intervals blocks available. The Intervals block returned is the most recent
block with its EndTime equal or older to the one provided. The most recent
Intervals block is requested using an End Time set to 0x00000000, subsequent
Intervals block are requested using an End time set to the EndTime of the previous
block - (number of intervals of the previous block * ProfileIntervalPeriod).
NumberofPeriods: Represents the number of intervals being requested. This
value cant exceed the size stipulated in the MaxNumberOfPeriodsDelivered
attribute. If more intervals are requested than can be delivered, the
GetProfileResponse will return the number of intervals equal to
MaxNumberOfPeriodsDelivered. If fewer intervals available for the time period,
only those available are returned.
D.3.2.4.2.2 When Generated
The GetProfile command is generated when a client device wishes to retrieve a
list of captured Energy, Gas or water consumption for profiling purposes. Due to
the potentially large amount of profile data available, the client device should
Copyright 2008 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
store previously gathered data and only request the most current data. When
initially gathering significant amounts of historical interval data, the GetProfile
command should not be issued any more frequently than 7.5 seconds to prevent
overwhelming the ZigBee network.
D.3.2.4.2.3 Command Processing Response
If success or failure occurs in recognizing or processing the payload of the
GetProfile command, the appropriate enumerated ZCL status (as referenced in the
ZCL Cluster Library specification) will be returned.
D.3.2.4.2.4 Effect on Receipt
On receipt of this command, the device shall send a GetProfileReponse command
(see sub-clause D.3.2.3.1.1).
D.3.2.4.3 Request Mirror Response Command
The Request Mirror Response Command allows the ESP to inform a sleepy
Metering Device it has the ability to store and mirror its data.
D.3.2.4.3.1 Payload Format
The Request Mirror Response command payload shall be formatted as illustrated
in Figure D.13
Octets
Data Type
Field Name
EndPoint ID
187
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
188
Annex D
Smart Energy Cluster Descriptions
Octets
Data Type
Field Name
Removed
EndPoint ID
Attribute Reporting
D.3.3.2
D.3.3.3
The frequency and timeliness of updating metering data contained in the Simple
Metering Cluster Attributes and Profile Intervals is up to the individual Metering
device manufacturers capabilities. As a best practice recommendation, updates of
Copyright 2008 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
the metering data should not cause delivery of the information to end devices
more often than once every 30 seconds. End devices should also not request
information more often than once every 30 seconds.
Smart Energy
Device
ESP
S
C = Client
S = Server
Please note the ESP is defined as the Server due to its role in acting as the proxy
for upstream price management systems and subsequent data stores.
D.4.2 Server
D.4.2.1
Dependencies
Events carried using this cluster include a timestamp with the assumption that
target devices maintain a real time clock. Devices can acquire and synchronize
their internal clocks via the ZCL Time server.
189
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
190
Annex D
Smart Energy Cluster Descriptions
If a device does not support a real time clock it is assumed that the device will
interpret and utilize the Start Now value within the Time field.
Anonymous Inter-PAN transmission mechanism outlined in Annex B.
D.4.2.2
Identifier
Name
Type
Length
Access
Default
Mandatory
/ Optional
0x0000
Tier1PriceLabel
Octet
String
0 to 12
Octets
Read/
Write
"Tier 1"
0x0001
Tier2PriceLabel
Octet
String
0 to 12
Octets
Read/
Write
"Tier 2"
0x0002
Tier3PriceLabel
Octet
String
0 to 12
Octets
Read/
Write
"Tier 3"
0x0003
Tier4PriceLabel
Octet
String
0 to 12
Octets
Read/
Write
"Tier 4"
0x0004
Tier5PriceLabel
Octet
String
0 to 12
Octets
Read/
Write
"Tier 5"
0x0005
Tier6PriceLabel
Octet
String
0 to 12
Octets
Read/
Write
"Tier 6"
0x0006 to
0xFFFF
Reserved
D.4.2.3
Commands Received
The server side of the Price cluster is capable of receiving the commands listed in
Table D.29.
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
Description
Mandatory / Optional
0x00
0x01
0x02 0xff
Reserved
Octets
Data Type
Field Name
Command Options
Figure D.16 The Format of the Get Current Price Command Payload
Bits
1 to 7
Field
Name
Requestor Rx
On When Idle
Reserved
191
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
192
Annex D
Smart Energy Cluster Descriptions
very likely that regular broadcasts of pricing information will be received by this
device, and 0 otherwise.
A device that publishes price information may use the value of this bit, as received
from requestors in its neighborhood, to determine publishing policy. For example,
if a device makes a request for current pricing information and the requestor Rx
on when idle sub-field of the GetCurrentPrice command payload has a value of 1
(indicating that the device will be likely to receive regular price messages), then
the receiving device may store information about the requestor and use it in future
publishing operations.
D.4.2.3.1.2 Effect on Receipt
On receipt of this command, the device shall send a Publish Price command (subclause D.4.2.4.1) for the currently scheduled time. Please note: The PublishPrice
command is sent out on the network from which the GetCurrentPrice command
was received (either the Inter-Pan or SE network). Example: If the
GetCurrentPrice command is received on the Inter-Pan network, the ESP shall
respond on the Inter-Pan. If the GetCurrentPrice command is received on the SE
Network, the ESP shall respond to the device requesting the pricing information.
D.4.2.3.2 Get Scheduled Prices Command
This command initiates a Publish Price command (see sub-clause D.4.2.4.1) for
all currently scheduled times. A server device shall be capable of storing five
scheduled price events at a minimum.
D.4.2.3.2.1 Payload Details
The Get Scheduled Prices command payload shall be formatted as illustrated in
Figure D.18:
Octets
Data Type
UTCTime
Unsigned8-bit integer
Field Name
Start Time (mandatory): UTC Timestamp representing the starting time for any
scheduled pricing events to be re-sent.
Number of Events (mandatory): Represents the maximum number of events to
be sent. A value of 0 would indicate all available events are to be returned.
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
193
D.4.2.4
Commands Generated
The server side of the Price cluster is capable of generating the commands listed
in Table D.30.
Table D.30 Generated Command IDs for the Price Cluster
Description
Mandatory / Optional
0x00
Publish Price
0x01 0xff
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
194
Annex D
Smart Energy Cluster Descriptions
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
Octets
0-12
Data
Type
Unsigned
32 bit
Integer
Octet
String
Unsigned
32 bit
Integer
UTCTime
8 bits
enumeration
Unsigned
16 bit
Integer
8 bit
BitMap
Provider
ID (M)
Rate
Label
(M)
Issuer
Event ID
(M)
Current
Time (M)
Unit of
Measure (M)
Currency
(M)
Price
Trailing
Digit &
Price
Tier (M)
8 bit
BitMap
UTCT
ime
Unsigned
16 bit
Integer
Unsigned
32 bit
Integer
Unsigned 8
bit Integer
Unsigned
32 bit
Integer
Unsigned
8 bit
Integer
Start
Time
(M)
Duration
In
Minutes
(M)
Price (M)
Price Ratio
(O)
Field
Name
Number
of Price
Tiers &
Register
Tier (M)
Generatio
n Price
(O)
Generati
on Price
Ratio (O)
Octets
Data
Type
Unsigned
32 bit
Integer
8 bits
enume
ration
8 bit
BitMap
Alternate
Cost
Delivered
(O)a
Altern
ate
Cost
Unit
(O)b
Alternate
Cost
Trailing
Digit(O)c
Field
Name
Octets
Data
Type
Field
Name
a. CCB 973
b. CCB 973
c. CCB 973
195
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
196
Annex D
Smart Energy Cluster Descriptions
specific information regarding the current billing rate. The String shall be encoded
in the UTF-8 format. This field is thought to be useful when a commodity
provider may have multiple pricing plans.
Issuer Event ID (mandatory): Unique identifier generated by the commodity
provider. When new pricing information is provided that replaces older pricing
information for the same time period, this field allows devices to determine which
information is newer. It is expected that the value contained in this field is a
unique number managed by upstream servers or a UTC based time stamp
(UTCTime data type) identifying when the Publish Price command was issued.
Thus, newer pricing information will have a value in the Issuer Event ID field that
is larger than older pricing information.
Current Time (mandatory): A UTCTime field containing the current time as
determined by the device. This field is thought to be useful to provide an extra
value-added feature for the broadcast price signals.
Unit of Measure (mandatory): An 8 bit enumeration field identifying the
commodity as well as its base unit of measure. The enumeration used for this field
shall match one of the UnitOfMeasure values using a pure Binary format as
defined in the Simple Metering cluster (see sub-clause D.3.2.2.5.1).
Currency (mandatory): An unsigned 16 bit field containing identifying
information concerning the local unit of currency used in the price field. This field is
thought to be useful for displaying the appropriate symbol for a currency (i.e.: $).
The value of the currency field should match the values defined by ISO 4217.
Price Trailing Digit and Price Tier (mandatory): An 8 bit field used to determine
where the decimal point is located in the price field and to indicate the current pricing
tier as chosen by the commodity provider. The most significant nibble is the Trailing
Digit sub-field which indicates the number of digits to the right of the decimal point.
The least significant nibble is an enumerated field containing the current Price Tier.
Valid values for the Price Tier sub-field are from 1 to 6 reflecting the least expensive
tier (1) to the most expensive tier (6). All other values for the Price Tier are reserved.
This sub-field also references the associated TiernPriceLabel attribute assigned to the
Price Tier. Table D.31 depicts the assignments:
Table D.31 Price Tier Sub-field Enumerations
Enumerated Value
Price Tier
0x0
No Tier Related
0x1
Reference Tier1PriceLabel
0x2
Reference Tier2PriceLabel
0x3
Reference Tier3PriceLabel
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
197
Reference Tier4PriceLabel
0x5
Reference Tier5PriceLabel
0x6
Reference Tier6PriceLabel
0x7 to 0xF
Reserved
Number of Price Tiers & Register Tier (mandatory): An 8 bit BitMap where
the most significant nibble is an enumerated sub-field representing the maximum
number of price tiers available, and the least significant nibble is an enumerated
sub-field indicating the register tier used with the current Price Tier. Valid values
for the Number of Price Tiers sub-field are from 0 to 6 reflecting no tiers in use (0)
to six tiers available (6). All other values for the Price Tier are reserved.
The Register Tier values correlates which CurrentTierNSummationDelivered
attribute, found in sub-clause D.3.2.2.2, is accumulating usage information. Both
attributes can be used to calculate and display usage and subsequent costs.
Register Tier enumerated values are listed in Table D.32.
Table D.32 Register Tier Sub-field Enumerations
Enumerated
Value
Register Tier
0x0
No Tier Related
0x1
0x2
0x3
0x4
0x5
0x6
0x7 - 0x0F
Reserved
Start Time (mandatory): A UTCTime field to denote the time at which the price
signal becomes valid. A start Start time Time of 0xffffffff 0x00000000 is a special
time denoting now.
Duration In Minutes (mandatory): An unsigned 16 bit field used to denote the
amount of time in minutes after the Start Time during which the price signal is
valid. Maximum value means until changed.
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
198
Chapter D
Smart Energy Cluster Descriptions
Values
Description
0x00
0x01
0x02 to 0xFF
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
D.4.3 Client
D.4.3.1
Dependencies
Events carried using this cluster include a timestamp with the assumption that
target devices maintain a real time clock. Devices can acquire and synchronize
their internal clocks via the ZCL Time server.
If a device does not support a real time clock it is assumed that the device will
interpret and utilize the Start Now 0x00000000 value within the Time field.
Anonymous Inter-PAN transmission mechanism outlined in Annex B.
D.4.3.2
Attributes
None.
D.4.3.3
Commands Received
The client receives the cluster specific response commands detailed in subclause D.4.2.3.1.
D.4.3.4
Commands Generated
The client generates the cluster specific commands detailed in subclause D.4.2.4.1, as required by the application.
199
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
200
Chapter D
Smart Energy Cluster Descriptions
Smart Energy
Device
ESP
S
C = Client
S = Server
Please note the ESP is defined as the Server due to its role in acting as the proxy
for upstream message management systems and subsequent data stores.
D.5.2 Server
D.5.2.1
Dependencies
D.5.2.2
Attributes
None.
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
D.5.2.3
Commands Generated
The command IDs generated by the Messaging server cluster are listed in
Table D.34.
Table D.34 Generated Command IDs for the Messaging Server
Command Identifier
Field Value
Description
Mandatory /
Optional
0x00
Display Message
0x01
Cancel Message
0x02 0xff
Reserved
Octets
Variable
Data
Type
Unsigned
32-bit integer
8-bit
BitMap
UTCTime
Unsigned 16
bit Integer
Character
string
Field
Name
Message ID
Message
Control
Start Time
Duration In
Minutes
Message
201
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
202
Chapter D
Smart Energy Cluster Descriptions
Bits
Enumeration
Value
Description
Bits 0 to 1
Normal transmission
only
Normal and
Anonymous InterPAN transmission
Reserved
Low
Medium
High
Critical
Bits 4 to 6
Reserved
N/A
Bit 7
Message
Confirmation
Bits 2 to 3
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
Start Time: A UTCTime field to denote the time at which the message becomes
valid. A Start Time of 0x00000000 is a special time denoting now.
Duration In Minutes: An unsigned 16 bit field is used to denote the amount of
time in minutes after the Start Time during which the message is displayed. A
Maximum value of 0xFFFF means until changed.
Message: A ZCL String containing the message to be delivered. The String shall
be encoded in the UTF-8 format. Please note: Since the Anonymous Inter-PAN
transmission mechanism outlined in Annex B does not support fragmentation and
is limited in its message size, any message forwarded will be truncated to match
the maximum message length supported. For messages not sent through the
Anonymous Inter-PAN transmission mechanism and received by devices that
display messages smaller than 80 bytes, they shall have the ability to receive up to
an 80 byte message. Devices will have the ability to choose the methods for
managing messages that are larger than can be displayed (truncation, scrolling,
etc.).
For supporting larger messages sent over the SE Profile network, both devices
must agree upon a common Fragmentation ASDU size. Please refer to subclause 5.3.8 for further details on Fragmentation settings.
Any message that needs truncation shall truncate on a UTF-8 character boundary.
D.5.2.3.2 Cancel Message
The Cancel Message command described in Table D.37 provides the ability to
cancel the sending or acceptance of previously sent messages. When this message
is received the recipient device has the option of clearing any display or user
interfaces it supports, or has the option of logging the message for future
reference.
Table D.37 Cancel Message Command Payload
Octets
Data
Type
Unsigned
32-bit
integer
8-bit
BitMap
Field
Name
Message
ID
Message
Control
203
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
204
Chapter D
Smart Energy Cluster Descriptions
managed by upstream systems or a UTC based time stamp (UTCTime data type)
identifying when the message was originally issued.
MessageControl: An enumerated field indicating the optional ability to pass the
cancel message request onto the Anonymous Inter-PAN transmission mechanism
outlined in Annex B. If the Anonymous Inter-PAN transmission mechanism is not
supported on a particular device, this parameter is ignored. Bitmap values for this
field are listed in Table D.36.
D.5.3 Client
D.5.3.1
Dependencies
D.5.3.2
Attributes
None.
D.5.3.3
Commands Generated
The command IDs generated by the Messaging cluster are listed in Table D.38.
Table D.38 Messaging Client Commands
Command Identifier
Field Value
Description
Mandatory
/ Optional
0x00
0x01
Message Confirmation
0x02 0xff
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
205
Octets
Data Type
Unsigned
32-bit integer
UTCTime
Field Name
Message ID
Confirmation
Time
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
206
Chapter D
Smart Energy Cluster Descriptions
Head
End
Subscribers
ESP
Message (Not defined by ZigBee)
~
OR
~
Cacncel Message
Cancel Message
~
OR
~
Get Last Message
Display Message
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
N N E X
E
ANNEX ERULES AND GUIDELINES FOR
OVERLAPPING EVENTS
This section describes multiple scenarios that Demand Response and Load
Control devices may encounter over the Smart Energy network. The examples
describe situations of overlapping events that are acceptable and where
overlapping events that will be superseded due to conflicts.
E.1 Definitions
Start Time Start Time field contained within the Load Control Event packet
indicating when the event should start. Please note, a Start Time value of
0x00000000 denotes now and the device should use its current time as the
Start Time.
Duration Duration field contained within the Load Control Event packet
indicating how long the event should occur.
End Time Time when Event completes as calculated by adding Duration to
Start Time.
Scheduled Period - Represents the time between the Start Time and the End Time
of the event.
Effective Start Time - Represents time at which a specific device starts a load
control event based on the Start Time plus or minus any randomization offsets.
Effective End Time - Represents time at which a specific device ends a load
control event based on the Start Time plus Duration, plus or minus any
randomization offsets.
Effective Scheduled Period - Represents the time between the Effective Start
Time and the Effective End Time.
Copyright 2008 ZigBee Standards Organization. All rights reserved.
207
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
208
Annex E
Rules and Guidelines for Overlapping Events
Overlapping Event - Defined as an event where the Scheduled Period covers part
or all of an existing, previously scheduled event.
Successive Events - Defined as two events where the scheduled End Time of the
first event is equal the Start Time of a subsequent scheduled event.
Nested Events - Defined as two events where the scheduled Start Time and End
Time of the second event falls during the Scheduled Period of the first scheduled
event and the second event is of shorter duration than the first event.
ESP may resolve any event scheduling conflicts by performing one of the
following processes:
a Canceling individual events starting with the earliest scheduled event and re-
directives.
It is recommended that process 2.c is used for most situations since it can allow
a smoother change between two sets of directives, but no way does it negate the
responsibilities identified in rule #1.
3 When an End Device receives an event with the End Time in the past (End
Time < Current Time), this event is ignored and a Report Event Status
command is returned with the Event Status set to 0xFB (Rejected - Event was
received after it had expired).
4 When an End Device receives an event with a Start Time in the past and an End
Time in the future ((Start Time < Current Time) AND (End Time > Current
Time)), the event is processed immediately. The Effective Start Time is calculated
using the Current Time as the Start Time. Original End Time is preserved.
Copyright 2008 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
209
a Report Event Status command (referencing the previous event) with the
Event Status set to 0x07 (The event has been superseded). After the Report
Event Status command is successfully sent, the End Device can remove the
previous event schedule.
b If the previous event is executing, the End Device shall change directly from
its current state to the requested state at the Effective Start Time of the
Overlapping Event (Note: Rule #4 effects Effective Start Time). The End
Device returns a Report Event Status command (referencing the previous
event) with the Event Status set to 0x07 (the event has been superseded).
6 Randomization shall not cause event conflicts or unmanaged gaps. To clarify:
a When event starting randomization is requested, time periods between the
Start Time of an event and the Effective Start Time a device should either
maintain its current state or apply changes which contribute to energy
saving. Preference would be to maintain current state.
b When event ending randomization is used and the Effective End Time
overlaps the Effective Start Time of a Successive Event, the Effective Start
Time takes precedence. Events are not reported as superseded, End devices
should report event status as it would a normal set of Successive Events.
c It is recommended devices apply the same Start and Stop Randomization
values for consecutive events to help prevent unexpected gaps between events.
d Devices shall not artificially create a gap between Successive Events.
7 It is permissible to have gaps when events are not Successive Events or
Overlapping Events.
8 If multiple device classes are identified for an event, future events for
individual device classes (or a subset of the original event) that cause an
Overlapping Event will supersede the original event strictly for that device
class (or a subset of the original event). Note: Rule #5 applies to all
Overlapping Events.
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
210
Annex E
Rules and Guidelines for Overlapping Events
ESP
S
Water Heater
Pool Pump/Spa/Jacuzzi
C = Client
Figure E.1
S = Server
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
Note: Vertical
arrows in the
examples indicate
event start and stop
times.
12
16
20
24
Figure E.2
211
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
212
Annex E
Rules and Guidelines for Overlapping Events
Event ID:1 is
no longer valid.
Event ID:2
supersedes
the previous
event.
12
16
20
24
Figure E.3
In Figure E.3, Device Class 0x000001 receives DR/LC Event ID#1 setup for a 24
hour Scheduled Period, which later is superseded by DR/LC Event ID#2,
invalidating the remainder of Event ID#1, which is cancelled.
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
Event ID:1 is
still valid but
only for device
02.
Event ID:2
supersedes
the previous
event for
Device Class
0x000001
12
16
20
24
Time in Hours->
Figure E.4
In Figure E.4, Device Class 0x000003 receives DR/LC Event ID#1 setup for a 24
hour Scheduled Period, which is targeted for both Device Class 0x000002 and
0x000001 (ORed == 0x000003). In the example, Event ID#2 is issued only for
Device Class 0x000001, invalidating the remainder of Event ID#1 for that device
class. DR/LC Event ID#1 is still valid for Device Class 0x000002, which in the
example should run to completion.
213
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
214
Annex E
Rules and Guidelines for Overlapping Events
12
16
20
24
Figure E.5
In Figure E.5, Device Class 0x000001 receives a DR/LC Event ID#1 with an
ending randomization setting (please refer to sub-clause D.2.2.3.1.1.1 for more
detail). A second DR/LC (Event ID#2) is issued with a starting time which
matches the ending time of DR/LC Event ID#1. In this situation, the Start Time of
Event ID#2 has precedence. Event ID#1 is not reported as superseded.
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
When successive or
back to back events are
scheduled, starting and
ending randomization
periods shall not cause a
gap.
12
16
20
24
Figure E.6
Figure E.6 above, Device Class 0x000001 receives a DR/LC Event ID#1 with an
ending randomization setting (please refer to sub-clause D.2.2.3.1.1.1 for more
detail). Effective End Time of Event ID#1 is not known. A second DR/LC (Event
ID#2) is issued with a starting randomized setting, which has an Effective Start
Time that could overlap or start after the Effective End Time of DR/LC Event
ID#1. In this situation, the Effective Start Time of Event ID#2 has precedence but
the DR/LC device must also prevent any artificial gaps caused by the Effective
Start Time of Event ID#2 and Effective End Time of Event ID#1.
215
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
216
Annex E
Rules and Guidelines for Overlapping Events
Randomized
periods.
This is a
valid gap
in time
12
16
20
24
Figure E.7
Figure E.7 above, Device Class 0x000001 receives a DR/LC Event ID#1 with
both a starting and ending randomization setting (please refer to subclause D.2.2.3.1.1.1 for more detail). A second DR/LC Event ID#2 is also issued
with both a starting and ending randomized setting. The primary configuration to
note in this example is the Effective End Time of DR/LC Event ID#1 completes
well in advance of the Effective Start Time of DR/LC Event ID#2. In this scenario,
regardless of randomization a gap is naturally created by the scheduling of the
events and is acceptable.
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
N N E X
F
ANNEX FJOINING PROCEDURE USING PRECONFIGURED TRUST CENTER LINK KEYS
The secure join procedure is detailed as follows:
The secured joining procedure is as stated in [B4] Section 4.6.3.2.3. The case
used in the Smart Energy application is the Pre-configured trust center link
key and address
In [B4] Section 4.6.3.2.3.2, in the case of Pre-configured Trust Center Link
Key, the joining device waits for the APSME-TRANSPORT-KEY.
Indication. The frame is encrypted/authenticated with the key-transport key
according to the methodologies specified in sections 4.4.1.1 and 4.5.3 of the
ZigBee specification r17, which describe the key-transport keys and their
association with link keys, in this case the pre-configured trust center link key.
The source address will be that of the Trust Center. The key transported will be
the NWK Key Key type == 0x01.
When the trust center sends the tunneled Transport Key command, the
Extended Nonce bit on the Auxiliary Frame Header must be set to 1 on the
Transport Key frame from the Trust Center to the joining child as described in
[B4] Section 4.5.1. The Trust Center must also insert its long address into the
Source Address field of the Auxiliary Frame Header since that information will
be needed at the child to decrypt the Transport Key command.
Sub-clause 5.4 of this document calls out two cases for secured join: preconfigured link keys and temporary link keys. The joining device and trust
center perform the same join operation in both cases. The only difference is
how the joining device and trust center treat the initial key material (either
using it directly as the pre-configured link key or hashing with some data like
the long address of the joining device at application level first, see Annex E for
this method). From the perspective of the security joining process what
happens afterwards is the secure join procedure is the same.
217
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
218
Annex F
Joining Procedure Using Pre-Configured
In either case called out in sub-clause 5.4 of this document, the joining device
is authenticated using the [B4] Section 4.6.3.2.3.2 procedure or leaves if the
security timeout expires. If authenticated, the key delivered via the APSMETRANSPORT-KEY.indication in [B4] Section 4.6.3.2.3.2 is the same for
either case called out in the AMI specification sub-clause 5.4 (no matter how
the application determined the pre-configured link key).
In terms of the message exchange between the child and trust center in performing
the secure join procedure, the following is employed:
Child joining device uses NLME-JOIN.request to parent. Parent sends an
APSME-UPDATE-DEVICE.request to the Trust Center on behalf of the child
to the Trust Center. APSME-UPDATE-DEVICE.request is transported
encrypted/authenticated with the NWK key that the parent has
Upon receipt at the trust center, the trust center must perform the following
processing:
Validity check of the childs address to determines if a trust center link key
exists between the trust center and the address provided by the joining child.
If the child has the trust center as its parent, the APSME-TRANSPORT-
command. The APS Tunnel command and its (already encrypted) payload is
encrypted using the NWK key from the trust center to the childs parent. On
the final hop, the childs parent will perform the following processing
according to [B4] Section 4.6.3.7.2:
The parent sends the contents within the APS Tunnel command to the
child without network layer encryption. The message from the parent to
the joining child is an APS encrypted transport key command using the
key-transport key derived from the trust center link key.
Here are the details on the message that is routed from the trust center to the
joining devices parent via the tunnel command:
NWK Data Frame (Dest: Parent)
APS Header (Command)
APS Command Frame (Tunnel)
Copyright 2008 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
219
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
220
Annex F
Joining Procedure Using Pre-Configured
The joining device must set the network key and sequence number in its NWK
Information Block.
The device is then joined and authenticated.
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