You are on page 1of 37

Wireless Control That Simply Works

ZigBee Application Framework - Product Profiles


Phil Jamieson, ZigBee AFG Chair
ESS Birmingham UK, October 12th, 2006

Copyright 2005-2006 ZigBee

TM

Alliance. All Rights Reserved.

The ZigBee Stack

Application Framework
ZPUI

Application Object 240


[On Endpoint 240] APSDE-SAP
APSSE-SAP NLSE-SAP

Application Object 1
[On Endpoint 1] APSDE-SAP

ZigBee Device Object (ZDO)


[On Endpoint 0] APSDE-SAP
APSME-SAP

Security Service Provider

Application Support (APS) Sub-Layer


NLDE-SAP

NLME-SAP

Network (NWK) Layer


MCPS-SAP MLME-SAP

Medium Access Layer (MAC) Layer


PD-SAP PLME-SAP

Physical (PHY) Layer


ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
2

Application Overview: Addressing & Binding


Radio Z1 Switch 1 EP 3 Switch 2 EP 21
Switch unit Switch application object adds functionality to switch unit Can create relationships between applications by adding bindings

Lamp application object adds functionality to lamp unit

EP = Endpoint
ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.

Lamp unit

Radio Z2

Lamp Lamp Lamp Lamp 1 2 3 4 EP 5 EP 7 EP 8 EP 17


3

Application Overview: Transporting Clusters


Radio Z1 Switch 1 EP 3 Switch 2 EP 21
Switch unit

Clusters (commands) transported via bindings EP = Endpoint


ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.

Lamp unit

Radio Z2

Lamp Lamp Lamp Lamp 1 2 3 4 EP 5 EP 7 EP 8 EP 17


4

Application Overview: Indirect Transmission


Radio Z1 Switch 1 EP 3 Switch 2 EP 21
Switch unit

Radio Z0

ZigBee coordinator

EP = Endpoint
ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.

Lamp unit

Radio Z2

Lamp Lamp Lamp Lamp 1 2 3 4 EP 5 EP 7 EP 8 EP 17


5

The Application Support Sub-Layer

Application Framework
ZPUI

Application Object 240


[On Endpoint 240] APSDE-SAP
APSSE-SAP NLSE-SAP

Application Object 1
[On Endpoint 1] APSDE-SAP

ZigBee Device Object (ZDO)


[On Endpoint 0] APSDE-SAP
APSME-SAP

Security Service Provider

Application Support (APS) Sub-Layer


NLDE-SAP

NLME-SAP

Network (NWK) Layer


MCPS-SAP MLME-SAP

Medium Access Layer (MAC) Layer


PD-SAP PLME-SAP

Physical (PHY) Layer


ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
6

APS Service Primitives


Data service
APSDE-DATA.request APSDE-DATA.confirm APSDE-DATA.indication

Management service
APSME-BIND.request APSME-BIND.confirm APSME-UNBIND.request APSME-UNBIND.confirm

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

Request to Transmit Data


APSDE-DATA.request ( DstAddrMode, DstAddress, DstEndpoint, ProfileId, ClusterId, SrcEndpoint, asduLength, asdu, TxOptions, DiscoverRoute, RadiusCounter )
Not present, 16-bit or 64-bit According to DstAddrMode Target endpoint: 0x00-0xff Profile to which this command belongs Cluster being transported Source endpoint: 0x00-0xfe The length of asdu The application data Security, NWK key, acknowledgement select Route discovery override Mesh transmission radius

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

Notification of the Arrival of Data


APSDE-DATA.indication ( DstEndpoint, SrcAddrMode, SrcAddress, SrcEndpoint, ProfileId, ClusterId, asduLength, asdu, WasBroadcast, SecurityStatus )
Target endpoint on this device: 0x00-0xfe Not present, 16-bit or 64-bit According to SrcAddrMode Originator endpoint: 0x00-0xff Identifier of the profile from which the frame originated Cluster being received The length of asdu The application data Whether the transmission was broadcast Unsecured, NWK key or link key

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

General APDU Frame Format

Depending on indirect addressing mode

Not included with command frames

Not included with command frames

Depending on indirect addressing mode

Octets:1

0/1 Destination endpoint

0/1 Cluster identifier

0/2 Profile identifier

0/1 Source endpoint

Variable

Frame Control

Frame payload

Addressing fields APS header APS payload

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

10

Frame Control Field

Data, command or acknowledgement frame

Source/destination endpoint inclusion control

Acknowledgement request control

Bits:0-1 Frame type

2-3 Delivery mode

4 Indirect address mode

5 Security

6 Ack. request

7 Reserved

Normal unicast, indirect addressing or broadcast transmission

Frame security control

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

11

Binding Link Creation/Removal


APSME(UN)BIND.request ( SrcAddr, SrcEndpoint, ClusterId, DstAddr, DstEndpoint )
64-bit IEEE address Source endpoint: 0x01-0xff Source cluster to (un)bind with destination 64-bit IEEE address Destination endpoint: 0x01-0xff

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

12

The Binding Table

The binding table forms the mapping: (as, es, cs) = { (ad1, ed1), (ad2, ed2), , (adn, edn) } Where
as es cs adi edi = the address of the device as the source of the binding link = the endpoint identifier of the device as the source of the binding link = the cluster identifier used in the binding link = the ith address of the device as the destination of the binding link = the ith endpoint identifier of the device as the destination of the binding link

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

13

The Application Framework

Application Framework
ZPUI

Application Object 240


[On Endpoint 240] APSDE-SAP
APSSE-SAP NLSE-SAP

Application Object 1
[On Endpoint 1] APSDE-SAP

ZigBee Device Object (ZDO)


[On Endpoint 0] APSDE-SAP
APSME-SAP

Security Service Provider

Application Support (APS) Sub-Layer


NLDE-SAP

NLME-SAP

Network (NWK) Layer


MCPS-SAP MLME-SAP

Medium Access Layer (MAC) Layer


PD-SAP PLME-SAP

Physical (PHY) Layer


ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
14

Data Types
Data type No data Unsigned 8-bit integer Signed 8-bit integer Unsigned 16-bit integer Signed 16-bit integer Semi-precision Absolute time (s) Relative time (ms) Character string Octet string Data length (octets) 0 1 1 2 2 2 4 4 Defined in 1st octet Defined in 1st octet

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

15

Descriptors
Mandatory/ Optional

Name

Description

Node

Type and capabilities of the node (one per device)

Node power

Node power characteristics (one per device)

Simple

Device descriptions contained in the node (one per active endpoint)

Complex

Further information about the device descriptions (one per active endpoint)

User

User-definable information

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

16

Node Descriptor

Field name Logical type Frequency band MAC capability flags Manufacturer code Maximum buffer size

Length (bits) 3 5 8 16 8

Description ZigBee coordinator, router, end-device 868MHz, 915MHz, 2.4GHz Alternative PAN coordinator, MAC logical device type, power source, receiver on when idle, security capability Allocated by the ZigBee Alliance Max size of data passed to application

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

17

Simple Descriptor

Field name Endpoint Application profile ID Application device ID Application device version Application flags Application input cluster count Application input cluster list Application output cluster count Application output cluster list

Length (bits) 8 16 16 4 4 8 8*i 8 8*o

Description The endpoint to which this descriptor refers The profile implemented on this endpoint The device description implemented on this endpoint Version 1.0 Complex, user descriptor available Number of input clusters List of supported input clusters Number of output clusters List of supported output clusters

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

18

General AF Frame Format

Number of transactions, n, included in the frame

Key Value Pair (KVP) or Message (MSG)

Bits:4 Transaction count

4 Frame type

Variable Transaction 1

Variable

Variable Transaction n

Where each transaction, Transaction i, has the format:


Bits:8 Transaction sequence number Transaction header Variable Transaction data Transaction payload
19

Transaction sequence number used to tie response frames to request frames

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

General KVP Command Frame Format

Appropriate data type (See Data Types)

Defined in appropriate device description

Dependent on command, data type and device description

Bits: 4 Command type identifier

4 Attribute data type

16 Attribute identifier

0/8 Error code

Variable Attribute data

Set Event Get with acknowledgement Set with acknowledgement Event with acknowledgement Get response Set response Event response

Success Invalid endpoint Unsupported attribute Invalid command type Invalid attribute data length Invalid attribute data Application defined error

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

20

MSG Frame Format

Bits: 8 Message length

Variable Message data

Designed Free No All

for commands which do not fit into the KVP structure form data response support

transactions must be defined in the device description

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

21

The ZigBee Device Object

Application Framework
ZPUI

Application Object 240


[On Endpoint 240] APSDE-SAP
APSSE-SAP NLSE-SAP

Application Object 1
[On Endpoint 1] APSDE-SAP

ZigBee Device Object (ZDO)


[On Endpoint 0] APSDE-SAP
APSME-SAP

Security Service Provider

Application Support (APS) Sub-Layer


NLDE-SAP

NLME-SAP

Network (NWK) Layer


MCPS-SAP MLME-SAP

Medium Access Layer (MAC) Layer


PD-SAP PLME-SAP

Physical (PHY) Layer


ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
22

Device & Service Discovery Commands


Command NWK address IEEE address Node descriptor Power descriptor Simple descriptor Active endpoint Match descriptor Complex descriptor User descriptor End device announce Addressing Request Broadcast Unicast Unicast Unicast Unicast Unicast Broadcast/unicast Unicast Unicast Unicast to ZC Response Unicast Unicast Unicast Unicast Unicast Unicast Unicast Unicast Unicast Unicast

ZC = ZigBee Coordinator
ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
23

Binding Commands

Command End device bind Bind Unbind

Addressing Request Unicast to ZC Unicast to ZC or Src Unicast to ZC or Src Response Unicast Unicast Unicast

ZC = ZigBee Coordinator
ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
24

Network Management Commands

Command Network discovery Neighbour table Routing table Binding table Leave network Direct network join

Addressing Request Unicast to ZC/router Unicast to ZC/router Unicast to ZC/router Unicast to ZC/router Unicast Unicast to ZC/router Response Unicast Unicast Unicast Unicast Unicast Unicast

ZC = ZigBee Coordinator
ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
25

Logical Device Types


State machine description for each device type
ZigBee ZigBee ZigBee

Coordinator Router End Device

Device initialisation Device normal operating state

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

26

Profiles

Application Framework
ZPUI

Application Object 240


[On Endpoint 240] APSDE-SAP
APSSE-SAP NLSE-SAP

Application Object 1
[On Endpoint 1] APSDE-SAP

ZigBee Device Object (ZDO)


[On Endpoint 0] APSDE-SAP
APSME-SAP

Security Service Provider

Application Support (APS) Sub-Layer


NLDE-SAP

NLME-SAP

Network (NWK) Layer


MCPS-SAP MLME-SAP

Medium Access Layer (MAC) Layer


PD-SAP PLME-SAP

Physical (PHY) Layer


ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
27

Why Do We Need Profiles?


Need a common language for exchanging data Need a well defined set of processing actions Device interoperability across different manufacturers Simplicity and reliability for the end users Consumer flexibility for products Allows solid conformance test programmes to be created Realistic application specifications developed through OEM

experience

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

28

What is a Profile?
Part 1: profile specification
A A

set of devices required in the application area set of clusters to implement the functionality
A set of attributes to represent device state A set of commands to enable the communication

Specification Specific

of which clusters are required by which devices

functional description for each device

Part 2: profile test specification


Set Set

of PICS* for device conformance specification of test cases for conformance testing

*PICS Protocol Implementation Conformance Statement


ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.
29

Profile Classes
Standard profiles
For

generically useful applications publicly by members of the ZigBee Alliance follows the profile lifecycle within the Application Framework Working Group

Developed Managed

Development Enables

products to undergo logo certification so that the ZigBee logo can be used manufacturer specific proprietary applications privately by individual manufacturers profiles must use a ZigBee allocated profile identifier

Private profiles
For Developed Private

Commercial

products built using private profiles must undergo no harm testing

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

30

Profile Development Lifecycle


Qualification & certification

Pre-development

Development

Gauge interest

Develop market requirements document

Develop profile specification

Define compliance test program

Demonstrate interoperable implementations

Profile proposal presentation

Profile study group formed

MRD complete Profile task group formed

Profile specification complete

Compliance test cases complete

Profile complete, published & ratified products appear

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

31

The ZigBee Cluster Library (ZCL)

ZigBee Cluster Library


Control HVAC Industrial Lighting Sensors Security

ZigBee Profiles
Home Automation Commercial Building Automation Industrial Plant Monitoring Automatic Meter Reading

ZigBee cluster library specifies functional

ZigBee profiles specifies application

domains
Each specification specifies the cluster sets

domains
Each profile collects related elements from

for that functional domain


Each specification defines mandatory &

the cluster library into application domains


Each profile defines device descriptions for

optional clusters, attributes, commands and functional descriptions


Explicit device descriptions are not defined
ZigBeeTM Alliance | Wireless Control That Simply Works
Copyright 2005-2006. All Rights Reserved.

each required device


Each profile specifies the cluster identifiers

for each cluster used from the cluster library


32

ZCL: Incremental Specification


Residential Devices

General cluster for basic manipulation and common tasks Mandatory clusters for fundamental functionality Optional clusters for enhanced functionality

Light Source General Load control OccSensor ctrl PropExtCluster1

Occupancy Sensor General Basic OS ctrl PropExtCluster2

E.g. Turning a residential sensor into a commercial sensor

Commercial Devices
Ballast Unit General Load control OccSensor ctrl LightSensor ctrl Ballast control PropExtCluster1 Occupancy Sensor General Basic OS ctrl Adv. OS ctrl PropExtCluster2

Proprietary extensions can be added by individual manufacturers

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

33

Current Profiles
Commercial building automation
Complete

building control, monitoring and energy management

Home automation
Low

to high end residential systems for control of devices around the home time varying attributes related to operating environment and machinery conditions monitoring, asset tracking and structural

Industrial plant monitoring


Monitoring

Wireless sensor applications


Environmental

monitoring

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

34

Future Standard Profiles


Telecom

applications

Light data sharing Active RFID in mobile paying

Automatic

Meter Reading health care

Residential & commercial utility systems Body area networks Fitness monitoring: home, gym, on-the-move Patient monitoring In vehicle control: vehicular & entertainment Status monitoring

Personal/home

Automotive

Others

identified by ZigBee members

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

35

Summary
The ZigBee AFG manages

Three stack components Profiles development Data service to the profiles Binding mechanism Framework for profile development ZigBee descriptors Device & service discovery Binding management Network management Can be standard or private Standard profiles follow a defined procedure ZigBee Cluster Library provides a repository of functionality for profiles
36

The application support (APS) sub-layer


The application framework (AF)


The ZigBee device objects (ZDO)


Profiles

ZigBeeTM Alliance | Wireless Control That Simply Works


Copyright 2005-2006. All Rights Reserved.

Wireless Control That Simply Works

Any Questions?

Copyright 2005-2006 ZigBee

TM

Alliance. All Rights Reserved.

You might also like