941 ZIG
ZigBee Protocol Hands-on
2005 Microchip Technology Incorporated. All Rights Reserved.
Slide
Class Objectives
Provide high level familiarity with ZigBee protocol. Experiment with the Microchip ZigBee stack with hands on experience. Understand current status and future plans for the ZigBee stack.
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
What is ZigBee Protocol?: 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.
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
What is ZigBee Protocol?: ZigBee Focus Simplicity Reliability Low cost Low power Interoperability
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
What is ZigBee Protocol?
Standard wireless network stack
Based on IEEE 802.15.4 Defined by ZigBee Alliance
Simple, flexible data transfer Low cost (< $10, 14-28KB) Low power (low duty cycle) Short range network
~100m outside, line-of-site ~30m inside
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
What is ZigBee Protocol?: ZigBee Target Applications
Security Lighting HVAC Access, closures
Monitors Sensors Control, automation
Remote monitors Remote meter reading
ZigBee
Monitors Diagnostics RF Remotes Portable gaming PC Peripherals
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Security Lighting Appliance control, HVAC Access, closures
Slide
What is ZigBee Protocol?
10,000 Cellular Cellular Technologies Technologies GSM, GPRS GSM, GPRS WLAN Technologies WLAN Technologies IEEE802.11 IEEE802.11
1,000 Range (meters)
100 Proprietary Proprietary 10
ZigBee IEEE 802.15.4
Bluetooth Bluetooth
1 1 10 100 1,000 Data Rate (kbps)
Class
10,000
100,000
Slide 8
2005 Microchip Technology Incorporated. All Rights Reserved.
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
ZigBee Fundamentals: ZigBee Terminology Attribute
A single data value A switch value (on/off) A temperature value A percentage The units and data type are predefined
Attribute OnOff
ON
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
10
ZigBee Fundamentals: ZigBee Terminology Cluster
A group of one or more attributes An attribute is in only one cluster All attributes within the cluster must be supported
Cluster OnOffCluster Attribute OnOff
ON
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
11
ZigBee Fundamentals: ZigBee Terminology Device Description
Description of a device that is part of a larger target application Contains one or more clusters Specifies if the clusters are inputs or outputs
Device - Switch
Output Cluster OnOffCluster Attribute OnOff
ON
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
12
ZigBee Fundamentals: ZigBee Terminology Device Profile
A collection of device descriptions for a target application
Profile Lighting Control Device - Switch Device - Light
Output Cluster OnOffCluster Attribute OnOff
Input Cluster OnOffCluster Attribute OnOff
ON
2005 Microchip Technology Incorporated. All Rights Reserved. Class
ON
Slide 13
ZigBee Fundamentals: Terminology Quiz
What is it?
Attribute Cluster Device Description Profile
Dimmer Switch Initial Switch Configurations On/Off Light Brightness Home Control, Lighting Complete System Status Current Draw Occupancy Sensor Building Automation
Class
2005 Microchip Technology Incorporated. All Rights Reserved.
Slide
14
ZigBee Fundamentals: ZigBee Terminology Endpoint
User-defined group of clusters, as required for implementation of a device description Allows implementation flexibility
Device - Switch Endpoint EP7 (users choice) Output Cluster OnOffCluster Attribute OnOff Device - Light Endpoint EP12 (users choice) Input Cluster OnOffCluster Attribute OnOff
ON
ON
Slide 15
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
ZigBee Fundamentals: ZigBee Terminology Node
A group of ZigBee devices sharing a single radio
Node Device - Switch Endpoint EP7 (users choice) Output Cluster OnOffCluster Attribute OnOff
RF Transceiver
ON
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
16
ZigBee Fundamentals: Terminology Quiz 2
Node Device Endpoint Output Cluster Attribute Input Cluster Attribute Attribute Attribute Endpoint Input Cluster Attribute Endpoint Output Cluster Attribute Device Endpoint Output Cluster Attribute Attribute
RF Transceiver
Endpoint Output Cluster Attribute
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
17
ZigBee Architecture (Why Have Endpoints?)
Application (APL) Layer
ZigBee Fundamentals:
Application Framework (AFG)
Application Object Application Object ZDO public interface
Your Code Here
ZDO ZigBee Device Objects
Device Mgmt.
Security Mgmt.
Binding Mgmt.
NWK Mgmt.
Endpoint
IEEE 802.15.4 defined Layers ZigBeeTM Alliance defined Layers ZigBeeTM Alliance defined Profiles and/or user defined profiles and application code Layer function Layer interface
240
...
...
Endpoint 0 APSME-SAP APSME-SAP NLME-SAP NLME-SAP MLME-SAP PLME-SAP
Endpoint 1
Endpoint Multiplexing APSDE-SAP
Application Support Sublayer (APS)
APS Message Management APS Security Management APS Security Management
SSP Security Service Provider
SSP Interface
ZDO Mgmt. Plane
NLDE-SAP
NWK - Network Layer
Routing Management NWK Management NWK Security Management
MCPS-SAP
MAC (IEEE 802.15.4)
PD-SAP
PHY (IEEE 802.15.4)
2.4 GHz
868/915 MHz
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
18
ZigBee Fundamentals: ZigBee Based Lighting Control
ZigBee Alliance has defined a Home Control, Lighting profile. In this profile, they define the following devices: Switch Remote Control Switching Load Controller Dimmer Remote Control Dimming Load Controller Occupancy Sensor Light Sensor Monochromatic
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
19
ZigBee Fundamentals: Home Control, Lighting
The Profile defines the cluster OnOffSRC
Attribute OnOff Defined values are On=0xFF, Off=0x00, or Toggle=0xF0.
For the Switch Remote Control (i.e. a switch), ZigBee defines one mandatory output cluster
OnOffSRC
For the Switching Load Controller (i.e. a light), ZigBee defines one mandatory input cluster
OnOffSRC
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
20
ZigBee Fundamentals: ZigBee Based Lighting Control
OnOff = On OnOff = On
OnOffSRC.OnOff = Off OnOff = Off
2005 Microchip Technology Incorporated. All Rights Reserved. Class
OnOff = Off
Slide 21
ZigBee Fundamentals: Application Concept
EP1 EP2 EP3 EP4
Lamp Radio
EP9
EP5
Switch Radio
How do you link the correct switches and lights?
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
22
ZigBee Fundamentals: Binding
EP1 EP2 EP3 EP4
Coordinator or Router EP9 EP5
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
23
ZigBee Fundamentals: Binding
EP1 EP2 EP3 EP4
Src EP9 EP5
Dest EP1, EP2 EP3, EP4
EP9
EP5
Binding Table
End_Device_Bind_req Bind_req
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Coordinator or Router
Slide 24
Agenda
What is ZigBee Protocol? Foundation of ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
25
Exercise 1 Bind your S2 switch to your neighbors D1 LED using End_Device_Bind_req
2005 Microchip Technology Incorporated. All Rights Reserved.
Slide
26
Using End_Device_Bind_req
1. 2. 3. 4. 5. 6. 7. 8. Agree who will be the light(s) and who will be the switch. Open the corresponding project and set your MAC address in zigbee.def If you are the switch, program and run your application. Make sure you start a network. If you are a light, program your application. After the switch starts the network, run your application. Make sure you join the network and get a short address. When a switch and a light are ready, each press RB5 within 5 seconds of each other. If binding is successful, the switch can control the lights RA1 LED with its RB4 switch. Repeat steps 4-7 for any other lights. Note how the switch controls all of the lights with one button press. Look at how the SendEndDeviceBindReq function is set up to send the End Device Bind request.
Class
Exercise 1 :
2005 Microchip Technology Incorporated. All Rights Reserved.
Slide
27
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
28
ZigBee Devices: IEEE 802.15.4 Devices The IEEE specification defines two types of wireless devices
Full Function Devices Reduced Function Devices
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
29
ZigBee Devices: Full Function Device Supports majority, if not all, of the ZigBee services
Capable of peer-to-peer connection Can allow other devices to join the network
Usually mains powered
Transceiver needs to be always on
Requires relatively large amount of program and data memory
Slide 30
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
ZigBee Devices: Reduced Function Device Supports limited ZigBee services
Must join the network through an FFD May communicate only via the FFD it joined to
Can be battery powered
Low duty cycle Can keep transceiver off when idle
Requires less program and data memory
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
31
ZigBee Devices
The ZigBee Specification defines three types of devices
ZigBee Coordinator ZigBee Router ZigBee End Device
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
32
ZigBee Devices: ZigBee Coordinator Always a Full Function Device Supports all ZigBee services
Includes binding and routing
Capable of peer-to-peer connection Forms the network
Accepts/Rejects new network members
Mains powered Transceiver is always on
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
33
ZigBee Devices: ZigBee Router Always a Full Function Device Extends physical reach of the network by allowing other nodes to join the network through it Supports all ZigBee services
Includes binding and routing
Capable of peer-to-peer connection Mains powered Transceiver is always on
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
34
ZigBee Devices: ZigBee End Device Usually a Reduced Function Device
Can be a Full Function Device
Supports some ZigBee services
Does not include binding and routing
Can communicate only with its parent node Can be battery powered Transceiver can be off when idle
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
35
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
36
ZigBee Networking: Star Network
typically battery powered Rx must always be on so typically mains powered
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
Slide 37
ZigBee Networking: Star Network
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
38
ZigBee Networking: Tree (Cluster) Network
typically battery powered Rx must always be on so typically mains powered
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
Slide 39
ZigBee Networking: Tree (Cluster) Network
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
40
ZigBee Networking: Mesh (Peer-to-Peer) Network
typically battery powered Rx must always be on so typically mains powered
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
Slide 41
ZigBee Networking: Mesh (Peer-to-Peer) Network
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
42
ZigBee Networking: Mesh (Peer-to-Peer) Network
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
43
ZigBee Networking: Mesh (Peer-to-Peer) Network
Reduced Function Device (RFD) Full Function Device (FFD) ZigBee Coordinator (FFD) ZigBee Router (FFD)
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
44
Quiz
What is an attribute? What is a cluster? What is an endpoint? How do FFDs and RFDs differ? When would you chose an RFD over an FFD? I want to develop a wireless controller for a video game system. What topology would you chose?
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
45
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
46
Communication over ZigBee Network: Addressing Devices Broadcast
Address 0xFFFF Everyone in radio distance receives the packet. Packet gets retransmitted until everyone gets the packet or it times out
Unicast
Uses the 16-bit address of the destination Only that devices radio will get the packet (all others will filter the packet out)
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
47
Communication over ZigBee Network Key-Value Pair (KVP)
Key Cluster/Attribute Value Data value of the attribute KVP Commands Set set an attribute Get get an attribute Event an event has occurred
Message (MSG)
Free format data transfer
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
48
Communication over ZigBee Network: Key-Value Pair Frame Format
Cluster: OnOffSRC Attribute: OnOff Command: SET Value: Off
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
49
Communication over ZigBee Network: Message Frame Format
Cluster: MSG_Cluster Values: [multiple]
Supports straight binary data transfer Proprietary data transfer Data size limited by IEEE frame size and ZigBee overhead
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
50
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
51
Exercise 2
Constructing and Sending KVP Frames
2005 Microchip Technology Incorporated. All Rights Reserved.
Slide
52
Exercise 2
Notes
Change your MAC address in zigbee.def Examine the profile definition file zMASTERS05Profile.h in the Stack directory Send a KVP message to the coordinator A message will appear on the main screen
Bonus
What other functions are available in the profile?
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
53
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
54
Dynamic networking
What we know
The different types of nodes available. What the different network topologies look like and what they are good for. How to send messages to other devices on the network
What is left?
How does a device join a network? How do we determine who is out there on the network to talk to? What happens when a node in the network fails?
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
55
Dynamic Networking: Joining a Network Send a Beacon request
ZigBee Routers and ZigBee Coordinators in the area that support joining will respond
Pick one to join to and send that device an association request
ZigBee Router or ZigBee Coordinator responds with an association response If the response is Denied, try to connect to a different network or keep polling the same network to wait for an opening.
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
56
Dynamic Networking: Rejoining
Send out orphan request
If your former parent is still out there and hears you, then they will respond with a coordinator realignment Bindings will be retained
If orphan request goes unanswered you can either
Continue searching for the same parent Give up and join the network as if you were a new node Will get a new 16-bit network address Bindings will need to be recreated
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
57
Dynamic Networking: Querying the Network ZigBee Device Profile
Built-in ZigBee Functions Interface through Endpoint 0
Service Discovery
Allows us to find out what the other devices do
Device Discovery
Allows us to locate other devices on the network
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
58
Dynamic Networking: Descriptors Node Descriptor
Type of Node and capabilities
Node Power Descriptor
Node Power Characteristics
Simple Descriptor
Describe the applications endpoints
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
59
Dynamic Networking: Node Descriptor
Mandatory, one per node Identifies device type
ZigBee Coordinator, ZigBee Router, End Device
Frequency band of operation Security capabilities Power Source If the receiver is on when Idle Buffer size
I am:
An end device 2.4 GHz Level 6 security Battery powered My Rx is off when I am Idle My buffer is 128 bytes
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
60
Dynamic Networking: Node Power Descriptor Mandatory, one per node Describes power capabilities in detail How the is receiver switched on
Permanently, Periodically, or When stimulated
Available power sources Current power source Current charge status
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
61
Dynamic Networking: Simple Descriptor
Mandatory for each endpoint Describes the endpoint
Endpoint number Application Profile ID, from the ZigBee Alliance Application Device ID, from the ZigBee Alliance Application Device Version, from the ZigBee Alliance I have: Application Flags An endpoint 8 Endpoint Input Cluster Count EP8 has one output cluster of Endpoint Input Cluster List OnOffSRC Endpoint Output Cluster Count Endpoint Output Cluster List
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
62
Dynamic Networking: Service Discovery Active_EP_req
Request all of the active Endpoints in the device
Match_Desc_req
Requests a check of all active Endpoints to see if one matches a given Profile ID Match can optionally require a match of input or output clusters
Node_Desc_req, Power_Desc_req, Simple_Desc_req
Request the Descriptors for a device
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
63
Dynamic Networking: Service Discovery
Match_Desc_req
Requests a check of all active Endpoints to see if one matches a given Profile ID Match can optionally require a match of input or output clusters
My Endpoint 3 Match_Desc_req: matches HCL profile, Out-Cluster of OnOffSRC My Endpoints 5 and 23 match
Now I know of 3 switches that I can decide to bind to!!
2005 Microchip Technology Incorporated. All Rights Reserved. Class
No Endpoints match; no response
Slide 64
Dynamic Networking: Device Discovery
NWK_Addr_req
Broadcast inquiry for a Devices 16-bit network address based on its 64-bit IEEE address Response can optionally also include the 16-bit addresses of all of the nodes that are associated to that node. Thats me. My Network NWK_Addr_req address is 0x9241
I am looking for IEEE: 00-46-00-A1-00-23-44-31
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
65
Dynamic Networking: Device Discovery
IEEE_Addr_req
Unicast inquiry for a Devices 64-bit IEEE address based on its 16-bit network address Response can optionally also include the 16-bit addresses of all of the nodes that are associated to that node. B: 0xAA23 B: 0x9134 B A: 0x9136
???
D
D: 0x0000
2005 Microchip Technology Incorporated. All Rights Reserved. Class
C C: 0x9443
Slide
66
Dynamic Networking: Device Discovery
IEEE_Addr_req
Unicast inquiry for a Devices 64-bit IEEE address based on its 16-bit network address Response can optionally also include the 16-bit addresses of all of the nodes that are associated to that node. NWK_Addr_req I am IEEE: 00-46- B: 0xAA23 B: 0x9134
I am looking for IEEE: IEEE_Addr_req: 0x9134, 00-46-00-A1-00-23-44-31 IEEE address? What is your
00-A1-00-23-44-31
B C C: 0x9443
Thats me. My Network address is 0xAA23
Slide 67
A A: 0x9136
D D: 0x0000
Class
2005 Microchip Technology Incorporated. All Rights Reserved.
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
68
Exercise 3 - An Introduction to Peer-to-Peer
Use Device Discovery services to send LED messages directly to your partner
2005 Microchip Technology Incorporated. All Rights Reserved.
Slide
69
Exercise 3
In zigbee.def set
Your MAC address Receiver always on
In Masters05Lab3.c, construct the Device Discovery message
Use the 64-bit address of your partners node
Press RB5 to get your partners 16-bit network address Press RB4 to control your partners LED
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
70
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
71
Hardware: Typical ZigBee Hardware
Microchip
PICmicro MCU
SPI
RF XCVR
ANTENNA
Trace, Monopole etc.
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
72
Block Diagram
Application Microchip Device 802.15.4 Transceiver MAC MAC (Hardware) (Hardware) Logic Logic
Hardware:
MAC MAC (Firmware) (Firmware)
Security Security APL APL NWK NWK APS APS
Tx chain Tx chain Rx chain Rx chain
Bias/VCO Bias/VCO
Silicon Silicon
ZigBee ZigBee Stack Stack
Application Application
Class
2005 Microchip Technology Incorporated. All Rights Reserved.
Slide
73
Hardware: IEEE 802.15.4
LR-WPAN
Low Rate Wireless Personal Area Network
Reliable data transfer
Fully acknowledged protocol
64-bit long/16-bit short addresses, 16-bit Personal Area Network (PAN) ID
BAND 2.4 GHz 868 MHz 915 MHz ISM ISM COVERAGE Worldwide Europe Americas DATA RATE 250 kbps 20 kbps 40 kbps # OF CHANNEL(S) 16 1 10
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
74
Agenda
What is ZigBee Protocol? ZigBee Fundamentals Exercise 1 ZigBee Devices ZigBee Networking Communication over ZigBee Network Exercise 2 Dynamic Networking Exercise 3 Hardware Designing with ZigBee Protocol
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
75
Designing with ZigBee Protocol: IEEE 802.15.4 MAC Address
Extended Address: 64-bit Short Address: 16-bit
To reduce message length overhead
IEEE Extended Unique Identifier - EUI-64TM
64-bit globally unique identification value Upper 32-bit assigned by IEEE as your Organizationally Unique Identifier (OUI) Lower 32-bit assigned by organization (~4 billion devices on one EUI) $1650 one time fee for OUI May use your Ethernet OUI
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
76
Designing with ZigBee Protocol: State of ZigBee
Version 1.0 of ZigBee Standards Complete
Downloadable by ZigBee Alliance members and adopters Fee to become a ZigBee adopter is $3500/yr www.zigbee.org/en/join 600+ pages Most sections have errata
Version 1.1 spec coming? IEEE 802.15.4 spec available online
http://standards.ieee.org/getieee802/download/802.15.4-2003.pdf
600+ pages
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
77
Designing with ZigBee Protocol
Purchase an IEEE OUI
https://standards.ieee.org/regauth/oui/forms/OUI-form.shtml
Determine radio based on data rate and geographical market needs Select suitable Microchip MCU Modify stack provided with AN965 for your application Do all RF compliance certifications Do ZigBee interoperability compliance certification
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
78
Designing with ZigBee Protocol: Microchip ZigBee Stack
Based on v1.0 of ZigBee Specifications Freely available as Microchip Application Note AN965 Must accept Electronic License Agreement Out-of-box support for MCC18 Support for 2.4 GHz radio Support for RFDs and FFDs (ZigBee Coordinators, ZigBee Routers, and FFDs as end devices) www.microchip.com/zigbee
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
79
Designing with ZigBee Protocol: Microchip ZigBee Stack
Modular design Cooperative Multitasking Architecture Application Independent RTOS Independent Supports PIC18 microcontrollers Standard Microchip technical support Updates for enhancements, improvements, and fixes
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
80
Designing with ZigBee Protocol:
Microchip ZigBee Stack Future Releases
Support for 915/868 MHz radio Security support Support for other MCU families (PIC24, dsPIC digital signal controllers) HI-TECH support
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
81
Summary
Provide high level familiarity with ZigBee protocol
RFDs, FFDs, Network Topologies, Bindings, Attributes, Clusters, Profiles, Descriptors, Radio frequencies, Endpoints, Devices, ZigBee Coordinators, ZigBee Routers, ...
Experiment with the Microchip ZigBee stack
Compiling and using the Microchip ZigBee stack Creating a network Creating bindings
Understand current status and future plans for the ZigBee stack
2005 Microchip Technology Incorporated. All Rights Reserved. Class
Slide
82
References
IEEE 802.15.4-2003
http://standards.ieee.org/getieee802/download/802.15.4-2003.pdf
ZigBee v1.0 specification AN965 - ZigBee application note available at www.microchip.com/zigbee
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
83
Thank you!
2005 Microchip Technology Incorporated. All Rights Reserved.
Class
Slide
84