wireless protocols (phy & mac)
Post on 03-Feb-2022
8 Views
Preview:
TRANSCRIPT
KTFENG@CM.NCTU
1
– Wireless Networks for Embedded Systems• IEEE 802.11
• Bluetooth Technology
• ZigBee
KTFENG@CM.NCTU
2
Wireless Protocols (PHY & MAC)
• Recent wireless LAN and PAN standards:– Others include 802.11e (QoS), 802.11n (Hight throughput), UWB, …
~2.4GHz~ 2.4GHz~ 2.4GHz~2.4GHz5GHzFrequency
Sensor Networks
PANLANSOHO, café
SOHO, hotel, airport
Environment
75m10m400m400m400mRange
250kbps780kbps22Mbps11Mbps54MbpsData rate
ZigBeeBluetooth802.11g802.11b802.11aTechnology
KTFENG@CM.NCTU
3
IEEE 802.11 Overview
• Primary Goals of the specification:– To provide a simple and robust wireless LAN– To offer time-bounded (synchronous) and asynchronous
services– MAC layer should operate with multiple PHY layers
• E.g. DSSS, FHSS
• Features of 802.11:– Supports power management– The ability to operate worldwide
• 2.4 and 5.0 GHz ISM band is available in most countries
– Data rates envisaged for the standard were 1 Mbps and up
KTFENG@CM.NCTU
4
IEEE 802.11 Overview
• IEEE 802.11– Denotes a set of Wireless LAN standards developed by working group
11 of the IEEE LAN/MAN Standards Committee
– The term also used to refer to the original 802.11, which is now called “802.11 legacy”
– The most popular techniques in the 802.11 family are those defined by the a, b, and g amendments to the original standard
– Security was originally included, and was later enhanced via the 802.11i amendment
– Other standards in the family (c–f, h–j, n) are service enhancement and extensions, or corrections to previous specifications
– 802.11b was the first widely accepted wireless networking standard, followed by 802.11a and 802.11g
KTFENG@CM.NCTU
5
IEEE 802.11 Certification
• Wi-Fi Alliance runs a certification program that members pay to participate in
– IEEE only sets specifications but does not test equipment for compliance
– Virtually all companies selling 802.11 equipment are members
– Intended to guarantee interoperability
– Currently, "Wi-Fi" can mean any of 802.11a, b, or g
– "Wi-Fi" will also mean equipment which implements the 802.11i security standard (Wi-Fi Protected Access 2, WPA 2)
– Products that say they are Wi-Fi supposed indicate the frequency band in which they operate at 2.4 or 5 GHz
KTFENG@CM.NCTU
6
IEEE 802.11 Standards
• IEEE 802.11 - The original 1 Mbps and 2 Mbps, 2.4 GHz RF and IR standard
• IEEE 802.11a - 54 Mbps, 5 GHz standard (1999, shipping products in 2001)
• IEEE 802.11b - Enhancements to 802.11 to support 5.5 and 11 Mbps (1999)
• IEEE 802.11d - International (country-to-country) roaming extensions
• IEEE 802.11e - Enhancements: QoS• IEEE 802.11f - Inter-Access Point Protocol (IAPP) • IEEE 802.11g - 54 Mbps, 2.4 GHz standard (backwards
compatible with b) (2003) • IEEE 802.11h - 5 GHz spectrum, Dynamic Channel/Frequency
Selection (DCS/DFS) and Transmit Power Control (TPC) for European compatibility
KTFENG@CM.NCTU
7
IEEE 802.11 Standards (Cont.)
• IEEE 802.11i (ratified 24 June 2004) - Enhanced security
• IEEE 802.11j - Extensions for Japan
• IEEE 802.11k - Radio resource measurements
• IEEE 802.11n - Higher throughput improvements
• IEEE 802.11p - WAVE - Wireless Access for the Vehicular Environment (such as ambulances and passenger cars)
• IEEE 802.11r - Fast roaming
• IEEE 802.11s - Wireless mesh networking
• IEEE 802.11t - Wireless Performance Prediction (WPP) - test methods and metrics
• IEEE 802.11u – Inter-working with non-802 networks (e.g., cellular)
• IEEE 802.11v - Wireless network management
KTFENG@CM.NCTU
8
IEEE 802.11 Architecture
• 802.11 Architecture Components– System architecture can be infrastructure-based or ad-hoc– Basic Service Set (BSS):
• System is subdivided into cells• Stations (STAs) in a cell are controlled by a base station (Access Point
(AP))– AP is connected with backbone (Distribution System (DS))– AP supports roaming capability
– Extended Service Set (ESS):• The whole 802.11 LAN interconnection
– STAs, APs, and DS– Portal: a device that interconnects between an 802.11 with other
802 LANs• An abstract description• Translation bridge
KTFENG@CM.NCTU
9
IEEE 802.11 Architecture (Cont.)
• 802.11 Infrastructure-based Architecture
KTFENG@CM.NCTU
10
IEEE 802.11 Protocols
• 802.11 legacy– The original version of the standard IEEE 802.11 released in 1997
• Specifies two raw data rates of 1 and 2 Mbps• Transmitted via infrared (IR) signals or in the ISM band at 2.4 GHz
– IR remains a part of the standard but has no actual implementations
– Defines the Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) as the media access method
• A significant percentage of the available raw channel capacity is sacrificed (via CSMA/CA) to improve the reliability of data transmissions
– At least five different, somewhat-interoperable, commercial products appeared using the original specification
• e.g. Alvarion (PRO.11 and BreezeAccess-II), Netwave Technologies (AirSurferPlus and AirSurfer Pro) and Proxim (OpenAir)
– Weakness: problem with interoperability• It offered too many choices that interoperability was challenging to realize
– It is more of a "meta-specification" than a rigid specification
KTFENG@CM.NCTU
11
IEEE 802.11 Protocols (Cont.)• 802.11b
– The 802.11b amendment to the original standard was approved in 1999– Uses the same CSMA/CA media access method defined in the original standard
• Due to the CSMA/CA protocol overhead, in practice the maximum 802.11b throughput is about 5.9 Mbps over TCP and 7.1 Mbps over UDP
– Direct extension of the DSSS modulation technique defined in the original 802.11 standard
– Usually used in a point-to-multipoint configuration (1 AP to many STAs)– Can operate at 11 Mbps, but will scale back to 5.5, 2, and 1 Mbps if signal quality
becomes an issue• Since the lower data rates use less complex and more redundant methods for
data encoding, they are less susceptible to corruption due to interference and signal attenuation
• Extensions have been made to the 802.11b protocol (e.g., channel bonding and burst transmission techniques) in order to increase speed to 22, 33, and 44 Mbps
– But the extensions are proprietary and have not been endorsed by the IEEE– Many companies call enhanced versions "802.11b+”
• These extensions have been obviated by the development of 802.11g, which has data rates up to 54 Mbps and is backwards-compatible with 802.11b
– Commercial products:• E.g. Apple Computer (AirPort), Linksys
KTFENG@CM.NCTU
12
IEEE 802.11 Protocols (Cont.)
• 802.11a– The 802.11a amendment to the original standard was approved in 1999– Uses the same core protocol as the original standard– Operates in 5 GHz band and uses a 52-subcarrier OFDM (Orthogonal
Frequency Division Multiplexing) with a maximum raw data rate of 54 Mbps
• Yields realistic net achievable throughput of 25 Mbps• The data rate is reduced to 48, 36, 34, 18, 12, 9, and 6 Mbps if required
– Non-interoperable with 802.11b, except equipment that implements both standards
– Commercial products: started shipping in 2001• Since the 2.4 GHz band is heavily used, using the 5 GHz band gives 802.11a the
advantage of less interference– However, this high carrier frequency also brings disadvantages
• Restricts the use of 802.11a to almost line of sight, necessitating the use of more APs
• Can not penetrate as far as 802.11b since it is absorbed more easily• Lagging 802.11b products due to the slow availability of the 5 GHz components• There are dual-mode or tri-mode cards that can automatically handle 802.11a, b, and g
KTFENG@CM.NCTU
13
IEEE 802.11 Protocols (Cont.)
• 802.11g– The 802.11g amendment was approved in June 2003 – Works in the 2.4 GHz band (like 802.11b) but operates at a maximum raw data rate
of 54 Mbps, or about 24.7 Mbps net throughput like 802.11a• Fully backwards compatible with 802.11b
– While holding the promise of higher throughput, actual results were mitigated by some factors:
• Conflict with 802.11b-only devices• Exposure to the same interference sources as 802.11b• Limited channelization (only 3 fully non-overlapping channels like 802.11b) • More susceptible to interference than 802.11b
– Causing the 802.11g device to reduce the data rate to the same rates used by 802.11b
• The move to dual-mode/tri-mode products ensure better throughput– A new proprietary feature called “Super G” is integrated in certain APs
• Boost network speeds up to 108 Mbps by using channel bonding• May interfere with other networks and may not support all b and g client cards
– Commercial products: • E.g. Apple (AirPort Extreme) Cisco (Aironet)
KTFENG@CM.NCTU
14
802.11 Protocols Entities
• 802.11 Protocol Entities
PLCP: PHY Layer Convergence Protocol PMD: PHY Medium Dependent
KTFENG@CM.NCTU
15
802.11 Protocols Entities (Cont.)
• PHY layer:– Physical Layer Convergence Protocol (PLCP):
• Provide a carrier sense signal called Clear Channel Assessment (CCA)– To sense the current wireless medium state
• Provide a common PHY Service Access Point (SAP) independent of the transmission technology
– Physical Medium Dependent (PMD):• Handles modulation and encoding/decoding of signals
• MAC layer: medium access, fragmentation of user data, and encryption• MAC management:
– Supports the association and re-association of a station to an AP and roaming between different APs
– Controls authentication mechanisms, encryption, synchronization between stations and AP
• PHY management: channel turning and PHY Management Information Base (MIB) maintenance
• Station management: interacts with both management layers and is responsible for additional higher layer functions
KTFENG@CM.NCTU
16
802.11 MAC
• Basic MAC access features:– Use Distributed Coordination Function (DCF) for efficient
medium sharing without overlap restrictions• Use CSMA with Collision Avoidance (CSMA/CA) derivative• Based on Carrier Sense function in PHY
– Robust for interference• CSMA/CA + ACK for unicast frames, with MAC level recovery• CSMA/CA for broadcast frame
– Parameterized use of RTS/CTS to provide a Virtual Carrier Sense function to protect against hidden terminals
• Duration information is distributed by both transmitter and receiver through separate RTS and CTS control frames
– Frame formats to support different access schemes• For infrastructure and Ad-Hoc networks support
KTFENG@CM.NCTU
17
802.11 MAC (Cont.)
• Procedures of the CSMA/CA+ACK scheme:– a station desiring to transmit senses the medium:
• If the medium is busy (i.e. some other station is transmitting), the station will defer its transmission based on Carrier Sense
– CCA from PHY and Virtual Carrier Sense state• If the medium is sensed free for a specific time (called DIFS
(Distributed Inter Frame Space), the station is allowed to transmit– The receiving station will check the CRC of the received packet
• If no error, it will send an acknowledgement packet (ACK) back to the sender
– Receipt of the ACK packet indicates the sender that no collision has occurred
– If the sender does not receive the ACK, it will retransmit the fragment after a random backoff (up to a maximum limit) until
• It gets ACK• Thrown away after a given number of retransmissions
KTFENG@CM.NCTU
18
802.11 MAC (Cont.)
DIFS: DCF Inter Frame SpaceSIFS: Short Inter Frame SpaceMPDU: MAC Protocol Data Unit
KTFENG@CM.NCTU
19
802.11 MAC (Cont.)
• Duration field in RTS and CTS frames distribute Medium Reservationinformation– Stored in a Net Allocation Vector (NAV)
• Defer on either NAV or CCA indicating Medium Busy• Use of RTS/CTS is optional but must be implemented
– Controlled by a RTS_Threshold parameter per STA• To limit overhead for short frames
KTFENG@CM.NCTU
20
– Wireless Networks for Embedded Systems• IEEE 802.11
• Bluetooth Technology
• ZigBee
KTFENG@CM.NCTU
21
Bluetooth Technology Overview
• Bluetooth Technology– Short-distance wireless technology
• Open, global specification for voice and data communication• Nearly worldwide unlicensed 2.4 GHz ISM band
– Standardized by IEEE 805.15.1• Bluetooth Architecture
Baseband ChipRadio Chip
ModemMicrocontroller
LinkController& Register
UART, PCM, USBInterfaces
Flash
AudioCODEC
SPI
Radio &Power Control
Bluetooth Module
To Host
ControlLogic &
Registers
ClockGenerator
Antenna
SPI
SRAM
KTFENG@CM.NCTU
22
Bluetooth Technology
– Radio• Frequency hopping spread spectrum (1 MHz for each channel, 2.402 ~ 2.480
GHz)• Time division multiplex is used (each 625 us)• Hops faster and uses shorter packets• Antenna power
– 20 dBm (100 mW): 100 m range– 4 dBm (2.5 mW): 40 m range– 0 dBm (1 mW): 10 m range
• Source of interference in 2.4 GHz band– Wireless LANs (IEEE 802.11b, HiperLAN/2, HomeRF)– 2.4 GHz cordless phone– Microwave ovens– Other computing devices
• Combating interference– Frequency hop transceiver
• 79 hops displaced by 1 MHz channel (23 in Japan, Spain, and France)• Hops every packet using pseudo-random sequence• Typically hops at 1600 hops/sec
– Error detection and correction
KTFENG@CM.NCTU
23
Bluetooth Protocol Stack
Baseband and link layerRF link, hopping sequence,
SCO, ACL.
Link Management ProtocolLink set-up, packet sizes, power mode, state of BT,
authentication, encryption
Logical Link Control and Adaptation Protocol
Multiplexing, segmentation & reassembly, QoS, group.
Service Discovery Protocol
Telephony Control Protocol
Cable Replacement Protocol
KTFENG@CM.NCTU
24
Bluetooth Protocol Stack (Cont.)
• Baseband and Link Layer– Synchronous connection-oriented (SCO) links are typically used for
voice transmission; a voice channel supports 64Kbps in each direction• Up to three synchronous voice connections
– Asynchronous connectionless (ACL) links are typically used for data transmission; a data channel supports maximal 732.2Kbps asymmetric (57.6Kbps in the return), or 433.9Kbps symmetric
• Link Manager– Controls the baseband state machine– Handles link setup, control, and security– Link managers communicate with each other using the Link
Management Protocol (LMP)– LMP packets are sent in the ACL payload, occupy a single-slot, and
have higher priority than logical link control packets
KTFENG@CM.NCTU
25
Bluetooth Protocol Stack (Cont.)
• Logical Link Control and Adaptation Protocol (L2CAP)
– Provides the interface to the LMP and allows for interoperability between Bluetooth devices
– Supports protocol multiplexing for many third-party upper layer protocols
• such as TCP/IP, vCard/vCalendar
– Monitors the quality of service (QoS) between devices and performs segmentation and re-assembly of packets when necessary
KTFENG@CM.NCTU
26
Bluetooth Protocol Stack (Cont.)
• L2CAP packet format:
Access Code Format
Header Format
Payload Format
Access code is derived from BT master’s address (which is unique for the channel)
Temporary addresses for one master and 7 slaves
The link types
Auto Repeat Request: for ACK
Sequence number for packet ordering
Header Error Checking
KTFENG@CM.NCTU
27
Bluetooth Protocol Stack (Cont.)
• Service Discovery Protocol (SDP)– Provides a way to determine what Bluetooth services are available on a
particular device– A single Bluetooth device has no more than one SDP server– SDP Service Records
• An SDP service can provide information, perform an action, or control a resource
• A service record is a catalog with all the available services provided by the device
• Service attributes within a service record describe the supported service type, service ID, protocols supported, service name, service description through a range of data types
– SDP Service Classes• Each service belongs to a service class which defines all attributes by
ID, intended use, and the format of the attribute value• A sub-class inherits the attributes of a super-class and defines more
specific attributes
KTFENG@CM.NCTU
28
SDP Service Classes
Service Record
Service Attributes
ID
ServiceClassIDList
Attribute
Attribute
Value
Class IDs
Value
Value
Class ID
Name
Attribute Definition
Attribute Definition
ID Type
Sub-Class ID
Name
Attribute Definition
ID Type
SDP Server Class Definition
KTFENG@CM.NCTU
29
Bluetooth Protocol Stack (Cont.)
– SDP functions:• Searching: based on universally unique identifiers (UUID)
– UUID: ID of a service
– Useful when a client is looking for specific capabilities of a remote device
• Browsing: based on the search capability by using a special service attribute supported by all service classes
– Useful when a client is trying to identify all services of a remote device
KTFENG@CM.NCTU
30
Bluetooth Profiles
• Define the capabilities for specific types of applications to ensure interoperability between Bluetooth software and hardware from different manufacturers
• GAP:– All Bluetooth devices must support the generic access
profile (GAP) that defines device discovery, connection procedures, and security levels
• RFCOMM: – A transport layer protocol with additional provisions for
emulating serial ports over L2CAP• Supports up to 60 simultaneous connections
KTFENG@CM.NCTU
31
Bluetooth Profiles (Cont.)
• OBEX (object exchange):
– A model for representing objects as a session layer protocol which structures the dialogue between two devices
• Representing devices as objects
• TCS (telephone control specification):
– Defines the call control signaling for the establishment of speech and data calls between Bluetooth devices
• Based on ITU-T Recommendation Q.931
• WAP (wireless application protocol):
– Specifies the rules needed for Bluetooth to operate as a WAP bearer
KTFENG@CM.NCTU
32
Device Interaction via BT
USB-based BT Device
BT Device
KTFENG@CM.NCTU
33
Bluetooth Network Topology
• Network Topology– a: single slave– b: multi-slave, piconet
• Up to 7 slaves active
– c: scatternet operation
KTFENG@CM.NCTU
34
Bluetooth States and Modes
Transmitdata
Standby
Inquiry (unknown address)
SNIFFPARK
Page(known address)
Connected
Low Power Modes
Connecting States
Active States
Unconnected Standby
Ttypical=2s
Ttypical=1.28s
Releases MAC Address
Keeps MAC Address
Ttypical=2msTtypical=2ms
Transmitdata
HOLD
KTFENG@CM.NCTU
35
Bluetooth States and Modes (Cont.)
• Three low power states:
– SNIFF• A master can communicate with devices in sniff mode only
during specific sniff-designated time slots
– HOLD• A slave does not receive any asynchronous packets and
listens only to determine if it should become active again
– PARK• A device in park mode stops listening and also gives up its
active member address
• Duty cycle: SNIFF > HOLD > PARK
KTFENG@CM.NCTU
36
– Wireless Networks for Embedded Systems• IEEE 802.11
• Bluetooth Technology
• ZigBee
KTFENG@CM.NCTU
37
ZigBee Overview
• ZigBee standard: Specification of protocols for small, low-power radios
– low cost: allows the technology to be widely deployed in wireless control and monitoring applications
– low power: allows longer lifetime with smaller batteries
– mesh networking: provides high reliability and larger range
• ZigBee Alliance: companies developing and promoting the standard
– More than 150 companies
KTFENG@CM.NCTU
38
• Home Networking
• Automotive Networks
• Industrial Networks
• Interactive Toys
• Remote Metering
•Active RFID/ Asset Tracking
•Personal Health Care
ZigBee Applications
Wireless Sensor Nodes, Short-range Communications
KTFENG@CM.NCTU
39
ZigBee Profiles
• Definition of ZigBee-Profiles
• Describes a common language for exchanging data
• Defines the offered services
• Device interoperatbility across different manufacturers
• Standard profiles available from the ZigBee Alliance
• Profiles contain device descriptions
• Unique identifier (licensed by the ZigBee Alliance)
KTFENG@CM.NCTU
40
ZigBee/IEEE 802.15.4 Architecture
KTFENG@CM.NCTU
41
Payload
PH
Y L
ayer
MA
C
Laye
r
MAC Header(MHR)
MAC Footer(MFR)
MAC Protocol Data Unit (MPDU)
MAC Service Data Unit(MSDU)
PHY Header(PHR)
Synch. Header(SHR)
PHY Service Data Unit (PSDU)
• Four types of MAC frames:
• Data Frame
• Beacon Frame
• Acknowledgment Frame
• MAC Command Frame
IEEE 802.15.4 Frame Structure
KTFENG@CM.NCTU
42
IEEE 802.15.4 Characteristics
• The radios use direct-sequence spread spectrum (DSSS) coding• Frequency bands of operation:
– 1 channel in 868 MHz in Europe– 10 channels in 915 MHz ISM band in countries such as USA and Australia– 16 channels in 2.4 GHz ISM band in most countries
• Modulations:– BPSK is used in the 868 and 915 MHz bands– QPSK is used in the 2.4 GHz band
• Raw data rate:– 250 kbps per channel in the 2.4 GHz band– 40 kbps per channel in the 915 MHz band– 20 kbps in the 868 MHz band
• Transmission range is between 10 and 75 meters• Maximum output power is 0 dBm (1 mW) • Basic channel access mode: CSMA/CA
KTFENG@CM.NCTU
43
868MHz / 915MHz PHY
2.4 GHz
868.3 MHz
Channel 0 Channels 1-10
Channels 11-26
2.4835 GHz
928 MHz902 MHz
5 MHz
2 MHz
2.4 GHz PHY
IEEE 802.15.4 Characteristics (Cont.)
KTFENG@CM.NCTU
44
• 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
IEEE 802.15.4 - Device Class
KTFENG@CM.NCTU
45
ZigBee - Node Type
• ZigBee Coordinator (ZBC) (IEEE 802.15.4 FFD)• Only one in a network• To initiates the network and to stores information about the network• All devices will communicate with the ZBC• Provide routing functionality• Bridge to other networks
• ZigBee Router (ZBR) (IEEE 802.15.4 FFD)• Optional component• Provide routes between nodes• To extends the network coverage• Manages local address allocation and de-allocation
• ZigBee End Device (ZBE) (IEEE 802.15.4 RFD)• Optimized for low power consumption• Cheapest device type
KTFENG@CM.NCTU
46
Full function device
Reduced function device
Communications flow
Master/slave
ZigBeeCoordinator
Star Topology
KTFENG@CM.NCTU
47
Full function device
Point to point Cluster tree
Peer-to-Peer Topology
KTFENG@CM.NCTU
48
Full function device
Reduced function device
Clustered stars - for example,cluster nodes exist between roomsof a hotel and each room has a star network for control
Combined Topology
KTFENG@CM.NCTU
49
ZigBee Stack Architecture
KTFENG@CM.NCTU
50
Typical ZigBee-Enabled Device Design
Typical design consist of a RF IC and a 8-bit microprocessor with peripherals connected to an application sensor or actuators
KTFENG@CM.NCTU
51
ZigBee Benefits over Bluetooth
• Decreasing• Power consumption
• ZigBee: 10mA <==> BT: 100mA
• Production costs• ZigBee: $1.1 <==>
BT: $3
• Development costs• Codesize ZB/codesize
BT = ½
• Bit-error-rate (BER)
KTFENG@CM.NCTU
52
ZigBee Benefits over Bluetooth (Cont.)
• Increasing
• Sensitivity• ZigBee: -92dbm <=> BT: -82dbm
• flexibility• Number of supported nodes
–ZigBee: 65536 (in a mesh) <=> BT: 7 (in a star)
• Security• ZigBee: AES (128bit) <=> BT: SAFER (64/128bit)
• Range• ZigBee: up to 75 m in LOS condition <=> BT: 10 m
top related