Bluetooth Connection Failed: Stream setup failed [ ubuntu / linux]
製作した公開中のアプリ
LINEの既読を付けないアプリ無既読
問題点
1)PCからA2DP接続ができない。2)システム設定のパネルが足りない(サウンドの設定とかできない)
ubuntu でBluetoothで音楽が聴きたくてBluetoothアダプターを購入
Amazon.co.jp: PLANEX Bluetooth USBアダプター Ver.4.0+EDR/LE(省エネ設計)対応 BT-Micro4: パソコン・周辺機器
色々設定が必要だったのでメモ残し。購入後そのまま指してペアリングしA2DP接続すると
Bluetooth Connection Failed: Stream setup failedとエラーがでる。(ペアリングは出来た)
2時間くらい試行錯誤してようやく解決。結論から言うとubuntu の audio.conf の設定でA2DPの設定がONになっていない。
モジュールが入ってない人はインストールから
$ sudo apt-get install pulseaudio-module-bluetooth
デフォルトだと以下のようになっている。
$ sudo gedit /etc/bluetooth/audio.conf
# Set to true to support HFP, false means only HSP is supported # Defaults to true HFP=true # Just an example of potential config options for the other interfaces #[A2DP] #SBCSources=1 #MPEG12Sources=0
以下のよう変更
1)A2DPの部分のコメントアウトを消す。
2)HFPをfalseにする。
# Set to true to support HFP, false means only HSP is supported # Defaults to true HFP=false # Just an example of potential config options for the other interfaces [A2DP] SBCSources=1 MPEG12Sources=0
モジュールの再読み込み
$ pactl load-module module-bluetooth-discover
接続できたー。
んでシステム設定のサウンドの出力先を変更すればいいだけなんだけど問題発生。
サウンド設定がない。それどころか色々消えてね?
なんで消えたのか分からないけどレムーブして再インストールした。
sudo apt-get install gnome sudo apt-get install gnome-panel
復活した。めでたしめでたし。