ツリーベリーパイコマンドラインBluetoothオーディオ接続
3451 ワード
依存インストール
sudo apt-get install bluez pulseaudio-module-bluetooth python-gobject python-gobject-2 bluez-tools
コマンドライン接続Bluetooth
#
sudo bluetoothctl
#
[bluetooth]# help
Menu main:
Available commands:
-------------------
advertise Advertise Options Submenu
scan Scan Options Submenu
gatt Generic Attribute Submenu
list List available controllers
show [ctrl] Controller information
select Select default controller
devices List available devices
paired-devices List paired devices
system-alias Set controller alias
reset-alias Reset controller alias
power Set controller power
pairable Set controller pairable mode
discoverable Set controller discoverable mode
agent Enable/disable agent with given capability
default-agent Set agent as the default one
advertise Enable/disable advertising with given type
set-alias Set device alias
scan Scan for devices
info [dev] Device information
pair [dev] Pair with device
trust [dev] Trust device
untrust [dev] Untrust device
block [dev] Block device
unblock [dev] Unblock device
remove Remove device
connect Connect device
disconnect [dev] Disconnect device
menu Select submenu
version Display version
quit Quit program
exit Quit program
help Display help about this program
export Print evironment variables
#
[bluetooth]# power on
Changing power on succeeded
#
[bluetooth]# agent on
Agent is already registered
#
[bluetooth]# scan on
#
[bluetooth]# devices
Device B8:18:54:02:4A:FF BT5.0 KB
Device 00:1A:7D:DA:71:11 DESKTOP-NRJSO9Q
Device 6B:2F:AB:45:4E:D2 BT5.0 KB
Device 10:9E:3A:37:8E:17 (2E:21)
Device 8E:65:6C:20:DF:E1 BT5.0 KB
Device 12:34:30:03:6D:F7 BT3.0 Keyboard
Device C2:5E:49:3C:92:A2 BT5.0 KB
Device 5C:1D:D9:61:0F:AA iPhone
Device 30:35:AD:AA:FE:4F 30-35-AD-AA-FE-4F
Device 6E:80:06:FD:33:F5 6E-80-06-FD-33-F5
#
[bluetooth]# pair 10:9E:3A:37:8E:17
[bluetooth]# trust 10:9E:3A:37:8E:17
[bluetooth]# connect 10:9E:3A:37:8E:17
#
[bluetooth]# exit
これでベリーパイ接続Bluetoothサウンドを完了