Command-line Bluetooth controller for device scanning, pairing, and management via BlueZ.
bluetoothctl bluetoothctl Sandbox: execFile · Timeout: 3600s
bluetooth.scan bluetooth.pair bluetooth.discover bluetooth.manage | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
scan | boolean | No | - | Scan for Bluetooth devices | scan, --scan |
advertise | boolean | No | - | Enable advertising | advertise, --advertise |
discoverable | boolean | No | - | Make adapter discoverable | discoverable, --discoverable |
pairable | boolean | No | - | Make adapter pairable | pairable, --pairable |
power | string | No | - | Power control (on/off) | power, --power |
agent | string | No | - | Register agent type | agent, --agent |
default-agent | boolean | No | - | Set as default agent | default-agent, --default-agent |
pair | string | No | - | Pair with device by MAC | pair, --pair |
trust | string | No | - | Trust device by MAC | trust, --trust |
connect | string | No | - | Connect to device by MAC | connect, --connect |
info | string | No | - | Show device info by MAC | info, --info |
list | boolean | No | - | List available adapters | --list |
show | boolean | No | - | Show adapter info | --show |
version | boolean | No | - | Show version | --version |
| Type | Description | MIME | Schema | Trust |
|---|---|---|---|---|
bluetooth.device.list | List of discovered Bluetooth devices | text/plain | - | verified |
bluetooth.device.info | Detailed device information | text/plain | - | verified |
Inputs
bluetooth.adapter Bluetooth adapter index
Outputs
bluetooth.device.list Discovered Bluetooth devices
bluetooth.device.info Detailed device attribute information
network_trafficnetwork_traffic Produces
bluetooth.device.listbluetooth.device.infoConsumes
bluetooth.adapter| Resource | Value |
|---|---|
| CPU | low |
| Memory | 16 MB |
| Network | none |
| Disk I/O | low |
Start interactive bluetoothctl session
bluetoothctl Enable scanning and power on
echo -e "power on\nscan on" | bluetoothctl List paired devices
bluetoothctl devices Show adapter information
bluetoothctl show Pair with a device
echo -e "pair AA:BB:CC:DD:EE:FF\nconnect AA:BB:CC:DD:EE:FF" | bluetoothctl Trust and connect
echo -e "trust AA:BB:CC:DD:EE:FF\nconnect AA:BB:CC:DD:EE:FF" | bluetoothctl Show device information
bluetoothctl info AA:BB:CC:DD:EE:FF Register agent and make pairable
echo -e "agent on\ndefault-agent\npairable on" | bluetoothctl bluetoothctl is the primary command-line interface for BlueZ, the official Linux Bluetooth protocol stack. It provides interactive and non-interactive control over Bluetooth adapters and devices.
| Command | Description |
|---|---|
scan on/off |
Enable/disable device discovery |
pair <mac> |
Pair with a Bluetooth device |
connect <mac> |
Connect to a paired device |
trust <mac> |
Mark device as trusted |
info <mac> |
Show detailed device information |
devices |
List all known devices |
show |
Show adapter information |