Bluetooth/Alsa
1. install packages
# apt-get install bluez-utils bluez-gnome bluez-alsa
2. setup ~/.asoundrc file
$ sudo hcitool scan
Scanning ...
XX:XX:XX:XX:XX:XX Stereo Headsetcat ~/.asoundrc
pcm.bluetooth {
type bluetooth
device "XX:XX:XX:XX:XX:XX"
profile "auto"
}3. connect bluetooth sound device (ex, Bluetoooth Headphone)
4. Let's play!
- mplayer
$ mplayer -ao alsa:device=bluetooth /tmp/hoge.mp3
- vlc
First, please change alsa-audio-device in ~/.config/vlc/vlcrc.
From:
# ALSA Device Name (string) #alsa-audio-device=default
To:
# ALSA Device Name (string) alsa-audio-device=bluetooth
Next, you can play sound data with vlc.
$ vlc /tmp/hoge.mp3
With Bluez >4.96 you also need to add:
- [General] section of /etc/bluetooth/audio.conf
Disable=Media Enable=Socket
