bluetoothd
Manages Bluetooth devices and connections
TLDR
Start the daemon
Start the daemon, logging to stdout
Start the daemon with a specific configuration file (defaults to /etc/bluetooth/main.conf)
Start the daemon with verbose output to stderr
Start the daemon with verbose output coming from specific files in the bluetoothd or plugins source
SYNOPSIS
bluetoothd [OPTIONS]
PARAMETERS
-d, --debug
Enables verbose debug output to the console, useful for troubleshooting issues.
-n, --nodetach
Prevents the daemon from detaching from the controlling terminal, allowing it to run in the foreground. Primarily for debugging.
-p, --pidfile
Specifies an alternative path for the PID file. Usually managed by systemd for service instances.
-C, --compat
Enables compatibility with older, deprecated APIs. May be required for legacy applications or scripts.
-E, --experimental
Activates experimental interfaces, which are subject to change and may not be stable.
-P, --plugin
Loads a specific plugin module, extending bluetoothd's capabilities. Can be used multiple times.
-v, --version
Displays the version information of the bluetoothd daemon and exits.
-h, --help
Shows a brief help message with available command-line options.
DESCRIPTION
bluetoothd is the official Linux Bluetooth protocol stack daemon, a fundamental background service for all Bluetooth operations. It implements the BlueZ stack, handling Bluetooth adapter initialization, device discovery, pairing, connection management, and service advertisement.
It provides a D-Bus API, which is the standard interface for applications (like desktop environments, audio players, or bluetoothctl) to interact with Bluetooth functionality. bluetoothd supports both Classic Bluetooth (BR/EDR) and Bluetooth Low Energy (LE) profiles, enabling features such as audio streaming (A2DP), hands-free telephony (HFP), GATT operations, and many other Bluetooth-dependent services.
Without bluetoothd running, no Bluetooth device can be detected, paired, or connected on a Linux system, making it an indispensable component for wireless connectivity.
CAVEATS
bluetoothd requires the necessary kernel modules (e.g., bluetooth, btusb) to be loaded and a functional Bluetooth adapter. It typically runs as a system service (e.g., via systemd's bluetooth.service) and needs root privileges to initialize, though it often drops privileges after startup. Incorrect configurations in /etc/bluetooth/main.conf or hardware issues can prevent the daemon from starting or operating correctly. Due to its nature as a wireless communication service, proper security practices are crucial to prevent unauthorized access or exploits.
D-BUS INTERFACE
The primary means by which applications and system components communicate with bluetoothd is through its D-Bus API. This standardized inter-process communication system allows for a flexible and secure way to manage Bluetooth devices, services, and profiles across the system.
CONFIGURATION FILES
The behavior of bluetoothd is largely controlled by configuration files located in /etc/bluetooth/. The main configuration file is /etc/bluetooth/main.conf, which allows administrators to set global parameters, enable/disable profiles, define security policies, and manage various aspects of Bluetooth operation.
SYSTEMD INTEGRATION
On most contemporary Linux distributions, bluetoothd is managed as a systemd service, typically named bluetooth.service. This allows for seamless startup at boot, controlled shutdown, and easy management (start, stop, enable, disable) using the systemctl command, integrating it deeply into the system's service management framework.
HISTORY
bluetoothd is a central component of the BlueZ project, which has been the official Linux Bluetooth protocol stack for many years. Its development has closely followed the evolution of Bluetooth specifications, from early versions supporting basic connections to modern iterations with Bluetooth Low Energy (BLE) and advanced profiles. Historically, BlueZ offered more direct socket interfaces, but modern bluetoothd primarily communicates with applications via a robust D-Bus API, enhancing stability and security.