SDB:Bluetooth headphones

Jump to: navigation, search

Setup bluetooth headphones for openSUSE 11.2

Easy setup in GNOME

To setup Bluetooth (BT) headset for openSUSE 11.2 is easy now in GNOME. Connect the headset in BT applet "Set up new device" and see that the headset will appear in the Hardware tab in the "Sound preferences" of the volume applet. In the Output tab you can select where the sound output will be directed.

Setup bluetooth headphones for openSUSE 11.1 HOWTO

Introduction

We are going to setup the Bluetooth (BT) headset for openSUSE 11.1. In this system the PulseAudio (PA) 0.9.12 is the default sound system. There is no easy way to setup the BT headset with the PA 0.9.12 now, so we will use the BT headset with the ALSA sound-system while preserve the coexistence with the PA as the default sound-system. The BT headset in this case can be used only with the applications that can direct the sound output to the specific ALSA device.

First we will pair the BT headset. Then we will prepare the configuration file ~/.asoundrc for the ALSA sound-system and then we will test the sound output to the BT headset. If something goes wrong please refer to the troubleshooting section and check that all packages are installed.

Unfortunately there is an annoying issue which you can observe if you try to use the BT headset together with other BT devices, typically with BT keyboard and mouse. In this case the sound in the BT headset is being interrupted when the BT mouse is moved or when you type the keyboard. This problem persists also when 2 BT adapters are used with one of them dedicated to the audio transfer. The BT architecture takes the specifics of the audio transfer into the account and provides the SW developer with a dedicated audio channel. This problem is not solved yet.

You can also observe that the video and audio are not synchronized when you play a movie. The BT headset wants to avoid the interruption by buffering the sound thus causing the delay.

Find the BT headset address

It is a good idea to store the BT address of the BT headset in a text-file, so we can cut&paste the address in the future, when we need it. To do it, we put BT headset into the pairing mode. This is device specific, so we refer to the device user's guide for instructions how to do it. Then we open a terminal and as a root issue the command:

       # hcitool scan
       Scanning ...
       00:1F:3A:FB:96:B2       linux-8hlf-0
       00:1E:4C:D5:E2:92       linux-09eo-0
       00:13:17:72:CD:FF       Jabra BT620s

Here we see the BT headset "Jabra BT620s" with the BT address "00:13:17:72:CD:FF". To store the addresses in a text file we can cut&paste the output from the screen. We can also use the command:

       # hcitool scan > bt.devices

Pairing the BT headset

The BT headset pairing was tested in KDE and GNOME, but generally the usage of the BT headset does not depend on the display manager used.

As of this writing there is a problem with the kbluetooth4 which is broken and does not do the pairing for KDE. In this case install the bluez-gnome package and start the bluetooth-applet which works well also in KDE.

If the bluetooth-applet is running and the BT adapter is switched on there is a BT icon in the KDE/GNOME panel, which invokes the interface to the BT applet. This BT applet enables the user to control and to communicate with the BT subsystem. To setup the new device, we set the new device into the pairing mode. This is device specific, so please refer to the device user's guide for instructions how to do it. Then we click the BT applet icon and select the "Setup new device" item. After reading the Introduction we click the "Forward" button. Then we wait till all devices are discovered and the symbolic names appears. Then we select the new device from the list. In the case of the BT headset the PIN is "0000" by default and we shall see in the Summary the message "Successfully configured new device". We click the "Close" button.

Configuration of the ALSA sound-system

Sound output which is sent to the ALSA can be redirected to the Pulse Audio (PA) by the following setting in the configuration file /etc/asound.conf or ~/.asoundrc.

       # cat ~/.asoundrc
       pcm.!default {
               type pulse
       }
       ctl.!default {
               type pulse
       }

Now we can test the sound system with the command:

       # aplay /usr/share/sounds/startup3.wav

and we should hear the sound from the speaker of the computer.

Configuration of the BT headset with the ALSA sound-system

To use the BT headset we add the following section to the file ~/.asoundrc:

       pcm.btheadset {
               type bluetooth
               device "00:13:17:72:CD:FF"
       }

In this case we used the BT address "00:13:17:72:CD:FF" of the "Jabra BT620s" which we found in the section before. Please replace the address with the one of your specific BT headset. Then we test the BT headset with the command:

       # aplay -D btheadset /usr/share/sounds/startup3.wav

and we should hear the sound from the BT headset.

So by default the audio output of the applications which use the ALSA sound-system is redirected to the PA. Then we can set the PA volume and mix the sound with the "Volume control" in the GNOME panel. But we can not set the volume of the BT headset with the "Volume control" in the GNOME panel. Instead we use volume control on the BT headset.

For a list of supported players please refer to the wiki: http://wiki.bluez.org/wiki/HOWTO/AudioDevices#SupportedPlayers Please note that the BT headset in this web page is named "bluetooth". We use the symbolic name "btheadset" in our examples instead.

For example to use the BT headset with the mplayer we can use the command:

       # mplayer -ao alsa:device=btheadset /usr/share/sounds/startup3.wav

Troubleshooting

(a) check if all packages are installed

       - bluez-alsa

(b) check your BT controller.

       # hciconfig -a
       hci0:   Type: USB
       BD Address: 00:1E:3D:F7:74:C4 ACL MTU: 1021:8 SCO MTU: 64:1
       UP RUNNING PSCAN
       RX bytes:205947 acl:9945 sco:0 events:3989 errors:0
       TX bytes:4958866 acl:6221 sco:0 commands:102 errors:0
       Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x83
       Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
       Link policy: RSWITCH HOLD SNIFF PARK
       Link mode: SLAVE ACCEPT
       Name: 'linux-h4dc-0'
       Class: 0x0a010c
       Service Classes: Networking, Capturing
       Device Class: Computer, Laptop
       HCI Ver: 2.1 (0x4) HCI Rev: 0xda LMP Ver: 2.1 (0x4) LMP Subver: 0x2192
       Manufacturer: Broadcom Corporation (15)

(c) check your alsa configuration file

       # cat ~/.asoundrc
       pcm.!default {
               type pulse
       }
       ctl.!default {
               type pulse
       }
       pcm.btheadset {
               type bluetooth
               device "00:13:17:72:CD:FF"
       }

(d) about chipset. If you can choose "Cambridge silicon radio".

HW Compatibility

Audio transfer without interruption was observed even when other BT devices were used with the following HW. Both BT controller and BT headset needs to be in the list.

This HW works

controller:

  * Vendor 0x1668 Actiontec Electronics, Inc. [hex] Product 0x0441 IBM Integrated Bluetooth II

headset:

  * EU3C (Cambridge Silicon Radio)

This HW does not work

This is the list of HW which cause the sound tranfer to be interupted.

controler:

  * Vendor: usb 0x0a5c "Broadcom Corp." Device: usb 0x2145 "ThinkPad Bluetooth with Enhanced Data Rate II"
  * Vendor: usb 0x044e "Alps Electric Co., Ltd" Device: usb 0x3017 "BCM2046 Bluetooth Device"
  * Vendor: usb 0x0a5c "Broadcom Corp." Device: usb 0x2101 "

headset:

  *Jabra BT620s

Notes

(a) important note

(b) BT headset speakers work with Skype 2.0.0.72-suse. One has to set the "Sound devices" -> "Sound Output" to the symbolic name of the BT headset from the ~/.asoundrc . "Sound In" can not use the BT device at present. "Make a test sound" sends the sound to the device set in "Ringing". "Make a test call" works.

(c) Smplayer 0.6.6 can be used with BT headset. Set "Options" -> "Preferences" -> "Audio" -> "Output driver" to "User defined" and set the option to alsa:device=btheadset . This is the mplayer -ao option syntax as described in the "Configuration of the BT headset with the ALSA sound-system" section.

FAQ

How can I install the latest PulseAudio package ?

You can install the latest pulseaudio package from the GNOME:Factory repository [a]. First download the file GNOME:Factory.repo from [a] and then as a root add the repo "$ zypper ar GNOME:Factory.repo" . You should be able to install the latest pulseaudio package via zypper or Yast.

[a] http://download.opensuse.org/repositories/GNOME:/Factory/openSUSE_11.1/

Is it possible to make any kind of link from a /dev/ entry to the btheadset to make the headset visible to any application ?

No. Link does not help to make the bluetooth (BT) headset visible to application. The BT sound devices do not create /dev/ entries on their own. At present the BT sound devices in openSUSE communicate with ALSA soundsystem only. Thus you can use BT headset with applications which support the output configuration to specific alsa device (specified in ~/.asoundrc) [b]. If your application does not allow this kind of configuration you can also try to set the default alsa device to your BT headset too. This will help of course only if this application sends the output to alsa.

[b] http://wiki.bluez.org/wiki/HOWTO/AudioDevices#SupportedPlayers

How to make the bt headsets alsa default device ?

This section in .asoundrc does it. For details go to reference [2].

      pcm.!default {
             type bluetooth
             device "00:13:17:72:CD:FF"
      }

External links

[1] MediaWiki Handbook]

[2] .asoundrc configuration files for ALSA drivers