Transcript ZigBee

Embedded Systems Software Training Center
ZigBee protocol stack overview
COPYRIGHT © 2012 DSR CORPORATION
Assumptions for Using this Teaching Material
DSR and OTSL takes no responsibility about the problem
which occurs as a result of applying the technical
information written in this document in a commercial
product, although the information is based on actual
implementation and our experiences, is reliable enough.
COPYRIGHT © 2012 DSR CORPORATION
2
Agenda
 Basic ZigBee overview
 802.15.4 basics
 Architecture of Zigbee
 ZigBee Profiles
 Historical necessity of ZigBee
 Technical trend and application examples of ZigBee
COPYRIGHT © 2012 DSR CORPORATION
3
Objectives
 Understand 802.15.4 basics
 Understand Zigbee basics and applications
 Understand Zigbee basic architecture
 Understand Zigbee most common issues.
COPYRIGHT © 2012 DSR CORPORATION
4
Embedded Systems Software Training Center
Basic ZigBee Overview
COPYRIGHT © 2012 DSR CORPORATION
Basic ZigBee overview
 ZigBee is a specification for a high level protocol stack using small,
low-power and low-cost radios. It based on IEEE 802.15.4 standard
for Personal Area Network.
 ZigBee standard maintained be ZigBee Alliance (www.zigbee.org)
 Usually vendors of ZigBee devices use system-on-chip (SoC)
solutions with integrated radio and 60-250KB of flash memory.
 ZigBee data transmission rate varies from 20 to 900kbits.
 For non-commercial purposes, the ZigBee specification is available
free to the general public. An entry level membership in the ZigBee
Alliance ( Adopter ), provides access to draft specifications and
permission to create products for market using the specifications.
 The requirements for membership in the ZigBee Alliance causes
problems for open-source developers because the annual fee
conflicts with the GNU GPL
COPYRIGHT © 2012 DSR CORPORATION
6
802.15.4 basics
 IEEE 802.15.4 specifies physical and MAC layer of lowrate WPANs.
 It could be and it used as a basis for different protocols
and standards. ZigBee, ISA100.11a, MiWi etc.
IEEE 802.15.4 specification:
802 = networking group
15 = wireless network
4 = low data rate consuming less power
COPYRIGHT © 2012 DSR CORPORATION
7
802.15.4 basics
 It operates one of the following bands:
868.0-868.6 MHz: Europe, allows one communication
channel
902-928 MHz: North America, up to ten channels (2003),
extended to thirty (2006)
2400-2483.5 MHz: worldwide use, up to sixteen
channels (2003, 2006)
COPYRIGHT © 2012 DSR CORPORATION
8
802.15.4 basics
802.15.4 basics
 It could use both amplitude and phase keying
 Has guaranteed time-slots.
 Uses network beaconing.
 Has no routing mechanism, so, only star and peer-topeer allowed.
 And the main: Most of the applications often uses only
part of 802.15.4 that is suitable for their purposes.
COPYRIGHT © 2012 DSR CORPORATION
10
Embedded Systems Software Training Center
ZigBee Architecture
COPYRIGHT © 2012 DSR CORPORATION
ZigBee Architecture
COPYRIGHT © 2012 DSR CORPORATION
12
ZigBee Architecture
Full Function Device (FFD)
■ Capable of being the PAN Coordinator
■ Implements processing of “Association Request”
■ Implements processing of “Orphan Notification”
■ Implements processing of “Start Request”
■ Implements processing of “Disassociation Notification”
Reduced Function Device (RFD)
■ Can only associate and communicate with a FFD
■ Reduced stack removes optional components
Architecture of ZigBee

Mac layer: controlling media, basic rf transmitting/receiving.

Network (NWK) layer: Routing, addressing, discovery and join.

APS layer: Bridge between NWK and upper layers. Binding tables,
separate addressing scheme etc.

ZDO layer: Different OTA stack parameters management.

Application/Profiles: Profiles and customer's application.
COPYRIGHT © 2012 DSR CORPORATION
14
Architecture of ZigBee
The IEEE 802.15.4 PHY layer includes features such as
receiver energy detection (ED), link quality indication
(LQI) and clear channel assessment (CCA). The network
addressing follows 64-bit IEEE and 16-bit short
addressing, supporting over 65,000 nodes per network.
The IEEE 802.15.4 MAC sub layer controls the access
to the radio channel using unslotted CSMA-CA (Carrier
Sense Multiple Access with Collision Avoidance)
method. It is also responsible for flow control via
acknowledgement and retransmission of data packets,
frame validation, and network synchronization as well as
support to upper layers for robust link operation. peer
entity control transfers.
COPYRIGHT © 2012 DSR CORPORATION
15
Mac Layer
The MAC frame structure has been designed to keep the complexity to a
minimum while making the system sufficiently robust for transmissions on a
noisy channel.
The IEEE 802.15.4 MAC defines four frame structures:
· A beacon frame, used by a coordinator to transmit beacons.
· A data frame, used for all transfers of data.
· An acknowledgment frame, used for confirming successful
frame reception.
· A MAC command frame, used for handling all MAC
COPYRIGHT © 2012 DSR CORPORATION
16
NWK Layer
NWK layer handles network addressing and routing by
invoking actions from MAC layer.
 Starting the network.
 Assigning network addresses.
 Adding/removing devices to/from network.
 Routing messages to the intended destination
 Applying security to the incoming/outgoing messages.
 Discovery and store routing information
COPYRIGHT © 2012 DSR CORPORATION
17
APS Layer
 APS layer responsible for communication with relevant applications and
endpoints. As well as for managing binding table.
Here's significant application concepts:
 A node may have several applications running on it - for example, a node in
an environment monitoring network may be measuring temperature and
humidity, each of which is an application. These application instances on a
node are said to be endpoints, where messages can originate and
terminate.
 In order to route messages arriving at the node to the appropriate
application, each application on the node must be uniquely identified and is
given an endpoint address. Endpoint addresses for user applications are
numbered from 1 to 240. Therefore, to identify a particular application
instance in a ZigBee network, you need to supply the relevant network
address and then the required endpoint address on the node.
 Endpoint address 255 can also be used. This is the broadcast endpoint
address
COPYRIGHT © 2012 DSR CORPORATION
18
ZigBee Cluster Library (ZCL)
Cluster is a structure of message or the message itself. Most
of the clusters have pair. For example for input and output
messages.
ZigBee cluster library, a set of common clusters and attributes
used across multiple application profiles.
ZDO Layer
 Endpoint address 0 on each node is reserved for a special
application called the ZDO (ZigBee Device Objects). This
application has a number of roles, including defining the type
of node (Co-ordinator, Router or End Device), initialising the
node and participating in network creation.
COPYRIGHT © 2012 DSR CORPORATION
20
Embedded Systems Software Training Center
ZigBee Application Profiles
COPYRIGHT © 2012 DSR CORPORATION
Application Profiles
– Every data request in ZigBee is sent (and received) on
an Application Profile. Application Profile IDs are 16-bit
numbers and range from 0x0000 to 0x7fff for public
profiles and 0xbf00 to 0xffff for manufacturer-specific
profiles.
– Think of a profile as a domain space of related
applications and devices. Public profiles are those
specified by the ZigBee Alliance (as opposed to private
profiles specified by individual OEMs).
– Nearly all public profiles use the ZigBee Cluster Library,
so I'll leave the example and details to Chapter 6, "The
ZigBee Cluster Library."
COPYRIGHT © 2012 DSR CORPORATION
22
Application Profiles
The current list of application profiles either published, or in the works are:
Released specifications
ZigBee Home Automation
ZigBee Smart Energy 1.0
ZigBee Telecommunication Services
ZigBee Health Care
ZigBee RF4CE - Remote Control
Specifications under development
ZigBee Smart Energy 2.0
ZigBee Building Automation
ZigBee Retail Services
ZigBee Light Link
.
COPYRIGHT © 2012 DSR CORPORATION
23
Embedded Systems Software Training Center
Historical necessity of ZigBee
COPYRIGHT © 2012 DSR CORPORATION
Why ZigBee?

Mesh Networking Technology
Self-healing mesh networks
Low cost, long battery life, good range, secure

Open Global Standard
2.4GHz is unlicensed, available Worldwide
Anyone can join the ZigBee Alliance


Where can ZigBee fit?
Secure, reliable, Personal Area Networks for sensor, control and low bandwidth data
communications.
It’s a low power wireless technology that's ideal for new and old infrastructures.
It can have range between 10m and 2km (with PA) Scalable Networking solutions
COPYRIGHT © 2012 DSR CORPORATION
25
Bluetooth vs. WiFi vs. ZigBee vs. Others
COPYRIGHT © 2012 DSR CORPORATION
26
Embedded Systems Software Training Center
Technical Trends and Application Examples
COPYRIGHT © 2012 DSR CORPORATION
Application Examples
ZigBee is well suited for a wide range of control uses in just about any market. The Alliance has focused its
standards development efforts around the commercial, residential, energy, consumer and industrial sectors. It
has developed global standards for energy management and efficiency, home and building automation, health
care and fitness, telecom and consumer electronics. Here are just a few examples of what our standards control:

Demand Response

Advanced Metering Infrastructure

Automatic Meter Reading

Lighting controls

HVAC control

Heating control

Wireless smoke and CO detectors

Home security

Blind, drapery and shade controls

Medical sensing and monitoring

Remote control of home entertainment systems

Indoor location sensing

Advertising on mobile devices
COPYRIGHT © 2012 DSR CORPORATION
28
Technical Trends
The main trend in Zigbee development is improving power management and stack interoperability. These features
called Smart Energy 2.0.
The Smart Energy 2.0 effort was launched in 2008 to offer IP-based HAN functionality. It will address the
following emerging market requirements:
Deployments in multi-dwelling units
Support multiple Energy Service Interfaces into a single premise
Supports any transport layer based on IETF IP compliant standards, including but not limited to ZigBee IP,
other RF-based and Power Line Carrier (PLC)-based transports
Support internationally recognized standards to ensure long-term interoperability with multiple technologies
Accomplishing these goals has led to the adoption of networking standards that ensure interoperability between
ZigBee and other network technologies. The ZigBee Alliance is developing an internet protocol (IP) networking layer
called ZigBee IP, which is based on the IETF-based 6LoWPAN technology. The application clusters for Smart Energy
2.0 have been mapped to the IEC Common Information Model, that will be implemented in Smart Energy 2.0. This
provides a migration path for features defined in ZigBee Smart Energy 1.X to be supported in Smart Energy 2.0.
Technical Trends
The ZigBee home area network standard already has lots of challengers (ZWave, Wi-Fi, and HomePlug to name just three). Now it faces an assault from
the biggest, baddest billion-dollar bully of them all – Google.
Google recently announced it will create its own home networking standard as
part of its Android@Home initiative
J. Berst. The founder
and
chief analyst of Smart Grid News.com
COPYRIGHT © 2012 DSR CORPORATION
30
The End
COPYRIGHT © 2012 DSR CORPORATION
31