Bluetooth Tutorial: Center For Wireless Telecommunications
Bluetooth Tutorial: Center For Wireless Telecommunications
Dennis Sweeney
Center for Wireless Telecommunications
[email protected]
Max Robert
Mobile and Portable Radio Research Group
DotMobile, Inc.
[email protected]
Overview
Introduction
Software/Interface Stack
Device Description
Radio Specification
Baseband Specification
Link Management and Control
Service Discovery
Emulation/Telephony Protocols
Integration with other wireless services
Available hardware
Introduction
Named after a medieval Danish king
Intended as a replacement for short-range
cables
Inexpensive
Flexible
Robust
Bluetooth SIG
Over 1500 companies
Started by Ericsson, Nokia, IBM, Intel, and
Toshiba
Assembled specifications
Functional descriptions
Leaves several implementation details open to
the developer
Market Estimates
Number of units expected to reach
260 Million by 2003
Worldwide sales market expected to exceed
$3 Billion by 2005
Market figure for devices only
Does not include applications
Device Usage
(almost) Stand-alone wireless connection
Needs external application to drive services
Device Communications
Client/Server (Master/Slave) configuration
Devices are inherently equal
Application determines identity
Software/Interface Stack
Bluetooth Host
Host Controller Interface driver
Physical Bus driver
Physical Bus
Physical Bus Firmware
Bluetooth Hardware
Host Controller Interface firmware
Baseband controller
Connecting to Device
Host Controller Interface
Allows control interaction with Bluetooth
hardware
Transport layer
Physical connection between host and
Bluetooth hardware
Transport Layer
Transport layer between host controller
driver and host controller
Intended to be transparent
Host controller does not care whether it is
running over USB or PC card
Allows upgrade of HCI without affecting
transport layer
Transport Options
Standard describes three basic transport
formats
USB Transport
Universal Serial Bus
RS232 Transport
UART Transport
Universal Asynchronous Receiver/Transmitter
Serial interface
Can be set to RS232 settings
Forms ad hoc
networks
APPLICATIONS
HIC
RFCOMM
O
DI
AU
OL
TCP/IP
NT
R
CO
DATA
L2CAP
LINK MANAGER
BASEBAND
RADIO
Software Stack
Internet
Protocols
OBEX
WAP
Modem protocols
AT
commands
TCP/IP
TCS BIN
Service Discovery
Protocol
SDP
PPP
RFCOMM
Serial Line Interface
COMPUTER
RADIO
Audio
Baseband
Bluetooth Radio
Bluetooth Networking
Piconet formed by up to seven active Bluetooth
devices
Master/Slave configuration
Additional slaves can be placed in a parked state
Devices are not active but remain synchronized
Connection, synchronization, parked/active controlled by master
All devices connected in a piconet share timing and frequencies
Establishing a connection
Master/Slave Piconet
One unit becomes the
master and the others
slaves
Master/slave relationship
establishes timing
A slave can become a
master in another Piconet.
This connects two Piconets
into a Scatter Net
SLAVE B
MASTER A
SLAVE E
SLAVE C
SLAVE D
Parked
Piconet I
S
S
MASTER
S
S
Piconet II
S
SCATTER NET
S
S
Parked
10
Bluetooth Radio
SOFTWARE STACK
APPLICATIONS
HIC
RFCOMM
O
DI
AU
DATA
CO
NT
RO
L
TCP/IP
L2CAP
LINK MANAGER
BASEBAND
RADIO
Bluetooth Radio
Radio specification
Goal is a single chip radio
Relaxed RF specifications reduce cost
Operation under unlicensed international rules
US: FCC Part 15
Europe: ESTI 300-328
2.4 GHz ISM band radio
Frequency Hop (FH) spread spectrum: 1600 hops/sec
Time Domain Duplex (TDD)
11
Bluetooth Radio
Bluetooth is a 2.4 GHz ISM band
spread spectrum radio
Regulatory
Allocation
2.400 2.4835 GHz
Europe
Spain
France
Japan
Blue Tooth
Channels
f = 2402 + k MHz
k = 078
f = 2402 + k MHz
k = 078
f = 2449 + k MHz
k = 022
f = 2454 + k MHz
k = 022
f = 2473 + k MHz
k = 022
12
BT Power Levels
Power
Class
1
Maximum Power
Nominal Power
N/A
Minimum Power
(at Max Pwr setting)
0 dBm
2.5 mW (4 dBm)
0 dBm
1 mW (0 dBm)
N/A
N/A
Power Control
4 dBm 20 dBm
-30 dBm - 0 dBm
(optional)
-30 dBm - 0 dBm
(optional)
-30 dBm - 0 dBm
(optional)
BT Link Budget
0 dBm Tx Pwr
TX power of 0 dBm
C/I = 21 dB
NF = 23 dB
Results in a radio with very
relaxed specifications
C/I = 21 dB
-91 dBm Rx Noise Floor
13
Bluetooth
Modulation
bit period
1 sec
zero
crossing
"1"
Transmit frequency
Ft
Ft+Fmin
Ft - Fmin
"0"
0 dBm
-10 dBm
Adjacent Channel
-20 dBc
Adjacent Channel 2 & 3
-20 dBm
-20 dBm
-30 dBm
-40 dBm
-40 dBm
Adjacent Channel >3
-50 dBm
-60 dBm
fo
Span = 10 MHz
14
Bluetooth Baseband
SOFTWARE STACK
APPLICATIONS
HIC
RFCOMM
O
DI
AU
DATA
CO
NT
RO
L
TCP/IP
L2CAP
LINK MANAGER
BASEBAND
RADIO
Baseband Controller
Host
2.4 GHz
Bluetooth
Radio
Radio
Bluetooth
Link
Controller
Baseband
Bluetooth
Link Manager
and I/O
Link Manager
15
Bluetooth Baseband
Frequency Hop Time Division Duplex Channel
Channel based on a 625 sec time slot (1600 hop/sec)
220 sec of the slot lost to PLL settling
Bluetooth uses both circuit and packet switched
channels, supports:
Up to 3 simultaneous 64 kbps synchronous voice channels
Simultaneous synchronous voice
and asynchronous data channel
Asynchronous data channel:
721/57.6 kbps asymmetric
432.6 kbps symmetric
72 bits
54 bits
Access
Code
Header
0 - 2745 bits
Payload
MSB
LSB
4 bits
Preamble
LSB
64 bits
Sync Word
4 bits
Trailer
MSB
16
Access Codes
Channel Access Code (CAC): Identifies a piconet,
this code is used with all traffic exchanged on a piconet
Device Access Code (DAC): Used for signaling, e.g.
paging and response to paging
Inquiry Access Code (IAC):
General Inquiry Access Code (GIAC)
Common to all Bluetooth devices
Dedicated Inquiry Access Code (DIAC)
Common to a class of Bluetooth devices
Inquiry process finds BT devices in range
Packet Header
AM_ADDR: 3 bit member address defines active members of a
piconet
Data Type: Defines various types of packets and
their length. Allows non-addressed slaves to
determine when they can transmit.
Flow Control
Acknowledgement: ACK/NAK field
HEC: header error check, if an error is found, the entire packet
is discarded
17
f(k+1)
f(k+2)
f(k+3)
f(k+4)
f(k+1)
f(k+2)
f(k+3)
f(k+4)
625 sec
MASTER Transmit
f(k)
625 sec
SLAVE Transmit
f(k+1)
f(k+2)
f(k+3)
f(k+4)
f(k+5)
f(k+6)
f(k+3)
f(k+4)
f(k+5)
f(k+6)
f(k+5)
f(k+6)
625 sec
f(k)
f(k)
18
HV2 Packet
2/3 rate FEC protected, no retransmission, no CRC
20 data bytes 2.5 msec of 64 kbps speech
Retransmitted every 4 time slots
HV3 Packet
No FEC, no retransmission, no CRC
30 data bytes 3.75 msec of 64 kbps speech
Retransmitted every 6 time slots
19
DM3
123 data bytes and occupies 3 time slots
2/3 FEC plus 16 bit CRC
DM5
226 data bytes and occupied 5 time slots
2/3 FEC plus 16 bit CRC
DH3
185 data bytes and occupies 3 time slots
16 bit CRC, no FEC
DH5
341 data bytes and occupied 5 time slots
16 bit CRC, no FEC
20
Other Packets
DV: Combined voice data packet,
Transmitted as SCO packet
Voice: 80 bits No FEC and no retransmission
Data: up to 150 bits 2/3 FEC but retransmission permitted
MSB
LSB
Access
Code
72 bits
Header
54 bits
Voice Field
80 bits
Data Field
32 - 150 bits
Symmetric
Asymmetric
108.8 kbps
108.8 kbps
DH1
172.8 kbps
172.8 kbps
172.8 kbps
DM3
258.1 kbps
172.8 kbps
172.8 kbps
DH3
390.4 kbps
585.6 kbps
86.4 kbps
DM5
286.7 kbps
477.8 kbps
36.3 kbps
DM5
433.9 kbps
723.2 kbps
57.6 kbps
108.8 kbps
21
Bluetooth ARQ
MASTER
SLAVE 1
H
Z
SLAVE 2
No ARQ
ACK
NAK
Physical Links
Bluetooth supports synchronous and
asynchronous physical connections
Asynchronous Connectionless (ACL) Link
22
Physical Links
Synchronous Connection Oriented (SCO) Link
Point to point synchronous symmetric link between the master and
a particular slave
Circuit switched: time slots are reserved for time bounded
information like voice
Master can support up to three SCO links with the same or
different slaves
A slave can support up to three SCO links with one master or two
with different masters
Link Manager (LM) establishes SCO link through LM protocol
messages
Packet Type
SCO
ACL
SCO
ACL
ACL
SCO
SCO
ACL
SCO
MASTER
SLAVE 1
SLAVE 2
SLAVE 3
23
Bluetooth Addressing
Bluetooth Device Address (BD_ADDR)
Uniquely identifies a Bluetooth device
48 bit IEEE 802 address
Synchronization
NATIVE CLK
Phase
Sequence
Offset
HOP
MASTER BD_ADDR
24
SLAVE B
MASTER A
SLAVE E
SLAVE C
SLAVE D
Link Manager
SOFTWARE STACK
APPLICATIONS
HIC
RFCOMM
O
DI
AU
DATA
CO
NT
RO
L
TCP/IP
L2CAP
LINK MANAGER
BASEBAND
RADIO
25
Supported features
Quality of Service, packet types
Security and Authentication
Establishes Logical Channels
Authentication
Encryption and Key Management
26
Hold Mode
ACL slave placed on Hold mode
ACL packets no longer supported
SCO packets can still be exchanged
Frees Slave
When master has no data, goes to low-power sleep
To attend another piconet
Scanning, inquiry, paging
Slave finds or is found by another piconet
Slave keeps AM_ADDR
Master assigns hold time
After hold time slave wakes up and synchronizes with
traffic on the channel
27
Park Mode
Low activity, low power mode
Deeper Sleep than Hold Mode
Devices wake up periodically to resynchronize and
check for broadcast messages
Parked Device
Gives up AM_ADDR
Remains synchronized
Receives:
PM_ADDR: 8 bit Park Member Address
AR_ADDR: 8 bit Access Request Address
Allows multiple slaves to be connected to a
Master
Park Mode
Parked Member Address
Used in Master initiated reconnection
Access Request Address
Used in Slave initiated reconnection
Special all zero PM_ADDR
Device must be unparked using 48 bit BM_ADDR
Allows almost an unlimited number of parked devices
28
Park Mode
Park Interval
BC
ACL
SCO
ACL
ACL
BC
MASTER
SLAVE X
SLAVE 2
SLAVE Y
29
Sniff Mode
Sniff Mode much like Hold Mode
Device remains active
Low power active mode
Slave retains AM_ADDR and goes to sleep
Wakes up at assigned Sniff Interval to exchange
packets
Sniff Mode
NSniff
Ntimeout
NSniff
Ntimeout
Sniff
Interval
30
Paging
ID
FHS
ID
LMP_accepted
Slave
Optional
M/S Switch
Security, etc.
LMP_host_connection_req
Master
LMP Setup
Connection
Setup
Complete
LMP_setup_complete
Overview of LMP
Piconet Management
ACL Link setup and
detach
SCO Link setup and
detach
Master/Slave Switch
Low Power Modes
Hold
Sniff
Park
Link Configuration
Power Control
FEC Control
QoS Control
Link Timers
Multi slot packet
Link Information
LMP Version
LMP supported features
Clock and Timing
31
32
Protocol multiplexing
Segmentation/reassembly
Quality-of-Service (QoS)
Group abstractions
Protocol Multiplexing
Baseband protocol treats all data packets
equally
L2CAP needs to distinguish multiple protocols
Service Discovery Protocol
RFCOMM
Telephony Control
33
Segmentation/Reassembly
Baseband packets are size-limited
Large packets need to be segmented by L2CAP
into smaller baseband packets
Multiple baseband packets need to be
reassembled into single, large packet
Integrity check performed on data
16-bit CRC
Leverages ARQ mechanism used by baseband protocol
Quality-of-Service (QoS)
L2CAP supports QoS message between Bluetooth
devices
Only required to support Best Effort service
No guarantees
Token Rate
Token Bucket Size
Peak Bandwidth
Latency
Delay Variation
34
Group Abstraction
35
SDP Requirements
Ability to search services based on attribute
Service discovery based on service class
Allow browsing of services without apriori
knowledge of service characteristics
Allow for dynamic service discovery
Allows for device to enter or exit coverage area
SDP Requirements
Client on one device able to determine the
services on another device without
consulting a third device
Simple enough for use by simple devices
Allow for gradual service discovery
Allow caching of service discovery
36
SDP Requirements
Functions while using L2CAP as transport
protocol
QoS info, segmentation, and protocol
multiplexing
37
DuplexColorPostscriptPrintServiceClassID
ColorPostscriptPrinterServiceClassID
PostscriptPrinterServiceClassID
PrinterServiceClassID
SDP Wrap-up
SDP allows the search and browsing of
services available through nearby devices
SDP allows an application to interface with
the Bluetooth device to establish who is out
there and what type of services are
supported
38
RFCOMM
Emulation of serial port over L2CAP
protocol
Supports up to 60 simultaneous connections
between two Bluetooth devices
Actual maximum of supported devices is
implementation-specific
Group Management
Ease handling of groups of Bluetooth devices
ConnectionLess
Exchange signaling information not related to
on-going call
39
IrDA Interoperability
Infrared Data Association (IrDA)
Support development of applications that
operate well over both short-range RF and
IR
Achieve technology overlap with IrOBEX
Protocol defined by IrDA
Used also by Bluetooth
Mapped over RFCOMM and TCP/IP (optional)
40
WAP Interoperability
Bluetooth used to communications between
WAP client and server
Physical layer and link control
WAP Integration
Provide ability for WAP applications to use
Bluetooth device
Application-controlled communications
41
42
Operates as
USB device
UART
43
44
CSR: BlueCore
Cost: $8K
Availability: now
www.cambridgesiliconradio.co
m
45
Conclusion
Bluetooth provides robust, short-range
communications
Flexible configuration can support multiple
applications
Layers capable of supporting significant
application variety growth
Final Thoughts
A single-chip solution is the ultimate goal
Around $5/chip
Several players have begun developing
implementations
46