9  Bluetooth Profiles

In 60 Seconds

Bluetooth profiles are interoperability standards that define how devices communicate for specific use cases. Classic profiles handle audio (A2DP, HFP) and data (SPP for wireless serial), while BLE GATT-based profiles serve sensor and health applications. Choosing the right profile determines your entire implementation approach.

Key Concepts
  • Bluetooth Profile: A standardized specification defining how two or more Bluetooth devices implement a specific use case (e.g., hands-free calling, heart rate monitoring)
  • GATT-Based Profile: Modern BLE profile built on the Generic Attribute Profile; defines specific service and characteristic UUIDs, mandatory operations, and data formats
  • A2DP (Advanced Audio Distribution Profile): Classic Bluetooth profile for stereo audio streaming; uses ACL connection and SBC/AAC/aptX codecs at up to 328 kbps
  • HFP (Hands-Free Profile): Classic Bluetooth profile for phone calls via headsets; requires bidirectional SCO (Synchronous Connection Oriented) audio channel
  • Heart Rate Profile (HRP): BLE profile using Heart Rate Service (0x180D) with Heart Rate Measurement characteristic (0x2A37); specifies notification-based operation
  • Battery Service (BAS): BLE service (UUID 0x180F) with Battery Level characteristic (0x2A19, 0–100%); universally supported for reporting device charge level
  • OTA DFU Profile: Over-the-air firmware update profile (Nordic NRF DFU, TI OAD, Silicon Labs OTA); allows field firmware updates via BLE without physical cable access
  • Adopted vs Custom Profile: SIG-adopted profiles use 16-bit UUIDs and guarantee interoperability; custom profiles use 128-bit UUIDs and are vendor-specific

9.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Explain the role of Bluetooth profiles in enabling interoperability across devices from different manufacturers
  • Implement Serial Port Profile (SPP) for wireless UART communication in embedded systems
  • Configure Human Interface Device (HID) profile for keyboards, mice, and game controllers
  • Apply Advanced Audio Distribution Profile (A2DP) for high-quality audio streaming with appropriate codec selection
  • Select the right profile and justify your choice for different IoT application requirements

Bluetooth profiles define what a device can do – there are profiles for audio streaming, file transfer, heart rate monitoring, and dozens more. Think of profiles as job descriptions: when two devices meet, they check each other’s profiles to see what they have in common, then use the matching profile to communicate.

MVU: Minimum Viable Understanding

If you only have 5 minutes, here’s what you need to know about Bluetooth Profiles:

  1. Profiles = Interoperability Standards - They define HOW devices communicate for specific use cases (audio, input, data)
  2. Classic vs BLE Profiles - Audio profiles (A2DP, HFP) use Classic Bluetooth; sensor/health profiles use BLE GATT
  3. SPP = Wireless Serial Cable - Use Serial Port Profile to replace RS-232 UART connections wirelessly
  4. HID = Input Devices - Keyboards, mice, and game controllers use Human Interface Device profile
  5. A2DP = Quality Audio - Advanced Audio Distribution Profile with codecs like SBC, AAC, aptX, LDAC

Bottom line: Choose Classic Bluetooth profiles (A2DP, SPP) for high data rate applications like audio streaming. Choose BLE GATT profiles for low-power sensors, health devices, and smart home applications.

In Plain English

Bluetooth profiles are like standardized recipes that tell devices exactly how to communicate for specific tasks. Without profiles, every Bluetooth headphone manufacturer would invent their own audio format, and your phone wouldn’t be able to play music on any of them.

Why it matters: When you connect a new wireless keyboard to your laptop, it “just works” because both devices speak the same HID profile language. Profiles enable the plug-and-play experience we expect from Bluetooth devices.

Hey there, future inventors! Let’s learn about Bluetooth profiles with the Sensor Squad!

Meet the Squad:

  • Sammy the Sensor - loves measuring things
  • Lila the Lightbulb - lights up when she learns something new
  • Max the Motor - always moving and doing
  • Bella the Battery - keeps track of energy

The Walkie-Talkie Story:

Imagine the Sensor Squad wants to share information, but they each speak different languages!

  • Sammy speaks in numbers: “Temperature: 72, Humidity: 45”
  • Lila speaks in colors: “Red, Blue, Green!”
  • Max speaks in commands: “Go Forward! Turn Left!”

The Problem:

If everyone speaks differently, nobody understands each other! It’s like trying to order pizza in a country where nobody speaks your language.

Bluetooth Profiles to the Rescue!

Profiles are like universal translators:

  • A2DP (Audio Profile) = The “Music Language” - Everyone agrees how to share songs
  • HID (Input Profile) = The “Button Language” - Everyone agrees how to say “I pressed a button!”
  • SPP (Serial Profile) = The “Text Message Language” - Everyone agrees how to send text

Real-World Examples:

  • Your wireless earbuds use A2DP to play music
  • Your gaming controller uses HID to send button presses
  • A smart home sensor uses BLE GATT to report temperature

Fun Experiment: Look at your Bluetooth settings on a phone or computer. You’ll see devices paired for “Audio,” “Input Device,” or “Other” - those are different profiles!

Remember: Profiles make sure ALL Bluetooth devices can be friends and talk to each other!


9.2 Prerequisites

Before diving into this chapter, you should be familiar with:

9.3 What Are Bluetooth Profiles?

Bluetooth profiles define how devices should behave for specific use cases. They ensure interoperability between devices from different manufacturers.

Bluetooth profile ecosystem showing Classic profiles (A2DP, HFP, SPP, HID) and BLE GATT profiles (HRS, proximity, mesh) organized by category

Bluetooth Profile Ecosystem Overview

Profile Types:

  • Audio: A2DP, HFP, HSP, and AVRCP use Classic Bluetooth for continuous audio and call-control streams.
  • Input: HID can run over Classic Bluetooth or BLE, depending on latency and battery-life requirements.
  • Data: SPP, FTP, and OPP are Classic Bluetooth profiles for file or serial-style data exchange.
  • Health: HRS, BLP, and GLS are BLE GATT profiles for structured sensor measurements.
  • Proximity: Find Me and Proximity profiles use BLE GATT for nearby-device alerts.
  • Automation: Mesh models use BLE Mesh for building-scale control networks.

9.4 Serial Port Profile (SPP)

SPP emulates a serial cable connection, replacing RS-232 with wireless communication.

9.4.1 Architecture

SPP architecture showing MCU with UART connected via RFCOMM over Bluetooth radio to host device creating virtual serial port

Serial Port Profile (SPP) Architecture

Use Cases:

  • Serial debugging
  • Sensor data transmission
  • Wireless UART for embedded systems
  • Legacy device communication

9.4.2 Implementation

SPP uses RFCOMM (Radio Frequency Communication) to create virtual serial ports:

# Python example using PyBluez
import bluetooth

# Server (peripheral device)
server_sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
server_sock.bind(("", bluetooth.PORT_ANY))
server_sock.listen(1)

# Advertise SPP service
uuid = "00001101-0000-1000-8000-00805F9B34FB"  # SPP UUID
bluetooth.advertise_service(server_sock, "SensorData",
                           service_id=uuid,
                           service_classes=[uuid, bluetooth.SERIAL_PORT_CLASS],
                           profiles=[bluetooth.SERIAL_PORT_PROFILE])

print("Waiting for connection...")
client_sock, client_info = server_sock.accept()
print(f"Connected: {client_info}")

# Send/receive data like a serial port
while True:
    data = read_sensor()
    client_sock.send(f"{data}\n")

9.4.3 Arduino Example

#include <SoftwareSerial.h>

// HC-05 Bluetooth module on pins 10, 11
SoftwareSerial bluetooth(10, 11);  // RX, TX

void setup() {
    Serial.begin(9600);
    bluetooth.begin(9600);
    Serial.println("Bluetooth SPP Ready");
}

void loop() {
    // Send sensor data over Bluetooth
    int sensorValue = analogRead(A0);
    bluetooth.println(sensorValue);

    // Receive commands from phone
    if (bluetooth.available()) {
        char cmd = bluetooth.read();
        processCommand(cmd);
    }

    delay(100);
}

9.4.4 SPP Limitations

  • No BLE support: SPP will not work with BLE-only devices; use a BLE UART-style GATT service instead.
  • Discovery required: Users normally pair manually; NFC or QR-assisted pairing can reduce setup friction.
  • Power consumption: Classic Bluetooth draws more current than BLE; reserve SPP for continuous streams or powered devices.
  • No standard data format: SPP transports bytes, not semantics; define a simple application protocol.

9.5 Human Interface Device (HID)

HID profile enables input devices like keyboards, mice, and game controllers.

9.5.1 HID over Classic Bluetooth

Used by most wireless keyboards and mice:

Characteristics:

  • Low latency (8-11ms typical)
  • Report-based data structure
  • Boot protocol for BIOS compatibility
  • Encryption required

9.5.2 HID over GATT (BLE)

BLE version for lower power devices:

Service UUID: 0x1812

BLE HID GATT service structure with characteristics for HID Information, Report Map, Control Point, Report, and Protocol Mode

BLE HID GATT Service Structure

Characteristics:

  • 0x2A4A - HID Information: Read-only metadata about the HID device.
  • 0x2A4B - Report Map: Read-only descriptor that tells the host how to interpret reports.
  • 0x2A4C - HID Control Point: Write Without Response for suspend/exit-suspend commands.
  • 0x2A4D - Report: Read, Write, and Notify for input, output, and feature reports.
  • 0x2A4E - Protocol Mode: Read and Write Without Response for Boot vs Report protocol selection.

The Report characteristic (0x2A4D) uses a Client Characteristic Configuration Descriptor (CCCD, UUID 0x2902) — a central writes 0x0001 to this descriptor to enable Input Report notifications from the peripheral.

9.5.3 HID Report Types

  • Input reports: Device to host; keystrokes, button presses, mouse movement, joystick axes.
  • Output reports: Host to device; LED state such as Caps Lock or controller rumble commands.
  • Feature reports: Bidirectional; configuration and device-specific settings.

9.5.4 Example: BLE Keyboard

#include <BleKeyboard.h>

BleKeyboard bleKeyboard("ESP32 Keyboard");

void setup() {
    bleKeyboard.begin();
}

void loop() {
    if (bleKeyboard.isConnected()) {
        // Type a message
        bleKeyboard.print("Hello from ESP32!");

        // Special keys
        bleKeyboard.press(KEY_LEFT_CTRL);
        bleKeyboard.press('c');
        bleKeyboard.releaseAll();

        delay(1000);
    }
}

9.5.5 Game Controller Support

Modern game controllers use HID:

  • Xbox Series controllers: Bluetooth HID, typically around 8 ms.
  • PlayStation 5 controllers: Bluetooth HID, typically around 10 ms.
  • Nintendo Switch controllers: Bluetooth HID, typically around 15 ms.
Mid-Chapter Check: GATT Fundamentals for BLE Profiles

Before continuing to audio profiles, confirm your understanding of how BLE GATT services operate — the foundation for all BLE-based profiles covered in the rest of this chapter.

9.6 Advanced Audio Distribution Profile (A2DP)

A2DP enables high-quality stereo audio streaming.

9.6.1 Architecture

A2DP architecture showing source and sink roles for Bluetooth music streaming and recording

A2DP Audio Streaming Architecture

9.6.2 Audio Codecs

  • SBC: 328 kbps, around 200 ms latency, good quality, mandatory and free for A2DP.
  • AAC: 256 kbps, around 100 ms latency, very good quality, licensed and widely used by Apple devices.
  • aptX: 352 kbps, around 70 ms latency, excellent quality, licensed and useful for video sync.
  • aptX HD: 576 kbps, around 100 ms latency, near-CD quality, licensed.
  • LDAC: 990 kbps, around 200 ms latency, high-resolution audio, licensed and power-hungry.
  • LC3: Variable bitrate, around 20 ms latency, excellent quality, used by BLE Audio rather than classic A2DP.

9.6.3 Codec Selection

During A2DP setup, the source and sink exchange supported codec capabilities and select the best mutually supported option. Always expect fallback to SBC because it is mandatory, then prefer lower-latency codecs when video or gaming sync matters.

9.6.4 A2DP Latency Considerations

Audio latency affects user experience:

  • Music listening: Less than 200 ms is usually acceptable; any supported codec can work.
  • Video watching: Aim below 100 ms; aptX is preferred, with AAC often acceptable.
  • Gaming: Aim below 50 ms; aptX Low Latency is the classic Bluetooth target.
  • Live performance: Aim below 20 ms; use wired audio or LE Audio with LC3 rather than classic A2DP.

9.7 Audio/Video Remote Control Profile (AVRCP)

AVRCP provides media playback control alongside A2DP:

Supported Commands:

  • Play/Pause/Stop: Control the active media session.
  • Next/Previous: Skip between tracks or chapters.
  • Fast Forward/Rewind: Move within the current track.
  • Volume Up/Down: Adjust playback level from the remote controller.

Metadata (AVRCP 1.3+):

  • Track title
  • Artist name
  • Album name
  • Track duration
  • Playback position

9.8 Hands-Free Profile (HFP)

HFP enables voice calls through Bluetooth devices:

Features:

  • Voice call audio routing
  • Call control (answer, reject, hold)
  • Voice dialing
  • Caller ID display
  • Volume control

Use Cases:

  • Car hands-free systems
  • Bluetooth headsets
  • Smart speakers

9.8.1 HFP vs HSP

  • Call control: HFP supports full call control; HSP only supports basic headset behavior.
  • Voice dial: HFP supports voice dialing; HSP does not.
  • Caller ID: HFP can expose caller ID; HSP does not include it.
  • Three-way calling: HFP supports it; HSP does not.
  • Audio codec: HFP supports CVSD and mSBC; HSP is limited to CVSD.
  • Use case: Choose HFP for modern devices and HSP only for legacy compatibility.

9.8.2 Voice Call Audio Quality

HFP voice call processing chain showing phone audio routed through Bluetooth to hands-free device with echo cancellation and noise reduction

HFP Voice Call Audio Processing Chain

9.9 Technology Comparison

Choosing the right profile for your application:

Comparison of Classic Bluetooth, BLE, and BLE Mesh showing differences in range, data rate, power consumption, and device capacity

Bluetooth Technology Comparison: Classic vs BLE vs Mesh
  • Classic Bluetooth: Around 100 m range, 1-3 Mbps data rate, medium power, about 100 ms typical latency, 7 active devices per piconet, pairing-based setup, best for audio and file-style streams.
  • BLE: Around 50 m range, 125 kbps to 2 Mbps data rate, very low power, 7.5 ms minimum connection interval, many devices over time, advertising-based discovery, best for sensors.
  • BLE Mesh: Multi-hop range, low data rate, low power for relays and sleepy endpoints, variable latency, up to 32,000+ nodes, provisioning-based setup, best for building-wide control.

9.9.1 Profile Selection Guide

  • Wireless earbuds: A2DP + AVRCP + HFP for music, media controls, and calls.
  • Fitness tracker: BLE HRS + GATT for low-power phone synchronization.
  • Game controller: HID over Classic or BLE for low-latency input.
  • Smart lock: BLE custom GATT for secure, battery-powered access control.
  • Industrial sensor: BLE or Mesh for power-efficient telemetry and site coverage.
  • Debug console: SPP for serial-terminal compatibility.
  • Car audio: A2DP + HFP for music playback and phone calls.

Matrix mapping Bluetooth profiles to application requirements including audio, input, data transfer, health monitoring, and smart home

Bluetooth Profile Selection Matrix by Application Requirements

9.10 Case Study: Wireless Earbuds

Modern wireless earbuds demonstrate multi-profile integration:

Profiles Used:

  1. A2DP - Stereo music streaming
  2. AVRCP - Play/pause/skip control
  3. HFP - Voice calls
  4. BLE GATT - Battery level, custom settings

Dual-Mode Operation:

Modern earbuds use Classic Bluetooth for A2DP audio streaming and BLE for low-power status updates (battery level, configuration). The dual-mode radio switches between protocols automatically based on the active profile.

Power Optimization:

  • A2DP codec selection affects battery life
  • BLE for low-power status updates
  • Sleep mode when not playing
  • Active noise cancellation power budget
Real-World Implementation Tips

For Embedded Developers:

  1. Start with proven libraries - Use ESP32’s Bluedroid stack or nRF Connect SDK rather than implementing profiles from scratch
  2. Test on multiple devices - iOS, Android, Windows, and macOS all have subtle profile implementation differences
  3. Monitor memory usage - Classic Bluetooth profiles require significantly more RAM than BLE
  4. Handle reconnection gracefully - Users expect paired devices to reconnect automatically

For Product Designers:

  1. Prioritize profiles - Not all platforms support all profiles equally (iOS limits SPP access)
  2. Consider companion apps - Custom GATT services require app development; standard profiles work natively
  3. Plan for certification - Bluetooth SIG qualification is required for commercial products
  4. Document codec support - Clearly list supported audio codecs (SBC, AAC, aptX, LDAC) in specifications


Common Pitfalls in Bluetooth Profile Implementation

1. Using Classic Bluetooth for Battery-Powered Sensors

  • Mistake: Implementing SPP or A2DP on coin-cell powered devices
  • Impact: Battery life measured in hours instead of months
  • Solution: Use BLE GATT profiles for battery-critical applications

2. Expecting Low Latency from SBC Codec

  • Mistake: Using SBC for gaming or video applications
  • Impact: 150-200ms audio delay causes noticeable lip-sync issues
  • Solution: Use aptX Low Latency (~40ms) or aptX (~70ms) for time-sensitive audio

3. Implementing Custom Protocols Instead of Standard Profiles

  • Mistake: Creating proprietary communication schemes instead of using HID, SPP, or GATT
  • Impact: Incompatibility with operating systems and need for custom apps
  • Solution: Use standardized profiles whenever possible for plug-and-play compatibility

4. Ignoring Profile Compatibility

  • Mistake: Assuming all Bluetooth devices support the same profiles
  • Impact: Connection failures between devices (e.g., BLE-only phone can’t use SPP)
  • Solution: Check profile support in datasheets; implement dual-mode for maximum compatibility

5. Forgetting About Security Requirements

  • Mistake: Implementing HID without encryption on classic Bluetooth
  • Impact: Keystroke injection attacks possible
  • Solution: HID requires authentication and encryption; always enable security features

Connection: BLE GATT Profiles meet CoAP Resource Model

BLE’s GATT (Generic Attribute Profile) and CoAP share a strikingly similar resource-oriented architecture. Both organize functionality into hierarchical resources: GATT uses Services > Characteristics > Descriptors, while CoAP uses URI paths like /sensors/temperature/current. Both support read/write/notify operations, and both use UUIDs or URIs as resource identifiers. If you understand GATT’s model of exposing sensor data as readable characteristics with notifications on change, you already understand CoAP’s GET with Observe. The key difference: GATT operates at the link layer (single-hop BLE), while CoAP operates at the application layer (multi-hop IP). See CoAP Fundamentals for the CoAP resource model.

9.11 Summary

This chapter covered Bluetooth profiles for different applications:

  • SPP enables wireless UART for embedded systems and debugging
  • HID provides standardized input device communication (keyboards, mice, controllers)
  • A2DP streams high-quality stereo audio with various codecs
  • AVRCP adds media playback control to audio streaming
  • HFP enables hands-free voice calls for headsets and car systems
  • Profile selection depends on data rate, power, latency, and device compatibility
  • Modern devices often combine multiple profiles (A2DP + HFP + BLE GATT)
Key Takeaways
  1. Profiles = Interoperability - They ensure devices from different manufacturers can communicate
  2. Classic for Streaming - Audio (A2DP) and high-throughput data (SPP) use Classic Bluetooth
  3. BLE for Battery Life - Sensors, health devices, and beacons use BLE GATT profiles
  4. Codec Matters - For audio applications, codec choice affects latency and quality (aptX for video sync, LDAC for audiophiles)
  5. Dual-Mode is Common - Modern devices (earbuds, smart hubs) combine Classic + BLE for best of both worlds

Decision tree guiding selection of Bluetooth profile based on use case: audio leads to A2DP/HFP, input to HID, sensors to BLE GATT

Bluetooth Profile Selection Decision Tree

Scenario: Compare SPP (Serial Port Profile, Classic Bluetooth) versus BLE GATT for streaming accelerometer data from a motion sensor to a data logger.

Given requirements:

  • Accelerometer: 3-axis, 16-bit per axis = 6 bytes per sample
  • Sample rate: 100 Hz (100 samples/second for vibration analysis)
  • Data rate: 6 bytes × 100 Hz = 600 bytes/second = 4,800 bps

Option 1: Classic Bluetooth SPP

  • Protocol: RFCOMM over L2CAP, stream-based like a serial port.
  • Typical MTU: 990 bytes, so large packets reduce overhead.
  • Practical throughput: 1-2 Mbps, compared with a theoretical 3 Mbps radio rate.
  • Latency: 10-50 ms, depending on buffering.
  • Active power: 30-50 mA continuously because the connection is maintained.
  • Idle power: 5-10 mA with sniff mode around every 40 ms.

Transmission efficiency:

  • Samples per packet: 990 bytes ÷ 6 bytes = 165 samples
  • Packets per second: 100 samples/sec ÷ 165 = 0.6 packets/sec
  • Overhead: RFCOMM (5 bytes) + L2CAP (4 bytes) + Baseband (18 bytes) = 27 bytes
  • Efficiency: 990 ÷ (990 + 27) = 97.3%

Battery impact (1000 mAh battery, 8 hours/day use):

  • Daily current: 40 mA × 8 hours = 320 mAh
  • Battery life: 1000 ÷ 320 = 3.1 days

Option 2: BLE GATT with Notify

  • Protocol: ATT over L2CAP, attribute-based rather than stream-based.
  • MTU: 23 bytes by default, commonly negotiated to 185 bytes for larger notifications.
  • Throughput: 5-10 kbps with the default MTU, limited by connection interval.
  • Connection interval: 7.5 ms minimum, allowing up to 133 connection events per second.
  • Latency: 7.5-30 ms, often lower than SPP for small updates.
  • Active power: 8-12 mA during short radio events.
  • Sleep power: 1-3 µA between events.

Transmission with 23-byte MTU (default):

  • Payload per notification: 23 - 3 (ATT header) = 20 bytes
  • Samples per notification: 20 ÷ 6 = 3 samples (18 bytes, 2 bytes wasted)
  • Notifications per second: 100 samples ÷ 3 = 34 notifications/sec
  • Problem: With 7.5ms interval, max rate is 133 notifications/sec → feasible

Transmission with 185-byte MTU (negotiated):

  • Payload: 185 - 3 = 182 bytes
  • Samples per notification: 182 ÷ 6 = 30 samples (180 bytes, 2 wasted)
  • Notifications per second: 100 ÷ 30 = 3.3 notifications/sec → easy

Battery impact (185-byte MTU, 7.5ms interval):

  • Radio active time: 2 ms per event (TX + RX window)
  • Duty cycle: 2ms / 7.5ms = 26.7%
  • Average current: 10 mA × 0.267 + 2 µA × 0.733 = 2.67 mA
  • Daily use: 2.67 mA × 8 hours = 21.36 mAh
  • Battery life: 1000 ÷ 21.36 = 46.8 days

Comparison summary:

  • Throughput: Both meet the 4,800 bps requirement, but SPP has much more margin (around 1 Mbps practical vs 10 kbps BLE GATT in this conservative example).
  • Latency: BLE wins for small updates at 7.5-30 ms versus 10-50 ms for SPP.
  • Battery life: BLE wins strongly: 46.8 days versus 3.1 days.
  • Setup complexity: SPP is simpler because it behaves like a serial port; BLE requires GATT service design.

Verdict: For this application (100 Hz streaming), BLE is feasible with large MTU but SPP is the better choice if:

  • Mains-powered (battery not a concern) → SPP for simplicity
  • Battery-powered with <1 kHz sample rate → BLE with 185-byte MTU
  • Battery-powered with >1 kHz sample rate → SPP (BLE bandwidth insufficient)

Real product example: Bosch BNO055 IMU offers both SPP and BLE modes. They recommend SPP for robotics (high-rate control) and BLE for fitness tracking (lower rate, battery critical).

Quantifying the battery life difference: SPP vs BLE GATT for 100 Hz accelerometer streaming

Using the worked example data (100 Hz, 6 bytes/sample), calculate the exact battery life impact:

Classic Bluetooth SPP (continuous connection):

Average current during 8 hours/day streaming: I_avg = 40 mA active × 1.0 duty cycle = 40 mA

Daily energy consumption: E_daily = 40 mA × 8 hours = 320 mAh/day

Battery life with 1000 mAh battery: Life_SPP = 1000 mAh / 320 mAh/day = 3.125 days

BLE GATT with 185-byte MTU (CI = 7.5 ms):

Radio duty cycle: 2 ms active every 7.5 ms: Duty = 2 / 7.5 = 0.267 = 26.7%

Average current: I_avg = (10 mA × 0.267) + (2 µA × 0.733) = 2.67 + 0.0015 ≈ 2.67 mA

Daily consumption (8 hours active): E_daily = 2.67 × 8 = 21.36 mAh/day

Battery life: Life_BLE = 1000 / 21.36 = 46.8 days

Battery life improvement: 46.8 / 3.125 = 15.0× longer with BLE

This 15× improvement shows that even for relatively high data rates (100 Hz = 4,800 bps), BLE’s duty-cycled operation provides dramatic power savings compared to SPP’s continuous connection. The key enabler is the 73.3% sleep time (1 - 0.267) between connection events.

  • Casual music listening: SBC at 328 kbps, about 200 ms latency, low battery impact, universal compatibility.
  • Audiophile music listening: LDAC at 990 kbps, about 200 ms latency, high battery impact, best for hi-res audio or mains-powered products.
  • Movie watching: aptX at 352 kbps, about 70 ms latency, medium battery impact, good for lip-sync below the 100 ms threshold.
  • Competitive gaming: aptX Low Latency at 352 kbps, about 40 ms latency, medium battery impact, useful when sub-50 ms response matters.
  • Phone calls: mSBC through HFP at about 60 kbps and 50 ms latency, low battery impact, optimized for voice rather than music.
  • Podcasts and audiobooks: SBC at 328 kbps, about 200 ms latency, low battery impact, best when runtime matters more than audiophile quality.

Codec negotiation flow:

When earbuds connect to a phone, they exchange supported codec lists and select the highest-quality mutually supported codec:

Phone: "I support SBC, AAC, aptX, LDAC"
Earbuds: "I support SBC, AAC, aptX"
Result: Connection uses aptX (highest quality both support)

Real-world trade-off example:

Sony WH-1000XM4 headphones support SBC, AAC, and LDAC:

  • With LDAC (990 kbps) on Android: 20 hours battery life
  • With SBC (328 kbps) on iPhone: 30 hours battery life

The 10-hour difference (50% more runtime) comes from LDAC’s 3× higher bitrate requiring more radio time and CPU for encoding/decoding.

Decision rule for product designers:

  • Always include SBC (mandatory for A2DP certification)
  • Add AAC if targeting iOS users (Apple prioritizes AAC > SBC)
  • Add aptX if targeting video/gaming use cases (<100ms latency needed)
  • Add LDAC only if battery is large or product is mains-powered (audiophile market)
  • Skip aptX HD unless targeting niche audiophile market (licensing cost not justified for mass market)

How much does codec choice affect wireless earbud battery life?

The Sony WH-1000XM4 battery life difference (20h with LDAC vs 30h with SBC) can be explained by calculating radio airtime:

SBC codec (328 kbps bitrate):

For CD-quality stereo (44.1 kHz, 16-bit), uncompressed rate is: Uncompressed = 44,100 × 16 × 2 = 1,411,200 bps = 1.41 Mbps

SBC compresses to 328 kbps, so Bluetooth must transmit: Radio time per second = 328,000 bits / 3,000,000 bps = 0.109 s = 10.9% duty cycle

Average current (10 mA active, 2 mA idle): I_SBC = (10 × 0.109) + (2 × 0.891) = 1.09 + 1.78 = 2.87 mA

LDAC codec (990 kbps bitrate):

Radio duty cycle: Radio time = 990,000 / 3,000,000 = 0.33 = 33% duty cycle

Average current: I_LDAC = (10 × 0.33) + (2 × 0.67) = 3.3 + 1.34 = 4.64 mA

Battery life ratio (800 mAh battery):

SBC battery life: Life_SBC = 800 / 2.87 = 279 hours ≈ 30 hours claimed

LDAC battery life: Life_LDAC = 800 / 4.64 = 172 hours ≈ 20 hours claimed

Power cost of higher quality: 4.64 / 2.87 = 1.62× more power for LDAC

This 62% power increase for 3× bitrate (990/328 = 3.0×) explains the 33% battery life reduction. For audiophiles, the improved quality justifies the trade-off. For casual listeners or travelers, SBC’s 50% longer runtime is more valuable.

Common Mistake: Using BLE HID Without Understanding Report Descriptor Complexity

The error: A developer building a custom BLE game controller implements HID over GATT (HOGP) but hardcodes a simple report descriptor, assuming “it’s just button states and joystick positions.”

What actually happens:

HID report descriptors are binary structures that define data layout, units, ranges, and mappings. A minimal game controller descriptor is 60-100 bytes of carefully structured data.

Simplified descriptor structure (actual binary is complex):

Usage Page (Generic Desktop)
Usage (Gamepad)
Collection (Application)
  Usage Page (Button)
  Usage Minimum (Button 1)
  Usage Maximum (Button 12)
  Logical Minimum (0)
  Logical Maximum (1)
  Report Count (12)
  Report Size (1)
  Input (Data, Variable, Absolute)  ← 12 bits for buttons

  Report Count (4)
  Report Size (1)
  Input (Constant)  ← 4 bits padding

  Usage Page (Generic Desktop)
  Usage (X)
  Usage (Y)
  Logical Minimum (-127)
  Logical Maximum (127)
  Report Size (8)
  Report Count (2)
  Input (Data, Variable, Absolute)  ← 2 bytes for joystick
End Collection

What the developer got wrong:

They copied a keyboard descriptor and changed “keyboard” to “gamepad” but didn’t update the usage codes. Result:

  • Windows recognized the device as a keyboard (not a gamepad)
  • Button presses sent as letter keys instead of gamepad buttons
  • Joystick axes were interpreted as mouse movements

Debugging nightmare:

  • Tested on Android: Worked (Android is lenient with HID descriptors)
  • Tested on iOS: Worked (iOS auto-detects based on UUIDs)
  • Tested on Windows 10: Failed (strict descriptor parsing)
  • Took 3 weeks to debug because Windows HID parser errors are cryptic

The fix:

Use a validated HID descriptor from a reference implementation:

  • USB-IF has sample descriptors for game controllers, keyboards, mice
  • Nordic Semiconductor’s nRF52 SDK includes working BLE HID examples
  • TI’s CC2640 SDK has template descriptors

Production impact:

A Kickstarter-funded BLE game controller (5,000 units manufactured) shipped with a broken HID descriptor. Windows users couldn’t use it. The company had to:

  • Release a firmware update (required users to use a smartphone app to reflash)
  • Provide full refunds to users who couldn’t update firmware
  • Lost an estimated 120,000 USD (refunds + support + reputation damage)

Lesson: HID descriptors are deceptively complex. Always test on all target platforms (Windows, macOS, Linux, Android, iOS) before mass production. Use existing validated descriptors as templates, not keyboard examples copied blindly.

9.12 What’s Next

You have now seen how Bluetooth profiles define interoperability across audio, input, data, and health use cases. The following chapters build on this foundation by putting profiles into practice and extending your understanding to the full BLE stack.

  • Bluetooth Hands-On Lab - Build a BLE sensor beacon from scratch using GATT services, notifications, and connection handling in Wokwi.
  • BLE GATT Services and Characteristics - Implement standardized GATT services (HRS, BAS, ESS) and design custom service schemas.
  • Bluetooth Security - Configure pairing modes, LE Secure Connections, and encryption to protect BLE profile data.
  • Classic Bluetooth vs BLE - Compare protocol stacks, power models, and profile availability to justify technology selection.
  • Bluetooth Protocol Stack - Analyze the full stack from PHY to ATT/GATT to understand how profiles are built on lower layers.