Open House November 19, 2003 IEEE 802.15.4 Tutorial Patrick Kinney IEEE 802.15.4 Chair ZigBee Secretary Kinney Consulting, LLC 802.15.4 Application Space • Home Networking • Automotive Networks • Industrial Networks • Interactive Toys • Remote Metering November, 2003 Slide 2 Copyright 2003 The ZigBee Alliance, Inc. 802.15.4 Application Topology Cable replacement - Last meter connectivity Virtual Wire Wireless Hub Mobility Ease of installation Stick-On Sensor November, 2003 Slide 3 Copyright 2003 The ZigBee Alliance, Inc. Some needs in a sensor network Thousands of sensors in a small space Wireless but wireless implies Low Power! and low power implies Low Duty Cycles Of course none of this is viable unless a Low Cost transceiver is available November, 2003 Slide 4 Copyright 2003 The ZigBee Alliance, Inc. Solution: Low Rate » WPAN Technology! By means of IEEE 802.15.4 November, 2003 Slide 5 Copyright 2003 The ZigBee Alliance, Inc. Solution: IEEE 802.15.4 is now an approved and published IEEE Standard! Eight IC vendors have announced products or plans for products November, 2003 Slide 6 Copyright 2003 The ZigBee Alliance, Inc. Differences between IEEE 802.15.4 & ZigBee • IEEE 802.15.4 – PHYsical Layer (PHY) • Radio portion, transmitter and receiver – Media Access Control (MAC) Layer • Radio controller, data to next device • ZigBee – Network Layer – Application Support Layer November, 2003 Slide 7 Copyright 2003 The ZigBee Alliance, Inc. 802.15.4 Architecture Upper Layers Other LLC IEEE 802.2 LLC IEEE 802.15.4 MAC IEEE 802.15.4 868/915 MHz PHY November, 2003 Slide 8 IEEE 802.15.4 2400 MHz PHY Copyright 2003 The ZigBee Alliance, Inc. 802.15.4 General Characteristics Data rates of 250 kb/s, 40 kb/s and 20 kb/s. Star or Peer-to-Peer operation. Support for low latency devices. CSMA-CA channel access. Dynamic device addressing. Fully handshaked protocol for transfer reliability. Low power consumption. Frequency Bands of Operation, either: 16 channels in the 2.4GHz ISM band; Or 10 channels in the 915MHz ISM band and 1 channel in the European 868MHz band. November, 2003 Slide 9 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 PHY Overview Operating Frequency Bands 868MHz / 915MHz PHY 2.4 GHz PHY Channel 0 Channels 1-10 868.3 MHz 902 MHz Channels 11-26 2.4 GHz November, 2003 2 MHz 928 MHz 5 MHz 2.4835 GHz Slide 10 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 PHY Overview Packet Structure PHY Packet Fields • • • • Preamble (32 bits) – synchronization Start of Packet Delimiter (8 bits) PHY Header (8 bits) – PSDU length PSDU (0 to 1016 bits) – Data field Preamble Start of Packet Delimiter PHY Header PHY Service Data Unit (PSDU) 6 Octets November, 2003 Slide 11 0-127 Octets Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 PHY Overview Modulation/Spreading 2.4 GHz PHY • • • • 250 kb/s (4 bits/symbol, 62.5 ksymbols/s) Data modulation is 16-ary orthogonal modulation 16 symbols are orthogonal set of 32-chip PN codes Chip modulation is O-QPSK at 2.0 Mchips/s 868MHz/915MHz PHY • Symbol Rate • 868 MHz Band: 20 kb/s (1 bit/symbol, 20 ksymbols/s) • 915 MHz Band: 40 kb/s (1 bit/symbol, 40 ksymbols/s) • Data modulation is BPSK with differential encoding • Spreading code is a 15-chip m-sequence • Chip modulation is BPSK at • 868 MHz Band: 300 kchips/s • 915 MHz Band: 600 kchips/s November, 2003 Slide 12 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 PHY Overview Common Parameters Transmit Power • Capable of at least .5 mW Transmit Center Frequency Tolerance • 40 ppm Receiver Sensitivity (Packet Error Rate <1%) • <-85 dBm @ 2.4 GHz band • <-92 dBm @ 868/915 MHz band Rx Signal Strength Indication Measurements • Packet strength indication • Clear channel assessment • Dynamic channel selection November, 2003 Slide 13 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 PHY Overview PHY Primitives PHY Data Service • PD-DATA – exchange data packets between MAC and PHY PHY Management Service • • • • November, 2003 PLME-CCA – clear channel assessment PLME-ED - energy detection PLME-GET / -SET– retrieve/set PHY PIB parameters PLME-TRX-ENABLE – enable/disable transceiver Slide 14 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Design Drivers Extremely low cost Ease of implementation Reliable data transfer Short range operation • Very low power consumption Simple but flexible protocol November, 2003 Slide 15 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Typical Network Topologies November, 2003 Slide 16 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Device Classes • Full function device (FFD) – Any topology – Network coordinator capable – Talks to any other device • Reduced function device (RFD) – Limited to star topology – Cannot become a network coordinator – Talks only to a network coordinator – Very simple implementation November, 2003 Slide 17 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Star Topology PAN Coordinator Master/slave Full function device Communications flow Reduced function device November, 2003 Slide 18 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Peer-Peer Topology Cluster tree Point to point Full function device November, 2003 Slide 19 Communications flow Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Combined Topology Clustered stars - for example, cluster nodes exist between rooms of a hotel and each room has a star network for control. Communications flow Full function device Reduced function device November, 2003 Slide 20 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Addressing • All devices have 64 bit IEEE addresses • Short addresses can be allocated • Addressing modes: – Network + device identifier (star) – Source/destination identifier (peer-peer) November, 2003 Slide 21 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview General Frame Structure PHY Layer MAC Layer Payload Synch. Header (SHR) MAC Header (MHR) MAC Service Data Unit (MSDU) MAC Protocol Data Unit (MPDU) PHY Header (PHR) PHY Service Data Unit (PSDU) 4 Types of MAC Frames: • Data Frame • Beacon Frame • Acknowledgment Frame • MAC Command Frame November, 2003 Slide 22 Copyright 2003 The ZigBee Alliance, Inc. MAC Footer (MFR) IEEE 802.15.4 MAC Overview Optional Superframe Structure GTS 2 Contention Access Period GTS 1 Contention Free Period 15ms * 2n where 0 n 14 Transmitted by network coordinator. Contains network information, frame structure and notification of pending node messages. Network beacon Contention period Access by any node using CSMA-CA Guaranteed Time Slot November, 2003 Reserved for nodes requiring guaranteed bandwidth Slide 23 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview Traffic Types • Periodic data – Application defined rate (e.g. sensors) • Intermittent data – Application/external stimulus defined rate (e.g. light switch) • Repetitive low latency data – Allocation of time slots (e.g. mouse) November, 2003 Slide 24 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 MAC Overview MAC Data Service Recipient MAC Originator MAC MCPS-DATA.request Originator Recipient Channel access Data frame Acknowledgement (if requested) MCPS-DATA.indication MCPS-DATA.confirm November, 2003 Slide 25 Copyright 2003 The ZigBee Alliance, Inc. IEEE 802.15.4 PHY Overview MAC Primitives MAC Data Service • MCPS-DATA – exchange data packets between MAC and PHY • MCPS-PURGE – purge an MSDU from the transaction queue • MAC Management Service • • • • • • • • • • • November, 2003 MLME-ASSOCIATE/DISASSOCIATE – network association MLME-SYNC / SYNC-LOSS - device synchronization MLME-SCAN - scan radio channels MLME- COMM-STATUS – communication status MLME-GET / -SET– retrieve/set MAC PIB parameters MLME-START / BEACON-NOTIFY – beacon management MLME-POLL - beaconless synchronization MLME-GTS - GTS management MLME-RESET – request for MLME to perform reset MLME-ORPHAN - orphan device management MLME-RX-ENABLE - enabling/disabling of radio system Slide 26 Copyright 2003 The ZigBee Alliance, Inc. Differences between Bluetooth® and IEEE 802.15.4 Bluetooth® Technology and IEEE 802.15.4 serve different markets November, 2003 Slide 27 Copyright 2003 The ZigBee Alliance, Inc. Application Space IEEE 802.15.4 was designed for: – Many devices – Small data packets – Long battery life is critical (years) – Low duty cycles – Such as sensors, controllers, medical monitoring, throwaway devices, etc November, 2003 Slide 28 Bluetooth is designed for: – Few/limited devices – Hands-free audio – Business day (rechargeable) – Synchronization of cell phone to PDA – PDA to printer Copyright 2003 The ZigBee Alliance, Inc. Air Interface ZigBee Direct Sequence SS 11 chips/ symbol 62.5 K symbols/s 4 Bits/ symbol IEEE 802.15.4 Frequency Hopping SS 1600 hops / second 1 M Symbol / second Peak Information Rate Peak Information Rate >128 Kbit/second ~108-723 kbit/second November, 2003 Slide 29 Copyright 2003 The ZigBee Alliance, Inc. Effective Data Rate (theoretical values, no retransmissions) Data Rate vs Packet size 800 700 Data Rate (kb/s) 600 500 400 300 200 100 0 1 12 23 34 45 56 67 78 89 100 111 122 133 144 155 166 177 188 199 210 221 232 243 254 265 276 287 298 309 320 331 Packet Size (bytes) November, 2003 Slide 30 Copyright 2003 The ZigBee Alliance, Inc. Power Considerations IEEE 802.15.4 ZigBee • 2+ years from ‘normal’ batteries • Designed to optimize slave power requirements November, 2003 Slide 31 • Power model as a mobile phone (regular charging) • Designed to maximize ad-hoc functionality Copyright 2003 The ZigBee Alliance, Inc. Networking Considerations IEEE 802.15.4 is designed to allow large networks • Larger address space (216) • Peer-peer & Star • CSMA • Node acquisition time ~ 30 mS • Wake-up time 15 mS November, 2003 Slide 32 Bluetooth is designed for small, personal networks • 7 active addresses • Star only • TDMA (Master/slave) • Node acquisition time ~3S • Wake-up time 3S Copyright 2003 The ZigBee Alliance, Inc. Security Mechanisms IEEE 802.15.4 • Standards based algorithms • AES 128-CTR • CCM/CBC-MAC • Authenticity • Replay Attack resistant (freshness check) November, 2003 Slide 33 Bluetooth • Proprietary algorithms • Safer+ • CRC (error control) • No authenticity • Replay attack susceptible (no freshness check) Copyright 2003 The ZigBee Alliance, Inc. For more Information please visit: www.ieee802.org/15/ November, 2003 Slide 34 Copyright 2003 The ZigBee Alliance, Inc.