Académique Documents
Professionnel Documents
Culture Documents
Presented by
Silicon Laboratories
Shaoxian Luo
ZigBee Basics
ZigBee Radio
ZigBee Stack
ZigBee Application Layer
Star Network
(e.g. 802.11)
Mesh Network
(e.g. ZigBee)
Network Topologies
Star
Tree
Mesh
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)
IEEE 802.15.4
Ratified Spring 2003
Any
Processor
APP
APP
ZDO
APS
Application
ZigBee Stack
MAC+PHY
MicroController
SSP
EM357
IEEE 15.4
Transceiver
EM357
NWK
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
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
Source: IEEE
802.15.4-2003
Specification,
Figure E.1
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
11
ZigBee Basics
ZigBee Radio
ZigBee Stack
ZigBee Application Layer
APP
APP
ZDO
APS
SSP
NWK
12
Application
ZigBee
802.15.4
Network organization
Route Discovery
Device Discovery
Message relay
Security
ZigBee Pro
Feature
Set
Medium Access
Physical RF
13
14
15
16
17
ZigBee Type
ZigBee Coordinator (ZC)
Notes
Special router that forms the
network; only 1 per PAN
ZC
2009 ZigBee Alliance. All rights reserved.
ZR
ZED
18
19
20
21
22
EUI-64
Network Address
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
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
25
26
27
Destination
28
29
30
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
application profile ID
cluster ID
source & destination endpoint
APS options
APS options:
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
33
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.
4.
35
Joining a Network
1.
2.
3.
36
37
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
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
40
41
42
Many-to-One/Source Routing
0x2049 | 0x2154 | 5
0xA021 | 0x2154 | 2
0x422F | 0x1254 | 3
0x5E2D | 0x2154 | 9
0x1437 | 0xD312 | 3
0x379C | 0xD312 | 3
Gateway
43
44
45
B
95%
99%
15%
99%
80%
46
47
48
49
EmberZNet: Security
EMBER_SECURITY_LEVEL sets security type
0 = no security
5 = ZigBee standard security level
50
51
EmberZNet: Endpoints
Set at configuration time
emberEndpoints[] array for SoC apps
AddEndpoint command for EZSP apps
52
53
54
EmberZNet: ZDO
Stack responds to most requests itself
Can elect to be notified about these
Can elect to handle unsupported requests
55
ZigBee Basics
ZigBee Radio
ZigBee Stack
ZigBee Application Layer
APP
APP
ZDO
APS
SSP
NWK
56
Examples:
57
58
Closures
Lighting
HVAC
Measurement
& Sensing
Application Profiles
General
Others
Commercial
Building Auto.
AMI
Home
Automation
59
60
Cluster ID range
General
0x0000 0x00ff
Closures
0x0100 0x01ff
HVAC
0x0200 0x02ff
Lighting
0x0300 0x03ff
0x0400 0x04ff
0x0500 0x05ff
Protocol interfaces
0x0600 0x06ff
61
General Clusters
Cluster ID
Cluster name
Description
0x0000
Basic
0x0001
Power configuration
0x0002
Device Temperature
Configuration
0x0003
Identify
0x0004
Groups
0x0005
Scenes
0x0006
On/off
62
On/off Switch
Configuration
0x0008
Level Control
0x0009
Alarms
0x000a
Time
0x000b
RSSI Location
Reserved.
0x000c
0x00ff
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
64
0/16
Variable
Frame control
Manufacturer
code
Transaction
sequence
number
Command
identifier
Frame payload
ZCL header
ZCL payload
65
EUI-64
64-bit globally
unique address
(IEEE MAC
address)
assigned to
each device at
manufacturing;
never changes
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
66
67
68
69
70
71
72
Device
Device
Device Device
HA
MSP
CBA
SE
ZigBee
Certified
Product
ZigBee Stack
HA
ZigBee Specification
ZigBee
Compliant
Platform
IEEE 802.15.4
2009 ZigBee Alliance. All rights reserved.
73
74
75
ZR = ZigBee Router
Relays messages; doesnt duty cycle; an FFD
TC = Trust Center
Handles authentication for devices entering the network
NM = Network Manager
Device responsible for handling frequency agility and PAN
ID conflict resolution
76
77
78