Vous êtes sur la page 1sur 78

ZigBee Overview & Concepts

Presented by

Silicon Laboratories
Shaoxian Luo

2009 ZigBee Alliance. All rights reserved.

ZigBee Basics
ZigBee Radio
ZigBee Stack
ZigBee Application Layer

2009 ZigBee Alliance. All rights reserved.

What is Mesh Networking

Star Network
(e.g. 802.11)

Mesh Network
(e.g. ZigBee)

In a Mesh architecture, every node can be a router for its


neighbors. Network management and data flow is
decentralized.
2009 ZigBee Alliance. All rights reserved.

Network Topologies
Star

Network controlled by central


PAN (Personal Area Network)
Coordinator
End Devices communicate
directly with Coordinator
Coordinator initiates and
maintains network.
Simple Layout
PAN Coordinator
Full Function Device (FFD)
Reduced Function Device (RFD)
2009 ZigBee Alliance. All rights reserved.

Tree

Tree structure rooted at the PAN


coordinator
Coordinator initiates network
Children route through Parents in
strict hierarchy.
Multi-hop topology extends range
of the network.
Not always appropriate for lowlatency applications

Mesh

Messages may be routed from any


source to any destination
Every FFD functions as a router for
its neighbors.
Multi-hop topology extends range
of the network.
High reliability achieved through
multiple paths.

ZigBee Systems Architecture

Application Profiles
(defined by ZigBee and OEMs)

HCL
App
HCL
Profile

Custom
Custom
Custom
OEM
OEM
OEM

ZDO
ZDO
ZDO

AppSupport
Support(APS)
(APS)
App
App
Support (APS)

SSP
Stack Feature Sets SSP
SSP
NWK
(defined by ZigBee Alliance)
NWK
NWK

Radios
(defined by IEEE 802.15.4)

2009 ZigBee Alliance. All rights reserved.

Medium Access (MAC)

Home Automation (HA)


Building Automation (CBA)
Smart Energy (SE)
+ more ...

ZigBee 2007 Specification:


- ZigBee
- ZigBee PRO

IEEE 802.15.4
Ratified Spring 2003

Physical Radio (PHY)

Typical ZigBee Silicon Options

Any
Processor

APP

APP

ZDO

APS

Application
ZigBee Stack

MAC+PHY

MicroController

SSP

EM357

IEEE 15.4
Transceiver

EM357

NWK

MEDIUM ACCESS (MAC)

PHYSICAL RADIO (PHY)

uC + Transceiver
IEEE 802.15.4 compliant
radio & MAC
Separate
microcontroller
Typical of 1st
generation products,
older designs
2009 ZigBee Alliance. All rights reserved.

System-on-Chip
IEEE 802.15.4 compliant
radio
Integrated microcontroller
Integrated peripherals (ADC,
encryption engine, GPIO,
etc.)
Lowest system cost

Network Co-Processor
Self-contained ZigBee Stack
Dedicated function device
reduces BOM cost & testing time
Applications run on any
processor from C8051 to
Pentium

ZigBee Basics
ZigBee Radio
ZigBee Stack
ZigBee Application Layer

2009 ZigBee Alliance. All rights reserved.

IEEE 802.15.4
Designed for low power, low data rate, low cost
networks: PANs (Personal Area Networks)
Low to moderate range, but amplification possible
Raw bit rate with 2.4GHz DSSS PHY is 250kbps
Channel access via CSMA-CA
Collision avoidance using CCA, random backoffs

Link layer acknowledgement (MAC ACK) on unicast


transmissions
Frequency Usage:
16 channels in the 2.4GHz ISM band
10 channels in the 915MHz ISM band
1 channel in the European 868MHz band
2009 ZigBee Alliance. All rights reserved.

2.4GHz DSSS PHY


Range can be up to 2km LoS, within legal limits
Good bandwidth, future proof
16 IEEE 802.15.4 channels to choose from
Robust communications - avoid interference
Frequency agility via network manager functionality

Increase available bandwidth in the area


Multiple concentrators/meters/homes could be on different
channels

Available globally, leads to increased uptake in


market

2009 ZigBee Alliance. All rights reserved.

2.4GHz Channels: 802.15.4 vs. 802.11

Source: IEEE
802.15.4-2003
Specification,
Figure E.1

2009 ZigBee Alliance. All rights reserved.

10

2.4GHz Coexistence
There are 16 channels available to 802.15.4
Most 2.4G networks are based on IEEE standards,
designed to coexist
CSMA-CA in 802.15.4 helps reduce collisions
Higher layers have own backoffs, ACKs, retries
Emerging IEEE 802.11n
Same channel width as .11b and g
Can use dual .11 channels, but this is only recommended at
5GHz and not 2.4GHz
Will still be quiet ZigBee channels in-between

Years of successful deployments demonstrate


coexistence
2009 ZigBee Alliance. All rights reserved.

11

ZigBee Basics
ZigBee Radio
ZigBee Stack
ZigBee Application Layer

APP

APP

ZDO

APS
SSP
NWK

MEDIUM ACCESS (MAC)

PHYSICAL RADIO (PHY)

2009 ZigBee Alliance. All rights reserved.

12

ZigBee Stack Architecture

Application

ZigBee

802.15.4

2009 ZigBee Alliance. All rights reserved.

Initiate and join network


Manage network
Determine device relationships
Send and receive messages

Network organization
Route Discovery
Device Discovery

Message relay
Security

ZigBee Pro
Feature
Set

Medium Access
Physical RF

13

Stack Profiles: ZigBee PRO


Maintained by Core Stack Working Group
ZigBee PRO is primary deployed network stack in ZigBee
today
Full mesh networking
Fault tolerant and reliable
Scalable to hundreds or thousands of devices
All existing application profiles operate on ZigBee PRO
Home Automation, Smart Energy 1, Building Automation, Health
Cate
Includes Security and Management services
Large deployments in US meters, Australia Meters,
upcoming UK meters and HAN, security systems with
Comcast/Time Warner
2009 ZigBee Alliance. All rights reserved.

14

Stack Profile: ZigBee RF4CE


Developed for point to point communications with
consumer electronics
Remote control to set top box
As IR replacement to address AV equipment moving behind panels

Original companies working on standard were Philips,


Sony, Panasonic, TI and Freescale
Requires bridge device to communicate with ZigBee
PRO system
Rolled out by major cable TV provider in US
Silicon Labs plans to support RF4CE more generally
by the end of this year

2009 ZigBee Alliance. All rights reserved.

15

Stack Profile: ZigBee IP


Based on IETF and W3C IP based standards
Required for Smart Energy 2.0 (US Utilities,
regulators and Federal Government)
Requirements driven by Metering requirements so not
clear stack will be suitable for Home Automation type
markets
Silicon Labs has a stack for this that is used internally
for testing and has become a golden unit for
compliance testing of other ZigBee IP platforms

2009 ZigBee Alliance. All rights reserved.

16

Stack Profile: Green Power


Green Power is an additional set of features on the ZigBee
PRO stack
Provide for low power energy harvesting end device
Capability in other routers to receive message from Green Power
end device, turn it into real ZigBee message and send to right
device in the network
European companies (Schneider, Philips) drove the
development
No deployments yet
Silicon Labs is planning support for this feature in our
roadmap

2009 ZigBee Alliance. All rights reserved.

17

ZigBee Concepts: Node Types

ZigBee Type
ZigBee Coordinator (ZC)

Notes
Special router that forms the
network; only 1 per PAN

ZigBee Router (ZR)

No duty cycling available

ZigBee End Device (ZED)

Does not participate in


routing; may be sleepy;
requires ZC/ZR parent for
network participation

ZC
2009 ZigBee Alliance. All rights reserved.

ZR

ZED
18

EmberZNet: Node Types


Chosen at runtime via FormNetwork,
JoinNetwork APIs
EMBER_ROUTER: a ZR node
EMBER_END_DEVICE: non-sleepy ZED;
doesnt have to poll parent for messages
EMBER_SLEEPY_END_DEVICE: sleepy ZED;
must poll periodically to get messages, ACKs
EMBER_MOBILE_END_DEVICE: variant of
sleepy ZED that times out of parent table
quickly
2009 ZigBee Alliance. All rights reserved.

19

ZigBee Concepts: PAN ID


16-bit identifier shared by all nodes in PAN
Used in MAC header to filter out traffic not
pertaining to own network
ZC picks value upon forming network
Should be random to ensure uniqueness Stack
detects conflicts and updates network automatically

2009 ZigBee Alliance. All rights reserved.

20

ZigBee Concepts: Extended PAN ID


64-bit extended PAN ID (EPID) known to all nodes in
PAN; unique per PAN
Chosen by ZC at network formation time
Only sent OTA in response to Active Scan
Intended to enhance selection of eligible networks
during scan/join activity, enable recognition of
network after PAN ID change (due to previous
conflict)
Might not be totally random (conflict less likely than
16-bit PAN ID); can be used like WiFi SSID

2009 ZigBee Alliance. All rights reserved.

21

EmberZNet: PAN ID, EPID


Set by ZC during FormNetwork
Recommend using emberScanForUnusedPanId()
(in form-and-join utilities) to pick PAN ID
EPID of all zeroes causes stack to generate
random value

EPID supplied as parameter in JoinNetwork


API
Takes precedence over PAN ID if non-zero
Recommend using
emberScanForJoinableNetwork() to find
available PAN/EPID/channel combinations
2009 ZigBee Alliance. All rights reserved.

22

ZigBee Concepts: Addresses

EUI-64

64-bit globally unique address


(IEEE MAC address)
assigned to each device at
manufacturing; never changes

2009 ZigBee Alliance. All rights reserved.

Network Address

16-bit network unique


address (node ID)
assigned to each device
when it joins the network;
may change over time

23

EmberZNet: Addresses
EUI64 is pre-programmed by Ember
User can override with custom value if needed
See Custom Nodes app note for your platform

Node ID assigned when stack comes online


User gets callback if ID changes
Can optionally get callback if other nodes IDs
change

2009 ZigBee Alliance. All rights reserved.

24

Stochastic Addressing
Distributed address assignment mechanism
Intelligently random address selection
Simple, yet highly scalable
Conflict detection is handled by the networking
stack, with no application work required
Used in ZigBee PRO feature set only
More flexible than CSKIP addressing
End devices can keep same ID even if connecting to new
parent

2009 ZigBee Alliance. All rights reserved.

25

ZigBee Concepts: Address Table


Stored locally on each device (in RAM)
Maps network address to MAC address (and vice
versa):
16-bit remote
node ID (dynamic)

64-bit remote EUI


(static)

Used for determining current node ID of destination


Remote node ID populated manually or when stack
performs address discovery
Not required for ZigBee communication, but more
robust than relying on dynamic node IDs
2009 ZigBee Alliance. All rights reserved.

26

EmberZNet: Address Table


Can set size (0-254) at configuration time
Can be used with emberSendXXX API calls to
reference a destination
Useful as a cache on NCP if host MCU tracks
all destinations internally:
ezspReplaceAddressTableEntry()

Extended Timeout flag tracks sleepy/nonsleepy property of each destination


Stack can populate this automatically
Enforces longer timeouts for ACKs to account for
ZEDs duty cycle / poll rate

2009 ZigBee Alliance. All rights reserved.

27

ZigBee Concepts: Binding Table


Bindings define persistent device relationships by
matching a local endpoint to a remote endpoint & EUI64
Source

Destination

8-bit source endpoint

64-bit MAC address or 16bit group address


8-bit destination endpoint

Not required for ZigBee communication, but useful for


frequently used, persistent communication paths
Table stored locally at each device; non-volatile
Binding type can be unicast, multicast or many-to-one
2009 ZigBee Alliance. All rights reserved.

28

ZigBee Concepts: Binding Table


Cluster ID is associated with each entry;
represents the area of functionality (cluster) that
the binding is used for (e.g. On/Off cluster)
Remote node ID cache is also maintained (in RAM)
to help resolve node ID EUI64 mappings (similar
to Address Table) for Binding Table destinations
External provisioning tool can remotely
create/delete entries via ZDO bind/unbind requests.

2009 ZigBee Alliance. All rights reserved.

29

EmberZNet: Binding Table


Supported as optional library on SoC
Size (0-254) set at configuration time
Shares Extended Timeout flag setting used
by Address Table mechanism
Can be used with emberAfSendXXX API calls
to reference a destination
Application can control ability to modify
remotely
emberRemoteSet/DeleteBindingHandler APIs

2009 ZigBee Alliance. All rights reserved.

30

ZigBee Concepts: Messages


Unicast messages
Direct transmission
Explicitly specify 16-bit destination network address (node ID) & endpoint

Indirect transmission
Application specifies only a table index; binding table or address table
entry is used to determine destination parameters

Broadcast messages
Sent to all devices in the network
Can limit radius of propagation
Can limit reception by class of devices (all devices; non-sleepy only;
routers only)

Multicast messages
Sent to a group of one or more nodes
Multicast table held locally to track group participation (via 16-bit
group IDs); multicast binding for group also signifies membership
Can limit propagation radius by hops per group members versus
non-members
2009 ZigBee Alliance. All rights reserved.

31

ZigBee Concepts: Messages


Application populates APS frame for each
transmission:

application profile ID
cluster ID
source & destination endpoint
APS options

APS options:

Include source and/or destination EUI-64 in frame


Encrypt message with APS layer link key
Use retries based on APS (end-to-end) ACK
Perform address or route discovery as needed (or by force)
Use fragmentation (spread payload across multiple
deliveries)

2009 ZigBee Alliance. All rights reserved.

32

EmberZNet: Messages
Loopback is supported (can receive own messages)
IncomingMessageHandler for all incoming
messages
emberAfSendUnicast/ezspSendUnicast
Also SendBroadcast, SendMulticast
Non-EZSP variants use packet buffers for memory
allocation (see stack/include/packet-buffer.h)
Return value signifies message being queued;
MessageSentHandler callback represents final
success/failure of delivery

Stack manages sequence numbers


Application can inspect apsFramesequence

Stack relays messages automatically


Sleepy ZEDs must poll to receive messages, ACKs
Fragmentation is not automatic (requires util code)
2009 ZigBee Alliance. All rights reserved.

33

ZigBee Network Activities


Creating a network
Joining a network
Routing messages

2009 ZigBee Alliance. All rights reserved.

34

Creating a Network
1. ZC starts the network by choosing a
channel and unique two-byte PAN-ID
and Extended PAN ID.
2. ZR or ZED joins the ZC.

3. ZR or ZED joins the ZR. (ZR


becomes the ZEDs parent.)

4.

Network grows outward from ZC.

2009 ZigBee Alliance. All rights reserved.

35

Joining a Network

1.

New ZR or ZED scans


channels to discover all local
(1-hop) ZR or ZC nodes

2.

Scanning device chooses a


responding device and
submits a join request

3.

If accepted, the new device


receives a confirmation that
includes the network address.
(Authentication through TC
occurs next if applicable.)

2009 ZigBee Alliance. All rights reserved.

PAN ID/EPID, Stack Profile, Joining


Allowed sent back to scanning node.

36

EmberZNet: Typical Joining Process


emberScanForJoinableNetwork(channelM
ask, desiredExtendedPanId)
Wait for
emberJoinableNetworkFoundHandler()
callback to yield a network match.
Call emberJoinNetwork(nodeType,
networkParamsPtr) to join.
Decide if it makes sense to stay in this
network.
If not, use
emberScanForNextJoinableNetwork() to
move to the next result.
2009 ZigBee Alliance. All rights reserved.

37

EmberZNet: Other network activities


emberNetworkInit() API:
Restores previous network functionality from last
runtime; only called once each runtime

emberFindAndRejoinNetwork() API:
Locates network and rejoins it if local settings
havent been erased yet
Recognizes network by EPID, even if PAN ID or
channel or security key have changed
Ignores permitJoining state of devices
Recommended for end devices that lose
connection to their parent device; finds new
parent automatically
2009 ZigBee Alliance. All rights reserved.

38

ZigBee Mesh Routing


Addresses are random
When a message needs
to be sent, a routing
table is consulted to
find the next hop.
If the next hop is not
known, a discovery
process will occur to
find the next route.
If the route fails, a new
route will be
discovered if available.

2009 ZigBee Alliance. All rights reserved.

A sends a message to Z
using the table driven
mesh routing (one
possible route).

39

EmberZNet: Routing
Route Table size set at configuration time
Relaying (to neighbor and child nodes)
happens automatically
Can optionally disable relaying with
EMBER_DISABLE_RELAY (useful for routers
installed temporary, like configuration /
commissioning tools)
SoC apps can use End device stack if no
routing (or child support) needed

2009 ZigBee Alliance. All rights reserved.

40

ZigBee: Routing and End Devices


ZED requires parent to participate in PAN
Parent is always first hop for ZEDs outgoing
message, last hop for incoming
ZED Broadcasts get unicasted first hop

Indirect Transmission Timeout: Determines


how long parents hold incoming messages
for their children
If broadcast mask includes sleepy ZEDs, they
must poll within timeout to get it not reliable

APS ACK is sent (if required) by ZED, not


parent, after pickup

2009 ZigBee Alliance. All rights reserved.

41

EmberZNet: End Device Routing


Can set
EMBER_INDIRECT_TRANSMISSION_TIMEOUT (030000ms) at configuration time
Should be same for all devices in PAN
ZigBee Pro recommended value: 7680ms

Parent holds as many pending child messages as


memory/timeout allows
Only one pending broadcast is remembered

Can use Alarm mechanism to hold critical messages


beyond timeout (EmberZNet-only)
See http://portal.ember.com/alarms for details

2009 ZigBee Alliance. All rights reserved.

42

Many-to-One/Source Routing
0x2049 | 0x2154 | 5
0xA021 | 0x2154 | 2
0x422F | 0x1254 | 3
0x5E2D | 0x2154 | 9
0x1437 | 0xD312 | 3
0x379C | 0xD312 | 3

Routing table overflows!

Gateway

Large networks pose special challenges in ZigBee due to


limited memory of embedded devices
Many nodes talking to one (a concentrator) will require
many broadcasts (route discoveries to common destination)
inbound and will quickly overflow routing tables outbound,
assuming traditional route discovery.
ZigBee provides aggregation mechanism [many-to-one
route request] to build route to aggregator node from
everyone with a single broadcast
Source routing (sender specifies route path) can be used at
concentrator for outbound routes
2009 ZigBee Alliance. All rights reserved.

43

MTOR / Source Routing (cont.)


Low RAM concentrator
buffers only most recent source route(s)
nodes send Route Record before every
transmission to concentrator
OK if concentrator only talks to destinations in
reply

High RAM concentrator


buffers many source routes
Route Record only sent initially (until first sourcerouted packet arrives from concentrator)
Great if resources permit
2009 ZigBee Alliance. All rights reserved.

44

EmberZNet: MTOR / Source Routing


emberSendManyToOneRouteRequest,
emberAppendSourceRouteHandler APIs to
send MTORRs, add source routes
EZSP uses SetSourceRoute to manage source
route for current message

Source route table code provided; see


app/util/source-route*.c
Optional callback to notify application of
incoming MTORR from concentrator
Optional callback to handle route errors (to
detect broken routes to/from concentrator)

2009 ZigBee Alliance. All rights reserved.

45

Asymmetric Link Detection

B
95%

99%

15%

99%
80%

Asymmetric links are common in real deployments


ZigBee routing discovers routes without regard to asymmetry,
sometimes resulting in non-functioning routes
Stack exchanges information in between nodes to maintain
symmetry information
Only symmetric links are used when performing route discovery,
ensuring the best bi-directional link is established
2009 ZigBee Alliance. All rights reserved.

46

EmberZNet: Neighbor Tables


Neighbor Table size (4, 8, 16) set at
configuration time (16 is recommended)
emberGetNeighbor() and
emberNeighborCount() APIs for inspecting
own neighbor table
ZDO offers LQI Table Request for remote
discovery of neighbor (and child) data
EmberZNet uses special algorithms to
balance neighbor tables in dense networks

2009 ZigBee Alliance. All rights reserved.

47

ZigBee Concepts: Standard Security


Backwards compatibility with ZigBee 2006 devices
Network Key (known to all devices in PAN)
Provides encryption (128-bit, 32-bit) of NWK layer and
above
Security level = 5 (Only level supported by ZigBee)
All nodes share the same encryption key
Key can be pre-loaded or passed at join time
Key sequence # can be used to switch between keys

Trust Center (TC)


One device (typically ZC) serves this role for entire network;
other devices can validate locally
Validates join requests for secure networks
Can accept or deny nodes access based on EUI64

2009 ZigBee Alliance. All rights reserved.

48

ZigBee Concepts: Security


Link key (known only to source and destination):
Link key may be pre-installed during manufacturing,
passed during joining
Can use global (fixed), unique, or pseudo-random link keys
for each device pair.
Used between TC and joining node to encrypt NWK key
data
Can also use these for APS encryption of certain
application messages between any 2 nodes
TC can act as trusted 3rd party for creating a link key
Used in SE profile for passing sensitive customer data

Additional security constructs (CBKE, ECC, etc.)


can be layered on top of this
2009 ZigBee Alliance. All rights reserved.

49

EmberZNet: Security
EMBER_SECURITY_LEVEL sets security type
0 = no security
5 = ZigBee standard security level

Other settings configured via


emberSetInitialSecurityState API prior to joining/forming
PAN
NWK and APS Keys are stored non-volatilely; only erased after
LeaveNetwork
Link Key Table size set at configuration time
SoC apps require full link keys library to use per-device link
keys
Can set Distributed Trust Center Mode to allow all routers to
act as TC for their joining nodes
Not interoperable with non-EmberZNet devices
Only ZC can be Trust Center (unless distributed)
See app/util/security for helper utility functions
2009 ZigBee Alliance. All rights reserved.

50

ZigBee Concepts: Endpoints


An endpoint is a service point within a
ZigBee node up to 255 endpoints per
node
Endpoints 0 and 240-255 are reserved
for special functions; endpoints 1-239
are available for user applications
Endpoint 0: ZigBee Device Object
[ZDO]; used for network config/admin
Endpoint 255: Broadcast endpoint

Each endpoint implements a single


device type from a single application
profile
Different endpoints on a single node
may represent devices from different
application profiles
Endpoint numbers for devices/profiles
not standardized across devices
2009 ZigBee Alliance. All rights reserved.

An example endpoint implementation:


Endpoint # Profile Name: Device Type

0 ZigBee Device Profile (ZDP): ZDO


1 HA: Thermostat
2 HA: On/Off Output
3 SE: In-Premise Display
4 MSP: proprietary vendor extensions

51

EmberZNet: Endpoints
Set at configuration time
emberEndpoints[] array for SoC apps
AddEndpoint command for EZSP apps

Stack doesnt care what endpoints exist


Only used for responding to service discovery
All messages (except ZDO) arrive at app.

2009 ZigBee Alliance. All rights reserved.

52

ZigBee Concepts: Endpoints


Each endpoint has a descriptor and a cluster
list.
Cluster list describes capabilities of device
by enumerating supported inbound (client) &
outbound (server) clusters.
Endpoint descriptor contains:
Application Profile ID
Device ID (within the specified profile)
Number of supported inbound & outbound
clusters
Bitmask indicating version/capabilities
2009 ZigBee Alliance. All rights reserved.

53

ZigBee Concepts: ZDO


ZigBee Device Object (ZDO): Stack service on Endpoint 0 to facilitate
discovery / administrative info from node
Requests/responses are standard in ZigBee NWK spec
Two general types of discovery in ZigBee:
Device discovery: find a 16-bit network address from an IEEE 64bit address, or the reverse.
Service discovery: query a device or the entire network
Active endpoints or supported clusters on a device (devices)
Devices and endpoints matching specified Profile ID and/or
Clusters
Other types are available (See ZigBee Device Profile section

in ZigBee NWK Spec. for details)

Applications can learn about the network around them:


Query device properties (tables, descriptors, configuration, etc.)
Set properties of remote devices (e.g: ask a node to permit joining,
leave the network, bind/unbind to a destination)

2009 ZigBee Alliance. All rights reserved.

54

EmberZNet: ZDO
Stack responds to most requests itself
Can elect to be notified about these
Can elect to handle unsupported requests

Utility functions provided for requests


See app/util/zigbee-framework/zigbee-device*.*
For example of usage in app context, see
app/framework/util/service-discovery*.c

2009 ZigBee Alliance. All rights reserved.

55

ZigBee Basics
ZigBee Radio
ZigBee Stack
ZigBee Application Layer

APP

APP

ZDO

APS
SSP
NWK

MEDIUM ACCESS (MAC)

PHYSICAL RADIO (PHY)

2009 ZigBee Alliance. All rights reserved.

56

ZigBee Concepts: Application Profile


Determines application-level features, protocol
Defines device types with different capabilities (clusters)
16-bit device ID enumerates device type within the profile
Inherits network-level features from stack feature set
Majority of public profiles use ZigBee Pro as dominant
stack feature set; non-Pro devices only allowed as end
devices.
Identified by 16-bit application profile IDs
Profile IDs allocated, maintained by ZigBee Alliance
can request private profile IDs for custom applications

Examples:

Home Automation (HA)


Commercial Building Automation (CBA)
Smart Energy (SE)
Manufacturer-Specific Profile (MSP) anything
proprietary

2009 ZigBee Alliance. All rights reserved.

57

ZigBee Concepts: Clusters


A cluster is a set of message types related to a
certain device function (e.g: Metering, Ballast
Control)
Enumerated by 16-bit Cluster ID

ZigBee Cluster Library (ZCL)


Defines clusters for use in public profiles
Same cluster (and ID) can be used in multiple profiles

Defines attributes and commands for a given cluster


Groups clusters into functional domains, e.g. Lighting,
HVAC
Uses client and server model of communication
Client sends messages to server; server maintains attributes

Standard command/messaging format ensures


interoperability, abstracts commands for designers
ZigBee Cluster Library spec available for public
download at zigbee.org website
2009 ZigBee Alliance. All rights reserved.

58

ZigBee Concepts: Clusters


ZigBee Cluster Library
Others
Safety &
Security

Closures
Lighting

HVAC
Measurement
& Sensing

2009 ZigBee Alliance. All rights reserved.

Application Profiles

General

Others

Commercial
Building Auto.

AMI

Home
Automation

59

ZCL Functional Domains


General
Generic commands and attributes, such as on/off, level control,
mains/battery information
Closures
Shades / Blinds, motor step size, status
HVAC
Thermostat readings and pump control
Lighting
Colour control and ballast configuration
Measurement and Sensing
Luminance, temperature, pressure, flow measurement,
occupancy sensors
Security and Safety
Zone control, warning devices, ancillary control equipment
Protocol Interfaces
Interface with BACNet

2009 ZigBee Alliance. All rights reserved.

60

ZCL Cluster IDs in use


Functional domain

Cluster ID range

General

0x0000 0x00ff

Closures

0x0100 0x01ff

HVAC

0x0200 0x02ff

Lighting

0x0300 0x03ff

Measurement and sensing

0x0400 0x04ff

Security and safety

0x0500 0x05ff

Protocol interfaces

0x0600 0x06ff

2009 ZigBee Alliance. All rights reserved.

61

General Clusters
Cluster ID

Cluster name

Description

0x0000

Basic

Attributes for determining basic information about a device,


setting user device information such as location, and
enabling a device.

0x0001

Power configuration

Attributes for determining more detailed information about a


devices power source(s), and for configuring under/over
voltage alarms.

0x0002

Device Temperature
Configuration

Attributes for determining information about a devices internal


temperature, and for configuring under/over temperature
alarms.

0x0003

Identify

Attributes and commands for putting a device into Identification


mode (e.g. flashing a light)

0x0004

Groups

Attributes and commands for group configuration and


manipulation.

0x0005

Scenes

Attributes and commands for scene configuration and


manipulation.

0x0006

On/off

Attributes and commands for switching devices between On


and Off states.

2009 ZigBee Alliance. All rights reserved.

62

more General Clusters


0x0007

On/off Switch
Configuration

Attributes and commands for configuring On/Off switching


devices

0x0008

Level Control

Attributes and commands for controlling devices that can be set to


a level between fully On and fully Off.

0x0009

Alarms

Attributes and commands for sending notifications and


configuring alarm functionality.

0x000a

Time

Attributes and commands that provide a basic interface to a realtime clock.

0x000b

RSSI Location

Attributes and commands that provide a means for exchanging


location information and channel parameters among devices.

Reserved.

0x000c
0x00ff

2009 ZigBee Alliance. All rights reserved.

63

Manufacturers Extensions
ZCL allows for extensions that are manufacturer specific
even in a fully ZigBee compliant and interoperable
application.
Implemented in such a way that they can be easily
ignored by devices that do not support these
manufacturer extensions.
Standard ZCL Header in app. payload
Contains optional Manufacturer Code field
Private Cluster IDs can be used

2009 ZigBee Alliance. All rights reserved.

64

ZCL Frame Format


Bits: 8

0/16

Variable

Frame control

Manufacturer
code

Transaction
sequence
number

Command
identifier

Frame payload

ZCL header

ZCL payload

Note: The Cluster ID is already in the APS Frame Header


The ZCL frame format is composed of a ZCL header and a ZCL payload.
Frame Control
Frame type describes if cluster specific or not (01 = cluster specific)
Manufacturer specific describes if this is an extension to the profile (0 = not)
Direction describes if coming from client (0) or server (1) side of cluster.
Manufacturer Code is as supplied by ZigBee, only if manufacturer specific set.
Transaction Sequence number is maintained by the app to match command / response
Command identifier and Payload is specific to the cluster and command.
2009 ZigBee Alliance. All rights reserved.

65

ZigBee Concepts: Addresses

EUI-64

64-bit globally
unique address
(IEEE MAC
address)
assigned to
each device at
manufacturing;
never changes

2009 ZigBee Alliance. All rights reserved.

Network Address

16-bit
network
unique
address
(node ID)
assigned to
each device
when it joins
the network;
may change
over time

Endpoint

8-bit logical
address within a
device (similar to
TCP port); each
device or service
implementation
occupies an
endpoint

Cluster ID

16-bit field used


as an
applicationspecific
message type

66

Home Automation (HA) Profile


Interface between devices in the home or small
building
Often used in hospitality scenarios as well
Becoming key part of the emerging security / monitoring /
automation (SMA) market

ZigBee Residential Security (NWK layer encryption)


ZigBee Pro required for routers and coordinators
ZigBee 2006/2007 feature sets supported for end devices

Small to large networks, generally with central


gateways
Interoperability, ease of installation/setup are key
concerns
2009 ZigBee Alliance. All rights reserved.

67

Home Automation (HA) Profile


Clusters Used:
General (Basic, On/Off, Groups, Scenes, )
Measurement/Sensing (Light, Temp, Pressure)
Lighting (Color Control)
HVAC (Thermostats, fans, pumps)
Closures (Shade controls)
Security/Safety (Alarms, zones, )

2009 ZigBee Alliance. All rights reserved.

68

Home Automation (HA) Profile


Device Types:
General: Range Extender, On/Off Switch & Output,
Level Control Switch & Output, Mains Outlet,
Remote Control, Config Tool, Simple Sensor
Lighting: Light, Switch, Dimmer, Occupancy & Light
Sensor
Closures: Shade & Controller
HVAC: Heater/Cooler, Thermostat, Temp / Pressure /
Flow Sensor, Pump & Controller
Intruder Alarm Systems (IAS): Warning Device,
Controller/Indicator, Zone

2009 ZigBee Alliance. All rights reserved.

69

Smart Energy (SE) Profile


Interface between AMI and HANs
Security is a key concern

Standard Security + extra features


NWK layer encryption among all nodes in network
APS layer encryption among pairs of devices
Trust Center facilitates key installation
Key Establishment Cluster to negotiate unique keys via
ECC

Anonymous messaging for AMIHAN comms


(pricing, events, etc. Avoids need for dedicated
bridge device
Typically ZigBee Pro, but ZigBee 2007 may be used
for end devices
Utilizes fragmentation for larger messages
Prefers channels that dont overlap with WiFi
2009 ZigBee Alliance. All rights reserved.

70

Smart Energy (SE) Profile


Clusters Used:
Key Establishment
Price (within cluster or via anonymous messaging)
Demand Response / Load Control (DRLC)
Simple Metering
Message (for updating displays)
Tunneling (complex metering) (not yet completed)
Pre-payment (not yet completed)

2009 ZigBee Alliance. All rights reserved.

71

Smart Energy (SE) Profile


Device Types:
Energy Service Portal (ESP) gateway between
utility and home; acts as ZC & TC
Metering Device (gas, water, electric, )
In-Premise Display (IPD)
Programmable Communicating Thermostat (PCT)
Load Control Device (e.g. remote disconnect)
Smart Appliance
Prepayment Terminal
Range Extender

2009 ZigBee Alliance. All rights reserved.

72

ZigBee Product Implementation


Device

Device

Device

Device Device

HA

MSP

CBA

SE

ZigBee
Certified
Product

ZigBee Cluster Library

ZigBee Stack

HA

ZigBee Pro Stack


End Device
Interoperability

ZigBee Specification

ZigBee
Compliant
Platform

IEEE 802.15.4
2009 ZigBee Alliance. All rights reserved.

73

ZigBee terms and abbreviations


IEEE 802.15.4
FFD = Full-Function Device
Implements all MAC functions; able to serve as a
coordinator

RFD = Reduced Function Device


Implements subset of MAC functionality; no coordinator
ability

MIC = Message Integrity Code


PAN = Personal Area Network
A single unique ZigBee / IEEE 802.15.4 network

DSSS = Direct Sequenced Spread Spectrum


CCA = Clear Channel Assessment

2009 ZigBee Alliance. All rights reserved.

74

ZigBee terms and abbreviations


ZigBee Stack components
APS = Application Support layer
Handles end-to-end (multi-hop) comms

NWK = Network (Networking layer)


Handles routing, addressing, joining/forming

MAC = Medium Access Control (layer)


Handles point-to-point comms

PHY = Physical layer


Handles transmission of bits over airwaves

SSP = Security Services Provider


Security engine interfacing with other layers

ZDO = ZigBee Device Object


Software entity built into the stack for handling
administrative queries/responses
2009 ZigBee Alliance. All rights reserved.

75

ZigBee terms and abbreviations


ZigBee node types
ZC = ZigBee Coordinator
Principal controller of the PAN; 1 per network; an FFD

ZR = ZigBee Router
Relays messages; doesnt duty cycle; an FFD

ZED = ZigBee End Device


Doesnt relay messages; an RFD; depends on an FFD
(parent) for routing inbound/outbound

TC = Trust Center
Handles authentication for devices entering the network

NM = Network Manager
Device responsible for handling frequency agility and PAN
ID conflict resolution

2009 ZigBee Alliance. All rights reserved.

76

ZigBee terms and abbreviations


Key ZigBee terms
Association: process of gaining membership into PAN
Authentication: process of gaining authorization to
communicate securely among other devices in PAN
Binding: creating logical/functional links between devices (at
application level), such as switch to light or client to server
Cluster: a message type in the application, usually pertaining
to some command or attribute; signified by Cluster ID
Commissioning: creating/modifying network-level device
relationships (ZC/ZR/ZED) in PAN through association
Endpoint: logical software component on a ZigBee device (like
a port in Ethernet terms) for handling device functionality at
application layer; not to be confused with end device
PAN ID: PAN Identifier, used to delineate networks
EPID = Extended PAN ID; used for further disambiguation of PANs

Provisioning process of matching up devices in network to


other devices with compatible services, usually via binding

2009 ZigBee Alliance. All rights reserved.

77

ZigBee terms and abbreviations


Smart Energy
(Z)SE = (ZigBee) Smart Energy Profile
HA = ZigBee Home Automation Profile
ESP = Energy Service Portal
HAN = Home Area Network
Local Communications

NAN = Neighborhood Area Network


Last Mile Communications

SKKE = Symmetric-Key Key Establishment


CBKE = Certificate-Based Key Exchange
ECC = Elliptical Curve Cryptography
MIC = Message Integrity Code
2009 ZigBee Alliance. All rights reserved.

78

Vous aimerez peut-être aussi