btmgmt
Manage Bluetooth controllers
SYNOPSIS
btmgmt [options] [{command [params]}]
PARAMETERS
-i, --index=INDEX
Select controller by index (default: 0)
-b, --no-paging
Disable paging output beyond 24 lines
-n, --timestamp
Prefix lines with timestamps
-t, --tty=TTY
Specify controller by TTY path
-V, --version
Print version information
-h, --help
Show usage help
DESCRIPTION
btmgmt is a command-line utility from the BlueZ Linux Bluetooth stack, providing low-level access to Bluetooth controllers via the kernel's generic Management (MGMT) socket interface.
It enables precise control over adapter states, discovery, scanning, advertising, pairing, security settings, and more. Ideal for developers, testers, and scripting, it supports multiple controllers by index and outputs machine-readable responses.
Key uses include enabling/disabling power, setting discoverable/connectable modes, LE scanning/advertising, reading controller info (version, features, LE states), managing bonds/keys, and handling events like device found or passkey requests. Unlike interactive bluetoothctl, btmgmt is non-interactive and raw, perfect for automation.
Most operations require root privileges. It's crucial for embedded systems, debugging HCI issues, or customizing Bluetooth behavior beyond D-Bus APIs.
CAVEATS
Requires root for most commands. Not all commands supported on every controller/hardware. Output is verbose; parse carefully for scripts.
COMMON COMMANDS
info
power on|off|auto
find [le|bredr]
discov on|off
pair <BDADDR>
set-powered on|off
set-connectable on|off
set-discoverable on|off
EXAMPLES
btmgmt info — Show controller details.
btmgmt -i 0 power on — Power on first controller.
btmgmt find — Start device discovery.
HISTORY
Introduced in BlueZ 4.93 (2012) with MGMT kernel API for modern Bluetooth. Expanded in BlueZ 5.x for BLE (Bluetooth 4.0+), with ongoing updates for Bluetooth 5.x features like extended advertising.
SEE ALSO
bluetoothctl(1), hciconfig(8), hcitool(8), btmon(1), bluetoothd(8)


