SakamonWeb
New
Tools
Index
Edit
RaspberryPI/YBT-22BT
Raspberry PI でBluetoothスピーカーを鳴らす。 デバイスにはYBP-22BTを利用。 <<インストール>> bluezパッケージとalsaのbluetooth関連のパッケージをインストールする <pre> # apt-get install bluez bluez-alsa </pre> bluezのaudio設定を行う。 General 設定にEnable行を追加。 <pre> # vi /etc/bluetooth/audio.conf ... [General] Enable=Source,Sink,Headset,Gateway,Control,Socket,Media AutoConnect=true ... </pre> 再起動。 <<ペアリング>> YBP-22BTの電源を入れて10秒ほど待ってから、Scanしてペアリングを行う。 <pre> # hcitool scan # bluez-simple-agent hci0 xx:xx:xx:xx:xx:xx </pre> 次回から自動接続できるようにしておく <pre> # bluez-test-device trusted xx:xx:xx:xx:xx:xx yes # bluez-test-audio connect xx:xx:xx:xx:xx:xx </pre> <<再生>> alsaの設定ファイル ~/.asoundrc を作成する。 <pre> $ vi ~/.asoundrc pcm.ybp22bt{ type bluetooth device "xx:xx:xx:xx:xx:xx" profile "auto" } </pre> mp3を再生する。 <pre> $ mplayer -ao alsa:device=ybp22bt sample.mp3 </pre>
Sign:
freeze
sage
Attachment
New:
Sign:
Rename
Title:
Sign: