What Is Bluetooth? A 25-Word Definition
- [Bluetooth] [uses] [2.4 GHz ISM band radio]
- [FHSS] [prevents] [radio interference]
- [BLE] [consumes] [10–100x less power than Classic Bluetooth]
Named after 10th-century Danish king Harald Bluetooth, who united Scandinavian tribes — just as the standard unites devices. Developed by Ericsson in 1994 and now governed by the Bluetooth Special Interest Group (SIG), it powers wireless audio, IoT sensors, medical devices, and automotive systems. As of 2024, over 5 billion Bluetooth-enabled units ship annually.
2.4 GHz Radio & Frequency Hopping Spread Spectrum (FHSS)
Bluetooth Classic operates in the 2.402–2.480 GHz ISM band, divided into 79 channels (1 MHz wide each). To coexist with Wi-Fi and microwaves sharing the same band, Classic Bluetooth uses Frequency-Hopping Spread Spectrum (FHSS) — the transmitter hops to a pseudo-random new channel 1,600 times per second.
BLE uses 40 channels (2 MHz wide): 37 data channels and 3 advertising channels. It employs Adaptive Frequency Hopping (AFH) — it maps used channels and actively avoids congested ones, dramatically reducing interference with Wi-Fi networks.
Classic Bluetooth vs BLE: When to Use Which
| Feature | Classic (BR/EDR) | BLE (4.0+) |
|---|---|---|
| Power Consumption | ~1 W active | 0.01–0.5 W (sleep ~1 µA) |
| Peak Data Rate | 3 Mbps (EDR) | 2 Mbps (BLE 5.0) |
| Latency | ~100 ms | ~3 ms |
| Range | 10–100 m | 10–400 m (BLE 5.0 Long Range) |
| Profiles | A2DP, HFP, SPP | GATT-based custom profiles |
| Best For | Audio streaming, file transfer | Sensors, wearables, IoT beacons |
| Battery Life | Hours (phones, speakers) | Months to years (coin cell) |
How Bluetooth Pairing Works Step-by-Step
- Inquiry & Discovery: Device A broadcasts an inquiry packet. Device B responds with its clock offset and device class, exposing its Bluetooth Device Address (BD_ADDR — a 48-bit MAC-like identifier).
- Secure Simple Pairing (SSP): Modern devices use Diffie-Hellman ECDH key exchange. Four association models exist: Just Works (auto), Numeric Comparison (verify 6-digit code), Passkey Entry, and Out-of-Band (NFC tap).
- Link Key Generation: Both devices derive a 128-bit link key from the shared secret. This key is used for AES-CCM encryption of all subsequent data.
- Bonding: Keys are stored in non-volatile memory so devices reconnect automatically without re-pairing — this is what "trusted device" means.
BLE GATT Architecture: Services, Characteristics & UUIDs
BLE devices expose data through the Generic Attribute Profile (GATT) hierarchy. Understanding GATT is essential for implementing BLE with an ESP32 BLE or any microcontroller.
🗂️ Profile
Top-level collection of services for a use case (e.g., Heart Rate Profile, Battery Profile)
📦 Service
Groups related characteristics. Identified by a UUID (e.g., 0x180D = Heart Rate Service)
📊 Characteristic
A single data point with properties: Read, Write, Notify, Indicate. Has a UUID + value field
🔔 Descriptor
Metadata about a characteristic — e.g., CCCD (0x2902) enables Notify subscriptions
Bluetooth on ESP32: Classic Serial vs BLE Server
The ESP32 supports both Classic Bluetooth and BLE simultaneously — a major advantage over dedicated modules.
📡 Classic Bluetooth Serial
Library: BluetoothSerial.h
Use SerialBT.begin("ESP32") — appears as a serial COM port on your phone. Best for debug consoles and serial data bridges.
🔵 BLE GATT Server
Library: ESP32 BLE Arduino
Create services and characteristics with custom UUIDs. Ideal for IoT sensors — phone reads temperature/humidity without continuous connection.
esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT) to free memory if only using BLE.Frequently Asked Questions
How does Bluetooth avoid interference with other 2.4 GHz devices?
Bluetooth Classic uses FHSS — hopping between 79 channels 1,600 times/second. BLE uses Adaptive Frequency Hopping (AFH) to avoid congested Wi-Fi channels. Each hop lasts ~625 µs, making sustained interference practically impossible.
What is the difference between Classic Bluetooth and BLE?
Classic Bluetooth is for high-bandwidth continuous streaming (audio). BLE sends small data bursts with ~1 µA sleep current — ideal for sensors and wearables running on coin cells for years.
What is Bluetooth pairing and how does it work?
Pairing exchanges a 128-bit link key using ECDH cryptography. Modern Bluetooth 4.2+ uses LE Secure Connections with AES-CCM encryption. Bonding stores keys so devices auto-reconnect without re-pairing.
What is GATT and how does BLE use it?
GATT (Generic Attribute Profile) defines the data hierarchy: Profiles contain Services which contain Characteristics (data points). Each is identified by a UUID. Your phone (GATT client) reads or subscribes to characteristics on the ESP32 (GATT server).
How do I use Bluetooth on an ESP32?
For Classic Serial: include BluetoothSerial.h and call SerialBT.begin("Name"). For BLE: use ESP32 BLE Arduino library to create BLEServer, add services with UUIDs, and start advertising. Use the nRF Connect app to test BLE characteristics.
Conclusion
Bluetooth is a marvel of radio engineering — FHSS ensures reliable short-range communication in a chaotic 2.4 GHz environment, while BLE's GATT architecture makes it perfect for modern IoT applications. Whether you're streaming audio over A2DP or reading sensor data from an ESP32 BLE server, understanding the underlying protocol makes you a more effective embedded developer.
