Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all...

63
1 Bluetooth Low Energy Robin Heydon Senior Director, Technology, Qualcomm

Transcript of Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all...

Page 1: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

1

Bluetooth Low Energy

Robin HeydonSenior Director, Technology, Qualcomm

Page 2: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

2

Starting Premise

If we are going to connect Everything to the Internet,we have to give everything wireless connectivity

These must be powered somehow(RFID, Wireless Power, Coin Cell Batteries, Nuclear Power Stations)

If they are battery poweredyou can’t change batteries every week/month/year

50 devices in a home, their batteries last a yearhow often do you have to change their batteries?

Page 3: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

3

IETF RFC 1925

(7) Good, Fast, Cheap: Pick any two (you can’t have all three).

(8) It is more complicated than you think.

(10) One size never fits all.

Wi-Fi Good / Fast / !Cheap

Bluetooth Good / !Fast / Cheap

(12) In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away.

https://tools.ietf.org/html/rfc1925

Page 4: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

4

Design Goals

1) Good and Cheapdoes not need to be fast

2) Design around the single biggest constraintCoin Cell Batteries

3) Design around major use cases, ignore everything elseno audio, no streaming, no connection-oriented data

Page 5: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

5

Basic Concepts

Optimize *EVERYTHING* for lowest power consumptionfrom the physics to the users

Why?button cells will be main powersource for peripherals

~15 mA peak current~19 µA average current

Page 6: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

6

Basic Concepts

Receiving more expensive, Transmitting cheapbest optimize to reduce Rx time as much possible

Advertising Channels – discovery / connectionsjust use 3 channels – reduces time to find devicessmallest battery device advertises

“Peripheral”

Page 7: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

7

Basic Concepts

Memory is expensivememory requires silicon area – costs moneymemory increases leakage current – costs battery life

Reduce dynamic memory footprint for specskeep packets short – less buffer memorykeep protocol simple – less state informationkeep services simple – one protocol / defined behavior

Page 8: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

8

Basic Concepts

Keep packets short

when Tx – short packets don’t need constant re-calibrationreduces peak current during Tx

when Rx – radio on for less timereduces total current usage

Optimized for low power consumption

Page 9: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

9

Basic Concepts

Peripherals are simple – very resource constrainedoptimize peripherals first

Central devices are complex – lots of memory & batterynot as critical to optimize here

Asymmetry is Good

Page 10: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

10

Basic Concepts

Design for Successable to discover thousands of devices in local areaunlimited number of slaves connected to a masterunlimited number of mastersstate of the art encryptionsecurity including privacy / authentication / authorizationclass leading robustness, data integrityfuture proof

Page 11: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

11

Basic Concepts

Everything has STATEdevices expose their statethese are servers

Clients can use the state exposed on serversread it – get current temperaturewrite it – increase set point temperature for room

Servers can tell clients when state updatesnotify it – temperature up to set point

Page 12: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

12

Basic Concepts

Client Server Architectureproven architecture for web-infrastructure

Gateways allow interconnect of internet & low energyweighing scales send reports to doctorhome security web site shows all windows closedassisted living for your parents allows low cost monitoringsports data immediately uploaded via cellular phone

Page 13: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

13

New Connection Models

Classic Bluetooth is largely cable replacement:Headset CablesMouse CablesKeyboard Cables

Bluetooth low energy is application enabling:Accessories for smartphone appsInternet connected devicesNew billion unit markets

Page 14: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

14

Stack Architecture

Controller

Host

Apps

Generic Access Profile

Generic Attribute Profile

Attribute Protocol Security Manager

Logical Link Control and Adaptation Protocol

Host Controller Interface

Physical Layer

Link Layer Direct Test Mode

Applications

Page 15: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

15

Physical Layer

Uses 2.4 GHz ISM Band

Industrial Scientific Medical band

License Free – with certain rules

2400 MHz to 2483.5 MHz

Used by many other standards

IEEE 802.11, IEEE 802.15

and many proprietary radios

Page 16: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

16

40 Physical ChannelsRF 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

Freq

uenc

y24

02 M

Hz24

04 M

Hz24

06 M

Hz24

08 M

Hz24

10 M

Hz24

12M

Hz24

14 M

Hz24

16 M

Hz24

18 M

Hz24

20 M

Hz24

22 M

Hz24

24 M

Hz24

26 M

Hz24

28 M

Hz24

30M

Hz24

32M

Hz24

34M

Hz24

36 M

Hz24

38 M

Hz24

40M

Hz24

42 M

Hz24

44 M

Hz24

46M

Hz24

48 M

Hz24

50 M

Hz24

52 M

Hz24

54M

Hz24

56 M

Hz24

58 M

Hz24

60 M

Hz24

62 M

Hz24

64 M

Hz24

66M

Hz24

68 M

Hz24

70 M

Hz24

72 M

Hz24

74 M

Hz24

76 M

Hz24

78 M

Hz24

80 M

Hz

f = 2402 + 2·k MHz

Page 17: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

17

GFSK Modulationbit period product BT = 0.5modulation index = 0.5 ± 0.05

PHY Bandwidth = 1 million bits / seconds

Why GFSK?“pulse shaping”Gaussian filter smoothes transitions from zero to onereduces spectral width

Modulation

0 1

Page 18: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

18

Link Layer (LL)

Link Layer State Machinecan have multiple state machines active in device

Link Layer ChannelsAdvertising Channels & Data ChannelsAdvertising Packets & Data Packets

Link Layer Control Procedures

Scanning

Standby

Connection

Advertising Initiating

Slave Master

Page 19: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

19

Link Layer State Machine

Scanning

Standby

Connection

Advertising Initiating

Slave Master

Page 20: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

20

Link Layer State Machine(s)

Scanning

Standby

Connection

Advertising Initiating

Slave Master

Scanning

Standby

Connection

Advertising Initiating

Slave Master

Scanning

Standby

Connection

Advertising Initiating

Slave Master

Scanning

Standby

Connection

Advertising Initiating

Slave Master

Page 21: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

21

Link Layer ChannelsLL 37 0 1 2 3 4 5 6 7 8 9 10 38 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 39

Freq

uenc

y24

02 M

Hz24

04 M

Hz24

06 M

Hz24

08 M

Hz24

10 M

Hz24

12M

Hz24

14 M

Hz24

16 M

Hz24

18 M

Hz24

20 M

Hz24

22 M

Hz24

24 M

Hz24

26 M

Hz24

28 M

Hz24

30M

Hz24

32M

Hz24

34M

Hz24

36 M

Hz24

38 M

Hz24

40M

Hz24

42 M

Hz24

44 M

Hz24

46M

Hz24

48 M

Hz24

50 M

Hz24

52 M

Hz24

54M

Hz24

56 M

Hz24

58 M

Hz24

60 M

Hz24

62 M

Hz24

64 M

Hz24

66M

Hz24

68 M

Hz24

70 M

Hz24

72 M

Hz24

74 M

Hz24

76 M

Hz24

78 M

Hz24

80 M

Hz

3 Advertising Channels and 37 Data Channels

Page 22: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

22

Link Layer ChannelsLL 37 0 1 2 3 4 5 6 7 8 9 10 38 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 39

Freq

uenc

y24

02 M

Hz24

04 M

Hz24

06 M

Hz24

08 M

Hz24

10 M

Hz24

12M

Hz24

14 M

Hz24

16 M

Hz24

18 M

Hz24

20 M

Hz24

22 M

Hz24

24 M

Hz24

26 M

Hz24

28 M

Hz24

30M

Hz24

32M

Hz24

34M

Hz24

36 M

Hz24

38 M

Hz24

40M

Hz24

42 M

Hz24

44 M

Hz24

46M

Hz24

48 M

Hz24

50 M

Hz24

52 M

Hz24

54M

Hz24

56 M

Hz24

58 M

Hz24

60 M

Hz24

62 M

Hz24

64 M

Hz24

66M

Hz24

68 M

Hz24

70 M

Hz24

72 M

Hz24

74 M

Hz24

76 M

Hz24

78 M

Hz24

80 M

Hz

3 Advertising Channels

Page 23: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

23

Link Layer ChannelsLL 37 0 1 2 3 4 5 6 7 8 9 10 38 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 39

Freq

uenc

y24

02 M

Hz24

04 M

Hz24

06 M

Hz24

08 M

Hz24

10 M

Hz24

12M

Hz24

14 M

Hz24

16 M

Hz24

18 M

Hz24

20 M

Hz24

22 M

Hz24

24 M

Hz24

26 M

Hz24

28 M

Hz24

30M

Hz24

32M

Hz24

34M

Hz24

36 M

Hz24

38 M

Hz24

40M

Hz24

42 M

Hz24

44 M

Hz24

46M

Hz24

48 M

Hz24

50 M

Hz24

52 M

Hz24

54M

Hz24

56 M

Hz24

58 M

Hz24

60 M

Hz24

62 M

Hz24

64 M

Hz24

66M

Hz24

68 M

Hz24

70 M

Hz24

72 M

Hz24

74 M

Hz24

76 M

Hz24

78 M

Hz24

80 M

Hz

37 Data Channels

Page 24: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

24

Link Layer ChannelsLL 37 0 1 2 3 4 5 6 7 8 9 10 38 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 39

Freq

uenc

y24

02 M

Hz24

04 M

Hz24

06 M

Hz24

08 M

Hz24

10 M

Hz24

12M

Hz24

14 M

Hz24

16 M

Hz24

18 M

Hz24

20 M

Hz24

22 M

Hz24

24 M

Hz24

26 M

Hz24

28 M

Hz24

30M

Hz24

32M

Hz24

34M

Hz24

36 M

Hz24

38 M

Hz24

40M

Hz24

42 M

Hz24

44 M

Hz24

46M

Hz24

48 M

Hz24

50 M

Hz24

52 M

Hz24

54M

Hz24

56 M

Hz24

58 M

Hz24

60 M

Hz24

62 M

Hz24

64 M

Hz24

66M

Hz24

68 M

Hz24

70 M

Hz24

72 M

Hz24

74 M

Hz24

76 M

Hz24

78 M

Hz24

80 M

Hz

3 Advertising Channels and 37 Data Channels

Page 25: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

25

Link Layer ChannelsLL 37 0 1 2 3 4 5 6 7 8 9 10 38 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 39

Freq

uenc

y24

02 M

Hz24

04 M

Hz24

06 M

Hz24

08 M

Hz24

10 M

Hz24

12M

Hz24

14 M

Hz24

16 M

Hz24

18 M

Hz24

20 M

Hz24

22 M

Hz24

24 M

Hz24

26 M

Hz24

28 M

Hz24

30M

Hz24

32M

Hz24

34M

Hz24

36 M

Hz24

38 M

Hz24

40M

Hz24

42 M

Hz24

44 M

Hz24

46M

Hz24

48 M

Hz24

50 M

Hz24

52 M

Hz24

54M

Hz24

56 M

Hz24

58 M

Hz24

60 M

Hz24

62 M

Hz24

64 M

Hz24

66M

Hz24

68 M

Hz24

70 M

Hz24

72 M

Hz24

74 M

Hz24

76 M

Hz24

78 M

Hz24

80 M

Hz

9 LL Data Channels still available

Wi-Fi Ch. 1 Wi-Fi Ch. 6 Wi-Fi Ch. 11

Page 26: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

26

One Packet Format

Not Whitened Whitened

Protected by CRC

Prea

mbl

e

Access Address PDU CRC

Page 27: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

27

Passive Scanning

Page 28: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

28

Active Scanning

Page 29: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

29

Initiating Connections

Page 30: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

30

Directed Connections

Page 31: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

31

Time From Disconnected To Data ~ 3ms (Radio Active ~ 1ms)

Time(us)

Master Tx Radio Active (us)

Slave Tx

0 176 ADV_DIRECT_IND326 CONNECT_REQ 3521928 Empty Packet 802158 144 Attribute Protocol

Handle Value Indication2452 Empty Packet (Acknowledgement) 802682 96 LL_TERMINATE_IND2928 Empty Packet (Acknowledgement) 80

ADV_DIRECT_INDCONNECT_REQ Empty Packet Empty Packet Empty Packet

ATT HVI LL_TERMINATE_IND

~ 3 ms

Page 32: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

32

Topology

Master/Scanner

Slave

Slave

Slave

Slave

Connection

Connection

Conn

ectio

nConnection

Advert-iser

Advert-iser

Scanner

Advert-iser

Adve

rts

Adverts

Adve

rts

Adverts

Page 33: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

33

Topology

Master/Initiator

Slave

Slave

Slave

Slave

Connection

Connection

Conn

ectio

nConnection

Advert-iser

Advert-iser

Scanner

Advert-iser

Adverts

Adve

rts

Conn.Req

Page 34: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

34

Topology

Slave

Master/Scanner

Slave

Slave

Slave

Slave

Connection

Connection

Conn

ectio

nConnection

Advert-iser

Scanner

Advert-iser

Adverts

Adve

rts

Connection

Page 35: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

35

Limits

A single master can address ~231 slaves~ 2 billion addressable slaves per master

Max Connection Interval = 4.0 secondsCan address a slave every ~ 5 ms (assuming 250 ppm clocks)

~ 800 active slaves per master

Page 36: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

36

Connections

Used to send application datareliably, robustly

Includesultra low power connection modeadaptive frequency hoppingconnection supervision timeout

Page 37: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

37

Data Packet

Empty Packet

0 to 27 bytes of Payload

Prea

mbl

e

Acce

ssAd

dres

s

Data

Hea

der

Payl

oad

Leng

th

CRC

Prea

mbl

e

Acce

ssAd

dres

s

Data

Hea

der

Payl

oad

Leng

th

L2CA

P Le

ngth

L2CA

P CI

D

CRC

Payload

Page 38: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

38

Data Packet

0 to 27 bytes of Payload (unencrypted)CRC protects

Data HeaderPayload LengthPayload

Prea

mbl

e

Acce

ssAd

dres

s

Data

Hea

der

Payl

oad

Leng

th

L2CA

P Le

ngth

L2CA

P CI

D

CRC

Payload

Page 39: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

39

Prea

mbl

e

Acce

ssAd

dres

s

Data

Hea

der

Payl

oad

Leng

th

L2CA

P Le

ngth

L2CA

P CI

D

MIC

CRC

Encrypted Data Packet

4 to 31 bytes of payload lengthMIC is part of “Payload”, CRC protects itMIC can be computed / checked in background

Payload

Page 40: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

40

LLID NESN SN MD RFUData channel PDU Header / Payload Length

Length (0 – 31) RFU

PDU HeadersPDU

Prea

mbl

e

Access AddressHe

ader

Payl

oad

Leng

thPayload CRC

Page 41: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

41

Logical Link Identifier

LLID Description00 Reserved01 LL Data PDU - Continuation of an L2CAP message

or an Empty PDU10 LL Data PDU - Start of an L2CAP message

or a Complete L2CAP message11 LL Control PDU

Page 42: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

42

Sequence Numbers

SN = Sequence NumberNESN = Next Expected Sequence Number

Sliding Window Algorithmwindow size of 1lazy acknowledgement possible – saves power

Page 43: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

43

Transmitting Data

Ignore RX data

SN = NESN?

TX old data, SN TX new data, SN

Inc SN

different(ack)

same(nack)

transmit packet

SN = NESN?

Rx new data

Inc NESN

different(old data)

same(new data)

received packet

Page 44: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

44

Connection Events

Masters transmits periodically at a connection eventsConnection Interval sent in CONNECT_REQConnection events continue until MD = 0

Page 45: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

45

Connection Events

Each connection event uses a different channelfn+1 = (fn + hop) mod 37

fn fn+1 fn+2 fn+3

Page 46: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

46

Latency

Master Latencyhow often the master will transmit to slave

Slave Latencyhow often the slave will listen to master

The two latencies don’t have to be the sameMaster Latency = Connection Interval (7.5 ms to 4.0 s)Slave Latency = Connection Interval * Slave Latency

Page 47: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

47

More DataMaster

MD = 0 MD = 1

Slav

e

MD

= 0

Neither device has more data to send.

Connection event closed

Master has more data, Slave hasno more data.

Master may continue, Slave should listen

MD

= 1

Slave has more data, Master has no more data.

Master may continue, Slave should listen

Both devices have more data.

Master may continue, Slave should listen.

Page 48: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

48

Connection Events

More Data bit automatically extends connection events

Page 49: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

49

Peer device transmits 150 μs after last packet

Minimum size packet = 80 μs(Preamble + Access Address + Header + CRC)

Maximum size packet = 328 μs(Preamble + Access Address + Header + Payload + MIC + CRC)

Packet Timings

Tx Rx Tx Rx Tx Tx Rx TxRx

Page 50: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

50

Maximum Data Rate

Asymmetric Tx/Rx Packet Sequence328 + 150 + 80 + 150 = 708 μsTransmitting 27 octets of application data

~305.1 kbps

Tx Rx Tx Rx Tx Tx Rx TxRx

Page 51: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

51

Doubling the Symbol Rate?

LE = 1 MS/s1,000,000 symbols per second

LE2 = 2 MS/s2,000,000 symbols per second

PHY data rate has doubledWhat about the application data rate?

Page 52: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

52

2 Mbits/second data rate

Asymmetric Tx/Rx Packet Sequence168 + 150 + 44 + 150 = 512 μsTransmitting 27 octets of application data

2M Symbols/second~412.9 kbps

Tx Rx Tx Rx Tx Tx Rx TxRx

Page 53: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

53

Extending Payload Length

Asymmetric Tx/Rx Packet Sequence

2200 + 150 + 80 + 150 = 2500 μs

Transmitting 251 octets of application data

Data Length Extensions

~803.2 kbps

Tx Rx Tx Rx Tx Tx Rx TxRx

Page 54: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

54

Extending Payload Length at 2 MS/s

Asymmetric Tx/Rx Packet Sequence1108 + 150 + 80 + 150 = 1408 μsTransmitting 251 octets of application data

Data Length Extensions with 2M Symbols/second~1426.1 kbps

Tx Rx Tx Rx Tx Tx Rx TxRx

Page 55: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

55

Adaptive Frequency Hopping

Frequency Hopping algorithm is very simplefn+1 = (fn + hop) mod 37

If fn is a “used” channel, use as isIf fn is an “unused” channel, remap to set of good channels

Wi-Fi Ch. 1 Wi-Fi Ch. 6 Wi-Fi Ch. 11

Page 56: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

56

Adaptive Frequency Hopping (hop = 7)

fn = 0, used = [9, 10, 21, 22, 23, 33, 34, 35, 36]“unused”; 0 mod 9 → 0; used[0] → 9

Wi-Fi Ch. 1 Wi-Fi Ch. 6 Wi-Fi Ch. 11

Page 57: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

57

Adaptive Frequency Hopping (hop = 7)

fn = fn-1 + 7 mod 37 = 7 mod 37 → 7fn = 7, used = [9, 10, 21, 22, 23, 33, 34, 35, 36]

“unused”; 7 mod 9 → 7; used[7] → 35

Wi-Fi Ch. 1 Wi-Fi Ch. 6 Wi-Fi Ch. 11

Page 58: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

58

Adaptive Frequency Hopping

fn = fn-1 + 7 mod 37 = 14 mod 37 → 14fn = 14, used = [9, 10, 21, 22, 23, 33, 34, 35, 36]

“unused”; 14 mod 9 → 5; used[5] → 33

Wi-Fi Ch. 1 Wi-Fi Ch. 6 Wi-Fi Ch. 11

Page 59: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

59

Adaptive Frequency Hopping

fn = fn-1 + 7 mod 37 = 21 mod 37 → 21fn = 21, used = [9, 10, 21, 22, 23, 33, 34, 35, 36]

“used”

Wi-Fi Ch. 1 Wi-Fi Ch. 6 Wi-Fi Ch. 11

Page 60: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

60

Limits

Maximum 239 packets per LTK per directionEach packet can contain up to 251 octets dataMax 125.5 Terabytes of data per connection~3 years at maximum data rate

Then you have to change the encryption keyuse “Restart Encryption Procedure”

Page 61: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

61

Link Layer Summary

Low Complexity• 1 packet format• 2 PDU types – depending on Advertising / Data Channel• 7 Advertising PDU Types• 7 Link Layer Control Procedures

Useful Features• Adaptive Frequency Hopping• Low Power Acknowledgement• Very Fast Connections

Page 62: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

62

And there is more…

Not even covered Attribute Protocol or Generic Attribute Profileand how it enables Services and Characteristics, reading, writing, notifications…

Not even covered Security Manager (SM)and how it enables a secure bond between devices

Not even covered Application APIsand how to create smart phone apps to talk with devices

Interesting new use cases using LE AdvertisingiBeacon / Mesh / Tracking / Marketing / Finding etc…

Page 63: Bluetooth Low Energy3 IETF RFC 1925 (7) Good, Fast, Cheap: Pick any two (you can’t have all three). (8) It is more complicated than you think. (10)One size never fits all.

63

thank you