LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Trying to get a2dp device working... (http://www.linuxquestions.org/questions/slackware-14/trying-to-get-a2dp-device-working-642869/)

niidea 05-17-2008 10:17 AM

Trying to get a2dp device working...
 
Hi,

I recently acquired this bluetooth audio receiver and I'm trying to get it working without any success on an Asus F5VL laptop running Slackware 12.1.

The Asus bluetooth adapter seems to work properly:
Code:

root@mona:~$ lsusb | grep Bluetooth
Bus 003 Device 004: ID 0b05:1712 ASUSTek Computer, Inc. BT-183 Bluetooth 2.0+EDR adapter

The bluetooth service starts with this error:
Code:

root@mona:~$ /etc/rc.d/rc.bluetooth start
Starting Bluetooth subsystem:  hcid sdpdCan't open RFCOMM control socket: Protocol not supported
 rfcomm passkeys.

anyway I continue with:
Code:

root@mona:~$ hciconfig hci0 up
root@mona:~$ hciconfig -a
hci0:        Type: USB
        BD Address: 00:1D:60:68:E9:A8 ACL MTU: 384:8 SCO MTU: 64:8
        UP RUNNING PSCAN
        RX bytes:4382 acl:0 sco:0 events:131 errors:0
        TX bytes:1369 acl:0 sco:0 commands:76 errors:0
        Features: 0xff 0xff 0x8b 0xfe 0x9b 0xf9 0x00 0x80
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'BlueZ (0)'
        Class: 0x000100
        Service Classes: Unspecified
        Device Class: Computer, Uncategorized
        HCI Ver: 2.0 (0x3) HCI Rev: 0x77b LMP Ver: 2.0 (0x3) LMP Subver: 0x77b
        Manufacturer: Cambridge Silicon Radio (10)

It can detect the bluetooth audio device:
Code:

root@mona:~$ hcitool scan --class
Scanning ...

BD Address:        00:17:53:00:F0:FF [mode 1, clkoffset 0x000f]
Device name:        ANYCOM BAR-10
Device class:        Audio/Video, Uncategorized (0x240400)


I set the ANYCOM BAR-10 passkey (that is the only modification I made to the default Slackware configuration files) and then restart the bluetooth service:
Code:

echo -n "0000" > /etc/bluetooth/passkeys/default
root@mona:~$ /etc/rc.d/rc.bluetooth restart
Stopping Bluetooth subsystem:  pand dund rfcomm hidd sdpd hcid.
Starting Bluetooth subsystem:  hcid sdpdCan't open RFCOMM control socket: Protocol not supported
 rfcomm passkeys.

Following this How-to I create a ~/.asoundrc:
Code:

gauthier@mona:~$ cat .asoundrc
pcm.bluetooth {
  type bluetooth
  device 00:17:53:00:F0:FF
  profile "auto"
}

And I finally I tried to listen to some music:
Code:

gauthier@mona:~$ mplayer -ao alsa:device=bluetooth test.mp3
...
bt_audio_service_open: connect() failed: Connection refused (111)
[AO_ALSA] Erreur ouverture de lecture : Connection refused
Ne peut ouvrir/initialiser le périphérique audio -> pas de son.
Audio : pas de son
Vidéo : pas de vidéo

and it doesn't work...

Any idea??

Thanks very much.

niidea 05-18-2008 07:12 AM

Ok I found the solution of my problem.

I've just inserted those two modules and restarted the bluetooth init-script:
Code:

root@mona:~$ modprobe l2cap
root@mona:~$ modprobe rfcomm
root@mona:~$ /etc/rc.d/rc.bluetooth restart
Stopping Bluetooth subsystem:  pand dund rfcomm hidd sdpd hcid.
Starting Bluetooth subsystem:  hcid sdpd rfcomm passkeys.

Now I can ping the remote a2dp device:
Code:

root@mona:~$ l2ping 00:17:53:00:F0:FF
Ping: 00:17:53:00:F0:FF from 00:1D:60:68:E9:A8 (data size 44) ...
4 bytes from 00:17:53:00:F0:FF id 0 time 15.91ms
4 bytes from 00:17:53:00:F0:FF id 1 time 32.11ms
4 bytes from 00:17:53:00:F0:FF id 2 time 28.08ms
4 bytes from 00:17:53:00:F0:FF id 3 time 41.06ms
4 sent, 4 received, 0% loss

Finally, I had to edit /etc/bluetooth/audio.service this way:
Code:

[Bluetooth Service]
Identifier=audio
Name=Audio service
Description=Bluetooth Audio service
Autostart=true

Autostart was set to false by default.

It is now working fine with mplayer...


All times are GMT -5. The time now is 09:05 PM.