btmgmt

Low-level Bluetooth adapter management tool

TLDR

Start interactive mode
$ btmgmt
List Bluetooth adapters
$ btmgmt info
Use specific adapter
$ btmgmt -i [hci0] info
Power on adapter
$ btmgmt power on
Power off adapter
$ btmgmt power off
Start discovery
$ btmgmt find
Enable monitor mode
$ btmgmt -m
Run command with timeout
$ btmgmt -t [10] find

SYNOPSIS

btmgmt [options] [command]

DESCRIPTION

btmgmt is an interactive Bluetooth management tool that issues commands to the kernel using the Bluetooth Management socket. It provides low-level control of Bluetooth adapter settings, discovery, and pairing functionality.The tool is part of the BlueZ Bluetooth stack and uses the management interface available since Linux kernel 3.4.

PARAMETERS

-i, --index adapter

Specify adapter index (e.g., hci0)
-m, --monitor
Enable monitor output
-t, --timeout seconds
Timeout for non-interactive mode
-v, --version
Display version
--init-script file
Run commands from init script
-h, --help
Display help

COMMANDS

info

Show adapter information
power on|off
Control adapter power state
find
Start device discovery
pair address
Pair with device
unpair address
Remove pairing
disconnect address
Disconnect device
con
List connections

INSTALL

sudo apt install bluez
sudo dnf install bluez
sudo pacman -S bluez
sudo apk add bluez-btmgmt
sudo zypper install bluez
brew install bluez
nix profile install nixpkgs#bluez

CAVEATS

Some commands require net-admin capability or root privileges. This is a low-level interface meant for bluetoothd; applications should use D-Bus APIs instead. Direct use may cause unexpected behavior with the Bluetooth daemon.

SEE ALSO

bluetoothctl(1), hciconfig(1), hcitool(1), bluetoothd(8)

RESOURCES

Source code