Smart Energy
Sample Application User’s Guide
Document Number: SWRU215
Texas Instruments, Inc.
San Diego, California USA
Copyright 2009-2011 Texas Instruments, Inc. All rights reserved.
Smart Energy Sample Application User's Guide SWRU215 Version 1.5
i Copyright 2009-2011 Texas Instruments, Inc. All rights reserved.
Revision Description Date
1.0 Initial release. 04/06/2009
1.1 Updated for Z-Stack 2.3 release. Document modifications include
INTER-PAN support for ESP and IPD, use of End Device Annce
message to trigger device discovery instead of Match Descriptor
Request.
12/23/2009
1.2 Updated for Z-stack 2.3.1 release. Document modifications include
support for installing Certicom keys in the CC2530 lock bits flash
page and MSP430 information memory segments. The APP_MSG
command is no longer used to retrieve the established link key.
Instead, ZDO_GET_LINK_KEY is used.
07/29/2010
1.3 Added “In Premise Display – End Device – OTA” configuration
which provides a sample OTA client application. Changed router and
end device startup behavior to initiate a match descriptor request to
discover the key establishment endpoint instead of assuming a fixed
endpoint number.
11/16/2010
1.4 Added Certicom Key memory layout for LM9B96 (section 3.3) 12/21/2010
1.5 Updated Pricing test with Price Acknowledgement message.
Added Fast Polling Test section.
Updated ESP section with fast poll and prepayment
Added Prepayment Test section.
07/12/2011
Smart Energy Sample Application User's Guide SWRU215 Version 1.5
Table of Contents
1. INTRODUCTION................................................................................................................. 1
1.1. S
COPE .............................................................................................................................. 1
1.2. D
EFINITIONS, ABBREVIATIONS, ACRONYMS.................................................................... 1
2. SETUP.................................................................................................................................... 3
2.1. REQUIRED TOOLS ............................................................................................................ 3
2.2. USING Z-CONVERTER TO TRANSFORM CERTICOM CERTIFICATES ................................... 3
2.3. S
UPPORTED HARDWARE PLATFORMS .............................................................................. 5
3. GETTING STARTED.......................................................................................................... 5
3.1. B
UILDING THE ESP, PCT, AND IPD APPLICATION INSTANCES ........................................ 5
3.2. CONFIGURING CERTICOM KEYS USING Z-TOOL .............................................................. 8
3.3. CONFIGURING CERTICOM KEYS FOR PRODUCTION DEVICES ......................................... 13
3.4. RUNNING THE ESP, PCT, AND IPD APPLICATIONS........................................................ 20
4. THEORY OF OPERATION ............................................................................................. 23
4.1. SE SECURE JOINING....................................................................................................... 23
4.2. KEY ESTABLISHMENT .................................................................................................... 23
4.3. DEVICE AND SERVICE DISCOVERY................................................................................. 25
4.4. ESP................................................................................................................................ 25
4.5. SIMPLE METERING DEVICE............................................................................................ 27
4.6. LOAD CONTROL DEVICE................................................................................................ 28
4.7. PCT ............................................................................................................................... 31
4.8. IN PREMISE DISPLAY ..................................................................................................... 33
4.8.1. Pricing Test........................................................................................................... 33
4.8.2. Fast Polling Test................................................................................................... 34
4.8.3. Prepayment Test.................................................................................................... 36
4.9. IN PREMISE DISPLAY – OTA.......................................................................................... 38
4.10. RANGE EXTENDER ..................................................................................................... 40
5. LIMITATIONS................................................................................................................... 42
5.1. T
RUST CENTER OPERATION ........................................................................................... 42
5.2. NETWORK MANAGER OPERATION ................................................................................. 42
5.3. S
ECURE JOINING OPERATION......................................................................................... 42
5.4. KEY ESTABLISHMENT OPERATION................................................................................. 42
5.5. D
EVICE STARTUP BEHAVIOR ......................................................................................... 42
5.6. LOAD CONTROL DEVICE BEHAVIOR .............................................................................. 43
5.7. ESP BEHAVIOR.............................................................................................................. 43
6. APPLICABLE DOCUMENTS.......................................................................................... 43
6.1. Z-S
TACK DOCUMENTS (PART OF THE Z-STACK INSTALLER).......................................... 43
6.2. O
THER DOCUMENTS (WWW.ZIGBEE.ORG)...................................................................... 43
ii Copyright 2009-2011 Texas Instruments, Inc. All rights reserved.
Smart Energy Sample Application User's Guide SWRU215 Version 1.5
iii Copyright 2009-2011 Texas Instruments, Inc. All rights reserved.
Table of Figures
F
IGURE 1. SYSTEM CONTEXT DIAGRAM ........................................................................................................................2
FIGURE 2. Z-CONVERTER GRAPHICAL INTERFACE .........................................................................................................4
FIGURE 3. FLOWCHART OF DEVICE STARTUP LOGIC ....................................................................................................24
FIGURE 4. SEQUENCE DIAGRAM FOR A SIMPLE METER DEVICE ...................................................................................27
FIGURE 5. SEQUENCE DIAGRAM FOR A LOAD CONTROL DEVICE .................................................................................29
FIGURE 6. SEQUENCE DIAGRAM FOR A PCT.................................................................................................................31
FIGURE 7. SEQUENCE DIAGRAM FOR AN IN PREMISE DISPLAY PRICING TEST ..............................................................33
FIGURE 8. SEQUENCE DIAGRAM FOR AN IN PREMISE DISPLAY FAST POLLING TEST ....................................................35
FIGURE 9. SEQUENCE DIAGRAM FOR AN IN PREMISE DISPLAY PREPAYMENT TEST .....................................................37
FIGURE 9. SEQUENCE DIAGRAM FOR AN IN PREMISE DISPLAY WITH OTA CLUSTER CLIENT SUPPORT .........................39
FIGURE 10. SEQUENCE DIAGRAM FOR A RANGE EXTENDER.........................................................................................41
Smart Energy Sample Application User's Guide SWRU215 Version 1.5
1. Introduction
ZigBee Smart Energy (ZSE) is one of the public application profiles released for the ZigBee
2007 specification. It enables utility companies and their customers to directly communicate with
thermostats and other smart appliances; see www.zigbee.org for more information.
The Smart Energy Sample application (part of the Z-Stack installer for ZigBee 2007; covering
ZigBee and ZigBee PRO) is the optimal starting point to build your own SE application on top of
Texas Instruments’ Z-Stack (www.ti.com/z-stack).
1.1. Scope
This document describes how to use the Smart Energy Sample Application and discusses its
theory of operation. For a more general description of Smart Energy, the reader is referred to the
Zigbee Smart Energy specification available from www.zigbee.org. The reader should also
review the Z-Stack Smart Energy Developer’s Guide prior to using this document.
There are seven defined application instances within the IAR project:
a. Energy Service Portal (ESP) as a Coordinator
b. Metering Device as a Router and also as an End Device
c. In Premise Display as an End Device
d. In Premise Display as an End Device with OTA cluster client support
e. Programmable Communicating Thermostat (PCT) as an End Device
f. Load Control Device as a Router
g. Range Extender as a Router
Figure 1 shows the usage model of how these sample application instances interact with the ESP.
1.2. Definitions, Abbreviations, Acronyms
Term Definition
AF Application Framework
CBKE Certificate-based Key Establishment
DCO Digitally Controlled Oscillator
DUT Device Under Test
ECC Elliptic Curve Cryptography
ESP Energy Service Portal. An alternate name is Energy Service Interface (ESI)
HAN Home Area Network
IPD In Premise Display
OSAL Operating System Abstraction Layer
OTA Over The Air firmware upgrade
1 Copyright 2009-2011 Texas Instruments, Inc. All rights reserved.