Bluetooth & PANs: Wireless Communication - PDF
Document Details

Uploaded by ComfySanity9825
York University
2025
Tags
Summary
This document discusses Bluetooth and personal area networks (PANs). It covers aspects such as radio specifications, frequency hopping, and the Bluetooth protocol stack. The material appears to be from a lecture or presentation, possibly related to a course at York University.
Full Transcript
PANs Bluetooth and others 56 Bluetooth Idea Universal radio interface for ad-hoc wireless connectivity Interconnecting computer and peripherals, handheld devices, PDAs, cell phones – replacement of IrDA Embedded in...
PANs Bluetooth and others 56 Bluetooth Idea Universal radio interface for ad-hoc wireless connectivity Interconnecting computer and peripherals, handheld devices, PDAs, cell phones – replacement of IrDA Embedded in other devices, goal: $5/device (already < $1) One of the first modules (Ericsson, 1994 or so) York University EECS 4215 Z (W2025) 57 Bluetooth - contd Available globally for unlicensed users Devices within 10 m (Class 2, 2.5 mW) can share up to 1 Mbps (721 kbps in practice, v 1.2) Up to 3 Mbps in v 2.0 + EDR, Up to 24 Mbps in v 3.0 + HS and v 4.0 Low Energy (LE) – up to 2 Mbit/s Lower power, cost, complexity, duty cycles Smart beacons, home automation, … York University EECS 4215 Z (W2025) 58 Applications Data and voice access points Real-time voice and data transmissions Cable replacement Eliminates need for numerous cable attachments for connection Ad hoc networking Device with Bluetooth radio can establish connection with another when in range York University EECS 4215 Z (W2025) 59 Characteristics 2.4 GHz ISM band, 79 RF channels, 1 MHz carrier spacing Channel 0: 2402 MHz … channel 78: 2480 MHz G-FSK modulation, 1–100 mW transmit power FHSS and TDD Frequency hopping with 1600 hops/s (Fast?) 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 Connectionless) Asynchronous, point-to-multipoint, up to 433.9 kbit/s symmetric or 723.2/57.6 kbit/s asymmetric, packet switched, ARQ retransmissions possible Topology Overlapping piconets (stars) forming a scatternet York University EECS 4215 Z (W2025) GFSK: Gausian FSK (smoother transitions) 61 Physical Links between Master and Slave Synchronous connection oriented (SCO) Allocates fixed bandwidth between point-to- point connection of master and slave Master maintains link using reserved slots Master can support three simultaneous links Asynchronous connectionless (ACL) Point-to-multipoint link between master and all slaves Only single ACL link can exist York University EECS 4215 Z (W2025) 62 Piconet Collection of devices connected in an ad hoc S fashion S One unit acts as master and the others as M slaves for the lifetime of the piconet SB Master determines hopping pattern, slaves S have to synchronize SB Each piconet has a unique hopping pattern Participation in a piconet = synchronization to hopping sequence M=Master SB=Standby Each piconet has one master and up to 7 S=Slave simultaneous slaves 63 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 Logical Transport Address (LT_ADDR, 3 bit) S SB SB S SB SB M SB SB SB SB S SB SB SB SB SB SB York University EECS 4215 Z (W2025) 64 Scatternet Linking of multiple co-located piconets through the sharing of common master or slave devices Devices can be slave in one piconet and master of another Communication between piconets Devices jumping back and forth between the piconets Piconets P (each with a S S capacity of 720 kbit/s) S P P M M SB S M=Master P SB SB S=Slave P=Parked S SB=Standby York University EECS 4215 Z (W2025) 65 Bluetooth protocol stack audio apps. NW apps. vCal/vCard telephony apps. mgmnt. apps. TCP/UDP OBEX AT modem IP commands TCS BIN SDP BNEP PPP Control RFCOMM (serial line interface) Audio Logical Link Control and Adaptation Protocol (L2CAP) Host Controller Link Manager Interface Baseband Radio AT: attention sequence SDP: service discovery protocol OBEX: object exchange RFCOMM: radio frequency comm. TCS BIN: telephony control protocol specification – binary BNEP: Bluetooth network encapsulation protocol 66 Another (simplified) view From Wikipedia York University EECS 4215 Z (W2025) 67 Frequency selection during data transmission 625 µs fk fk+1 fk+2 fk+3 fk+4 fk+5 fk+6 M S M S M S M t fk fk+3 fk+4 fk+5 fk+6 M S M S M t fk fk+1 fk+6 M S M t 72 Frequency Hopping Total bandwidth divided into 1MHz physical channels FH occurs by jumping from one channel to another in pseudorandom sequence Hopping sequence shared with all devices on piconet Piconet access: Bluetooth devices use time division duplex (TDD) Access technique is TDMA FH-TDD-TDMA York University EECS 4215 Z (W2025) 73 Frequency Hopping in Bluetooth Provides resistance to interference and multipath effects Provides a form of multiple access among co-located devices in different piconets York University EECS 4215 Z (W2025) 74 Radio Specification Classes of transmitters Class 1: Outputs 100 mW for maximum range Power control mandatory Provides greatest distance Class 2: Outputs 2.4 mW at maximum Power control optional Class 3: Nominal output is 1 mW Lowest power York University EECS 4215 Z (W2025) 75 Bluetooth Packet Fields Access code – used for timing synchronization, offset compensation, paging, and inquiry Header – used to identify packet type and carry protocol control information Payload – contains user voice or data and payload header, if present York University EECS 4215 Z (W2025) 77 Access Code Types: Channel access code (CAC) – a piconet; Device access code (DAC) – used for paging and subsequent responses; Inquiry access code (IAC) – used for inquiry purposes (setup) Preamble – used for DC compensation 0101 if LSB of sync word is 0 1010 if LSB of synch word is 1 Sync word – 64-bits, derived from: 7-bit Barker sequence Lower address part (LAP) Pseudonoise (PN) sequence Trailer 0101 if MSB of sync word is 1 1010 if MSB of sync word is 0 York University EECS 4215 Z (W2025) 79 Packet Header Fields AM_ADDR – contains “active mode” address of one of the slaves Type – identifies type of packet Flow – 1-bit flow control ARQN – 1-bit acknowledgment SEQN – 1-bit sequential numbering schemes Header error control (HEC) – 8-bit error detection code York University EECS 4215 Z (W2025) 80 Bluetooth Data Types York University EECS 4215 Z (W2025) 81 Payload Format Payload header L_CH field – identifies logical channel Flow field – used to control flow at L2CAP level Length field – number of bytes of data Payload body – contains user data CRC – 16-bit CRC code York University EECS 4215 Z (W2025) 82 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 SCO ACL SCO ACL SCO ACL SCO ACL MASTER f0 f4 f6 f8 f12 f14 f18 f20 SLAVE 1 f1 f7 f9 f13 f19 SLAVE 2 f5 f17 f21 83 Classical SCO payload types No retransmissions DV: data + voice York University EECS 4215 Z (W2025) 84 Asynchronous connectionless link types York University EECS 4215 Z (W2025) 85 Error Correction Schemes 1/3 rate FEC (forward error correction) Used on 18-bit packet header, voice field in HV1 packet 2/3 rate FEC Used in DM packets, data fields of DV packet, FHS packet and HV2 packet ARQ Used with DM and DH packets York University EECS 4215 Z (W2025) 86 FEC details 1/3 FEC sends three copies of each bit The receiver then performs a majority decision: each received triple of bits is mapped into whichever bit is in majority Can correct all single bit errors in these triples 2/3 FEC encoding detects all double errors and can correct all single bit errors in a codeword York University EECS 4215 Z (W2025) 87 ARQ Scheme Error detection – destination detects errors, discards packets Positive acknowledgment – destination returns positive acknowledgment Retransmission after timeout – source retransmits if packet unacknowledged Negative acknowledgment and retransmission – destination returns negative acknowledgement for packets with errors, source retransmits York University EECS 4215 Z (W2025) 88 Speed Increased rates are possible (x2, x3) (modulation) York University EECS 4215 Z (W2025) Wireless LANs 89 Robustness Slow frequency hopping with hopping patterns determined by a master ◦ Protection from interference on certain frequencies ◦ Separation from other piconets (FH-CDMA) Retransmission ◦ ACL only, very fast Error in payload (not header!) Forward Error Correction ◦ SCO and ACL NAK ACK MASTER A C C F H SLAVE 1 B D E SLAVE 2 G G 90 Baseband states of a Bluetooth device standby unconnected detach inquiry page connecting transmit connected active hold sniff low power Standby: do nothing Sniff: listen periodically, not each slot Inquire: search for other devices Hold: stop ACL, SCO still possible, possibly Page: connect to a specific device participate in another piconet Connected: participate in a piconet 91 Channel Control States of operation of a piconet during link establishment and maintenance Major states Standby – default state Connection – device connected York University EECS 4215 Z (W2025) 92 Channel Control Interim states for adding new slaves Page – device issued a page (used by master) Page scan – device is listening for a page Master response – master receives a page response from slave Slave response – slave responds to a page from master Inquiry – device has issued an inquiry for identity of devices within range Inquiry scan – device is listening for an inquiry Inquiry response – device receives an inquiry response York University EECS 4215 Z (W2025) 93 Power consumption/CSR BlueCore2 Typical Average Current Consumption1 ◦ VDD=1.8V Temperature = 20°C ◦ Mode ◦ SCO connection HV3 (1s interval Sniff Mode) (Slave) 26.0 mA ◦ SCO connection HV3 (1s interval Sniff Mode) (Master) 26.0 mA ◦ SCO connection HV1 (Slave) 53.0 mA ◦ SCO connection HV1 (Master) 53.0 mA ◦ ACL data transfer 115.2kbps UART (Master) 15.5 mA ◦ ACL data transfer 720kbps USB (Slave) 53.0 mA ◦ ACL data transfer 720kbps USB (Master) 53.0 mA ◦ ACL connection, Sniff Mode 40ms interval, 38.4kbps UART 4.0 mA ◦ ACL connection, Sniff Mode 1.28s interval, 38.4kbps UART 0.5 mA ◦ Parked Slave, 1.28s beacon interval, 38.4kbps UART 0.6 mA ◦ Standby Mode (Connected to host, no RF activity) 47.0 µA ◦ Deep Sleep Mode2 20.0 µA Notes: ◦ 1 Current consumption is the sum of both BC212015A and the flash. ◦ 2 Current consumption is for the BC212015A device only. 98 Example: Bluetooth/USB adapter 1 euro coin: similar in diameter to 25c Canadian coin 99 SDP – Service Discovery Protocol Inquiry/response protocol for discovering services Searching for and browsing services in radio proximity Adapted to the highly dynamic environment Defines discovery only, not the usage of services Caching of discovered services Gradual discovery Service record format Information about services provided by attributes Attributes are composed of an 16 bit ID (name) and a value values may be derived from 128 bit Universally Unique Identifiers (UUID) https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles York University EECS 4215 Z (W2025) 100 Profiles https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles Represent default solutions for a certain usage model Use a selection (set) of protocols + parameters to form a basis for interoperability Not all parameters in a supported protocol are used Basic profiles generic access, service discovery, cordless telephony, intercom, serial port, headset, dialup networking, fax, LAN access, generic object exchange, object push, file transfer, and synchronization Additional profiles advanced audio distribution, PAN, audio video remote control, basic printing, basic imaging, extended service discovery, generic audio video distribution, hands-free, and hardcopy cable replacement Each profile selects a set of protocols. For example, the serial port profile needs RFCOMM, SDP, LMP, L2CAP Baseband and radio are always required The profile further defines all interoperability requirements, such as RS232 control signals for RFCOMM or configuration options for L2CAP (QoS, max. transmission unit) York University EECS 4215 Z (W2025) 102 Profiles Represent default solutions for a certain usage model Vertical slice through the protocol stack Applications Basis for interoperability Protocols Examples A2DP: Advanced Audio Distribution Profile BIP: Basic Imaging Profile CTN: Calendar Tasks and Notes Profile FTP: File Transfer Profile GNSS: Global Navigation Satellite System Profile Profiles HDP: Health Device Profile HID: Human Interface Device Profile PBAP: Phone Book Access Profile SPP: Serial Port Profile … York University EECS 4215 Z (W2025) 104 Bluetooth Audio Voice encoding schemes: Pulse code modulation (PCM), uncompressed Continuously variable slope delta (CVSD) modulation (telephony), low bitrate Advanced Audio Distribution Profile (A2DP) SBC codec, AAC, MP3, aptX, etc. Choice of scheme made by link manager Negotiates most appropriate scheme for application York University EECS 4215 Z (W2025) 105 Bluetooth Link Security Elements: Authentication – verify claimed identity Encryption – privacy Key management and usage Security algorithm parameters: Unit address Secret authentication key Secret privacy key Random number York University EECS 4215 Z (W2025) 106 Security User input (initialization) PIN (1-16 byte) Pairing PIN (1-16 byte) Authentication key generation E2 E2 (possibly permanent storage) link key (128 bit) Authentication link key (128 bit) Encryption key generation E3 E3 (temporary storage) encryption key (128 bit) Encryption encryption key (128 bit) Keystream generator Keystream generator payload key Ciphering payload key Cipher data Data Data 107 Bluetooth versions Bluetooth 1.1 also IEEE Standard 802.15.1-2002 initial stable commercial standard Bluetooth 1.2 also IEEE Standard 802.15.1-2005 eSCO (extended SCO): higher, variable bitrates, retransmission for SCO AFH (adaptive frequency hopping) to avoid interference Bluetooth 2.0 + EDR (2004, no more IEEE) EDR (enhanced date rate) of 3.0 Mbit/s for ACL and eSCO lower power consumption due to shorter duty cycle Bluetooth 2.1 + EDR (2007) better pairing support, e.g. using NFC improved security Bluetooth 3.0 + HS (2009) Bluetooth 2.1 + EDR + IEEE 802.11a/g = 54 Mbit/s Bluetooth 4.0 (2010), 4.1 (2013), 4.2 (2014) Low Energy, much faster connection setup Bluetooth 5 (2016) Longer range (100m) or higher data rate (2 Mbit/s without EDR), localization, no more park state York University EECS 4215 Z (W2025) 108 Bluetooth Low Energy – this is not classical BT anymore! Also at 2.4 GHz, FHSS, mandatory 1 Mbit/s, 500 kbit/s, 125 kbit/s as well as optional 2 Mbit/s Special mesh networking for many-to-many communication between thousands of devices Two MAC schemes FDMA 40 channels, 2 MHz spacing, 3 channels for advertising, 37 general purpose (advertising, data) TDMA Polling scheme with predetermined intervals Physical channel sub-divided into “events” Advertising, extended advertising, periodic advertising, connection, isochronous Radio supports direction finding (angle of arrival / departure) York University EECS 4215 Z (W2025) Zigbee Relation to 802.15.4 similar to Bluetooth / 802.15.1 Pushed by Chipcon (now TI), Ember, Freescale (Motorola), Honeywell, Mitsubishi, Motorola, Philips, Samsung… More than 260 members – see www.zigbee.org about 19 promoters, 133 participants, 162 adopters must be member to commercially use ZigBee spec ZigBee platforms comprise IEEE 802.15.4 for layers 1 and 2 ZigBee protocol stack up to the applications ZigBee Alliance York University EECS 4215 Z (W2025) Zigbee Technical Specifications Source: www.zigbeealliance.org York University EECS 4215 Z (W2025) ISM band interference Many sources of interference ◦ Microwave ovens, microwave lighting ◦ 802.11, 802.11b, 802.11g, 802.15, … ◦ Unlicensed metropolitan area networks ◦… Levels of interference ◦ Physical layer: interference acts like noise ◦ Spread spectrum tries to minimize this ◦ FEC/interleaving tries to correct ◦ MAC layer: algorithms not harmonized ◦ E.g., Bluetooth might confuse 802.11 802.11 vs Bluetooth – a problem from the beginning? Bluetooth may act like a rogue member of the 802.11 network ◦ Does not know anything about gaps, inter frame spacing etc. IEEE 802.15-2 discusses these problems ◦ Proposal: Adaptive Frequency Hopping ◦ a non-collaborative Coexistence Mechanism Real effects? Many different opinions, publications, tests, formulae, … ◦ Results from complete breakdown to almost no effect ◦ Bluetooth (FHSS) seems more robust than 802.11b (DSSS) Overview – who is where? Bluetooth BR/EDR Bluetooth LE ZigBee 802.15.4 WLAN 802.11 Source: S. Raza Summary Multiple wireless standard exists Different properties New standards are introduced Coordination is needed York University EECS 4215 Z (W2025) 115