ZigBeeWorkshop_v2_Part2.pdf

ZigBee Workshop
(Nov 2009 - Special Release)
Student Guide
Revision 0.97
November 2009
Important Notice
Important Notice
Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or
to discontinue any product or service without notice, and advise customers to obtain the latest
version of relevant information to verify, before placing orders, that information being relied on is
current and complete. All products are sold subject to the terms and conditions of sale supplied at
the time of order acknowledgment, including those pertaining to warranty, patent infringement,
and limitation of liability.
TI warrants performance of its semiconductor products to the specifications applicable at the time
of sale in accordance with TI’s standard warranty. Testing and other quality control techniques
are utilized to the extent TI deems necessary to support this warranty. Specific testing of all
parameters of each device is not necessarily performed, except those mandated by government
requirements.
Customers are responsible for their applications using TI components.
In order to minimize risks associated with the customer’s applications, adequate design and
operating safeguards must be provided by the customer to minimize inherent or procedural
hazards.
TI assumes no liability for applications assistance or customer product design. TI does not
warrant or represent that any license, either express or implied, is granted under any patent right,
copyright, mask work right, or other intellectual property right of TI covering or relating to any
combination, machine, or process in which such semiconductor products or services might be or
are used. TI’s publication of information regarding any third party’s products or services does not
constitute TI’s approval, warranty or endorsement thereof.
Copyright  2005, 2008 Texas Instruments Incorporated
Mailing Address
Texas Instruments
Technical Training Organization
7839 Churchill Way, M/S 3984
Dallas, Texas 75251-1903
Texas Instruments Norway AS
Low Power RF
Gaustadalleen 21
N-0349 Oslo, Norway
ii
ZigBee Workshop - Cover Page
ZigBee Stack
Introduction
This module will take a fairly comprehensive look at the ZigBee stack. We’ll delve into forming
a network, descriptors, the application framework, binding and other topics. By the end of the
module with its 4 labs you should be able to ask the right questions (and maybe answer them)
concerning how your application will utilize the ZigBee stack.
Objectives

Starting a network

Routing

Packet Sniffer

Descriptors

Application Framework

Binding

ZDO API’s

Callbacks

Multiple Endpoints

Mobility
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8-1
Module Topics
Module Topics
ZigBee Stack .............................................................................................................................................. 8-1
Module Topics......................................................................................................................................... 8-2
ZigBee Overview..................................................................................................................................... 8-3
ZigBee 2007 Features ............................................................................................................................. 8-4
ZigBee 2007 Summary ............................................................................................................................ 8-8
ZigBee Advantages and Architecture...................................................................................................... 8-9
Mesh Networking and Components .......................................................................................................8-10
PAN Formation......................................................................................................................................8-12
Routing...................................................................................................................................................8-13
Digging into the Stack............................................................................................................................8-15
Profiles...................................................................................................................................................8-16
Clusters ..................................................................................................................................................8-17
Endpoints ...............................................................................................................................................8-18
Descriptors.............................................................................................................................................8-19
Architecture ...........................................................................................................................................8-22
Application Framework and Send/Receive Data ...................................................................................8-23
Visualizing Acknowledgements ..............................................................................................................8-25
Digging Further into the Stack ..............................................................................................................8-26
Binding...................................................................................................................................................8-27
Digging still further into the ZigBee Stack.............................................................................................8-31
ZDO .......................................................................................................................................................8-32
Configuration.........................................................................................................................................8-34
Z-Tool ....................................................................................................................................................8-35
Third Party Tools...................................................................................................................................8-38
Mobility..................................................................................................................................................8-42
Smart Energy .........................................................................................................................................8-43
8-2
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
ZigBee Overview
ZigBee Overview
ZigBee Overview

IEEE 802.15.4-2003 defines PHY/MAC

ZigBee 2007
Two stack profiles: ZigBee and ZigBee PRO


ZigBee RF4CE

ZigBee IP

…?
2
ZigBee 2007 and ZigBee PRO

ZigBee 2007




Based on proven 2006 feature set plus frequency agility and
optional fragmentation
Basic features require less memory & resources than PRO
ZigBee PRO

Enhanced features optimize performance and RAM
utilization under select scenarios

Feature enhancements based on identified limitations of
ZigBee 2006 for specific network deployments
Interoperability

PRO devices will operate as End Devices on a ZigBee ‘06 or
‘07 network, and vice versa

ZigBee ‘06 and ‘07 network seamlessly
ZigBee 2007 Features ...
4
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8-3
ZigBee 2007 Features
ZigBee 2007 Features
ZigBee 2007 Feature Set
ZigBee
 CSKIP Tree Addressing
AODV Routing
Backup Tree Routing





Fragmentation
Frequency Agility
Basic Group Addressing
ZigBee PRO
 Stochastic Addressing
 AODV Routing
 Many to One / Source
Routing
 Asymmetric Link Handling
 Fragmentation
 Frequency Agility
 Basic Group Addressing


Security


Limited Broadcast
Addressing
Security
High Security
Address Assignment ...
5
ZigBee 2007 - Automated Address Assignment
ZigBee: Tree Addressing Basics



Uses CSKIP algorithm to dynamically distribute addresses
Provides well defined topology for backup tree routing
Supports mobile End Devices through Rejoin and ED Announce
ZigBee PRO: Stochastic Addressing Basics




Randomly assigns addresses to joining devices
Deals with potential address conflict through resolution protocol
Adds extended address to network packets for resolution
Supports mobile End Devices through Rejoin and ED Announce
Group Addressing ...
6
8-4
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
ZigBee 2007 Features
CSKIP() Tree Address Allocation
0x0000 Coordinator address
0xFFFF
Router 0_0 Router 0_1 Router 0_2 Router 0_3 Router 0_4 Router 0_5
Coordinator child routers and ……….. child end_devices
0x0001 Router address – Depth 1
0x143D
Router 1_0 Router 1_1 Router 1_2 Router 1_3 Router 1_4 Router 1_5
….
Router 0_0 child routers and ………... child end_devices
0x0004 Router address – Depth 4
0x0017
Router 3_0 child routers and .. child end_devices
Home Automation Profile:
MAX_CHILDREN = 20
MAX_ROUTERS = 6
MAX_DEPTH = 5

Parents allocate addresses

At Depth 5, a single address is allocated
(if a router, no devices can join it)

This is address assignment, not routing
ZigBee Mesh Networking ...
22
ZigBee 2007 - Group Addressing
ZigBee: Basic Group Addressing
Send broadcast out to entire network and filter by group ID at the
application layer

ZigBee PRO: Basic + Limited Broadcast Group Addressing



Basic group addressing is same as ZigBee
Group member can send limited broadcast with restrictions on
message propagation
Limited broadcast restricts non-member re-broadcasts
Limited Broadcast Group Addressing Tradeoffs




Network communication is reduced in very large networks where
communication is mostly local
Sleeping devices cannot participate in the group
Message sender has to be a group member
Ineffective in small networks or for cross-network communication
Fragmentation ...
7
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8-5
ZigBee 2007 Features
ZigBee 2007 - Fragmentation
Basics
Optional in BOTH ZigBee and ZigBee PRO
Used to disassemble and reassemble large application payloads
Implemented at application layer as an add-on



Tradeoffs
Allows application to send large packets without concern for size
Adds code complexity and application header overhead


Frequency Agility ...
8
ZigBee 2007 - Frequency Agility
Basics



Mandatory in BOTH ZigBee and ZigBee PRO
Used to compensate for RF interference by monitoring network
statistics and notifying ZDO when “problem” is detected
ZDO of Network Manager responds accordingly
Tradeoffs





Provides solution for interference prone environments
Requires additional complexity maintaining network statistics
Requires resynchronization when sleeping End Devices miss
channel migration message
Can be costly in terms of battery consumption
Can be problematic if a Router misses the “change” message
ZDO = ZigBee Device Object (network and device management)
PAN ID Conflict Resolution ...
9
8-6
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
ZigBee 2007 Features
ZigBee 2007 PAN ID Conflict Resolution
Basics
 ZigBee PRO feature only
 Used to resolve the scenario when co-existing networks select
the same PAN_ID on the same channel
 All devices monitor neighbor communication during joining to
identify duplicate PAN
 Network Manager handles resolution, backup Manager can be
designated
Tradeoffs
 When commanded to change PAN_ID, devices missing the
message can become stranded
 Commissioning can be used to prevent this problem
PAN = Personal Area Network
Security ...
10
ZigBee 2007 Security
ZigBee: Basic Security

Secured network communication through AES-128 encryption
ZigBee PRO: Basic + optional High Security


High Security creates a mechanism for establishing link keys
between peer to peer connections
High Security adds additional security when devices on the
network may not be trusted (inside attack)
High Security Tradeoffs




Requires the overhead of link key establishment
Adds significant complexity consuming valuable code space
SE and HA profiles chose NOT to use high security
CBA will probably not use high security
AES-128 = 128-bit Advanced Encryption Standard
ZigBee 2007 Summary ...
11
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8-7
ZigBee 2007 Summary
ZigBee 2007 Summary
ZigBee (non-PRO) Summary

ZigBee is useful …


In most topologies; including Peer to Peer or Sensor
Reporting
ZigBee drawbacks include:


Limited address assignment capabilities in a mobile
environment
Route establishment takes time and expends energy
during route establishment in many source to
Concentrator scenario
ZigBee PRO Summary ...
12
ZigBee PRO Summary

ZigBee PRO is useful in networks with:




Large deployments with a high ratio of mobile devices
Many sensor nodes reporting to Concentrator
High Security Requirements
ZigBee PRO drawbacks include:




Additional features increase the code size and complexity
Network will suffer reduced throughput due to communication
overhead
Heavy burden on the “Concentrator” device
Required Network Manager becomes a Point of Failure
ZigBee Sales Pitch ...
13
8-8
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
ZigBee Advantages and Architecture
ZigBee Advantages and Architecture
ZigBee Sales Pitch




Enable low cost, low power, reliable devices for monitoring and control
Ensure that devices are efficient in their use of the available bandwidth
Provide a platform and implementation for wirelessly networked devices
 Make it easy to design and develop ZigBee devices
 Reduce today’s cost of building wireless solutions
Enable “out-of-the-box” interoperable devices where desired by
manufacturers
Architecture ...
14
ZigBee Device Software Architecture
Endpoint
Endpoint Endpoint
app 240 … app 1
app 0
User
User
ZDO
app
app
ZigBee Stack
HAL/I/O
OSAL
TI-MAC
Physical HW (PHY)
Mesh Network …
15
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8-9
Mesh Networking and Components
Mesh Networking and Components
Mesh Network Devices
ZigBee Coordinator
Starts the Network
Routes packets
Manages security
Associates Routers and End
Devices
Example: Heating Central
ZigBee Router
Routes packets
Associates Routers and End
Devices
Example: Light

Devices are pre-programmed for
their network function
ZigBee End Device
Sleeps most of the time
Can be battery powered
Does not route
Example: Light switch
Coordinator …
16
Coordinator









Starts a non-beaconed PAN
Allows other devices to join it
Buffers messages for sleeping End Devices
Provides binding and address-table services
Routes messages
Dynamically repairs routing
Can have I/O capability
Manages security
Radio always on
Router ...
17
8 - 10
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Mesh Networking and Components
Router








Does not own or start PAN (Scans to find a network to join)
Allows other devices to join it after PAN has been started
Routes messages
Dynamically repairs routing
Buffers messages for sleeping End Devices
Support secure messaging
Can have I/O capability
Radio always on
End-Device ...
18
End Device

Does not:
 route messages
own or start network
allow other devices to join it
Scans to find a PAN to join
Polls parent to get messages (can be disabled)
Can be mobile
Radio/CPU can sleep






Forming a network …
19
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 11
PAN Formation
PAN Formation
PAN Formation - Coordinator
ZDO
NWK
Form PAN
MAC
Energy detect
each channel
Perform
passive scan
Scan confirmed
Beacon request
open channels
Perform
active scan
Formation
confirmed
PHY
Scan confirmed
Notify
application via
ZDO_STATE_CHANGE
event

A unique PAN ID is determined either from
the IEEE address or dynamically

One channel is selected

Process fully automated once started
PAN discovery ...
20
PAN Discovery/Join - Router and End-Device
ZDO
NWK
Discover PAN
MAC
Perform
active scan
Discovery
confirmed
Scan confirmed
Join
Associate
Join confirm
Associate
confirm
Notify
application via
ZDO_STATE_CHANGE
event
PHY
Beacon request
open channels
Associate
request
Associate
response

List of discovered PANs are returned

Every chip has a unique 64-bit IEEE address
(used for joining ID)

ZDO determines which PAN to join by PAN ID

Process fully automated once started
Address Allocation ...
21
8 - 12
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Routing
Routing
ZigBee Mesh Routing

Mesh network routing employs AODV
(Ad Hoc On Demand Distance Vector Routing)




Ad Hoc (Network is unknown at start-up)
On Demand (Determines the route to the destination only when needed)
Distance Vector (Only the final destination and the next hop are stored at
each node. Relies on a distributed protocol to handle routing)
Self healing upon route failure

Reliable and robust. Failed router will reinitiate discovery and find an
alternative path
More routing info …
23
ZigBee Mesh Routing






Routing is a decentralized, cooperative process
Routers (and Coordinator) forward unicast messages directly to the
destination
Other messages prompt the router to check its’ routing table
 If an entry exists, router forwards message to the next node
 If none exists, route discovery takes place
Route discovery searches all possible routes using request/response
packets (RREQ/RREP)
 “Route cost”, a function of RSSI, to all neighbors is recorded
 Routing algorithm selects and stores: the destination address, the next
hop node address and the link status in the routing table
Routes can be invalidated due to errors, expiration, mobile nodes or by the
user, prompting a new route discovery
Pro routing includes Many-to-One routing to optimize data concentrator
traffic
Routing table …
24
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 13
Routing
Routing Table



Every routing device contains a Routing Table
The table stores information needed to route packets
Routes can automatically expire if not used for
ROUTE_EXPIRY_TIME seconds (f8wconfig.cfg)
Routing table entry:
Destination address
Next hop node
Link status


A Route Discovery table stores temporary information
while route discovery is in process
MAX_RREQ_ENTRIES (f8wconfig.cfg) sets the maximum
number of simultaneous route discoveries that can be
performed
Re-routing …
25
Automatic Rerouting
1.
2.
3.
Coordinator sends msgs to R3 via R1 (blue path), then R1 fails
Coordinator sends msgs to R3 via R2 (green path), then R2 fails
Coordinator sends msgs to R3 via R4 and R5 (red path)
R4
R6
R5
R2
R1
Coord
R3
Channel
Configuration…
26
8 - 14
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Digging into the Stack
Digging into the Stack
Digging Into the ZigBee Stack





Profiles
Clusters
Endpoints
Descriptors
Application Framework




Send/Receive functions and structures
Application Acknowledgements
Third Party tools
Write to the LCD
Profiles ...
30
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 15
Digging into the Stack
Profiles
Profiles




ZigBee Allian ce d efi nes Profiles as a me th od to ensure application le ve l
interopera bility

De fin es d evice types in th e profile

Agree s on me ssag e fo rmat, conten t coding, a nd interp retation of clusters

Specifies network stack p rofile
A profile ID mu st be un ique an d is issued b y the allia nce
Pro prietar y pro fil es can b e d efined by the customer
 li mits app lica ti on interop erab ility to devices th at share th is pr ofi le.
 Do es n ot exclud e n etwo rk l evel interop erab ility
Status o f All iance Pro fil es (1 0/2008 )

Ho me A utomation (HA)

Smart E nerg y (S E)



Rele ased fo r Zi gBee a nd ZigBe e PRO

Formerly A dvanced Meteri ng In fr astru ctu re (AMI)

Rele ased fo r Zi gBee P RO
Co mme rcial Buil ding Au to mation (CBA )

Und er develo pment

Ad opted as sta ndar d for wire less B ACnet
Switch
Blind
Light
Sensor
Thermostat
Pump
Person al He alth and Hospital Care (P HHC)

Und er develo pment
Clusters ...
31
8 - 16
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Clusters
Clusters
Clusters

Values sent or received over
the network are called
Clusters (data types)

The cluster library contains a
complete list of these data
types. For HA, see zcl_ha.h

Endpoint applications send
messages to other Endpoint
applications using clusters
Switch
Cluster
List
ZCL_HA_CLUSTER
_ID_GEN_ON_OFF
Light
ZCL_HA_CLUSTER_ID_GEN_ON_OFF
ZCL_HA_CLUSTER_ID_GEN_LEVEL_CONTROL
Cluster
List
Endpoints ...
32
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 17
Endpoints
Endpoints
Endpoints

An Endpoint is the address of your
application



24 0
0 is the ZDO application address
Up to 240 additional applications
can be supported on a device
Each endpoint is identified by its
own descriptor structures
Z
D
O
1
ZigBee Stack
HAL /I/O
OSAL
TI-MAC
PHY


This device contain two endpoints (in addition to the ZDO)
Each endpoint contains a switch application
Descriptors ...
33
8 - 18
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Descriptors
Descriptors
Descriptors
Simple
Endpoint
Node Power
Node
Populated in your application initialization code
Must be registered with the Application Framework
See AF.h for definitions of these structures
Simple and Endpoint descriptors provide information about the
endpoint applications
Power and Node descriptors provide information about the device





Simple descriptor ...
34
Simple Descriptor
typedef struct

One per Endpoint
byte EndPoint;

byte AppProfId;

byte AppDeviceId;

int AppDevVer:4;

Endpoint number (1 – 240)
Profile ID from Alliance
Device ID from Alliance
Version
{
int Reserved:4;
byte AppNumInClusters;
cId_t *pAppInClusterList;

byte AppNumOutClusters;

cId_t *pAppOutClusterList;


Number of input clusters
Pointer to input cluster list
Number of output clusters
Pointer to output cluster list
} SimpleDescriptionFormat_t;
Endpoint descriptor ...
35
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 19
Descriptors
Endpoint descriptor
typedef struct
{
byte endPoint;
byte *task_id;

One per Endpoint

Endpoint number (1 – 240)
OSAL application task ID

SimpleDescriptionFormat_t *simpleDesc;
afNetworkLatencyReq_t latencyReq;
} endPointDesc_t;


Pointer to simple descriptor
0
Each Endpoint must be registered with
the application framework (AF):
afRegister( endPointDesc_t *epDesc )
Power descriptor ...
36
Node Power Descriptor
typedef struct
{
unsigned int PowerMode:4;
unsigned int AvailablePowerSources:4;
unsigned int CurrentPowerSource:4;
unsigned int CurrentPowerSourceLevel:4;
} NodePowerDescriptorFormat_t;

One per device

PowerMode
 Receiver always on,
periodically on or
externally activated

PowerSources


Constant (Mains)

Rechargeable
batteries

Disposable batteries
CurrentLevel

Critical, 33%, 66%,
100%
Node descriptor ...
37
8 - 20
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Descriptors
Node Descriptor
typedef struct
{
uint8 LogicalType:3;
uint8 ComplexDescAvail:1;
uint8 UserDescAvail:1;
uint8 Reserved:3;
uint8 APSFlags:3;
uint8 FrequencyBand:5;
byte CapabilityFlags;
uint8 ManufacturerCode[2];
uint8 MaxBufferSize;
uint8 MaxInTransferSize[2];
uint16 ServerMask;
uint8 MaxOutTransferSize[2];
uint8 DescriptorCapability;
} NodeDescriptorFormat_t;

One per device

Coordinator, Router or End Device

Band: 868MHz, 902MHz or 2.4GHz

Max single packet size

Network Manager, Primary/Backup
Trust center, binding table, or
discovery table
Architecture ...
38
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 21
Architecture
Architecture
ZigBee Device Architecture
Endpoint
app 240
User
app
…
Endpoint Endpoint
app 1
app 0
User
app
HAL/I/O
ZDO
Application Framework
OSAL
ZigBee Stack
MAC
Physical HW
Application Framework …
39
8 - 22
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Application Framework and Send/Receive Data
Application Framework and Send/Receive Data
Application Framework (AF)
Endpoint
app 240
…
Endpoint Endpoint
app 1
app 0
User
app
User
app
ZDO
The AF provides applications with
structures and functions to:

Manage endpoints

Send and receive data
Application Framework
Send/Receive
Structures
and Functions

Address structure

Send data function

Receive data structure

Receive data callback
Address Structure ...
40
Address Structure
Address Structure
typedef struct{
union{
uint16 shortAddr;
ZLongAddr_t extAddr;


Unicast to 16-bit short or
64-bit extended destination address
} addr;
afAddrMode_t addrMode;

byte endPoint;

Addressing mode
Endpoint number
} afAddrType_t;
Mode Parameter
Addr16Bit:
Unicast
AddrNotPresent: Indirect – destination address found in binding table
AddrBroadcast: Broadcast to all devices, non-sleeping devices or
routers/coordinator only
AddrGroup:
Devices can assign themselves to groups addressable here
Send data interface ...
41
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 23
Application Framework and Send/Receive Data
Send Data Function
afStatus_t AF_DataRequest(
afAddrType_t *dstAddr,
endPointDesc_t *srcEP,


Pointer to address structure
Endpoint descriptor of sending endpoint
uint16 cID,

Cluster ID for this message
uint16 len,

uint8 *buf,

Message length in bytes
Pointer to message data
uint8 *transID,

Transaction sequence number
uint8 options,
uint8 radius );

Transmit options (i.e. ack request)

Max propagation radius in hops

afStatus_SUCCESS
afStatus_FAILED
Return
parameters
defined in
ZComDef.h
afStatus_MEM_FAIL
afStatus_INVALID_PARAMETER
Receive data interface ...
42
Receiving Data
1 . Afte r yo u regi ster the En dpoi nt with the A F :
afRegister( &GenericApp_epDesc );
you can receive inco mi ng OTA message call backs
at tha t En dpoi nt
2 . You r Ta sk event han dler is tri gger ed by
the SYS _EVENT_MSG e ve nt:
case AF_INCOMING_MSG_CMD:
GenericApp_MessageMSGCB( MSGpkt );
break;
Received Data Structures
typedef struct
{
byte TransSeqNumber;
uint16 DataLength;
byte *Data;
} afMSGCommandFormat_t;
typedef struct
{
osal_event_hdr_t hdr;
uint16 groupId;
3 . Now yo ur messa ge callba ck rou tin e ca n process
and a ct on the message :
uint16 clusterId;
void GenericApp_MessageMSGCB( afIncomingMSGPacket_t *pkt ) afAddrType_t srcAddr;
{ switch ( pkt->clusterId )
byte endPoint;
{ case GENERICAPP_CLUSTERID:
byte wasBroadcast;
#if defined( LCD_SUPPORTED )
byte LinkQuality;
HalLcdWriteScreen( (char*)pkt->cmd.Data, "rcvd" );
byte Securit yUse;
#endif
uint32 timestamp;
break;
afMSGCommandFormat_t cmd;
}}
} afIncomingMSGPacket_t;
Visualizing Acknowledgments ...
43
8 - 24
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Visualizing Acknowledgements
Visualizing Acknowledgements
Acknowledgments
End Device
Coord
Router
Switch
Light
Network
Network
MAC




52
Network
MAC
MAC
App Msg
App Msg
MAC Ack
MAC Ack
App Ack
App Ack
MAC Ack
MAC Ack
MAC-level acknowledgements & retries are default and automatic
regardless of service used. Destination app is unaware and uninvolved
Specifying ACK generates an ACK by the destination AF task
If you are using application level acknowledgments,
AF_DATA_CONFIRM will notify you of the complete transmissions'
success/failure
If you are not using application level acknowledgments,
AF_DATA_CONFIRM will notify the app of the first hops’ success/failure
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 25
Digging Further into the Stack
Digging Further into the Stack
Digging Further Into the ZigBee Stack

Binding







Binding table
Automatic binding
Assisted binding
Centralized binding
Application binding
Z-Tool
Z-Tool scripting
A binding example ...
64
A Simple Network



The light switch device has 2
endpoints
The lamp device has 4
endpoints
Binding can be one to one,
one to many or many to many
Lamp Device
Radio
1
Lamps
2
3
4
Light
Switch
Device
Binding ...
65
8 - 26
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Binding
Binding
Binding




Applications bind with other applications
Simple and Endpoint descriptors (covered later) are used to
determine who can talk to who
IN clusters and OUT clusters must have the same profile ID and be
compatible
Documented in Z-Stack API Guide and in Z-Stack Developer’s Guide

There are 4 types of binding:
 Automatic
 Assisted


Centralized
Application
Binding Table ...
66
Binding Table




Defined in RAM, but can be saved in Flash if the NV_RESTORE
compiler option is used
Stored on source node (REFLECTOR compiler option required)
Entries map messages to their intended destination
Each entry in the binding table contains the following:
typedef struct
{
uint16 srcIdx;
// Source index
uint8 srcEP;
// Source endpoint
uint8 dstGroupMode;
// Specifies normal or group addressing
uint16 dstIdx;
// Destination index or group address
uint8 dstEP;
uint8 numClusterIds;
// Destination endpoint
// Number of cluster IDs in the clusterIdList below
uint16 clusterIdList[MAX_BINDING_CLUSTER_IDS];
} BindingEntry_t;
Automatic Binding ...
67
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 27
Binding
Automatic Binding
I’m ZCL_HA_CLUSTER
_ID_GEN_ON_OFF (OUT)





I’m ZCL_HA_CLUSTER
_ID_GEN_ON_OFF (IN)!
Let’s talk!
Sending device broadcasts a “personal ad” on the network with:
 Address, Profile ID, Cluster Lists
 Match Description Request - ZDP_MatchDescReq()
Compatible devices respond
Response handled and validated by the ZDO
Sender application stores binding record in binding table
Sometimes called “Service discovery”, “AutoFind” or “AutoMatch”
Assisted Binding ...
68
Assisted Binding
I need this switch and
that light to bind
That’s me!



Me too! I’ll store the
record!
External device initiated binding (“external” meaning not a
participant of the resultant binding)
External device application calls ZDP_BindReq() with 2
applications (addresses and endpoints) and the cluster ID to bind.
The first parameter is where the binding record will be stored
Make sure you have REFLECTOR compile flag enabled
Centralized Binding ...
69
8 - 28
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Binding
Centralized Binding
I’m ZCL_HA_CLUSTER
_ID_GEN_ON_OFF (IN)
I’m ZCL_HA_CLUSTER
_ID_GEN_ON_OFF (OUT)
You guys should talk
to each other
I’ll store the record




Application initiates ZDP_EndDeviceBindReq() (i.e. via button press)
with 2 applications (addresses and endpoints) and the cluster ID to bind.
The first parameter is where the binding record will be stored (sender)
Coordinator receives and holds the request until a request from another
node is received (10 seconds is the default)
 Profile IDs must match, clusters must be compatible
Make the REFLECTOR compile flag enabled
Known as “source binding” in ZigBee 2007
Application Binding …
70
Application Binding
Applications can manage the binding table itself, adding
and removing entries
bindAddEntry() – Add entry to binding table
bindRemoveEntry() – Remove entry from binding table

bindRemoveClusterIdFromList() – Remove a cluster ID from an existing binding table entry
bindAddClusterIdToList() – Add a cluster ID to an existing binding table entry
bindRemoveDev() – Remove all entries with an address reference
bindRemoveSrcDev() – Remove all entries with a referenced source address
bindUpdateAddr () – Update entries to another address
bindFindExisting () – Find a binding table entry
bindIsClusterIDinList() – Check for an existing cluster ID in a table entry
bindNumBoundTo() – Number of entries with the same address (source or destination)
bindNumOfEntries() – Number of table entries
bindCapacity() – Maximum entries allowed
BindWriteNV() – Update table in NV
Which binding method should you use?
71
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 29
Binding
App Centralized Assisted Automatic
Which Binding Method To Use?
+ no user interaction required
+ no tool cost
- development time knowledge
- non-configurable
+ install-time decisions (site-specific knowledge)
+ analysis, maintenance, modification, visualization
can be under installers control
- cost of tool
+ allows user to decide
+ cost of tool minimal
- few, if any, configurable parameters
- requires a user interface on each device
+ maximum flexibility
- you must write all the code
Z-Tool ...
72
8 - 30
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Digging still further into the ZigBee Stack
Digging still further into the ZigBee Stack
Digging Still Further Into the ZigBee Stack





ZDO APIs
Network Startup
Autostart / Start modes
Registering for ZDO Callback
Mobility
ZDO ...
80
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 31
ZDO
ZDO
ZDO APIs
ZDO APIs provide application level control and monitoring of the
following services through the ZigBee Device Profile (ZDP):

Device and Service Discovery


End Device Bind, Bind and Unbind Service


Creation and deletion of binding table entries mapping
messages to their destination
Network Management Service


Ability to discover services offered by other network devices
Allows user or commissioning tools to manage the network
Device Network Startup

ZDApp_Init() in ZDApp.c provides network startup by default

Your application can override this behavior by including the
HOLD_AUTO_START compile option (NV_RESTORE
also recommended)
Network startup ...
81
ZDO Network Startup
void ZDApp_Init( uint8 task_id )
{
ZDAppTaskID = task_i d;
ZDAppNwkAddr. addrMode = Addr16Bit;

This is the default network
start code (minus some
comments)

Inits network

Registers endpoint

Inits device
(NV_RESTORE optional)

Registers for ZDO
callbacks based on
compiler options set and
device type (C/R/ED)
ZDAppNwkAddr. addr.shortAddr = INVALID_NODE_ADDR;
(void)NLME _GetExtAddr();
ZDAppCheckForHoldKey(); / / Check for manual "Hol d Auto S tart"
ZDO_Init();
afRegister( (endPointDesc_t *)&ZDApp_epDesc );
#if defined( ZDO_USERDESC_RESPONSE )
ZDApp_InitUserDesc();
#endif // ZDO_USERDESC_RESPONSE
// Start the device?
if ( devState != DEV_HOLD )
{ ZDO Ini tDevice( 0 );
} else
{ HalLedBlink ( HAL_LED_4, 0, 50, 500 );
} ZDApp_RegisterCBs();
} /* ZDApp_I nit() */
ZDO Status ...
82
8 - 32
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
ZDO
ZDO Status Indicator
devState provides the user app with the ZDO status:
typedef enum
{
DEV_HOLD,
// Initialized - not started automatically
DEV_INIT,
// Initialized - not connected to anything
DEV_NWK_DISC,
DEV_NWK_JOINING,
// Discovering PAN's to join
// Joining a PAN
DEV_NWK_REJOIN,
// Rejoining a PAN, only for end devices
DEV_END_DEVICE_UNAUTH, // Joined but not yet authenticated by trust center
DEV_END_DEVICE,
// Started as device after authentication
DEV_ROUTER,
// Device joined, authenticated and is a router
DEV_COORD_STARTING,
// Started as Zigbee Coordinator
DEV_ZB_COORD,
DEV_NWK_ORPHAN
// Started as Zigbee Coordinator
// Device has lost information about its parent..
} devStates_t;
Registering for ZDO callback ...
83
Registering for a ZDO Callback

You can register for ZDO over-the-air (OTA) message
(request or receive) callbacks

These messages would normally be transparent to your application
ZDO_RegisterForZDOMsg()

Message is sent to the application as an OSAL message
(ZDO_CB_MSG)

zdoIncomingMsg_t contains the OTA message body
Mobility …
84
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 33
ZDO
Configuration
Configure the Channel in f8wConfig.cfg
Multiple channels
may be selected
and the PAN ID ...
27
Configuring PAN ID in f8wConfig.cfg
If PAN_ID = 0xFFFF and device = Coordinator:
Device uses IEEE address to choose a PAN_ID (last 2 bytes)
If PAN_ID = 0xFFFF and device = Router or End Device
Device will join any available PAN
If PAN_ID ? 0xFFFF and device = Coordinator
Device will use the set value for the PAN_ID
If PAN_ID ? 0xFFFF and device = Router or End Device
Device will ONLY join a PAN that has this PAN_ID
Lab time ...
28
8 - 34
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Z-Tool
Z-Tool
Z-Tool


A PC application for sending and receiving commands to/from
programs on the target board using the RS-232 port (transceiver
required)
Requires MT_TASK Compiler option
CC2520
CC2520EM
MS P430
Emulator
Port
CCMSP
USB
FET
Emulator
SmartRF05EB
UART
RS-232
X CVR
RS-232
Sending commands ...
73
Sending Commands from Z-Tool
Receiving commands in app ...
74
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 35
Z-Tool
Receiving Commands In Application
byte MTProcessApp Msg( b yte *pData, byte len )
{ b yte ret = ZFailure;
byte en dpoint;

Message handler takes
en dPo in tDesc_t *epDesc;
the incoming MT message and
mtSysApp Msg_t *msg;
constructs an OSAL message
// Get the endpoin t and skip p ast it.
for the application
en dpoint = *pData++;

Handler code is automatically
len --;
included when enabled
// L ook up the endpo int
ep Desc = afFindEndPointDesc( endpoint );
if ( epDesc )
{ // Build and send the message to the APP
msg = (mtSysApp Msg_t *)osal_msg _allocate( sizeof( mtSysApp Msg_t ) + len );
if ( msg )
{
msg->hd r.even t = MT_SYS_APP_MSG;
msg->endpoint = en dpoint;
msg->appDataLen = len ;
msg->appData = (uint8*)(msg +1);
o sal_memcpy( msg->appData, pData, len );
o sal_msg_send ( *(epDesc->task_id), (u in t8 *)msg );
ret = ZSuccess;
} } retu rn ret;
}
Sending messages from app ...
75
Sending Messages From Application


Use debug_str to send a null-terminated string from within app
Include Debugtool.h to your project
#if defined( BN_DISPLAY_TEST ) && defined( MT_TASK )
debug_str( "Not Sorted" );

Values can be converted for display using _ltoa()
osal.c]


[defined in
Converts a long value to ascii
Declare: unsigned char buf[8];
#if defined( BN_DISPLAY_TEST ) && defined( MT_TASK )
_ltoa((unsigned long) ValueToConvert, &buf[0], 10);
debug_str( buf );
Receiving in Z-Tool ...
76
8 - 36
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Z-Tool
Receiving Messages in Z-Tool


Z-Tool automatically formats
and displays incoming and
outgoing messages
Z-stack is instrumented to
automatically provide system
status at startup (when enabled)
Scripting ...
77
Z-Tool Scripting



Provides automated testing support
JScript based script compiled by Z-Tool
See Z-Tool Help file
functi on MessageHandler(zportName:S tring, id:MES SAG E_ID, msg:Object)
{
switch(currentState)
{

case TEST_S TATE.STATE1:
Note: Code
snippet only
{
/ / set state to STATE 2
cur rentState = TEST_S TATE.STATE 2;
Run Script from
Script browser in
Z-Tool
/ / send SY S_LED_CONTROL command to Devi ce2
var req : S YS_LED_CONTROL = new SYS _LED_CONTROL();
req.LedID = SY S_LED_CONTROL.LED_NUM. LE D_1;
req.Mode = SYS_LED_CONTROL.LED_MODE.BLINK;
ZEngine.S end("Device2", req);
}
Lab time ...
78
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 37
Third Party Tools
Third Party Tools
Daintree Sensor Network Analyzer
ZigBee can be a bit confusing when you’re getting started. The SNA
shows the network in an easy-to-understand format with devices and
interactions shown graphically, and ability to drill down for additional
detail to provide a more complete picture of what is going on.
55
Keeping you up to date
The SNA stays up to date, not only
with the latest ZigBee standards,
but also with the latest functionality
offered by TI.
For example, recent releases of the
SNA support commissioning,
binding, and TI-specific features
including over-the-air firmware
upgrades and locationing. The SNA
provides full support for ZigBee
2006, 2007 and PRO.
56
8 - 38
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Third Party Tools
Complete and Compliant
Help to ensure your products pass ZigBee
certification at the first attempt.
The Daintree SNA is used by the ZigBee test houses as the primary
platform-independent means of visualizing, recording and verifying
conformance to ZigBee specifications and test plans.
Your TI ZigBee development kit, including the SNA, provides
everything you need for development, testing and field trials of
ZigBee devices.
The Basic edition of the SNA comes standard with the TI kits,
together with 30-day trial versions of the enhanced Standard and
Professional editions. Find out more at www.daintree.net
Atalum ...
57
Atalum Manage & Commission Suite
Network Su mmary at a Glance
Synch-up
Repo rts & Stat istics
Eas y t o use Windows to ol for
Commis sion ing Made 1 -2 -3
Graphical Representat ion of
Multiple N etworks
58
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 39
Third Party Tools
Maximize a ZigBee Infrastructure







Atalum enables companies to maximize a ZigBee infrastructure by
minimizing maintenance & management costs.
A ZigBee infrastructure provides a standard wireless means to
control AND monitor ANY thing in ANY place.
To realize the potential of a ZigBee infrastructure companies should
have the means to remotely access & automate what’s going on in
the network.
Plus, commissioning & on-going management must be at least as
economical as existing systems.
Companies should also be able to integrate the information from
ZigBee networks with existing systems and seamlessly interface the
data across applications, locations & users.
Also, installers require a way to quickly commission ZigBee devices
without any special expertise.
Regardless of the phase in the life-cycle Atalum’s GREENsuite
provides the necessary functionality to deploy, manage and maintain
a ZigBee network in a cost-effective and easy way.
59
Fully Loaded Application Suite

Atalum’s GREENsuite provides the tools required by installers, SIs &
OEMs.

Atalum offers a Web network management application along with a
Windows commissioning tool. Information can be synched between
the two applications. APIs for integration with legacy or other
systems can also be used.
Atalum’s intuitive GUIs make it easy to deploy and maintain multiple
hardware platforms.


GREENsuite allows companies to:










Set-up Networks & Configure Sensors
Register Devices
Schedule Events
Define Triggers & Alarms
View Network Diagnostics & Performance
Obtain Reports & Statistics (User Defined Queries or Default)
Manage Users (Access & Privileges)
Obtain System Logs (Summary or Detail)
Export Information (Multiple Formats)
Integrate with Legacy, Billing or Other Systems
Developer network …
60
8 - 40
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Third Party Tools
Low Power RF Developer Network

Modules

Engineering
Services
Development
Tools

Go to www.ti.com/zigbee and click on:
Writing to the LCD ...
61
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 41
Mobility
Mobility
Mobile End Devices
 End devices are automatically mobile. No extra compile flags
needed
 An end device detects that a parent isn’t responding either
through polling failures and/or through data message failures
 MAX_POLL_FAILURE_RETRIES controls the number of
consecutive failures. See f8wConfig.cfg (higher = less sensitive)
 When a child network layer detects that its parent isn’t
responding, it will initiate a rejoin by calling
ZDO_SyncIndicationCB()
 The rejoin process will first scan for an existing parent,
then scan for a new parent and join that network
 In a secure network, it’s assumed that the device already has
a key and a new key isn’t issued
Let's do a lab ...
85
8 - 42
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Mobility
Smart Energy
ZigBee Smart Energy
Why …
88
Why Smart Energy?

Policies such as the Energy Policy Act of 2005 and
California’s Title 24
 Require utility companies to adopt “green” technologies
 Promote awareness of energy conservation
 Push standardization of wireless protocols such as
ZigBee’s Smart Energy
 Help establish National and International market
acceptance
 Drive trial deployments to prove feasibility early
What …
89
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 43
Mobility
What is “Smart Energy”

Metering
 Multiple commodities including electric, gas, water, and thermal

Real-time consumption / production information

Historical price information
Support for meter-as-gateway and meter-as-device on a ZigBee
network
Demand Response and Load Control



Scheduling of multiple events

Built in support for customer override

Text Messaging

Security

Elliptic curve support via 3rd party library
Solution …
90
TI’s Smart Energy Solution






TI / Chipcon has been driving the Alliance since inception
TI has implemented the full Smart Energy Profile
 Available free for download today
 Supports SETestApp Sample Application Code
 Supports Elliptic Curve Cryptology (ECC) stubs
TI can deliver quality parts of significant volume in a timely manner
TI is well positioned in ZigBee, 6LoWPAN, or wherever the
Metering market takes us
TI supports Over the Air Download for remote firmware upgrades
TI will release an SoC based complete Smart Energy solution for
2009
Security …
91
8 - 44
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
Mobility
SE Security

Elliptic Curve Cryptology (ECC)
 TI provides the code for hooking Certicom’s ECC solution
into our stack. We do not provide hooks for any other ECC
solution
 TI does NOT provide the ECC code itself
 Certicom charges customers for their development kit and
does not provide ECC for free. Please check with Certicom
for pricing.
www.Certicom.com
Demos …
92
Low Power Wireless and ZigBee Networking Workshop - ZigBee Stack
8 - 45
ZigBee Security
Introduction
Whether you’re a homeowner or a manager of a mission critical automatic industrial
production line, security is an issue that you should be concerned about. Tech savvy burglars can
use the unsecured transmission from your garage door remote to easily enter your home.
Saboteurs can cripple a production line by targeting an unsecured wireless control system.
Security is an issue for every wireless system.
Objectives

Security modes

Cryptographic key, transport, establishment

Joining a secure network
Low Power RF Solutionsp - ZigBee Security
10 - 1
Module Topics
Module Topics
ZigBee Security.........................................................................................................................................10-1
Module Topics........................................................................................................................................10-2
Security and Modes ...........................................................................................................................10-3
Frames with Security .............................................................................................................................10-4
Trust Center ...........................................................................................................................................10-5
Cryptographic Keys ...............................................................................................................................10-6
Joining a Secure Network ......................................................................................................................10-7
Features .................................................................................................................................................10-9
10 - 2
Low Power RF Solutions - ZigBee Security
Module Topics
Security and Modes
802.15.4 Security
Defined security services include:
 Access Control

Communications based on received frame address
Data Encryption


Frames can be encrypted with a symmetric key
Frame Integrity


Prevents messages from being altered in transit
Sequential Freshness


Counters prevent replay attacks
Security Modes ...
2
Security Modes

Unsecured


Access Control List


Messages are sent in
the clear
Only listed senders will
be communicated with
Secured Mode
S ecurit y
At tributes
n one
MIC-32
Data
Encryption
OFF
OFF
Frame Inte grity
(length of MIC in by tes)
NO
YE S (4)
MIC-64
MIC-128
E NC
OFF
OFF
ON
YES( 8)
YES (16 )
NO
E NC-MIC-32
E NC-MIC-64
E NC-MIC-32
ON
ON
ON
YE S (4)
YES( 8)
YES (16 )
MIC=Message
Integrity Code
ENC=AES
Encryption
(CCM – Combined
encryption and
authentication
block Cipher Mode)
Frames ...
3
Low Power RF Solutions - ZigBee Security
10 - 3
Frames with Security
Frames with Security
IEEE 802.15.4 Frames with Security
P HY MAC A UX
P reambl e HDR HDR HDR
Se curity
Frame Type E na ble
Encr ypted A pp Pa ylo ad
Src Add r
Mode
MIC
FCS
Seq uence
Fra me Co ntrol Field - FCF




Security adds Auxiliary Header and Message
Integrity Code (MIC)
Data in front of the MIC is integrity protected
27 byte overhead (Depending on security
Level selected)
Security Enabled

Frame Control Field – Bit Field
Trust Center ...
4
10 - 4
Low Power RF Solutions - ZigBee Security
Trust Center
Trust Center
Trust Center


Coordinator
Coordinator is assumed to be the Trust
Center (TC) and provides:

Cryptographic key establishment


Key transport
Frame protection

Device management
Two security modes

Standard – TC maintains a standard
network key and controls network
admittance. Memory required does not scale
with network size (ex: Residential)

High – TC maintains a list of devices and
keys. It provides network key updates.
Memory required scales with network size.
(ex: Commercial)
Router
End Device
Keys ...
5
Low Power RF Solutions - ZigBee Security
10 - 5
Cryptographic Keys
Cryptographic Keys
Cryptographic Keys

Master – Basis for long term security
Used for symmetric key establishment (1,3)

Link

Network - Used for broadcast communication security (1,3)
Alternate Network key employed for key rotation
–
Shared exclusively between two network
peers for Unicast communication (1,2,3)
Keys are obtained by:
1. Key-transport (key is sent from one device to another)
2. Key-establishment (key is derived locally)
3. Pre-installation (during programming)
Joining a Secure Network ...
6
10 - 6
Low Power RF Solutions - ZigBee Security
Joining a Secure Network
Joining a Secure Network
Joining a Secure Network
Secure Network
New
Device
Coordinator
Router
End Device

Keys need to be set with new devices that join the network
7
Joining a Secure Network
Secure Network
New
Device
Coordinator
Router
End Device


Keys need to be set with new devices that join the network
Over the air key setup is unsecured and vulnerable to a one
time eavesdropper attack
8
Low Power RF Solutions - ZigBee Security
10 - 7
Joining a Secure Network
Joining a Secure Network
Secure Network
Coordinator
Router
End Device




Keys need to be set with new devices that join the network
Over the air key setup is unsecured and vulnerable to a one
time eavesdropper attack
After joining, device may need to store multiple keys
Solutions: out of band programming
controlled joining
device deactivation
Security features ...
9
10 - 8
Low Power RF Solutions - ZigBee Security
Features
Features
Security Features

Freshness



Message Integrity



Message cannot be modified in transit
0, 32, 64 or 128-bit integrity
Authentication



Prevents replay attacks
Incoming/Outgoing freshness counters
Assurance of Originator
Access Control
Confidentiality


Prevents eavesdropping – 128-bit AES encryption
Can be turned off without affecting freshness,
integrity or authentication
Lab time ...
10
Low Power RF Solutions - ZigBee Security
10 - 9
Manufacturing Issues
Introduction
You need to be aware of the various problems that can arise as you move towards
production. This module presents some of the most important issues.
Objectives

ZigBee Alliance Issues

IEEE Numbers

Production Programming
Low Power RF Solutionsp - Manufacturing Issues
11 - 1
Module Topics
Module Topics
Manufacturing Issues...............................................................................................................................11-1
Module Topics........................................................................................................................................11-2
ZigBee Alliance.................................................................................................................................11-3
Membership ...........................................................................................................................................11-4
Certification and Compliance................................................................................................................11-5
Private Profiles ......................................................................................................................................11-7
IEEE Addresses......................................................................................................................................11-8
Production Programming ......................................................................................................................11-9
11 - 2
Low Power RF Solutions - Manufacturing Issues
Module Topics
ZigBee Alliance
The ZigBee Alliance
What is the ZigBee Alliance?
The ZigBee Alliance is an association of companies working together to
enable reliable, cost-effective, low-power, wirelessly networked, monitoring
and control products based on an open global standard.
Joining the ZigBee Alliance
There are three levels of membership in the ZigBee Alliance with
different entitlements:
Adopter ($3,500USD/year): Offers access to final, approved specifications,
use of the ZigBee Alliance logo, participation in interoperability events, and
access to application Profile Task Group documents and activities.
Participant ($9,500USD/year):Offers full participation in ZigBee Alliance
working groups and member meetings, ability to earn voting rights in work
groups, and early access to ZigBee Alliance specification.
Promoter: ($50,000USD/year) Offers automatic voting rights in all working
groups, final approval rights on all specifications, and a seat on the Alliance
Board of Directors
Member benefits ...
3
Low Power RF Solutions - Manufacturing Issues
11 - 3
Membership
Membership
ZigBee Membership Benefits
As a ZigBee Alliance member, you can:

Use ZigBee Alliance intellectual property for commercial gain,
royalty free.

Leverage the global marketing efforts promoting the use of
ZigBee technology.

Depending on the membership level selected, you can
participate in member meetings, committees, and working
groups that shape the future of ZigBee technology
www.zigbee.org
What are certified products?
4
ZigBee Alliance Membership
Organization Scenario
Companies creating/designing products for
sale using the ZigBee Alliance specification
Companies offering services and reselling
ZigBee products
Companies using ZigBee certified products
designed by others
Homeowner
Retailer
Installer
Architect
Interior Designer
Sub-contractor to ZigBee member company
ZigBee
Membership
Required?
Yes
No
No
No
No
No
No
No
No
Under current ZigBee Alliance rules, the company is only required to be a
member in the year the product is initially created. However, if you
update/modify/etc. your product in later years you must be a member
during that year as well.
Certification process ...
6
11 - 4
Low Power RF Solutions - Manufacturing Issues
Certification and Compliance
Certification and Compliance
What are ZigBee Certified Products?
The ZigBee Alliance promotes the development of products that are
fully compliant with the ZigBee standard. Through certification testing,
you can ensure your products successfully co-exist or interoperate with
other ZigBee Certified Products. ZigBee products are certified with either
a Manufacturer Specific Application Profile or a Public Application Profile.
 A Manufacturer Specific Application Profile is an application developed
by a member.
 A Public Application Profile is developed by the Alliance and is
available to all members (HA or SE at this time).
Both Manufacturer Specific Application Profiles and Public Application
Profiles must be implemented on ZigBee Compliant Platforms.
Note that ZigBee compliance testing does not include
ETSI/FCC/ARIB testing. There are a number of test houses
in this business.
Membership ...
5
ZigBee Certification Process
1.
2.
3.
Join the ZigBee Alliance
Apply for certification
Submit product(s) to test provider
7.
Test provider notifies Alliance of success
Member company provides declaration of
conformity
Alliance conformation of membership, review,
audit and approval
Notification & publication of certification
8.
Certification Logo
4.
5.
6.
Compliance and certification ...
7
Low Power RF Solutions - Manufacturing Issues
11 - 5
Certification and Compliance
Compliance and Certification

ZigBee Qualification Group (ZQG) is responsible for:

Establish an independent test house program

Select test houses
– National Technical Systems of Culver City, California
–

TÜV Rheinland of North America of Pleasanton, California
ZigFest
 Informal multi-vendor interoperability testing

Proving ground for new designs

An invaluable pre-certification testing opportunity
New public profiles in the works:
 CBA
Commercial Building Automation
(completed/ratified/NOT tested)
 PHHC Personal Health & Hospital Care
(in study)
Your profile ...
8
11 - 6
Low Power RF Solutions - Manufacturing Issues
Private Profiles
Private Profiles
Your Own Profile

You can maintain ZigBee compliance without allowing others
access to your network via a Manufacturer Specific
Application Profile

Hundreds of Manufacturer Specific Application Profiles are
already registered

Public profiles, like the Home Automation Profile and Smart
Energy allow interoperability between products

Proprietary profiles are intended to limit interoperability at the
application level, but can also limit network interoperability

Profile IDs are distributed by the Alliance to members. You
must request a profile ID for your proprietary profile
IEEE addresses ...
9
Low Power RF Solutions - Manufacturing Issues
11 - 7
IEEE Addresses
IEEE Addresses
IEEE Addresses
IEEE registers Organizationally Unique
Identifiers (OUI) world-wide. A subset
of these addresses is called Individual
Address Block (IAB).
OUI costs$1650 for 2^40 addresses
IAB costs $550 for 2^12 addresses
http://standards.ieee.org/regauth/index.html
Note: An OUI allocates enough IEEE
numbers to place 2 devices on every
square meter of land and sea on Earth.
Production Programming ...
10
11 - 8
Low Power RF Solutions - Manufacturing Issues
Production Programming
Production Programming
Production Programming





Use development tools for
programming
Elprotronic www.elprotronic.com
E-Lab www.e-lab.de
BP micro www.bpmicro.com
Elnec www.elnec.com
11
Production Board Layout
Production board
Add traces and pads for 14-pin
emulation port to production board

Add traces and pads for UART
connection to Z-Tool (external
transceiver may be needed)

MSP CC2520
430
Populate with DIP pins header for
emulation and test

UART port
14 pin JTAG
emulation port
12
Low Power RF Solutions - Manufacturing Issues
11 - 9
Production Programming
GangPro-CC and FlashPro-CC
USB Flash Programmers








USB Flash Programming Adapter (FPA) with programmable Vdd
2.2 to 3.6 V, Idd up to 100 mA.
Supplied GUI software and Multi-FPA API-DLL.
IEEE Address and Serial Number assignment with GUI software.
Six devices programmed simultaneously from one Gang FPA.
Up to 8 USB-FPA can be controlled via Multi-FPA API-DLL that
allows to program simultaneously up to 48 devices, e.g. to
program one panel with up to 48 boards on the panel.
Six CC2431F128 can be erased,
blank checked, programmed and
verified in 12 seconds.
Lock setup capability useful in
production.
Custom defined programming
sequence (from the script file).
13
GangPro-CC GUI
Code formats:
IEEE Address and Serialization
Auto incremented
From the custom defined file
TI hex (txt)
Intel (hex)
Motorola (s19, s28, s37)
IEEE Address
Serialization
14
11 - 10
Low Power RF Solutions - Manufacturing Issues
Production Programming
GangPro-CC
Multi-FPA API-DLL
Multi-FPA API-DLL
Application Software (C++, LabVIEW etc.)
Multi-FPA DLL Selector and Task Manager
API-DLL
API-DLL
API-DLL
Simultaneous process
USB-1
FPA-1
Device-1
Device-1
Device-1
Device-1
Device-1
Device-6
USB-2
FPA-2
Device-1
Device-1
Device-1
Device-1
Device-1
Device-12
USB-8
FPA-8
Device-1
Device-1
Device-1
Device-1
Device-1
Device-48
15
Contronix Programmers
16
Low Power RF Solutions - Manufacturing Issues
11 - 11
Production Programming
Contronix
17
11 - 12
Low Power RF Solutions - Manufacturing Issues