bluetooth presentation.pdfuses frequency hopping to mitigate interference changes frequency for each...
TRANSCRIPT
Outline: What we’re going to tell you
I. Brief overview of wireless technologiesII. What is Bluetooth? Why do we use it?
III. Specification overview - radio band, range, and power
IV. Bluetooth ProfilesV. Data transfer - Packets and Frequency Hopping
VI. Networks - Pairing and Piconets
2https://nksoldes2015.com/explore/notepad-clipart/
Why do we communicate wirelessly? In general...
Advantages
● More convenient than wires● Sometimes the only option (Ex. long
range, mobile devices)
Disadvantages
● Slower (latency, bandwidth)● Power consumption/battery life
3
Here are a few of our options.
● Low power, low bandwidth○ ZigBee○ BLE (Bluetooth Low Energy)
● Moderate power, moderate bandwidth○ Bluetooth
● High power, high bandwidth○ WiFi○ WiMax/RF
Each option has its strengths and weaknesses… let’s look at Bluetooth.
4
Background
● Harald “Bluetooth” Gormsson○ King who united Denmark in the 10th century
● Bluetooth Special Interest Group (1994)○ Ericsson, Nokia, IBM, Toshiba, Intel, and more○ Wanted to create a unified standard to exchange
data over short distances○ Initial goal
■ Replace wires■ “Unite devices”
5http://daniel-mccloskey.deviantart.com/art/Harald-Bluetooth-644300366
What is Bluetooth?
● Convenient connections between devices - “piconet”
● Ubiquitous● Common uses
○ Device control○ File transfer
6https://vestavialibrary.org/bluetooth-upgrade-more-speed-greater-range/
In general, Bluetooth finds a useful middle ground:Advantages
● Data transfer bit rate is high enough to perform complex activities ○ Ex. streaming/transmitting
audio with relatively low latency
● Simple pairing process● Commonplace, cheap, standardized
○ Bluetooth Profiles● Moderate power consumption,
range
7
Disadvantages
● Security○ Blueborne - BT stack vulnerabilities
allowed for devices to be compromised without being paired
● Interference○ 2.4 GHz
Why do we use Bluetooth?
(https://learn.sparkfun.com/tutorials/bluetooth-basics/wireless-comparison) 8
Specification
● Uses the 2.4 Ghz Industrial, Scientific, and Medical (ISM) radio band○ Goes from 2.402 Ghz to 2.48 Ghz○ 79 one Mhz channels
● 1600 ‘hops’ per second - 625 μsec per hop○ ~200 μsec used for synchronization
● Time Domain Duplex○ Every other hop is assigned to either the master or slave transmission
● Uses frequency hopping to mitigate interference○ Changes frequency for each hop
9
Range and Power of Bluetooth Devices
● Class 1 - Laptops / Desktops / Industrial Applications○ 100mW Transmit Power Limit○ Typical range: ~100 m○ Generally requires power isolation to prevent interference
● Class 2 - Phones / Headsets○ 2.5mW Transmit Power Limit○ Typical range: ~10 m
● Class 3 - Extremely low power devices○ 1mW Transmit Power Limit○ Typical Range: ~1 m
10
Bluetooth ProfilesWhat is a Bluetooth profile?
● A specification for a type of Bluetooth device defined by Bluetooth SIG○ Defines how the device uses the Bluetooth protocol- which parts of the stack are used?○ Ex. Is the device an audio device? Input device?○ A device can support multiple profiles
● Different profiles for different types of data
Why are Bluetooth profiles important?
● Devices are compatible if they support the same profiles○ Standardized implementation- a device is guaranteed compatibility with other devices of the
same profile.11
Commonly Used Bluetooth Profiles and Examples
12
● Audio○ Hands-Free Profile and Headset
Profile■ Hands-free calling■ Earpieces
○ A/V Remote Control Profile■ Car Audio System
○ Advanced Audio Distribution Profile■ Headphones, Microphones
● Device Communication○ Serial Port Profile
■ Communication between Arduino devices
○ Human Interface Device■ Keyboards, mice, game
controllers
Example: Bluetooth Profiles in Google Nexus/Pixel phones
13https://support.google.com/nexus/answer/6048862?hl=en
Packet Timing
● Time Division Duplex (TDD)○ Master and slave alternate
transmitting and receiving○ Master transmits during
even-numbered slots○ Slave transmits during
odd-numbered slots
14
http://sna.csie.ndhu.edu.tw/~cnyang/PDF/bt_tut.pdf
Packet Structure● Access Code used for
packet identification● Header contains
device address, type of transmission, etc.
● Payload contains data transmission
15http://www.ques10.com/p/2706/explain-the-frame-format-in-bluetooth-technology-1/
Packets
● Packets can be 1, 3, or 5 “hops” long
● Analogous to the “burst” feature of the AHB
16http://sna.csie.ndhu.edu.tw/~cnyang/PDF/bt_tut.pdf
Frequency Hopping
● The transmitter and the receiver communicate on changing frequency bands○ 79 frequency bands to choose from
● Master device dictates a changing frequency pattern that slave devices follow
● Designed this way to avoid interference with other devices on the ISM spectrum
● Makes data transfer harder to be intercepted
17
Frequency Hopping
18https://www.youtube.com/watch?v=CkhA7s5GIGc
The Stack
● Multiple protocols work together for Bluetooth to work● The radio
○ Receive/transmit signals
● Baseband○ Error catching○ Physical linking to all layers
● Link Manager Protocol○ Controls linking between
devices with pairing
● Logical Link Control andAdaptation Protocol (L2CAP)○ Interface with host controller https://www.engineersgarage.com/articles/bluetooth-protocol-basics-working
19
Pairing
● Devices make themselves discoverable ○ Identify themselves and their services via
profiles● Can only pair with devices supporting the same
profile● Bond for security and to enable reestablishing a
connection without user input ● Once connection is established and unique
passkeys are exchanged, devices can share data● Convenient replacement for wires, little user
config needed
20http://manuals.denon.com/WMS/DSB-200/EM/ENG/BONDSYaaimogad.html
Pairing Difficulties
● Time○ Pairing is slow
● Older bluetooth devices can take up to 10s to pair!● Newer versions can take up to 5s● Can often edit announcement interval at cost of increased power
○ Increase effective phone battery by broadcasting less frequently○ Could be broadcasting as frequently as every 6ms or as slow as once every 5s○ Can manage in software and disable checking until required by user
21
Piconets
● Small local point to point networks● Each Bluetooth piconet can have 7 active
devices ○ 6 slaves and 1 master○ More devices can be connected in either
parked or hold mode and remain synchronized
● One master per piconet but can function as a slave in another piconet○ Forms scatter net○ Time division multiplexed between
piconets
http://sna.csie.ndhu.edu.tw/~cnyang/PDF/bt_tut.pdf 22
Summary: What we have told you
23
I. Brief overview of wireless technologies ○ Wireless is convenient but has higher power consumption and is slower
II. What is Bluetooth? Why do we use it? ○ Standardized, cheap middle ground
III. Specification overview - radio band, range, and power ○ Moderate range, low-moderate power consumption
IV. Bluetooth Profiles ○ Profiles guarantee compatibility, different profiles for different types of data
V. Data transfer - Packets and Frequency Hopping○ Frequency hop to avoid interference
VI. Networks - Pairing and Piconets○ Up to 7 device to device connections
References● http://sna.csie.ndhu.edu.tw/~cnyang/PDF/bt_tut.pdf
● https://www.youtube.com/watch?v=sCMDIjbKLb0&t=2s
● http://large.stanford.edu/courses/2012/ph250/roth1/
● https://www.youtube.com/watch?v=CkhA7s5GIGc
● https://learn.sparkfun.com/tutorials/bluetooth-basics/how-bluetooth-works
● http://www.ques10.com/p/2706/explain-the-frame-format-in-bluetooth-technology-1/
● https://www.electronics-notes.com/articles/radio/pll-phase-locked-loop/tutorial-primer-basics.php
● https://www.link-labs.com/blog/types-of-wireless-technology
● https://go.armis.com/hubfs/BlueBorne%20Technical%20White%20Paper.pdf
● https://www.radio-electronics.com/info/wireless/bluetooth/networks-networking-connections-pairing.php
24
Header Structure
● AM_ADDR is the temporary address for active members of the piconet● TYPE tells the type of data transmission● FLOW/ARQN are for flow and acknowledgement● SEQN is the sequence number for packet ordering● HEC is an error check, packet is discarded if an error is found
26
http://www.ques10.com/p/2706/explain-the-frame-format-in-bluetooth-technology-1/