Bluetooth® Classic
Bluetooth Classic provides APIs for implementing traditional Bluetooth functionalities, including audio streaming, device communication, and data exchange over the Serial Port Profile. It supports multiple Bluetooth profiles, allowing ESP devices to act as source or sink in scenarios like wireless audio, remote control, and data transmission.
The Bluetooth Classic API provides the following main features:
Core protocol support (GAP, L2CAP, and SDP)
Serial data communication (SPP)
High-quality audio streaming (A2DP)
Media playback control (AVRCP)
Hands-free calling support (HFP)
Input device connectivity (HID host and device roles)
The Bluetooth Classic API in ESP-IDF is organized into the following parts:
Core Protocols
-
Generic Access Profile (GAP): Device discovery, pairing, and security management
-
Logical Link Control and Adaptation Protocol (L2CAP): Data multiplexing and channel management
-
Service Discovery Protocol (SDP): Discovers remote device services and attributes
Communication Profile
-
Serial Port Profile (SPP): Emulates a serial communication channel over Bluetooth for data exchange
Audio and Media Profiles
-
Advanced Audio Distribution Profile (A2DP): High-quality audio streaming (source and sink)
-
Audio/Video Remote Control Profile (AVRCP): Media playback control (play, pause, volume)
Hands-Free Profile (HFP)
Bluetooth HFP Define: Core definitions shared by HFP roles
Bluetooth HFP Client: Implements the hands-free unit role (e.g., headset, car kit)
Bluetooth HFP AG: Implements the audio gateway role (e.g., mobile phone)
Human Interface Device (HID)
Bluetooth HID Device: Implements peripheral roles such as keyboard, mouse, or game controller
Bluetooth HID Host: Implements the host role for connecting to remote HID devices
Each part typically includes an Overview, Application Examples, and API Reference, covering purpose, main functionality, sample usage, and detailed API documentation.