Code Sample |
# modprobe snd-bluez-sco # lsmod Module Size Used by Not tainted snd-bluez-sco 7584 0 (unused) snd-pcm 53604 0 [snd-bluez-sco] snd-timer 13124 0 [snd-pcm] snd-hwdep 4484 0 [snd-bluez-sco] snd-page-alloc 5364 0 [snd-bluez-sco snd-pcm] snd 25412 0 [snd-bluez-sco snd-pcm snd-timer snd-hwdep] soundcore 3428 0 (autoclean) [snd] ... # cat /proc/asound/cards 0 [Headset ]: Bluez SCO - Bluez Headset Bluez Headset 1 |
Code Sample |
# hcitool cc 00:12:EE:A6:1D:F4 [use your bt address here] # hcitool auth 00:12:EE:A6:1D:F4 |
Code Sample |
# hciconfig hci0 revision hci0: Type: USB BD Address: 00:10:C6:56:F4:9F ACL MTU: 192:8 SCO MTU: 64:8 Build 1266 Chip version: BlueCore02-External Max key size: 128 bit SCO mapping: HCI [if you don't have this apparently you can give up now] # sdptool search --bdaddr 00:12:EE:A6:1D:F4 HS [enter your bt address here] Searching for HS on 00:12:EE:A6:1D:F4 ... Service Name: SonyEricsson Headset Service Service RecHandle: 0x10002 Service Class ID List: "Headset" (0x1108) "Generic Audio" (0x1203) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 1 [this is the information required] Profile Descriptor List: "Headset" (0x1108) Version: 0x0100 |
Code Sample |
# rfcomm bind 1 00:0A:D9:E8:4A:65 1 [bind rfcomm1 to bt channel 1] # mknod -m 666 /dev/rfcomm1 c 216 1 [create rfcomm1] # hciconfig hci0 voice 0x0040 |
Code Sample |
# bluezsco 00:12:EE:A6:1D:F4 1 [use your bt address here] # Device is 1:0 Voice setting: 0x0040 RFCOMM channel connected SCO audio channel connected (handle 49, mtu 64) Setting sco fd Done setting sco fd AT*ECBP=? AT+VGS=6 Sending up speaker change 6 AT+CLIP=1 AT+CSCS="UTF-8" AT*SEAM="HBH-610",13 AT+CLAN? [to close connection, press headset button, prompt returns &] AT+CKPD=200 |
Code Sample |
# alsamixer [allows to you adjust sound, microphone and loopback] # aplay -D plughw:Headset /path-to-file/music.wav [works but stops after a few secs] # aplay -B 1000000 -D plughw:Headset /path-to-file/music.wav [works] # mpg123 -o alsa /path-to-file/music.mp3 ... Directory: /path-to-file/music.mp3 Playing MPEG stream from music.mp3 ... MPEG 1.0 layer III, 192 kbit/s, 44100 Hz stereo ALSA snd_pcm_hw_params_set_period_size error: Invalid argument Can't find a suitable libao driver. (Is device in use?) |
Code Sample |
# modprobe snd-pcm-oss # mpg123 -o oss /path-to-file/music.mp3 # mplayer-nogui -ao oss /path-to-file/music.mp3 |