Bluetooth
Bluetooth is a wireless communication technology designed to be:
- short range (tens of meters or less)
- low power
- low cost
Bluetooth is used to build Wireless Personal Area Networks (WPANs).
A Bluetooth network is called a piconet.
Characteristics
Bluetooth incorporates many link-layer networking techniques:
- time division multiplexing (TDM)
- frequency division
- randomized backoff
- polling
- error detection and correction
- reliable data transfer via ACKs and NAKS
Bluetooth operates in the 2.4 GHz ISM (Industrial, Scientific and Medical) radio band.
Because many other devices also use this unlicensed band (e.g., microwaves, cordless phones, garage door openers), Bluetooth is designed to tolerate noise and interference.
Piconets
Bluetooth is an ad hoc networking technology: it does not require network infrastructure such as an access point.
Instead, nearby devices organize themselves into a piconet:
A piconet can contain:
- 1 centralized controller
- up to 7 active client devices (8 active devices total)
- up to 255 parked devices
The controller is responsible for managing the entire piconet.
Its responsibilities include:
- maintaining the piconet
- providing the network clock and determining TDM slot boundaries
- determining the frequency-hopping sequence
- admitting new client devices
- controlling client transmit power (100 mW, 2.5 mW, or 1 mW)
- polling clients to grant permission to transmit
Active clients communicate within the piconet.
Parked devices remain associated with the piconet but stay in a low-power state:
- they periodically wake to receive beacon messages according to the controller's schedule
- they cannot communicate until promoted to active status by the controller
Bluetooth wireless channel
Bluetooth uses Time Division Multiplexing (TDM).
Time slots:
- each time slot lasts 625 μs (microseconds)
- therefore Bluetooth has 1,600 time slots per second
1 second = 1,000,000 μs 1,000,000 μs ÷ 625 μs = 1,600 slots/s
During each time slot:
- a sender transmits on one of 79
1-MHzchannels - the channel changes every slot according to a known pseudo-random sequence
Frequency Hop Spread Spectrum (FHSS)
This channel-hopping technique is called Frequency Hop Spread Spectrum (FHSS).
FHSS reduces interference from other devices operating in the same ISM band: they will only interfere with Bluetooth communications in at most a subset of the slots.
Bluetooth can achieve data rates of up to 3 Mbps.
Forming a Bluetooth network
Since Bluetooth networks are self-organizing, devices must first discover one another before communication can begin.
Phase 1: neighbor discovery (inquiry)
The controller:
- broadcasts 32 inquiry messages
- sends each inquiry on a different frequency
- repeats the sequence up to 128 times
Each client:
- listens on one frequency
- waits until it hears an inquiry message
- chooses a random backoff between 0 and 0.3 seconds
- replies with its device ID
The random backoff helps avoid collisions between multiple responding devices, similar to Ethernet's randomized backoff.
Phase 2: paging
After discovering nearby devices, the controller invites selected devices to join the piconet.
This process is called paging, and is similar to a Wi-Fi client associating with an access point.
For each client, the controller:
- sends 32 paging invitation messages
- transmits them on different frequencies because the client does not yet know the hopping sequence
- waits for the client's ACK
Once the ACK is received, the controller sends:
- the frequency-hopping pattern
- clock synchronization information
- an active member address
Finally, the controller polls the client using the shared hopping sequence to confirm that it has successfully joined the piconet.
Modern Bluetooth
Modern Bluetooth versions have introduced several improvements, including:
- higher data rates
- greater range
- lower power consumption
- stronger security
- better reliability
A major addition is Bluetooth Low Energy (BLE):
- introduced in Bluetooth 4.0
- optimized for devices that transmit small amounts of data while consuming very little power (wearables, sensors, IoT applications)