kelvin hilton [email protected] personal area networks
TRANSCRIPT
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 2kch/soc/sdmc/01 page
ObjectivesUnderstanding:
The motivation behind BluetoothPiconets & ScatternetsHow Bluetooth devices communicateThe Bluetooth Packet structure/payloadApplications of Bluetooth
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 3kch/soc/sdmc/01 page
Introducing the Vision
It seems that ever since we invented wired networks we have been dreaming of a world without them!Two main philosophies
Remove the wire but retain the concepts, network principles, protocols, etc (WLAN)Start with no legacy/pre-conceptions
“ ...technology [enabling] low-cost radios that can be embedded in existing…devices [leading] toward ubiquitous connectivity and truly connecting everything to everything. ”
J.C.Haartsen. 2000 (Bluetooth pioneer)
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 4kch/soc/sdmc/01 page
Background1994 Ericsson were looking at ways of connecting headsets to handsets without wires (a multi-communicator link)1998 together with IBM, Intel, Nokia & Toshiba formed a Special Industry Group (SIG)They called the new technology they were proposing Bluetooth after Danish King Harald Gormsen epithet was Blåtand (Bluetooth!) who is credited with uniting Scandinavia in the 10th Century
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 5kch/soc/sdmc/01 page
BackgroundGoals of specification
Low powerLow cost < $5 US for the chipReplacing the umbilical connection
Proposed usingShort-range radio technologyAd hoc piconetworkingDynamic device discoveryUnlicensed frequencySupport data and voice
Specification eventually became 802.15HP tried same thing with Ir but failed!
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 6kch/soc/sdmc/01 page
Background1998 May – Bluetooth SIG announced1999 July – version 1.0A released1999 Dec – version 1.0B released2001 Mar – version 1.1 released2001 First commercial devices launched2004 Version 2.0 adds enhanced data rates up to 2.1 Mbps2007 Version 2.1 adds enhanced power management and NFC
1999 Ericsson erected monument to Harald Gormsen depicting a man holding a laptop & a cellular phone!
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 7kch/soc/sdmc/01 page
BackgroundScenarios
Connecting Peripherals – wired world, connector variations (LAN, Serial, USB, etc)Ad hoc networks - anyone, anywhere, conferences, tradeshows, lectures even!Network Access Points – automatic up/downloads from servers as you enter buildings, get off planes, etc all trafficked via a handset or PDA
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 8kch/soc/sdmc/01 page
Bluetooth ArchitectureThe basic concept of a Bluetooth “network” is the piconet
A collection of devices connected in an Ad Hoc fashionNo central server instead uses the concept of Master/SlaveRange of reception
Three classes of device were specified with 100m (100mW). 10m (2.5mW), 1m (1mW) range
A unit can exist within a piconet as 1 of 4 nodes
MasterSlaveParkedStandby
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 9kch/soc/sdmc/01 page
Piconet
Sb
S
P
SS
M
Sb StandbyP ParkedM MasterS Slave
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 10kch/soc/sdmc/01 page
Overview of Master/Slave Relationship
Only 1 unit can be a Master within a piconetMaster initiates the exchange of dataSlave can only respond to the Master, cannot initiate communicationSlave to slave communication is not possibleEach Master can connect to 7 simultaneous Slaves or 255 Parked nodesMaster assigns a 3bit Active Member Address (AM_ADDR) to each slave participating in the piconetMaster assigns an 8bit Parked Member Address to none participating but registered nodes (PM_ADDR)
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 11kch/soc/sdmc/01 page
Overview of Master/Slave Relationship
A parked node has agreed with the Master to park (low power state), can only be activated by MasterA Standby node is physically located within the range of the Master but is not associated with any piconetAn active node may be a in more than one piconet (called a Bridge Slave or Bridge Node)Collection of interconnected piconets are called a ScatternetA Master can only be a Master of one piconet
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 12kch/soc/sdmc/01 page
Scatternet
Sb
S
P
S
MS
SS
M
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 13kch/soc/sdmc/01 page
Traditional Ad Hoc Networks
d
d
d
d
d
d
d
d
No overlap
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 14kch/soc/sdmc/01 page
Bluetooth Scatter Ad Hoc Networks
Allow overlap
d
d
dd
d
d
d
d
d
d
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 15kch/soc/sdmc/01 page
Selecting the FrequencyTo provide a truly ubiquitous experience the SIG had to select a frequency that was available worldwideTo achieve low cost must be an unlicensed frequencyAround the world frequency allocation is licensed/controlled by governmentsThere is some coordination via the ITUSIG selected the Industrial, Scientific, Medical (ISM) band
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 16kch/soc/sdmc/01 page
ISMOriginally reserved for the “professions” now open worldwide for commercial useCentred around 2.4 GHzIn US range is 2400 to 2483.5 MHz regulated by FCCSame in Europe (excepting France & Spain) regulated by ETSIJapan 2400 MHz to 2500 MHzRegulations differ regarding the use of the frequency (spread of signal, power of transmission)SIG selected the lowest common denominator
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 17kch/soc/sdmc/01 page
Accessing the FrequencyISM at 2.4 GHz provides about 80 MHz of bandwidthBluetooth designers defined 79 carrier channels with 1 MHz spacingISM band only supports a gross bit rate of 1Mb/s per channel (channel = 1 MHz)Therefore, theoretical limit across the spectrum of 79 Mb/sBluetooth uses as a base the Code Division Multiple Access scheme (CDMA)
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 18kch/soc/sdmc/01 page
Frequency Division
= 2400 MHzff+ 1 f+ 2
……..
f + 79
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 19kch/soc/sdmc/01 page
Accessing the FrequencyDedicating a piconet to one channel would limit the maximum number of simultaneous piconets available to 79Using only 1 channel per communication would not be very secure (or efficient)!Therefore, the specification of the ISM states that users must hop (called Frequency Hopping, FH*) between different channels within the frequency bounds (called spread spectrum)However, fixed hopping sequence is also a security risk, therefore Bluetooth designers use a pseudorandom hopping sequence
* Therefore, the actual access scheme used by Bluetooth is called (FH)-CDMA
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 20kch/soc/sdmc/01 page
Accessing the FrequencyThe sequence of hops is defined by the Master nodeEach Bluetooth device has a 28bit native clock that ticks once every 312.5 s (mircoseconds)Each Bluetooth device has a unique 48bit IEEE MAC address (called the Bluetooth device address BD_ADDR)Slave uses the BD_ADDR of Master to identify the hopping sequence and offsets its native clock to synchronise with the MasterBluetooth radios complete 1600 hops/s
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 21kch/soc/sdmc/01 page
Accessing the FrequencyHow long we stay on a given frequency channel is called the dwell timeWhen using time to divide up each channel each unit of time is called a slot Bluetooth uses the minimum dwell time required to transmit (Tx) one packetThis is 625 s (mircoseconds)Master transmits on even slots and slaves transmit on odd slots (classic Time Division Multiplexing, TDM) 50/50 split of slotsFurther, to ensure full-duplex communication Bluetooth uses Time Division Duplexing (TDD) such that unit alternates between send & receive
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 22kch/soc/sdmc/01 page
Accessing the Frequency
Time (t)
t
Master
Slave
f n
Packet
Tx
Packet
Tx
Packet
Tx
625s Single Slot
f fn + FH1 n + FH2
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 23kch/soc/sdmc/01 page
Collision PreventionTo prevent two or more Slaves transmitting at a time Master applies polling, the Master decides which slave can transmit in which slotOnly the slave addressed in the previous Master slot transmission can transmit in the succeeding Slave slotIf data is received incorrectly it is resent in the next appropriate slot
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 24kch/soc/sdmc/01 page
Polling
t
tf n
Tx
addr
esse
d to
B
f f
n +
FH
1
n +
FH
2
Master
Slave A
tSlave BB a
llow
ed t
o Tx
Tx
addr
esse
d to
A
A a
llow
ed t
o Tx
fn
+ F
H3
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 25kch/soc/sdmc/01 page
ModulationBluetooth uses Gaussian-shaped Frequency Shift Keying (GFSK)
Version 2.0 use Phase Shift Keying (PSK)
Basically binary 1 is sent as a positive nominal modulation and 0’s are sent as negative nominal modulations
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 26kch/soc/sdmc/01 page
Bluetooth PacketsOnly 1 packet per slotBluetooth specifies 15 types of packets
4 control packetsID packets used for reconnection, signalling, etcNULL packets for flow control or Automatic Repeat Requests (ARQ)FHS packets used to exchange real-time clock and identity information for hop synchronisationPOLL packets used by Master to force a Slave response
Remaining are used to define payload packets
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 27kch/soc/sdmc/01 page
Bluetooth Packets625 bits per packet theoretical
Have to allow a settling time for radio circuits to stabilise after a hop & decode/encode the packet, ranges from 200 – 260 s, faster the settling time the more electrical/processor power required
All packets have same general formatAccess codeHeaderData
Access Code
72 bits
Header
54 bits
Payload
0 - 2745 bits
The is a payload size is theoretical
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 28kch/soc/sdmc/01 page
Access Code
Used for synchronizationOffset compensationIdentificationSignallingThree types (Sync words)
Channel Access Code (CAC)Device Access Code (DAC)Inquiry Access Code (IAC)
Basically used to uniquely identify the piconetOnly if the Access Code corresponds to the Master Access Code will the packet be accepted by the receiving node
Access Code
72 bits
Header
54 bits
Payload
0 - 2745 bits
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 29kch/soc/sdmc/01 page
Access Code
Access Code
72 bits
Header
54 bits
Payload
0 - 2745 bits
preamble
4
Sync Word
64
trailer
4
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 30kch/soc/sdmc/01 page
Header
3bits AM_ADDR (zeroed address used for broadcast) hence maximum of 7 slaves 4bit packet type code1bit Flow flag used by slave to alert when its data buffer is full1bit Acknowledge/ Negative Acknowledge for ARQ (ACK/NACK)1bit Sequence flag used for retransmission8bit header error check code (HEC) used as a Cyclic Redundancy Check (CRC) for the headerBluetooth uses 1/3 Forward Error Correction (FEC) on the header (3 x Tx)
Access Code
72 bits
Header
54 bits
Payload
0 - 2745 bits
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 31kch/soc/sdmc/01 page
Header
Access Code
72 bits
Header
54 bits
Payload
0 - 2745 bits
AM_ADDR
3
Type
4
F A S
1 1 1
HEC
8
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 32kch/soc/sdmc/01 page
Real-Time PayloadReal-time (including voice) uses Synchronous Connection Oriented Links* (SCO)
Point-to-PointCircuit-switched – 64kbps (uplink/downlink) using reserved Pulse Code Modulation (PCM) channelsUp to three voice channels can be active in a piconet (maybe to 1, 2 or three slaves)
High Voice (HV) 1 – 1/3 FECHV2 – 2/3 FECHV3 – no FEC
Only uses one slot packets* Links are the name for the logical channel between two communicating entities
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 33kch/soc/sdmc/01 page
Real-Time Payload
Access Code
72 bits
Header
54 bits
Payload
240 bits
10 bytes
20 bytes
30 bytes
HV1
HV2
HV3
366 bits
1/3 FEC (1 full-duplex voice channel active at a time)
2/3 FEC (2 full-duplex voice channel active at a time)
no FEC (3 full-duplex voice channel active at a time)
relia
bilit
y
best
worst
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 34kch/soc/sdmc/01 page
Real-Time Round-Trip Delay
HV1
Tx Tx TxRx Rx Rx
1.25ms
HV2
HV3
1 Channel Reserved
2.5ms
Two Channels Reserved
3.75ms
Two Channels Reserved
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 35kch/soc/sdmc/01 page
Data PayloadPackets can be one, three or five slotsMultislot packets are transmitted on a single carrier hop
The hop channel which is used for the first hop remains in use for the remaining packets (no hop after 1st packet sent)Hopping resumes on the next channel that would have been valid if single hops had been used
eg If 3 slot packet used then next hop will be f + FH3
Odd number ensures master-slave sequence duplex maintained
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 36kch/soc/sdmc/01 page
Multislot Transmission
One Slot Tx
Three Slot Tx
Five Slot Tx
Tx Tx TxRx Rx Rx
fn fn + FH1fn + FH2
fn + FH3fn + FH4
fn + FH5
Tx Rx Tx Rx
RxTx
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 37kch/soc/sdmc/01 page
Data PayloadData uses Asynchronous Connectionless (ACL) links
Includes 16bit CRCVariable data payload
Data Medium (DM) uses 2/3 FECDM1 – uses 1 slotDM3 – uses 3 slotsDM5 – uses 5 slots
Data High (DH) no FECDH1 – uses 1 slotDH3 – uses 3 slotsDH5 – uses 5 slots
Best effort delivery, FEC optionalOnly one link can exist between a Master & a Slave, Master can link to 7 slavesBroadcasting is possible
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 38kch/soc/sdmc/01 page
One Slot ACL Packet Format
Access Code
72 bits
Header
54 bits
Payload
0 - 240 bits
Header Data CRC
16bits8bits 216bits
Logical Channel Flow Field Unused
3bits 1bit 4bits
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 39kch/soc/sdmc/01 page
One Slot ACL Packet Payload
Access Code
72 bits
Header
54 bits
Payload
0 - 240 bits
Header Data CRC
16bits8bits 216bits
DM1 (2/3 FEC) Data
136bits
Data
216bits
DH1 no FEC
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 40kch/soc/sdmc/01 page
One Slot ACL Data RateDM1
Tx(136 bits x 800 hops/s) / 1000 = 108.8 kbps
Rx(136 bits x 800 hops/s) / 1000 = 108.8 kbps
DH1Tx
(216 bits x 800 hops/s) / 1000 = 172.8 kbps
Rx(216 bits x 800 hops/s) / 1000 = 172.8 kbps
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 41kch/soc/sdmc/01 page
Three Slot ACL Packet Format
Settling period reduced allowing larger first packetAsymmetric Tx = 3 Slots Rx = 1 Slot
Access Code
72 bits
Header
54 bits
Data
0 - 1500 bits
Header
16bits
CRC
16bits
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 42kch/soc/sdmc/01 page
Three Slot ACL Data RateDM3
Tx(968 bits x 400 hops/s) / 1000 = 387.2 kbps
Rx(136 bits x 400 hops/s) / 1000 = 54.4 kbps
DH3Tx
(1464 bits x 400 hops/s) / 1000 = 585.6 kbps
Rx(216 bits x 400 hops/s) / 1000 = 86.4 kbps
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 43kch/soc/sdmc/01 page
Five Slot ACL Packet Format
Asymmetric Tx = 5 Slots Rx = 1 Slot
Access Code
72 bits
Header
54 bits
Data
0 - 2745 bits
Header
16bits
CRC
16bits
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 44kch/soc/sdmc/01 page
Five Slot ACL Data RateDM5
Tx(1792 bits x (1600/6 hops/s)) / 1000 = 477.8 kbps
Rx(136 bits x (1600/6 hops/s)) / 1000 = 36.3 kbps
DH5Tx
(2712 bits x (1600/6 hops/s)) / 1000 = 723.2 kbps
Rx(216 bits x (1600/6 hops/s)) / 1000 = 57.6 kbps
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 45kch/soc/sdmc/01 page
Bluetooth Packet Miscellaneous
Therefore we get maximum throughput of 723.2 from 1Mbps availableCan mix SCO & ACL traffic on the same piconet
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 46kch/soc/sdmc/01 page
Overview of Device Discovery
Device n
Idle Idle
InquiryWake-up
Broadcast ID & Clock Data
FHS with ID & Clock DataInquiry Response
IdleID & DAC Packet
Wake-up
Ack PageID & DAC Packet
Device A now Master
Page
FHS for Piconet
Device n now SlaveConfirm with ID & DAC Packet
Connection Connection
Device A
15/07/2003 Copyright: All rights reserved. Not to be reproduced without consent. 47kch/soc/sdmc/01 page
IssuesBluetooth is a shared medium, starts with theoretical 1Mbps for each device that joins the bit rate diminishesBluetooth and WLAN are competitors sharing the same frequency leads to interferenceDesigned by committee (hence the profile proliferation)