2019-11-19 12:01:22 +00:00
|
|
|
# bluetoothctl
|
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
> Manage Bluetooth devices from the command-line.
|
2021-07-09 15:45:55 +01:00
|
|
|
> More information: <https://www.npmjs.com/package/bluetoothctl>.
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
- Enter the `bluetoothctl` shell:
|
2019-11-19 12:01:22 +00:00
|
|
|
|
|
|
|
`bluetoothctl`
|
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
- List all known devices:
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
`bluetoothctl devices`
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
- Power the Bluetooth controller on or off:
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
`bluetoothctl power {{on|off}}`
|
|
|
|
|
|
|
|
- Pair with a device:
|
|
|
|
|
|
|
|
`bluetoothctl pair {{mac_address}}`
|
2019-11-19 12:01:22 +00:00
|
|
|
|
|
|
|
- Remove a device:
|
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
`bluetoothctl remove {{mac_address}}`
|
|
|
|
|
|
|
|
- Connect to a paired device:
|
|
|
|
|
|
|
|
`bluetoothctl connect {{mac_address}}`
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
- Disconnect from a paired device:
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
`bluetoothctl disconnect {{mac_address}}`
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
- Display help:
|
2019-11-19 12:01:22 +00:00
|
|
|
|
2021-11-10 22:42:48 +00:00
|
|
|
`bluetoothctl help`
|