ZigBee Overview
Sunghyun Choi, Associate Professor, Ph.D.
Multimedia & Wireless Networking Lab. (MWNL) Seoul National University
E-mail: [email protected] URL: http://mwnl.snu.ac.kr
Talk Outline
ZigBee Architecture Overview
ZigBee Network Overview
Network Structure
ZigBee Device Types
Addressing
Message Routing
Link Symmetry
3
The 802 Wireless Space
Data Rate (Mbps)
Range
ZigBee
802.15.4 802.15.3
802.15.3a 802.15.3c WiFi
802.11
10 100 1000
WPAN WLAN WMAN WWAN
0.01 0.1 1
Bluetooth 802.15.1
IEEE 802.22
WiMax IEEE 802.16
IEEE 802.20
What IEEE 802.15.4 Addresses
IEEE 802.15.4
MAC and PHY only
IEEE 802.15.4 MAC Upper Layer Stack
IEEE 802.2 LLC Other LLC
IEEE 802.15.4 2400 MHz PHY IEEE 802.15.4
868/915 MHz PHY
5
ZigBee Missions
Needed an organization with a mission to define a complete open global standard for reliable,
cost-effective, low-power, wirelessly networked products addressing monitoring and control
Alliance provides
Upper layer stack and application profiles
Compliance and certification testing
Branding
Result is a set of recognizable, interoperable solutions
ZigBee Architecture Objectives
Enable low cost, low power, reliable
devices for monitoring and control based on IEEE 802.15.4 PHY/MAC standard.
Ensure interoperability through the definition of application profiles
Provide the framework to allow a separation of concerns for the
specification, design, and implementation
of ZigBee devices.
7
The ZigBee Platform
IEEE 802.15.4
Public Application Profile
ZigBee Stack
Compliant Platform
Certified Product
ZigBee Protocol Stack
9
ZigBee Protocol Stack (1/2)
Application Framework
The manufacturer-defined application objects
Application Support Layer
Maintains tables for binding, which is the ability to match two devices together based on their services and their needs
Forwards messages between bound devices
Network Layer
Will be covered.
ZigBee Protocol Stack (2/2)
ZigBee Device Object (ZDO)
Defines the role of the device within the network (e.g., ZigBee coordinator or end device)
Initiates and/or responds to binding requests
Establishes a secure relationship between network devices
Discovers devices on the network and
determining which application services they provide.
ZigBee NWK Overview
NWK Layer Details
ZigBee device types
Network management and addressing
Message routing
Route discovery and Maintenance
Security (not dealt in this material)
13
Network Structure
ZigBee Device Types (1/2)
ZigBee Coordinator (ZC)
Acts as IEEE 802.15.4 PAN Coordinator (FFD)
Initiates network formation
Channel, PANId, Stack profile
One extra function: acts as Bind Request Controller
ZigBee End Device (ZED)
Acts as IEEE 802.15.4 Device (RFD)
Shall not allow associating and participating in routing
Relies on its parent to let it sleep Î RxOnWhenIdle is off
15
ZigBee Device Types (2/2)
ZigBee Router (ZR)
Acts as IEEE 802.15.4 Coordinator (FFD)
Discovers and associates with ZC or ZR
Extends the network coverage
Manages local address allocation/de- allocation
Look after its ZEDs when it comes to broadcast and routing messages
Addressing (1/2)
CSkip based address assignment
Cm: nwkMaxChildren, Rm: nwkMaxRouters, Lm: nwkMaxDepth
( ) ( 1) 1, if -th child router
( ) , if -th child end-device
where 1 for router and 1 ( ) for end-device, respectively
parent skip n
parent skip m
m m m
A C d n n
A A C d R n n
n R n C R
+ ⋅ − +
= ⎨⎧⎩ + ⋅ +
≤ ≤ ≤ ≤ −
17
Addressing (2/2)
Address determined from tree location
Example
Cm=5: nwkMaxChildren, Rm=3: nwkMaxRouters, Lm=3: nwkMaxDepth
19
Example (Cont ’ d)
Note that the addresses for Zigbee Router (a), (b), and (c) are not assigned via the rule by which those for ZED (e) ~ (j) are assigned. And ZED (e)
couldn’t associate with ZR (k) since ZR (k) exhausts its addresses for ZED.
ZC [Cskip=21, Addr=0]
j c
f i
g
h b
ZR [Cskip=6, Addr=1]
ZED [Cskip=6, Addr=64]
ZR [Cskip=6, Addr=22]
ZR [Cskip=6, Addr=43]
ZR [Cskip=1, Addr=44]
ZED [Cskip=0, Addr=48]
e X
ZED [Cskip=1, Addr=41]
ZED [Cskip=1, Addr=42]
a
ZR [Cskip=1, Addr=23]
ZR [Cskip=1, Addr=29]
ZR [Cskip=0, Addr=30]
ZED [Cskip=0, Addr=39]
ZED [Cskip=0, Addr=40]
ZR [Cskip=1, Addr=35]
Message Routing
1.
See if the destination is in the Neighbor Table
2.
Check for a Routing Table Entry
3.
Finally resort to Tree Routing
21
Tree Routing
The address tells you where the destination is
Simple equation gives ‘route up’ or ‘route down’
If , route down
Else route up
Neighboring Routing
A ZC or ZR maintains a table of devices in its neighborhood.
If the target device is physically in range it
can send message directly.
23
Mesh Routing
A ZC or ZR maintains a routing table of next hop addresses
If the target device has a routing table
entry then the message can be sent using
this routing
Routing: Route Discovery (1/2)
A device wishing to discover a route
issues a route request command frame (RREQ)
Specialized broadcast frame transmitted throughout the network
Nodes relay the route request with new
accumulated path cost if it is new or better route request
Path cost is computed by intermediary nodes upon reception
Path cost = sum of link costs
25
Routing: Route Discovery (2/2)
Intended destination responds to the
RREQ with a route reply command frame (RREP) if it is new or better route request
Unicast fame, returns along the reverse path
Reports the path cost
Intermediate nodes relay the route reply and update their routing tables
Mesh Routing is adopted from AODVjr[4]
Routing Information Tables (1/2)
Routing table
Route status values
27
Routing Information Tables (2/2)
Route discovery table
Only used for the transmission of RREP
Route discovery table entries last only during a single route discovery operation
Command Frame Formats (1/2)
Route request command frameRREQ
Route request identifier:
sequence number in AODV or AODVjr
29
Command Frame Formats (2/2)
Route reply command frame (RREP)
Originator: originator of corresponding RREQ
Responder: originator of this RREP
Route Discovery Example
RREQ is originated and broadcast to neighbors.
src dest
RREQ
31
Route Discovery Example
1-hop neighbors
broadcast RREQ with accumulated path cost.
Referring to the same route identifier, 1-hop neighbors discard RREQ from its 1-hop neighbor.
However, less expensive path cost makes a
neighbor relay that RREQ.
(1) RREQ Broadcast
src dest
RREQ
Discarded RREQ
Route Discovery Example
According to the rules that a node relays
newer or better RREQ, RREQ is gradually
propagating to the destination.
src dest
RREQ
Discarded RREQ
33
Route Discovery Example
The final destination also responds to
newer or better RREQ with a RREP.
RREP is forwarded to the originator of the RREQ by unicasting.
(1) RREQ Broadcast
src dest
RREQ
Discarded RREQ RREP
RREP
Route Discovery Example
Because of the less expensive path cost, the RREP is generated and unicast though
one has been already unicast.
The originator
receives two RREPs, and selects one route to deliver data
packets.
(2) RREP Propagation and
RREP
route
Less expensive path is found later!
35
Flow Chart: Basic Routing
Algorithm (1/2)
Flow Chart: Basic Routing
Algorithm (2/2)
37
Flow Chart: Receipt of RREQ
Flow Chart: Receipt of RREP
39
Link Symmetry
Assume that links are symmetrical
Establish reverse routes at the same time the forward route is established
Devices that do not assume symmetry
should not establish reverse automatically
nwkSymLink (TRUE of FALSE) The current route symmetry setting TRUE means that routes are considers to be comprised of
symmetric links. Back ward and forward routes are created during one route discovery and they are identical. FALSE indicates that routes are not consider to be comprised of symmetric links. Only the forward route is stored during route discovery
Conclusion
Missions of ZigBee Alliance and
architecture of ZigBee protocol stacks are introduced.
Network layer functions and routing algorithm are speculated.
ZigBee standards provide more convenient way to turn 802.15.4 into a low power
multi-hop mesh network.
41
Reference
1. Ian Marsden, “Network Layer Overview,” Open House
presentation materials, Mar. 16, 2006, available online at http://www.zigbee.org/en/events/OpenHousePresentations_
2006-03-16.asp.
2. Don Sturek, “ZigBee Architecture and Specifications
Overview,” Open House presentation meterials, Mar. 16, 2006. available at the above webpage.
3. ZigBee Document 02130r10, Network Specification Revision 10, Version 1.00, ZigBee Alliance, Dec. 14, 2004.
4. Ian D. Chakeres and Luke Klein-Berndt, “AODVjr, AODV Simplified, “ACM SIGMOBILE Mobile Computing and
Communications Review, vol 6, number 3, pp. 100 – 101, July 2002.