Professional Documents
Culture Documents
Bluetooth and BLE: Networked Computing Lab (NXC Lab)
Bluetooth and BLE: Networked Computing Lab (NXC Lab)
Bluetooth and BLE: Networked Computing Lab (NXC Lab)
Kyunghan Lee
Networked Computing Lab (NXC Lab)
Department of Electrical and Computer Engineering
Seoul National University
https://nxc.snu.ac.kr
kyunghanlee@snu.ac.kr
Classic Bluetooth
Enhanced
Basic Rate (BR)
Data rate (EDR)
(2002)
(2004)
Bluetooth 4.0
(2010)
Alternate
Low Energy (LE)
MAC/PHY (AMP)
(2010)
(2009)
Bluetooth Low Energy (BLE) Bluetooth High Speed
Bluetooth CoreCore
Bluetooth System
System
• Consist
□ Consist of a single
of a single hostone
host and andor
one or more
more controllers
controllers
□ Host• and controller
Host combinations
and controller combinations
§ Dual• mode devices are backward compatible with classic Bluetooth
Dual mode devices are backward compatible with classic Bluetooth
Host Host
LE BR/EDR LE
Controller Controller Controller
MWNL
Multimedia & Wireless Networking Lab.
Bluetooth Profiles 5
Bluetooth Profiles
□ Bluetooth profiles
• Bluetooth profiles
§ Define the required functions and features of each layer in Bluetooth system
• Bluetooth profiles
• Define the required functions and features of each layer in Bluetooth system
• Define the required functions and features of each layer in Bluetooth system
□ Classic Bluetooth
• Classic Bluetooth
• Classic Bluetooth
Glucose
Glucose Running
Running speedspeed
and and cadence
cadence iBeacon/Eddystone
iBeacon/Eddystone
(for healthcare
(for healthcare application)
application) (for(for
sports/fitness applications)
sports/fitness applications) (for (for location-based
location-based service service
e.g., beacon)
e.g., beacon)
WIRELESS NETWORKING, 430.752B, 2020 SPRING MWNL
MWNL
Multimedia & Wireless Networking Lab.
Multimedia & Wireless Networking Lab.
Classic Bluetooth
Protocol Stack – Protocol Stack
Radio
□
2403
(MHz)
2406 4
2404
2402 2
05
2407
2405
2403
2408 13
6
• Use
2406
2404
2409 24
7
• 79
2405
2407 35
8
2410
2 (most
2406
2408 46
□• Use
2411 9
• Range
Use
2407 57
Power
2409
3
10
•§ 79
2412
2408 68
2410
Radio
2413 11
2 (most
Radio
2409
2411 79
• Range
12
• Typical
• Transmit
2414 8
Range
Power
2410
3
2412 10
13
2415 9
2.42.4
2411
• Range
2.4
Radio
2413 11
3
2412
2416 10
14
•Transmit
12
• Typical
□• Transmit
2414
Radio
Class
11
§ • Typical
2413
2417 15
common)
2415 13
12
Transmit
2414
2418 16
GHz
2416
2415
2419 14
13
17
•channels
2417
2416 15
14
18
2420
common)
Power Class
15
16
GHz
2417
2418
GHz
19
2 (most common)
2421
channels
16
indoor
2418
2419 17
79channels
2422 20
power
2419 17
79 channels
2420 18
21
Typicalindoor
2423
2420 18
19
2421
power
ISM
2424 22
indoor
19
with
2421
2422 20
indoor
power
2425
2422 23
20
with
ISM
power
2423 21
24
2426 21
100 100
2423
1 mW
ISM
2424 22
with
22
25
2.5 mW
2424
2427
with
2425
2425 23
23
26
2428 24
Class Maximum
2426
2426 24
27
1 mW
2429
mWmW
25
2.5 mW
2427 25
levels
2427
2430 28
levels
2428 26
band
2428
2431 29
Maximum
scenario:
scenario:
MHz
band
2429
2429 27
11 MHz
30
(20 (20
2432
levels
(0 dBm)
levels
2430
2430 28
31
(4 dBm)
2433
• Use 2.4 GHz ISM band
band
2431 29
29
scenario:
dBm)
2431
WIRELESS
scenario:
32
Power
2434
MHz
2432 30
11 MHz
30
1 mW (0 dBm)
2432 33
(0 dBm)
2435 31
2.5 mW (4 dBm)
2433 31
(4 dBm)
2433
Maximum Power
2434
dBm)
32
10 10
Power
2434
2437
2435 35
33
10
2435
2436
2438 33
34
36
2436
2437
2439 34
35
37
2437
2438 35
36
mm
2440 38
m with
2438
2439 36
37
bandwidth
2441 39
37
10NETWORKING,
2439
2440 38
40
2442
m w/
2441
2440 39
38
2443 41
w/w/
40
bandwidth
2442
2441 39
42
2444
1 mW
2443
2442 41
40
bandwidth
2445
2444 43
42
41
1 mW
2443
Nominal
44
bandwidth
2446
2445 43
42
2444
1430.752B,
1 mW 2447
2446 45
44
43
mW
N/A
N/A
2445
2448
2447 46
45
Nominal
44
1 mW
2446
N/AN/A
2020
2447
2449 45
47
48
2450
1 mW
(0 dBm)
2448
2450 46
48
49
1 mW (0 dBm)
2451
Power
power
2449
2451 47
49
50
Nominal Power
2452 50
48
2452
2450
(0 dBm)
2453 51
51
SPRING
2453
2451 49
Power
2454 52
2454
2452 52
50
power
2455 53
power
2455 53
51
Regulatory
2453
2456 54
2456
2454 54
52
2.400-2.4835
2457
2457 55
55
power
2455 53
56
2458
2458 56
Regulatory
2456
2459
2459 54
57
2.400-2.4835
2457
2460
2460 55
58
2.400-2.4835 GHz
2458
2461 56
59
Regulatory Range
2461
Range
2459
2462
2462 57
60
60
2460
2463 58
61
1 mW
0.250.25
2463 61
2464
2461 62
59
62
2464
2465 63
60
N/A
2462
Minimum
2465 63
64
1 mW
2466
2463 61
64
2466
mWmW
2467
2464 65
62
2467
2468 65
66
Minimum
2465 63
N/AN/A
66
1 mW (0 dBm)
2468
2469 67
64
2466
(0 dBm)
2469
2470 67
68
0.25 mW (-6 dBm)
Minimum Power
2467
2470 65
68
69
2471
(-6 dBm)
Power
2468 66
GHzGHz fc=2402+k
2472
2471 70
69
(0 dBm)
2469 67
71
fc=2402+k
2473
2472 70
0, ,78
2470 68
72
(-6 dBm)
2474 71
Power
2473
0, ,78
2471
2475 69
73
RF Channels
2474 72
fc=2402+k
MHz,
2476
2472 74
70
73
2475
Range RF Channels
2477
2473 75
71
MHz,
2476 74
0, ,78
2478
2474 76
72
9
2477
2479 75
77
2475 73
RF Channels
2478
2480 76
78
MHz,
9
2476
2479 74
77
MWNL
Multimedia & Wireless Networking Lab.
2477
2480 75
78
2478 76
9
2479 77
2480 78
• Basic Rate (BR)
PHY
• 1 Mb/s (Gaussian Frequency Shift Keying (GFSK)) modulation
• Enhanced
□ Basic Data Rate (EDR)
Rate (BR)
§ 1•Mb/s (Gaussian
2 Mb/s Frequency
( /4-DQPSK), Shift Keying
3 Mb/s (GFSK)) modulation
(8DPSK)
□ Enhanced Data Rate (EDR)
• Time Division Duplex (TDD) & Frequency Hopping (FH)
§ 2 Mb/s (π/4-DQPSK), 3 Mb/s (8DPSK)
• Master and slave alternately transmit
□ Time Division Duplex (TDD) & Frequency Hopping (FH)
• 1600and
§ Master hops/s
slaveFH (in connection
alternately transmitstate)
§ 1600• hops/s FH (in
f(k): channel connection
index state)
used in slot k
• f(k): channel index used in slot k
f(k) f(k+1) f(k+2)
Master M1 M2 M2 M2
Master
Slave
Slave S1 M2 S2 M2
625 us
Access code Payload HDR (ACK) HDR (NACK)
MW
Multimedia & Wir
f(k) f(k+5)
MWN
Multimedia & Wireless Networ
Re-mapping fk'
Use fk' for next slot
Function
Link Types
Link Types
• Master has full control over ACL link
□ Master has full control over ACL link
• In slots not reserved for SCO (& eSCO), master polls a slave on a
§ In slots not reserved for SCO (& eSCO), master polls a slave on a
per-slot
per-slot basis
basis
§ Slave onlyonly
• Slave allowed
allowedtototransmit in slave-to-master
transmit in slave-to-master slotslot after polled
after
by the master
polled by the master
□ Retransmission isisenabled
• Retransmission inACL
enabled in ACLbyby
ARQARQ
SCO SCO ACL ACL ACL ACL SCO
Master
Slave 1
Slave 2
Slave 3
MWNL
Multimedia & Wireless Networking Lab.
Master M1 M2 M2 M2
Slave S1 M2 S2 M2
Diagram
Standby
Device Discovery
Inquiry Inquiry scan
(master) (slave)
Connection
Active
Sniff Hold
Park
MWNL
Multimedia & Wireless Networking Lab.
□ Page (Master)
§ Establish a piconet with a device in page scan
§ Searching 32 page channels
□ Sniff mode
§ Only communicate during (periodically allocated) sniff time slots
• Reduce duty cycle of a slave’s activity
□ Park state
§ Does not need participate piconet but still needs synchronization
• Wake up at regular intervals
WIRELESS NETWORKING, 430.752B, 2020 SPRING
SEOUL NATIONAL UNIVERSITY
20
ProtocolLow
Bluetooth Stack
Energy – Protocol Stack
Controls connections
Non-core profiles
and advertising in BLE
Defines a basic data
structure and procedures
GAP
Generic Attribute Profile
(GATT)
Host
SMP Attribute Protocol (ATT)
BLE
BLE communications
communications
• BLE communicates in two ways
□ BLE communicates in two ways
1) Broadcasting
§ • 1) Broadcasting
Broadcaster Observer
BLEcommunications
BLE communications
• BLE communicates in two ways
□ BLE communicates in two ways
2) Connections
§• 2) Connections
Connection topology
□ From 4.1 specification, any restrictions on role
combinations have been
• From 4.1 specification, removed
any restrictions on role combinations have been removed
BLE
BROADCASTER
BLE
BLE OBSERVER
PERIPHERAL+CENTRAL
PHY PHY
PHY
24
MWNL
Multimedia & Wireless Networking Lab.
PHY
§ 1 Mb/s (Gaussian Frequency Shift Keying (GFSK)) modulation
□ Transmit power
• Data rate levels
§ 0.01–10 mW (Gaussian
• 1 Mb/s (-20–10Frequency
dBm) Shift Keying (GFSK)) modulation
• Transmit
□ Frequency power spread
hopping levels spectrum (FHSS)
• 0.01 10 mW (-20 10 dBm)
§ Basic algorithm
• Frequency hopping spread spectrum (FHSS)
§ Adaptive frequency
• Basic algorithm hopping (hopping within used channel set)
• Adaptive frequency hopping (hopping within used channel set)
Last channel
(fk-1) fk Is fk in the set of YES
+ Mod 37 used channels
Use fk for next slot
Hop
increment
NO
Basic algorithm fk
Re-mapping fk'
Used channel set Use fk' for next slot
Function
LinkLink
Layer State Diagram
Layer State Diagram
26
Scanning
Scanner
Beacon
Slave Master
Connection
MWNL
Multimedia & Wireless Networking Lab.
Advertising/Scanning State
Advertising/Scanning State
• Advertising channel selection
□ Advertising channel
• Advertising event selection
uses three predefined advertising channels
§ Advertising event uses three predefined advertising channels
• Advertiser and scanner are not synchronized
□ Advertiser and scanner are not synchronized
* Scanning interval = 50 ms
Scanning interval = 50 ms
* ••Scan window = 25 ms
Scan window = 25 ms
Scanner
0 ms 25 ms 50 ms 75 ms 100 ms 125 ms
Advertiser
0 ms 20 ms 40 ms 60 ms 80 ms 100 ms 120 ms 140 ms
• Advertising on 37 ( ), 38 ( ), and 39 ( )
• Advertising interval = 20 ms
Connection State
□ Connection interval: an interval between anchor points
Connection
(i.e.,• starts interval: an interval
of connection events)between anchor points (i.e., starts of
connection events)
§ Connection interval has a value of a multiple of 1.25 ms (min. 7.5 ms, max. 4 s)
□ Frequency channel
• Connection changes
interval every
has a value connection
of a multiple interval
of 1.25 ms (min. 7.5 ms, max. 4 s)
§ •AFrequency
single data channel
channel is used
changes for connection
every all packetsinterval
in a connection event
§ Cf.• Classic Bluetooth with hopping interval of 625 us
A single data channel is used for all packets in a connection event
R T Radio idle R T R T R T
Slave X X X X X X X X
T R Radio idle T R T R T R
Master X X X X X X X X
Connection Establishment
29
Connection Establishment
Bluetooth Low Energy Classic Bluetooth
• •Bluetooth
Bluetooth Low
Low Energy ClassicBluetooth
Classic Bluetooth
Slave
Slave Master
Master Slave
Slave Master
Master
Advertising
Advertising Inquiry
Inquiry
Advertising Inquiry
Inquiry
Advertising Initiating
Initiating Inquiry
Scan Inquiry
Connection request
request Scan Inquiry response
Connection Inquiry response
Page
Page Page
Page Page
Scan Page
Scan Page response
Page response
# channels 79 40
Latency 100 ms 3 ms
<Estimote>
<Hanabee>
MWNL
WIRELESS NETWORKING, 430.752B, 2020 SPRING
Multimedia & Wireless Networking Lab.
Using Beacons
Using Beacons 32
Using Beacons
•□AnAn example
example retail
retail implementation
implementation
• An example
§ Using retail implementation
iBeacon devices created by Estimote
• Using iBeacon devices created by Estimote
§ Customers with store’s
• Using iBeacon mobile
devices application
created by Estimote
• C e
• •Mobile
C app e b ebsignals
e receives beacon
e
a e a ca ca
• Mobile• app receives
Mobile beacon
app receives signals
beacon signals
Shoes
Shoesareare
on on
sale today ! !
sale today
MWNL
Multimedia & Wireless Networking Lab.
Summary
Summary
• Classic Bluetooth
□ Classic Bluetooth
• Low rate short range connection
§ Low rate short range connection
• BLE
□ BLE
§ • Extremely
Extremely low
low rate
rate with
with extremely
extremely low power connection
connection