Overview of Bumble Bluetooth Stack components
mainBumble is a Python-based Bluetooth stack designed for emulation, testing, and experimentation. It supports both Bluetooth Low Energy (BLE) and Bluetooth Classic. The stack is built using Python coroutines and asyncio, meaning concurrent tasks run in a single thread for predictability.
Core components include:
- Controller: Exposes an HCI interface and connects to a link-layer bus. It can be virtual or physical.
- Host: Connects to a controller over HCI to send commands/ACL data and receive events.
- Link: The interface between controllers.
LocalLinkallows in-memory, in-process communication between multiple controllers in one app. - Channel Manager: Manages L2CAP channels.
- Security Manager: Handles pairing and bonding.
- GATT Client/Server: APIs for discovering services, characteristics, and handling reads/writes/subscriptions.
- SDP: Implements the Service Discovery Protocol for Bluetooth Classic.
- RFComm: Provides a bi-directional serial-port-like protocol.
- Device: A compound object that aggregates a Host, GATT Client, GATT Server, L2CAP access, and advertising/scanning capabilities.
- Profiles: High-level implementations of standard use cases like A2DP (audio streaming), HFP (headsets), and HID (input devices).