Bluetooth & BLE · Study deck

Bluetooth Profiles: Classic and GATT

This first route builds the profile model through Classic services and BLE GATT structure.

Radio Remi is your guide for this deck.

profiles
Radio Remi, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

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
iotclass.org

Major section

In 60 Seconds

Bluetooth Low Energy, or BLE, is the low-power Bluetooth family used by many sensors.

  • Firmware means the software stored on a device.
  • This runway does not prove range, privacy, or compatibility with every product.
  • Bluetooth profiles are interoperability standards that define how devices communicate for specific use cases.
  • Choosing the right profile determines your entire implementation approach.
iotclass.org

Major section

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.
iotclass.org

Major section

What Are Bluetooth Profiles?

Bluetooth profiles define how devices should behave for specific use cases.

  • 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.
  • Health: HRS, BLP, and GLS are BLE GATT profiles for structured sensor measurements.
Bluetooth profile ecosystem overview
Bluetooth profile ecosystem overview
iotclass.org

Major section

Serial Port Profile (SPP)

The useful mental model is still a cable replacement, but the review should remember the layers.

  • RFCOMM emulates EIA-232 style control and binary data transport over the Bluetooth baseband through L2CAP, so a terminal sees a simple reliable stream while the controller still handles hopping, framing, retransmission, and link supervision.

Why it matters

Discovery required: Users normally pair manually; NFC or QR-assisted pairing can reduce setup friction.

Serial Port Profile (SPP) Architecture
Serial Port Profile (SPP) Architecture
iotclass.org

Major section

Serial Port Profile (SPP) (continued)

Discovery required: Users normally pair manually; NFC or QR-assisted pairing can reduce setup friction.

  • That makes SPP a good fit for powered debug consoles and legacy UART bridges, but a weak fit for coin-cell sensors that only need occasional structured values.
  • Android Bluetooth examples use the same role split.
  • No BLE support: SPP will not work with BLE-only devices; use a BLE UART-style GATT service instead.
iotclass.org

Major section

Human Interface Device (HID)

The hierarchy connects GATT discovery to actual operating-system events: a link can be connected yet unusable if its report map, permissions, or subscriptions are wrong.

  • 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.

Why it matters

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

BLE HID GATT Service Structure
BLE HID GATT Service Structure
iotclass.org

Major section

Advanced Audio Distribution Profile (A2DP)

The role boundary determines which endpoint produces the encoded media stream and which endpoint receives and renders it, so it belongs ahead of any bitrate or latency choice.

  • During A2DP setup, the source and sink exchange supported codec capabilities and select the best mutually supported option.

Why it matters

A2DP enables high-quality stereo audio streaming.

A2DP Audio Streaming Architecture
A2DP Audio Streaming Architecture
iotclass.org

Major section

Hands-Free Profile (HFP)

Voice dial: HFP supports voice dialing; HSP does not.

  • Three-way calling: HFP supports it; HSP does not.
  • Audio codec: HFP supports CVSD and mSBC; HSP is limited to CVSD.
  • The processing blocks reveal why a connected call may still suffer echo, noise, or intelligibility failures.
HFP Voice Call Audio Processing Chain
HFP Voice Call Audio Processing Chain
iotclass.org

Deck summary

Key takeaways

Bluetooth Low Energy, or BLE, is the low-power Bluetooth family used by many sensors.

  • 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).
  • Bluetooth profiles define how devices should behave for specific use cases.
  • The useful mental model is still a cable replacement, but the review should remember the layers.
  • Discovery required: Users normally pair manually; NFC or QR-assisted pairing can reduce setup friction.
iotclass.org

Retrieval practice

Recall check 1 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q1You're designing a wireless debug console for an ESP32 embedded system. The console needs to stream continuous sensor data to a laptop terminal application. Which Bluetooth profile is most appropriate?

AA2DP - because it handles continuous streaming
BHID - because it's designed for device-to-computer communication
CSPP - because it emulates a serial port for UART-like communication
DBLE GATT with a custom service, to expose sensor values as typed characteristics
Show answer

Answer: C Correct!

iotclass.org

Retrieval practice

Recall check 2 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q2A BLE central device has just connected to a peripheral and wants to receive temperature readings automatically without polling. Which sequence of GATT operations correctly sets this up?

ARead the temperature characteristic repeatedly using ATT_READ_REQ at 1-second intervals
BDiscover the temperature characteristic, then write 0x0001 to its CCCD (UUID 0x2902) to enable Notify
CWrite 0x0001 directly to the temperature characteristic value to start streaming
DUse ATT_WRITE_CMD to set the characteristic's Notify property flag to true
Show answer

Answer: B Correct!

iotclass.org

Retrieval practice

Recall check 3 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q3A wearable fitness device needs to act as a remote control for a smartphone music player. Which HID implementation approach is most appropriate?

AClassic Bluetooth HID for lower latency
BBLE HID over GATT (Service UUID 0x1812) for power efficiency
CA2DP with AVRCP because it's designed for audio control
DCustom BLE GATT service for full control flexibility
Show answer

Answer: B Correct!

iotclass.org

Retrieval practice

Recall check 4 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q4A user complains that audio is out of sync with video when watching movies on their Bluetooth headphones. The headphones support SBC, AAC, and aptX. Which codec configuration would best resolve this issue?

ASBC at maximum bitrate (328 kbps) for best audio quality
BaptX for its lower latency (~70ms) while maintaining good quality
CAAC because it's the highest quality codec available
DLDAC for the highest possible audio quality
Show answer

Answer: B Correct!

iotclass.org

Retrieval practice

Recall check 5 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q5A car manufacturer is implementing a Bluetooth hands-free system. The system needs to support voice calls, voice-activated dialing, and display caller ID on the dashboard screen. Which profile should they implement?

AHSP (Headset Profile) - it's simpler and sufficient for voice calls
BHFP for calls, dialing, and caller ID
CA2DP with AVRCP - they're used for audio in cars
DSPP (Serial Port Profile) - it can transmit any data including voice
Show answer

Answer: B Correct!

iotclass.org

Print reference

Answers

Answer key.

  1. C · Correct!
  2. B · Correct!
  3. B · Correct!
  4. B · Correct!
  5. B · Correct!
iotclass.org