Lecture Computer Networks - Uni Ulm

46
LOMI Universität Ulm, 2002 Lecture Computer Networks Bluetooth Prof. Dr. H. P. Großmann Dipl.-Ing. Andreas Schmeiser Department of Information Resource Management University of Ulm, Germany

Transcript of Lecture Computer Networks - Uni Ulm

Page 1: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

LectureComputer Networks

Bluetooth

Prof. Dr. H. P. GroßmannDipl.-Ing. Andreas SchmeiserDepartment of Information Resource ManagementUniversity of Ulm, Germany

Page 2: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

What is Bluetooth?

Personal Area Network (PAN)

Short range wireless transmission for data and speech

Ad-hoc connections between notebooks, handheld devices, organizers, mobile phones, headsets, ...

Encrypted data transmissions

Replacement of several peripheral interfaces:parallel printer port, serial interface, network interface, IrDA

Harald Bluetooth the 10th century Viking king gaves the name to this technology

Page 3: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Bluetooth Devices

Page 4: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Special Interest Group (SIG)

5 companies founded the Bluetooth SIG at beginning of 1998: Ericsson Mobile Communications AB Nokia Mobile Phones IBM Corporation Toshiba Corporation Intel Corporation

Today more than 2100 SIG members 3COM Corporation Agere Systems, Inc. Microsoft Corporation Motorola, Inc.

Page 5: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Key data

Transceiver operating frequency:2400 – 2483.5 MHz Industrial Scientific Medicine (ISM) band

Transmitter power: 1 mW, 2.5 mW, 100 mW Range: 10 m, up to 100 m (depending on transmitter power) Frequency hopping:

79 RF channels (USA, Europe and most other countries),23 RF channels (France) spaced 1 MHz, 1600 hops/s

Modulation: Gaussian Frequency Shift Keying (GFSK) Symbol Rate: 1 Ms/s Slotted Channel with 625 µs,

Full duplex transmission with Time-Division Duplex (TDD) Asynchronous Connection-Less (ACL) link

up to 433.9 kb/s (sym.), resp. 723.2 / 57.6 kb/s (asym.) Synchronous Connection-Oriented (SCO) link

64 kb/s (sym.), up to 3 links Authentication / Encryption

Page 6: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Protocol Stack

Page 7: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Protocol Stack

Bluetooth Core Protocols Baseband LMP (Link Manager Protocol) L2CAP (Logical Link Control and Adaption Protocol) SDP (Service Discovery Protocol)

Cable Replacement Protocol RFCOMM with TS 07.10 (Serial Port Emulation)

Telephony Control Protocol TCS Binary (Telephony Control protocol Specification) AT-Commands

Adopted Protocols PPP IP, TCP, UDP WAP OBEX ...

Page 8: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Bluetooth Core Protocols I

Baseband Specification of the Bluetooth link controller which carries out the

baseband protocols and other low-level link routines

LMP (Link Manager Protocol) Used for link set-up and control Signals are interpreted and filtered out by the Link Manager on the

receiving side and are not propagated to higher layers.

Page 9: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Bluetooth Core Protocols II

L2CAP (Logical Link Control and Adaption Protocol) Supports higher level protocol multiplexing, packet segmentation

and reassembly Conveying of quality of service information Protocol state machine, packet format and composition Test interface, required for Bluetooth test and certification program

Page 10: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Bluetooth Core Protocols

SDP (Service Discovery Protocol) Protocol for locating services provided by or available through a

Bluetooth device Essential to find available services Access to located services takes place with other protocols

Page 11: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Cable Replacement Protocol

RFCOMM with TS 07.10 (Serial Port Emulation) Emulation of a RS232 like interface Handles up to 60 simultaneous connections between 2 Bluetooth

devices

Page 12: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Cable Replacement Protocol

RFCOMM with TS 07.10 (Serial Port Emulation) (continued)

RFCOMM Direct Connect

RFCOMM used with legacy COMM device

Page 13: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Telephony Control Protocol

TCS (Telephony Control protocol Specification) Binary Call control signaling for the establishment of speech and data

calls between Bluetooth devices Uses a bit-oriented protocol

Page 14: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Telephony Control Protocol

TCS (Telephony Control protocol Specification) Binary(continued)

Point-to-point signaling in a single-point environment

Page 15: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Telephony Control Protocol

TCS (Telephony Control protocol Specification) Binary(continued)

Signaling in a multi-point environment

Page 16: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Adopted Protocols

PPP (Point-to-Point Protocol) PPP over RFCOMM

TCP, UDP, IP Provides access to the Internet

WAP (Wireless Application Protocol) WAP over Bluetooth

Page 17: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Adopted Protocols

OBEX (OBject EXchange Protocol) Provides exchange of data objects

OBEX in the protocol stack

Page 18: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

LectureComputer Networks

Bluetooth

Baseband Specification

Page 19: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Topology

Point-to-point

Piconet(1 master,

up to 7 active slaves)

Scatternet(overlapped piconets)

Page 20: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Physical Channel

Hopping sequence Nominal hop rate: 1600 hops/s Pseudo-random sequence Unique for each piconet Determined by device address of master

Time slots 625 µs in length Numbered according to the clock of the piconet master Cycle length: 227

Time Division Duplex (TDD) scheme Master transmits in even numbered slots Slaves in odd numbered slots Packets may extend over up to 5 slots

Page 21: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

TDD and timing

Page 22: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Multi-slot packets

Page 23: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Standard packet format

Access Code Header Payload

72 54 0 - 2745 Bit

LSB MSB

Least Significant Bit (LSB) corresponds to b0

LSB is the first bit sent over the air

Page 24: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Access code format

Channel Access Code (CAC) Device Access Code (DAC) Inquiry Access Code (IAC)

General Inquiry Access Code (GIAC) Dedicated Inquiry Access Code (DIAC)

Access Code Header Payload

72 54 0 - 2745 Bit

Preamble Sync Word Trailer

4 64 4 Bit

Page 25: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Packet header format

Access Code Header Payload

72 54 0 - 2745 Bit

AM_Addr HEC

3 4 1 Bit

Type Flow ARQN SEQN

81 1

AM_Addr: Active member addressType: Type code of packetFlow: Flow control – 0: Stop

ARQN: Acknowledge indicationSEQN: Sequence numberHEC: Header error check

Page 26: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Packet Types

ACL packets

kbit/s

SCO packetsHigh-Quality Voice (64 kbit/s): HV1, HV2, HV3Combined Data Voice: DV

Page 27: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Payload format - Data

Access Code Header Payload

72 54 0 - 2745 Bit

Payload-Header Body (Information) CRC

8 (single slot packet) or

16 (multi-slot packet)

0 - 2712 Bit

Page 28: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Payload header format - Data

Access Code Header Payload

72 54 0 - 2745 Bit

Payload-Header Body (Information) CRC

8 or 16 0 - 2712 Bit

L_CH Flow Length

2 1 Bit

Res.

5 or 9 4

L_CH: Logical channelFlow: Flow control at L2CAP level – 0: Stop

Page 29: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

1/3 rate FEC (Forward Error Correction code)

Simple Repeat each bit 3 times

Used for Entire header Voice field in HV1 packet

Page 30: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

2/3 rate FEC (Forward Error Correction code)

(15,10) shortened Hamming code Code

corrects all single errors in each code-word detects all double errors in each code-word

LFSR generating the code

Used for Data Medium rate (DM) packets Data field in DV packet Frequency Hop Synchronization (FHS) packet High-Quality Voice HV2

Page 31: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

ARQ (Automatic Repeat reQuest) scheme for the data

Fast, unnumbered acknowledge scheme ACK (ARQN=1) or NAK (ARQN=0) is returned in response to

receipt of previously received packet Retransmission of previous packet till ARQN=1

Used for Data High rate (DH) Data Medium rate (DM) DV packet

Page 32: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Error checking

Channel access code 64 bit sync word derived from 24 Bit master LAP Check of LAP prevents receiver from accepting packets of another

piconet

HEC, CRC Check both on errors and on wrong address Additional test of access code, because UAP normally included

Page 33: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Logical channels

LC Channel (Link Control) Carries low level link control information like ARQ, flow control,

payload characterization Mapped onto packet header

LM Channel (Link Manager) Carries control information exchanged between the link managers

of master and slave(s) UA Channel (User Asynchronous)

Carries L2CAP transparent asynchronous user data Data may be transmitted in one or more baseband packets

UI Channel (User Isochronous) Like UA Channel Isochronous data channel supported by timing properly at higher

levels US Channel (User Synchronous)

Carries transparent synchronous user data Channel is carried over SCO link

Page 34: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

States

Page 35: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

States – Standby, Connection

Standby State Default state Low power mode Only native clock with accuracy of Low Power Oscillator (LPO) is

running

Connection State Active Mode – Unit actively participates on the channel

» Active Member Address (AM_ADDR) assigned Sniff Mode – Reduced duty cycle of slave‘s listen activity Hold Mode – Slave temporarily does not support ACL packets on

channel, frees capacity for other things like scanning, paging, inquiring, attending another piconet

Park Mode – Slave does not participate on channel, but still remains synchronized to the channel

» Parked Member Address (PM_ADDR) assigned» Access Request Address (AR_ADDR) assigned

Page 36: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

States – Paging

Device Access Code (DAC) is used to establish an actual connection Page Scan – Unit listens periodically for its own device access

code

Page – Master activates and connects to a slave» Master does not know when slave wakes up and on which hop

frequency» Therefore it transmits repeatedly a train of identical DACs on different

hop frequencies

Page Response – Procedure between master and slave to exchange vital information to continue connection setup

» Channel access code» Channel hopping sequence» Synchronized clocks

Page 37: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

States – Inquiry

Inquiry Access Code (IAC) is used to discover which other bluetooth devices are in range Inquiry Scan – Similar to the Page Scan substate, instead IAC is

used

Inquiry – Similar to Page substate, used by unit that wants to discover new devices

Inquiry Response – Recipient‘s address returned to master» FHS (Frequency Hop Synchronization) packet carries unit‘s

parameters (BD_ADDR)

Page 38: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Bluetooth Addressing

Derived from IEEE 802 standard Unique for each device 48 Bit Bluetooth Device Address (BD_ADDR)

LAP: lower address part, 24 Bit UAP: upper address part, 8 Bit NAP: Non-significant address part, 16 Bit

Page 39: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

LectureComputer Networks

Bluetooth

Link Manager Protocol (LMP)

Page 40: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

Link Manager Protocol

LM messages have higher priority than user data Messages not acknowledged since Link Control (LC) channel

provides reliable link LM message timeout: 30 s

Page 41: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

LMP – Protocol Data Unit (PDU)

1 byte Header Transaction ID

0: Initiated by master1: Initiated by slave

7 bit OpCode

Content

Page 42: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

LMP Tasks

Authentication Encryption (start, stop, key size, mode, ...) Clock Offset Request Slot-Offset Supported Features Switch of Master-Slave role Change of Mode Power Control (TX-Power) Link attach and detach ...

Page 43: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

LectureComputer Networks

Bluetooth

Logical Link Control and Adaptation Protocol (L2CAP)

Page 44: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

L2CAP in Bluetooth Protocol Architecture

Provides connection-oriented and connectionless data services to upper layer protocols with multiplexing capability packet segmentation and reassembly Quality of Service group abstraction

Page 45: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

L2CAP protocol requirements

Simplicity Low overhead Applicable for devices with limited computational resources Low power consuption Minimum memory requirements

Page 46: Lecture Computer Networks - Uni Ulm

LOMI Universität Ulm, 2002

References

The Official Bluetooth Websitehttp://www.bluetooth.com

Specification of the Bluetooth SystemVersion 1.1, 22 February 2001 Volume 1: Core Volume 2: Profiles

The Bluetooth SIG, Inc. Member Web Sitehttp://www.bluetooth.org