BobbyQuineのブログ(備忘録)

Linux関係の備忘録、その他タバコ、Vape関連なんかも。

Linux PC "を" Bluetooth Speaker としてつかう

ども

今回はLinux PCをBluetoothスピーカーとして使っていくよ

環境はArch LinuxBluetooth まわりで必要なものは前回のこれ↓で確認。多分今回のでは必要ないのも含まれてるけど

http://bobbyquine.hatenablog.com/entry/2019/01/15/204651

今回は作業中だったのでrootユーザーで進めていく。一般ユーザーでやるときは適宜sudo 使ってね。

参考にしたページ↓

https://wiki.archlinux.jp/index.php/Bluetooth#.E3.82.B3.E3.83.B3.E3.83.94.E3.83.A5.E3.83.BC.E3.82.BF.E3.81.AE.E3.82.B9.E3.83.94.E3.83.BC.E3.82.AB.E3.83.BC.E3.82.92_bluetooth_.E3.83.98.E3.83.83.E3.83.89.E3.82.BB.E3.83.83.E3.83.88.E3.81.A8.E3.81.97.E3.81.A6.E4.BD.BF.E3.81.86

 

設定

# pacman -S bluez bluez-utils

# vim /etc/bluetooth/audio.conf

以下を追加---------------------------------------------------------------

[General]
Enable=Source

------------------------------------------------------------------------------

 

起動、ペアリング

# systemctl start bluetooth

# bluetoothctl

シェルが変わる

[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on

同時にスマホBluetoothをONにする。

それっぽいのを探して

[bluetooth]# pair yourdevicesMacAdd

ペアリングしたらちゃんとコネクトもしてあげましょ

[bluetooth]# connect yourdevicesMacAdd

これで使えるようになったはず

 

以上