L 6 WPAN Bluetooth Characteristics Piconet and Scatternet
L 6: WPAN-- Bluetooth • • Characteristics Piconet and Scatternet MAC mechanism Connection Management
Wireless PAN • WPAN – Wireless Personal Area Network • WPAN vs. WLAN – – smaller coverage area (~10 m) lower data rate (~1 Mbps) ad hoc only topology lower power consumption (~1 m. W) 2
Bluetooth • Short range (10 m) • Low power consumption • 2. 4 GHz (Unlicensed ISM Band) – Advantage: worldwide availability – Disadvantage: interfere with IEEE 802. 11 b products • Voice and data transmission, totally 1 Mbps • Low cost – less than US$5 for a Bluetooth chip 3
Bluetooth • Universal radio interface for ad-hoc wireless connectivity • Voice and data transmission, approx. 1 Mbit/s gross data rate One of the first modules (Ericsson). 4
Application Scenarios Cable Replacement Integrated Access Point: connect wireless devices to both voice and data backbone infrastructure. Ad Hoc Personal Network (e. g. connect multiple users in a conference room) 5
History 1994 Initial study started at Ericsson, Sweden. 1998 Ericsson, Nokia, IBM, Toshiba and Intel formed a Special Interest Group (SIG) to develop a standard. 1999 First specification was released and accepted as the IEEE 802. 15 WPAN standard. Today Over 10, 000 companies joined the Bluetooth SIG. 6
Why is it called “Bluetooth”? • Harald Blaatand – translated in English means “Bluetooth” – A. D. 940 -981 – a king of Denmark and Norway • Brought Christianity to Scandinavians to harmonize their beliefs with the rest of Europe. – symbolize the need for harmony among manufacturers of WPANs around the world. 7
History and hi-tech… 1999: Ericsson mobile communications. 8
…and the real rune stone Located in Jelling, Denmark, erected by King Harald “Blåtand” in memory of his parents. The stone has three sides – one side showing a picture of Christ. Inscription: "Harald king executes these sepulchral monuments after Gorm, his father and Thyra, his mother. The Harald who won the whole of Denmark and Norway and turned the Danes to Christianity. " Btw: Blåtand means “of dark complexion” (not having a blue tooth…) This could be the “original” colors of the stone. Inscription: “auk tani karthi kristna” (and made the Danes Christians) 9
Characteristics • 2. 4 GHz ISM (industry-scientific-medical) band, 79 RF channels, 1 MHz carrier spacing – Channel 0: 2402 MHz … channel 78: 2480 MHz – G-FSK modulation, 1 -100 m. W transmit power • FHSS and TDD – Frequency hopping with 1600 hops/s – Hopping sequence in a pseudo random fashion, determined by a master – Time division duplex for send/receive separation • Voice link – SCO (Synchronous Connection Oriented) – FEC (forward error correction), no retransmission, 64 kbit/s duplex, point-to-point, circuit switched • Data link – ACL (Asynchronous Connection. Less) – Asynchronous, fast acknowledge, point-to-multipoint, up to 433. 9 kbit/s symmetric or 723. 2/57. 6 kbit/s asymmetric, packet switched • Topology – Overlapping piconets (stars) forming a scatternet 10
Piconet • Before a connection is created, a device is in “standby” mode, periodically listen for messages every 1. 28 sec. • Devices are connected in an ad hoc fashion, called piconet. • One unit acts as master and the others as slaves for the lifetime of the piconet. Each piconet has 1 master and up to 7 slaves. • Master determines hopping pattern, slaves have to synchronize. P S S M P SB S P M = Master S = Slave SB P = Parked SB = Standby 11
Piconet (con’t) • Each piconet has a unique hopping pattern • Participation in a piconet = synchronization to hopping sequence • Other devices within the piconet will be considered “parked”. • Parked devices, as well as the slaves, are synchronized to the master. P S S M P SB S P M = Master S = Slave SB P = Parked SB = Standby 12
Forming a piconet • All devices in a piconet hop together – Master gives slaves its clock and device ID • Hopping pattern: determined by device ID (48 bit, unique worldwide) • Phase in hopping pattern determined by clock • Addressing – Active Member Address (AMA, 3 bit) – Parked Member Address (PMA, 8 bit) SB SB SB S SB P S M P S P SB 13
Scatternet • Linking of multiple co-located piconets through the sharing of common master or slave devices – A device can be slave in one piconet and master of another – No device can be master of two piconets P S (each with a capacity of < 1 Mbit/s) S S M M M=Master S=Slave P=Parked SB=Standby P SB SB S 14
Bluetooth protocol stack audio apps. NW apps. v. Cal/v. Card TCP/UDP OBEX telephony apps. AT modem commands IP BNEP PPP mgmnt. apps. TCS BIN SDP Control RFCOMM (serial line interface) Audio Logical Link Control and Adaptation Protocol (L 2 CAP) Link Manager Host Controller Interface Baseband Radio AT: attention sequence OBEX: object exchange TCS BIN: telephony control protocol specification – binary BNEP: Bluetooth network encapsulation protocol SDP: service discovery protocol RFCOMM: radio frequency comm. 15
Bluetooth protocols • "Bluetooth is defined as a layer protocol architecture consisting of core protocols, cable replacement protocols, telephony control protocols, and adopted protocols”. • Mandatory protocols for all Bluetooth stacks are: LMP, L 2 CAP and SDP. Additionally, these protocols are almost universally supported: HCI and RFCOMM. 16
Core Protocols • Radio – Physical layer aspects, e. g. frequency hopping • Baseband – Link control at bit and packet level, e. g. coding, encryption – Provides two types of physical links, SCO and ACL, to be described later • Link Manager Protocol (LMP) – Link setup and ongoing link management. Used for control of the radio link between two devices. Implemented on the controller. • Logical Link Control and Adaptation Protocol (L 2 CAP – see next) – Provide services to upper layer protocols (e. g. packet segmentation and assembly). • Service Discovery Protocol (SDP) – Discover available services and connects two or more devices to support a service such as faxing, printing, etc. 17
L 2 CAP • Multiplex multiple logical connections between two devices using different higher level protocols. Provides segmentation and reassembly of on-air packets. • Basic mode, – L 2 CAP provides payload up to 64 k. B, with 672 bytes as the default MTU, and 48 bytes as the minimum mandatory supported MTU. • Retransmission & Flow Control modes – L 2 CAP can be configured for reliable or isochronous data per channel by performing retransmissions and CRC checks. • Reliability in any of these modes is optionally 18
Service Discovery Protocol (SDP) • Service Discovery Protocol (SDP) allows a device to discover services supported by other devices, and their associated parameters. – E. g. when connecting a mobile phone to a Bluetooth headset, SDP will be used for determining which Bluetooth profiles are supported by the headset (Headset Profile, Hands Free Profile, Advanced Audio Distribution Profile (A 2 DP) etc. ) and the protocol multiplexer settings needed to connect to each of them. Each service is identified by a Universally Unique Identifier (UUID), with official services (Bluetooth profiles) assigned a short form UUID (16 bits rather than the full 128) 19
Bluetooth – other protocols • HCI (Host/Controller Interface) – Standardised communication between the host stack (e. g. , a PC or mobile phone OS) and the controller (the Bluetooth IC). This standard allows the host stack or controller IC to be swapped with minimal adaptation. – There are several HCI transport layer standards, each using a different hardware interface to transfer the same command, event and data packets. The most commonly used are USB (in PCs) and UART (in mobile phones and PDAs). • In Bluetooth devices with simple functionality (e. g. , headsets) the host stack and controller can be implemented on the same microprocessor. In this case the HCI is optional, although often implemented as an internal software interface. 20
Bluetooth – other protocols • RFCOMM (Serial Port Emulation) for Radio frequency communications • Provides for binary data transport and emulates EIA-232 (formerly RS-232) control signals over the Bluetooth baseband layer. • Provides a simple reliable data stream to the user, similar to TCP. • Used directly by many telephony related profiles as a carrier for AT commands, as well as being a transport layer for OBEX (OBject Exchange) over Bluetooth. • Widespread support and publicly available API on most operating systems. 21
Bluetooth protocol -- HCI (Host/Controller Interface) • BNEP (Bluetooth Network Encapsulation Protocol) – BNEP is used for transferring another protocol stack's data via an L 2 CAP channel. Its main purpose is the transmission of IP packets in the Personal Area Networking Profile. BNEP performs a similar function to SNAP in Wireless LAN. • AVCTP (Audio/Video Control Transport Protocol) – Used by the remote control profile to transfer AV/C commands over an L 2 CAP channel. The music control buttons on a stereo headset use this protocol to control the music player. • AVDTP (Audio/Video Distribution Transport Protocol) – Used by the advanced audio distribution profile to stream music to stereo headsets over an L 2 CAP channel. Intended to be used by video distribution profile. 22
Other Bluetooth protocols -- Telephony control protocol • Telephony control protocol-binary (TCS BIN) is the bit-oriented protocol that defines the call control signaling for the establishment of voice and data calls between Bluetooth devices. Additionally, "TCS BIN defines mobility management procedures for handling groups of Bluetooth TCS devices. " • TCS-BIN is only used by the cordless telephony profile, which failed to attract implementers. As such it is only of historical interest. 23
Other Bluetooth protocols : Adopted protocol • Adopted protocols are defined by other standards-making organizations and incorporated into Bluetooth’s protocol stack, allowing Bluetooth to create protocols only when necessary. The adopted protocols include: • Point-to-Point Protocol (PPP) – Internet standard protocol for transporting IP datagrams over a point-topoint link. • TCP/IP/UDP – Foundation Protocols for TCP/IP protocol suite • Object Exchange Protocol (OBEX) – Session-layer protocol for the exchange of objects, providing a model for object and operation representation • Wireless Application Environment/Wireless Application Protocol (WAE/WAP) – WAE specifies an application framework for wireless devices and WAP is an open standard to provide mobile users access to telephony and information services. 24
Three Classes of Transmitters • Class 1 – Output power: 1 m. W – 100 m. W – Range: up to 100 m – Power control is mandatory • Class 2 – Output power: 0. 25 m. W – 2. 4 m. W – Range: 10 m – Power control is optional • Class 3 – Output power: 1 m. W – Range: 0. 1 – 10 m 25
MAC mechanism • FH-CDMA/TDD – Frequency Hopping CDMA – Time Division Duplex • Polling – Master polls the slaves for transmission – No collision/interference within a piconet 26
Frequency Hopping • Totally, 79 frequencies for hopping – Each of bandwidth 1 MHz – 2402 + k MHz, k = 0, 1, . . . , 78 • ALL devices on a piconet follow the SAME frequency hopping sequence. – 1600 hops per second – Therefore, each frequency is occupied for a duration of 625 sec. , called a slot. 27
Hopping Sequence • Every Bluetooth device has – a unique device ID (48 bits Bluetooth address) – a clock • Master gives its device ID and clock to its slaves – Hopping pattern: determined by device ID – Timing in hopping pattern: determined by clock • All slaves synchronizes to the master 28
Polling for Transmission P The MASTER polls the SLAVES according to certain rules S - e. g. round robin S M P SB S P SB Time Division Duplex (TDD) –When a master is transmitting, the slave is receiving and cannot transmit. 29
Baseband link types • Polling-based TDD packet transmission – 625µs slots, master polls slaves • SCO (Synchronous Connection Oriented) – Voice – Periodic single slot packet assignment, 64 kbit/s full-duplex, point-to-point • ACL (Asynchronous Connectionless) – Data – Variable packet size (1, 3, 5 slots), asymmetric bandwidth, point-to-multipoint 30
Alternate Transmission • Master transmits on even numbered slots • Slave transmits on odd numbered slots • A slave can transmit only if the master has just transmitted to this slave f(k): the frequency used in slot k according to the hopping sequence. 31
Frequency selection during data transmission 625 µs fk M fk+1 fk+2 fk+3 fk+4 fk+5 fk+6 S M S M t fk fk+3 fk+4 fk+5 fk+6 M S M t fk fk+1 M S fk+6 M t 32
Baseband Packet Format Synchronization, paging and inquiry 4 preamble 64 sync. Identify packet type and carry control information 72 54 access code packet header 4 (trailer) 3 AM address Carry information bits 0 -2745 bits payload 4 1 1 1 8 type flow ARQN SEQN HEC Active Member Address: Up to 7 active slaves; 000 reserved for broadcast The header field has 18 bits that are repeated 3 times for error correction. Packet Types Status Reports bits Parity Check for the header 33
Baseband data rates/rules ACL 1 slot 3 slot 5 slot SCO Type Payload User Header Payload [byte] FEC CRC Symmetric Asymmetric Max. Rate max. Rate [kbit/s] Forward Reverse DM 1 1 0 -17 2/3 yes 108. 8 DH 1 1 0 -27 no yes 172. 8 DM 3 2 0 -121 2/3 yes 258. 1 387. 2 54. 4 DH 3 2 0 -183 no yes 390. 4 585. 6 86. 4 DM 5 2 0 -224 2/3 yes 286. 7 477. 8 36. 3 DH 5 2 0 -339 no yes 433. 9 723. 2 57. 6 AUX 1 1 0 -29 no no 185. 6 HV 1 na 10 1/3 no 64. 0 HV 2 na 20 2/3 no 64. 0 HV 3 na 30 no no 64. 0 DV 1 D 10+(0 -9) D 2/3 D yes D 64. 0+57. 6 D Data Medium/High rate, High-quality Voice, Data and Voice 34
Physical Links • Two types of links can be established between a master and a slave. • Synchronous Connection Oriented (SCO) – For delay-sensitive traffic, e. g. voice – Slots are reserved at regular intervals – Basic unit of reservation is two consecutive slots (one in each direction). • Asynchronous Connection. Less (ACL) – For best-effort traffic, e. g. data – Use variable packet size (1, 3, 5 slots) to support asymmetric bandwidth 35
Packet Types • Control packets – Four different types • SCO – Three different types – 64 kbps voice with different error protection • ACL – Six different types – Different error protection and different data rates • Integrated – Carries both voice and data 36
SCO payload types payload (30) HV 1 audio (10) HV 2 audio (20) HV 3 DV FEC (20) FEC (10) audio (30) audio (10) header (1) payload (0 -9) 2/3 FEC CRC (2) (bytes) 37
SCO Packet Frame Formats No. of bits High-quality Voice Three different types Forward Error Correction 38
Example MASTER SLAVE 1 SLAVE 2 SCO f 0 SCO f 6 ACL f 4 f 1 f 7 f 5 SCO f 12 ACL f 8 f 9 SCO f 18 ACL f 14 f 13 ACL f 20 f 19 f 17 f 21 A multislot packet is transmitted using the same frequency until the entire packet has been sent. In the next slot after the multislot packet, the frequency is chosen according to the original hopping sequence. Therefore, two or four hop frequencies have been skipped. 39
Robustness • Slow frequency hopping with hopping patterns determined by a master – Protection from interference on certain frequencies – Separation from other piconets (FH-CDMA) • Retransmission Error in payload (not transmitted!) – ACL only, very fast • Forward Error Correction NAK – SCO and ACL MASTER SLAVE 1 SLAVE 2 A C B C D F ACK H E G G 40
ACL Packet Frame Formats (in bit) Data Medium Data High Six different types 41
ACL Payload types (in byte) payload (0 -343) header (1/2) DM 1 header (1) DH 1 header (1) DM 3 header (2) DH 3 header (2) DM 5 header (2) DH 5 header (2) AUX 1 header (1) payload (0 -339) payload (0 -17) 2/3 FEC payload (0 -27) payload (0 -121) CRC (2) (bytes) CRC (2) 2/3 FEC payload (0 -183) payload (0 -224) payload (0 -339) CRC (2) 2/3 FEC CRC (2) payload (0 -29) 42
Data Rate • DH 1 – data high rate – 1 slot/pkt + 1 byte header • DM 1 – data medium rate – 1 slot/pkt + 1 byte header • DH 3 – data high rate – 3 slot/pkt + 2 byte header • DM 3 – data medium rate – 3 slot/pkt + 2 byte header • DH 5 – data high rate – 5 slot/pkt+ 2 byte header • DM 5 – data medium rate – 5 slot/pkt + 2 byte header 43
Example: Data Rate of DH 1 • Suppose that there is 1 master and 1 slave. What is the data rate of DH 1 packets in each direction? • Solution: – 216 bits per slot – 800 slots per second (every other slot) in each direction – Data rate = 216 (bits/slot) × 800 (slots/sec) = 172. 8 Kbps 44
ACL Packet Types and Associated Data Rates Type Symmetric Asymmetric DM 1 108. 8 DH 1 172. 8 DM 3 258. 0 387. 2 54. 4 DH 3 384. 0 576. 0 86. 4 DM 5 286. 7 477. 8 36. 3 DH 5 433. 9 723. 2 57. 6 45
How to calculate the rate? • DM 3 – 3 slot/pkt + 2 byte header; Symmetric – Each direction use 3 slot, thus, 800/3(slots/s)*968 bits = 258133 bits/s • DH 5 – Symmetric – Each direction use 5 slot, thus, 800/5(slots/s)*2712 bits = 433920 bits/s • DM 3 – Asymmetric – One direction use 3 slot and another direction uses 1 slot (ack), thus, 1600/4(slots/s)*968 bits = 387200 bits/s 46
Connection Management
States of a Bluetooth device Unconnected standby inquiry transmit AMA park PMA page connected AMA hold AMA Standby: do nothing Inquire: search for other devices Page: connect to a specific device Connected: participate in a piconet sniff AMA Connecting Active Power saving Park: release AMA, get PMA Sniff: listen periodically, not each slot Hold: stop ACLs, SCO still possible, possibly participate in another piconet 48
Establishing a Connection • Standby – Devices not connected in a piconet are in standby mode • Inquiry – A device sends an inquiry message to locate other devices within communication range. • That device becomes Master – Timing and ID of other devices are sent to the Master • Those devices become Slaves • Page – The Master sends its timing and ID to the slaves using a page message. – A piconet is established and communication session takes place 49
Power Saving Modes • Hold – No data is transmitted – The device may connect to another piconet • Sniff – The device listens to the piconet at reduced intervals • Park – The device gives up its Active Member address but remains synchronized to the piconet – It does not participate in the traffic but check on broadcast messages. 50
Summary: IEEE 802. 15 -1. 0 – Bluetooth • Data rate • Connection set-up time – Synchronous, connection-oriented: 64 kbit/s – Asynchronous, connectionless • • 433. 9 kbit/s symmetric 723. 2 / 57. 6 kbit/s asymmetric • Transmission range – POS (Personal Operating Space) up to 10 m – with special transceivers up to 100 m • Frequency – Free 2. 4 GHz ISM-band • Security – Challenge/response (SAFER+), hopping sequence • Cost – 50€ adapter, drop to 5€ if integrated • Availability – Integrated into some products, several vendors – Depends on power-mode – Max. 2. 56 s, avg. 0. 64 s • Quality of Service – Guarantees, ARQ/FEC • Manageability – Public/private keys needed, key management not specified, simple system integration • Special Advantages/Disadvantages – Advantage: already integrated into several products, available worldwide, free ISM-band, several vendors, simple system, simple ad -hoc networking, peer to peer, scatternets – Disadvantage: interference on ISM -band, limited range, max. 8 devices/network&master, high setup latency 51
Bluetooth 1. 1 • Many errors found in the 1. 0 B specifications were fixed. • Added support for non-encrypted channels. • Received Signal Strength Indicator (RSSI). 52
WPAN: IEEE 802. 15 – future developments 1 • 802. 15 -2: Coexistance – Coexistence of Wireless Personal Area Networks (802. 15) and Wireless Local Area Networks (802. 11), quantify the mutual interference • 802. 15 -3: High-Rate – Standard for high-rate (20 Mbit/s or greater) WPANs, while still low-power/low-cost – Data Rates: 11, 22, 33, 44, 55 Mbit/s – Quality of Service isochronous protocol – Ad hoc peer-to-peer networking – Security – Low power consumption – Low cost – Designed to meet the demanding requirements of portable consumer imaging and multimedia applications 53
Bluetooth 1. 2 • • Backward compatible with 1. 1 Faster Connection and Discovery Adaptive frequency-hopping spread spectrum (AFH. Higher transmission speeds in practice, up to 721 kbit/s, than in 1. 1. • Extended Synchronous Connections (e. SCO) improve voice quality of audio links. • Introduced Flow Control and Retransmission Modes for L 2 CAP. 54
Bluetooth 2. 0— 2. 1 • Three times the transmission speed (1. 8 -2. 1 Mbit/s) in some cases. • Reduced complexity of multiple simultaneous connections due to additional bandwidth. • Lower power consumption through a reduced duty cycle. 55
Bluetooth 3. 0 • Supports theoretical data transfer speeds of up to 24 Mbit/s. • AMP -- (Alternate MAC/PHY), addition of 802. 11 as a high speed transport. Two technologies had been anticipated for AMP: 802. 11. 56
Bluetooth V 4. 0 Future • 4. 0: low energy protocols • Future • Broadcast channel: Enables Bluetooth information points, pulling information from the information points, and not based around the object push model that is used in a limited way today. • Topology management: Enables the automatic configuration of the piconet topologies especially in scatternet situations that are becoming more common today. This should all be invisible to users of the technology, while also making the technology "just work. " • Qo. S improvements: Enable audio and video data to be transmitted at a higher quality, especially when best effort traffic is being transmitted in the same piconet. 57
WPAN: IEEE 802. 15 – future developments 2 • 802. 15 -4: Low-Rate, Very Low-Power – Low data rate solution with multi-month to multi-year battery life and very low complexity – Potential applications are sensors, interactive toys, smart badges, remote controls, and home automation – Data rates of 20 -250 kbit/s, latency down to 15 ms – Master-Slave or Peer-to-Peer operation – Support for critical latency devices, such as joysticks – CSMA/CA channel access (data centric), slotted (beacon) or unslotted – Automatic network establishment by the PAN coordinator – Dynamic device addressing, flexible addressing format – Fully handshaked protocol for transfer reliability – Power management to ensure low power consumption – 16 channels in the 2. 4 GHz ISM band, 10 channels in the 915 MHz US ISM band one channel in the European 868 MHz band 58
References • Ch. 7. 5 --- J. Schiller, Mobile communications, Addison. Wesley, 2004. • K. Pahlavan and P. Krishnamurthy, Principles of wireless networks: a unified approach, Prentice Hall, 2002. 59
- Slides: 59