History
• Harald Bluetooth : 10th century Danish King,
managed to unite Denmark and Norway
• Bluetooth SIG (Special Interest Group) :
– Founded in 1998 by : Ericsson, Intel, IBM, Toshiba and
Nokia
What is Bluetooth? Bluetooth Architecture
• Uses the radio range of 2.45 GHz • Piconet
– Each piconet has one master and up to 7 simultaneous
• Theoretical maximum bandwidth is 1 Mb/s slaves
• Several Bluetooth devices can form an ad hoc • Master : device that initiates a data exchange.
• Slave : device that responds to the master
network called a “piconet”
– In a piconet one device acts as a master (sets
frequency hopping behavior) and the others as
slaves
– Example: A conference room with many laptops
wishing to communicate with each other
Piconet Scatternet
• All devices in a piconet hop together Linking of multiple piconets through the master or slave devices
– Master gives slaves its clock and device ID Devices can be slave in one piconet and master of
• Non-piconet devices are in standby another
P
S
S S
P
S M SB P
SB
S M
M=Master P=Parked M
SB S=Slave SB=Standby S
S SB
P P SB
S
Bluetooth Addresses and
Names
Every single Bluetooth device has a unique 48-
bit address, commonly abbreviated BD_ADDR.
This will usually be presented in the form of a 12-
digit hexadecimal value.
The most-significant half (24bits) of the address
is an organization unique identifier (OUI), which
identifies the manufacturer.
The lower 24-bits are the more unique part of the
address.
Connection Process Paging (Connecting)
Inquiry:- process of forming a connection between
If two Bluetooth devices know absolutely two Bluetooth devices.
nothing about each other, one must run an Before this connection can be initiated, each
inquiry to try to discover the other. device needs to know the address of the
One device sends out the inquiry request, other (found in the inquiry process).
and any device listening for such a
request will respond with its address, and
possibly its name and other information.
Connection
Active Mode – This is the regular connected mode, where
the device is actively transmitting or receiving data.
After a device has completed the paging • Sniff Mode – This is a power-saving mode, where the
device is less active. It’ll sleep and only listen for
process, it enters the connection state. transmissions at a set interval (e.g. every 100ms).
While connected, a device can either be • Hold Mode – Hold mode is a temporary, power-saving
mode where a device sleeps for a defined period and then
actively participating or it can be put into a returns back to active mode when that interval has passed.
low power sleep mode. The master can command a slave device to hold.
• Park Mode – Park is the deepest of sleep modes. A master
can command a slave to “park”, and that slave will become
inactive until the master tells it to wake back up.
Bonding and Pairing Bonds are created through one-time a
process called pairing.
Bonded devices automatically establish a When devices pair up, they share their
connection whenever they’re close addresses, names, and profiles, and
enough. usually store them in memory.
When I start up my car, for example, the The also share a common secret key, which
phone in my pocket immediately connects allows them to bond whenever they’re
to the car’s Bluetooth system because together in the future.
they share a bond. No UI interactions are
required!
Pairing usually requires an authentication process where a
user must validate the connection between devices. Power Classes
The flow of the authentication process varies and usually
depends on the interface capabilities of one device or the
Class Number Max Output Max Output Max
other. Power (dBm) Power (mW) Range
Sometimes pairing is a simple “Just Works” operation, where
the click of a button is all it takes to pair (this is common for Class 1 20 dBm 100 mW 100 m
devices with no UI, like headsets).
Class 2 4 dBm 2.5 mW 10 m
Other times pairing involves matching 6-digit numeric codes.
Older, legacy (v2.0 and earlier), pairingprocesses involve Class 3 0 dBm 1 mW 10 cm
the entering of a common PIN code on each device.
The PIN code can range in length and complexity from four
numbers (e.g. “0000” or “1234”) to a 16-character
alphanumeric string.
Bluetooth Profiles
define what kind of data a Bluetooth module
is transmitting.
While Bluetooth specifications define how
the technology works, profiles define how
it’s used.
The profile(s) a Bluetooth device supports Serial Port Profile (SPP)
determine(s) what application it’s geared
towards. If you’re replacing a serial communication
A hands-free Bluetooth headset, for interface (like RS-232 or a UART) with
example, would use headset profile (HSP), Bluetooth, SPP is the profile for you.
while a Nintendo Wii Controller would SPP is great for sending bursts of data
implement the human interface device between two devices.
(HID) profile. Two Arduinos, for example, could converse
For two Bluetooth devices to be compatible, with each other from across rooms,
they must support the same profiles. instead of from across the desk.
Hands-Free Profile (HFP) and
Human Interface Device (HID)
Headset Profile (HSP)
HID is the go-to profile for Bluetooth-enabled user-input HFP is used in the hands-free audio systems built into
devices like mice, keyboards, and joysticks. cars.
It’s also used for a lot of modern video game controllers, It implements a few features on top of those in HSP to
like WiiMotes or PS3 controllers. allow for common phone interactions
HID aims to replace USB cables. (accepting/rejecting calls, hanging up, etc.) to occur
while the phone remains in your pocket.
Advanced Audio Distribution A/V Remote Control Profile
Profile (A2DP) (AVRCP)
defines how audio can be transmitted from allows for remote controlling of a Bluetooth
one Bluetooth device to another. device.
Where HFP and HSP send audio to and
from both devices, A2DP is a one-way
street, but the audio quality has the
potential to be much higher.
Bluetooth v1.2 Bluetooth v2.1 + EDR
They support data rates of up to 1 Mbps The 2.x versions of Bluetooth introduced
(more like 0.7 Mbps in practice) and 10 enhanced data rate (EDR), which
meter maximum range. increased the data ratepotential up to 3
Mbps (closer to 2.1 Mbps in practice).
For low-speed microcontrollers, where 2
Mbps is still fast, v2.1 gives them just
about everything they could need.
Bluetooth v4.0 and Bluetooth
Bluetooth v3.0 + HS
Low Energy
Only those devices with the “+HS” suffix are Bluetooth 4.0 split the Bluetooth
capable of routing data through WiFi and specification into three categories:
achieving that 24 Mbps speed. classic, high-speed, and low-energy.
“Bluetoothv3.0” devices are still limited to a Classic and high speed call back to
maximum of 3 Mbps, Bluetooth versions v2.1+EDR and
v3.0+HS respectively.
The real standout of Bluetooth v4.0 is
Bluetooth low energy (BLE).
BLE
BLE is aimed at peripheral devices which
operate on batteries, and don’t require
high data rates, or constant data
transmission.
Smartwatches, like the Mi-Bands, are a
good example of this application.