Tutorial: Bluetooth A2DP headphones (high quality stereo), Windows Vista, and cellphones
02-Aug-2007: Added information about using AVRCP with Winamp
24-Sep-2007: Added my experiences with the Toshiba Bluetooth stack
01-Oct-2007: Added information about WIDCOMM Stack 18.104.22.16800, Toshiba Stack 5.00.07 and 5.10.12, BlueSoleil Stack 5.0.5 build 178, an issue with installing the Broadcom/WIDCOMM 6.x drivers via the online web updater, and the References section.
Do you remember when Microsoft introduced Plug & Play back in Windows 95? They were already somewhat behind other platforms at the time with that concept, but, 12 years later, never let it be said that the art of messing around trying to get a simple piece of hardware to work on your PC has died! In this tutorial I’ll explain how to get Bluetooth Stereo headphones to work in Windows Vista before you throw them out of the window.
A2DP and Symbian OS phones
Most current phones (July 2007) don’t support the A2DP profile, which means they will use HSP (Headset Profile) to communicate with your headset instead. This leads to a very poor 8kHz sound quality in only one ear (vs the usual 44.1kHz stereo for CD-quality sound) and is definitely not suitable for listening to music.
Of the Nokia N-series range, only the N91 8GB Edition and N95 support A2DP out of the box at the time of writing. Older phones like the N73 can be upgraded with A2DP by installing the latest firmware at home via the Nokia Software Updater (firmware versions 4.0726.0.1 and onwards for the N73 support A2DP), but S60 2nd Edition phones such as the N70 have no A2DP support. Make sure your phone supports A2DP before you blow your hard-earned cash on Bluetooth headphones! To get Nokia firmware upgrades not available from your operator or territory, see my article on changing your phone’s product code.
Note: MSI have an application called BluePlayer which is an MP3 player that will stream using A2DP from any Symbian OS phone. However, it is locked down to work only with their i.Tech headsets, doesn’t allow other software on your phone (such as its native music player) to take advantage of A2DP, and only supports MP3 format files, not AAC, OGG or WMA. At a pinch, if you have a phone like the N70, you might want to consider investing in an i.Tech headset and BluePlayer.
Bluetooth A2DP headphones
Every Bluetooth device supports a set of so-called Bluetooth profiles, which define the capabilities of the device. Until recently, Bluetooth headsets have mostly been used for voice calls which only require a low-bandwidth mono signal, and this is handled by devices supporting the Headset Profile or HSP. There is now a new generation of products for streaming music via Bluetooth, and these take advantage of the Bluetooth Advanced Audio Distribution Profile or A2DP. A2DP, in a nutshell, allows a high quality stereo audio stream to be sent from your phone or PC to any Bluetooth headset with A2DP support.
Sadly, most phones currently on the market (July 2007) don’t suport A2DP (see Symbian OS sidebar), and will use HSP instead. This sounds truly awful, and they are not alone: Windows Vista doesn’t support A2DP out of the box either.
Setting up your Windows Vista Bluetooth stack
Microsoft has supplied a crippled Bluetooth stack (the software that allows your PC to communicate with Bluetooth devices) with Vista, with most profiles including A2DP removed; only very basic functions such as file transfer (FTP profile) implemented.
Fortunately, the stack can be replaced, and the first thing you need to do is download Broadcom’s (formally WIDCOMM) Bluetooth stack from Broadcom’s Bluetooth Software Download page. This works very nicely in Vista with all Bluetooth adapters, and adds all of the profiles that Microsoft left out including A2DP. When you install the Broadcom stack, your existing Bluetooth configuration will be removed and replaced, so you may have to re-pair any existing Bluetooth devices you’re using.
Pair your headphones
Turn on your headphones, right-click the blue and white Bluetooth icon in the system tray and choose Show Devices. You’ll see a window like that in Figure 1. The first step is to setup your PC and headphones to communicate with each other, which is done by a process known as pairing. Your headphones must be in discoverable mode in order to pair, check your manual to find out how to set this (on my Motorola S9 headphones, the device goes into discoverable mode automatically for 5 minutes after you switch them on, if it couldn’t connect to any audio source when first turned on; so if you’ve already used them or they’ve been on for more than 5 minutes, you’ll have to turn them off and on again).
Click Add… and Vista should find your headphones. Choose ‘Use the passkey provided in the documentation’ and enter the passkey for your headphones (often 0000).
As your headphones are paired, you’ll see numerous drivers being installed, these are drivers for each profile supported by the headphones. You should see Bluetooth Stereo Audio which is A2DP, you may also see Bluetooth Hands-free Audio (HSP), Bluetooth Hands-free telephony (HFP or Hands Free Profile, which allows you to make and receive calls via buttons on the headset) and Bluetooth Remote Control (AVRCP or Audio Video Remote Control Profile, which allows you to pause and seek songs etc. via buttons on the headset).
If your headphones can be connected to more than one device at a time, it is possible to use them simultaneously to listen to music on your PC and take phone calls and SMS alerts from your phone, switching between the two automatically as calls come in and are hung up. If you’re planning to use your headphones in this way, you need to right-click their icon in the Bluetooth Devices window, click the Services tab and uncheck Hands-free telephony, otherwise your phone won’t be able to connect to them. Note that if you do this, you can’t use the headphones for MSN/Skype voice chat.
Connect to your headphones
In the same window as Figure 1, click the Audio tab and you should see something like Figure 2. If Bluetooth Hands-free Audio shows as Connected, click Disconnect so you don’t get HSP-quality 8kHz mono sound. Click Bluetooth Stereo Audio and choose Connect. This will connect your headphones to Vista. Most headphones remember the last device they were connected to and will auto-reconnect next time you switch them on, so you should only need to do this once.
For some reason Vista can be a real bitch about connecting to the Bluetooth device so you may need to restart your headphones and/or Vista itself before you can finally establish a connection. If you have other Bluetooth devices like your cellphone nearby you can make life easier for yourself by disabling Bluetooth on them until you get your headphones hooked up to Vista. This is all part of the fun of getting them to work 🙂 Once you’ve got them connected, re-enable Bluetooth on your other nearby devices.
Some headphones don’t support Secure Connections
The instructions for my headphones say to turn off the Secure Connection option because the audio is sent unencrypted. In Windows XP, you have a checkbox for this on each device’s properties tab. Broadcom’s stack in Windows Vista enables encryption by default and the only way to turn it off is to edit the registry.
If you’ve tried restarting both your headphones and Vista several times, repaired them and still can’t get them to connect, press START+R, type
regedt32 and press Enter to bring up the registry editor. Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Widcomm\BTConfig\Applications, look through all the subkeys to find the one with a Name key of
Stereo Audio (0013 in my case), and change the Encryption subkey from 1 to 0. If you want to be thorough, you can also repeat this for the keys with name subkeys of Headset, Audio Gateway and Hands-free Audio, then repeat the same again for the
Close the registry editor, restart Broadcom’s Bluetooth stack (a nice way to do this is to pull your Bluetooth adapter out and in again, or press the Bluetooth radio toggle button on your laptop) and try to connect with your headphones again.
Make Vista auto-switch between Bluetooth audio and your normal soundcard when the Bluetooth headphones are switched off
Go to Control Panel -> Hardware and Sound -> Manage audio devices and you’ll get the window in Figure 3. Bluetooth audio is treated as two virtual soundcards with a single speaker output each – one for HSP and one for A2DP. If you can’t see two Bluetooth ‘soundcards’ in the Playback tab, right-click and ensure that ‘Show disabled devices’ and ‘Show disconnected devices’ are both ticked.
No sound will come out of your Bluetooth headphones until you set them as the default playback device even if they show as connected, so it’s important to complete this step.
Click the soundcard you want to use when your Bluetooth headset is disconnected and click Set Default then Apply. Then click Bluetooth Stereo Audio, Set Default and Apply again. Vista will handily remember the last default soundcard you chose, so that when your Bluetooth headset is disconected, playback will automatically revert back to your normal soundcard. When your headset is reconnected, playback will automatically be redirected into it. This way, you don’t have to keep changing the default playback device all the time.
Bluetooth Stereo Audio and Bluetooth Hands-free Audio only appear in the Playback tab of this window when the headphones are connected. When you turn them off, the Bluetooth playback devices will disappear and the default will revert to your preferred soundcard.
To get music to actually play via Bluetooth, you typically have to stop and restart the current track on your media player. In Winamp, pausing isn’t good enough, you literally have to click Stop then Play to get the music to stream properly; this is because it will keep streaming into the normal default soundcard until it realises the default has been changed. Some audio applications may require you to restart them altogether.
A2DP and Bluetooth 1.x
A2DP does not require Bluetooth 2.0 or EDR (Enhanced Data Rate) to function properly. It will work just fine with a Bluetooth 1.2 adapter or phone and there is no need to upgrade to Bluetooth 2.0 to use A2DP headphones. The bandwidth of a standard SBC-encoded A2DP stream at 44.1kHz stereo is 223kbits out of the 723kbits theoretical maximum available in Bluetooth 1.x (source: Bluetooth Specifications – Advanced Audio Distribution Profile).
But it skips every 15 seconds…
Yes, indeed it does, and this is the main puzzler that got me frustrated. At first I thought the problem was with my Bluetooth adapter, being Bluetooth 1.2 against my headphones’ Bluetooth 2.0 (see panel to the right). However when I tried them on Windows XP on the same machine, they worked perfectly.
The problem is the Microsoft and Broadcom Bluetooth stacks interfere with each other and degrade the overall Bluetooth performance of the machine. The solution is to turn off the Microsoft stack, which has some hefty drawbacks:
- My Bluetooth Places and the menu options on the Bluetooth system tray icon will stop working. This means you can’t access the Bluetooth Devices window to disconnect or reconnect your headphones if there’s a problem, or any other devices.
- Some applications only support Microsoft’s Bluetooth stack so you may for example lose the ability to communicate with your cellphone via Bluetooth.
If your headphones are constantly skipping like mine were, turning off Microsoft’s stack is the only way to go. First, stop it from launching automatically when you turn on your computer. Go to Start -> Control Panel -> Administrative Tools -> Services and scroll down to the service called Bluetooth Support as shown in Figure 4. Right-click the service, choose Properties and change the startup type from Automatic to Manual. Click OK.
To turn off Microsoft’s Bluetooth stack, click Stop the service in the left-hand part of the list of services while Bluetooth Support is still highlighted. You should find that within a few seconds of doing this, any skipping you experience in your headphones disappears; you don’t need to restart the current song for this to work. If the skipping persists, you may have a problem with range, location, interference and so on so check the rest of your setup. A2DP is entirely a software implementation so your Bluetooth adapter doesn’t need any special support in order for A2DP to work properly.
The finnicky setup aside, this stack conflict problem is the key reason why A2DP headphones are unusable by default in Vista. If you get this problem, try turning off Microsoft’s Bluetooth Support service before you start hacking up the registry.
Set up shortcuts to toggle Microsoft’s Bluetooth stack
You’ll probably find that you do need to access the aforementioned windows from time to time, especially when you’ve been out of range for a while with your headphones and Vista randomly decides not to let them connect automatically anymore. You can make some double-click shortcuts on your desktop to turn Microsoft Bluetooth Support on and off easily as follows:
- Press START+R, type
cmdand press Enter to bring up the command prompt.
cd desktopto move your working directory to the desktop.
echo net start bthserv > BTSupport-On.bat
echo net stop bthserv > BTSupport-Off.bat
Figure 5 shows what the command prompt should look like before you press Enter for the final time. This will create two files on your desktop, BTSupport-On and BTSupport-Off, which will enable and disable Microsoft Bluetooth Support respectively. When you need to access the Bluetooth Devices window, double-click BTSupport-On (expect your headphones to start skipping very soon), do what you need to do, then double-click BTSupport-Off so that just the Broadcom stack is left running.
While you’re making shortcuts, I recommend also creating shortcuts to Sound and Audio Devices and Bluetooth Devices on the desktop, so you can quickly access the relevant windows when things stop working as they should. I have them in a little cluster on my secondary monitor.
AVRCP (Bluetooth Remote Control) in Winamp
Getting the play, pause and track seek buttons to work on your Bluetooth headset is pretty simple, all you need to do is enter Winamp preferences (CTRL+P) and enable Global Hotkeys in the General Preferences section!
Connecting to a PC and a phone simultaneously
One of the brilliant redeeming features which make combo A2DP/HFP headsets a pleasure to use is that, if they support connections to more than one device at a time, you can connect your PC and your phone at the same time, have your music on loud yet never miss a call or SMS.
The trick to getting this to work in Vista is initially to disable Bluetooth on your phone altogether and just get A2DP working properly on your PC first, as described above. Once you’ve got this working smoothly, and made sure that Bluetooth Hands-free Audio reports itself as Disconnected in Bluetooth Devices, go ahead and pair your phone with the headphones. Again you will probably need to restart your headphones or press a button on them to put them into discoverable mode so that your phone can find them. Don’t disconnect them from Vista while you do this. Because the A2DP connection is already being used by the PC, the phone will only be able to establish a connection via HFP/HSP, which means the music will keep streaming from your PC, but when a call or text comes in, the audio will switch to your phone and you can take the call. The music on the PC keeps playing, but when you hang up the audio should automatically switch back from your phone to Vista. You should not need to restart the current track for this to work, it should be handled seamlessly by your headset.
Motorola S9 review
I use a pair of Motorola S9 headphones with a D-Link DBT-122 Bluetooth 1.2 adapter to listen to music in Vista, along with a Nokia N70 for taking calls. The sound quality is very good for the speaker size, battery life fairly average for Bluetooth headphones at 5-6 hours of continuous listening to music, it features track remote control and call answering/hold buttons on the side. The volume, call control (HFP) and track pause/seek buttons (AVRCP) all work fine. The headphones are comfortable to wear and come with three replaceable earbud sets of different sizes to fit your ears – they don’t go completely inside your ears so don’t get tiring to wear after a while. The range is quite poor but that may be because of the DBT-122 (the range when using them on my phone is better than the range from my PC). Overall they are quite pleasurable to use and I have no real problems with them once you’ve got them setup properly; switching between phone and PC music when a call comes in is automatic and works smoothly.
Using the Toshiba Bluetooth stack
The article above discusses using the Broadcom stack for A2DP. You can also use other stacks, including the Toshiba Bluetooth stack which is pre-installed on many laptops.
My experience with the Toshiba stack: setting up the headphones is easier, you just choose New Connection from the Bluetooth Settings window and follow the steps. Windows will automatically select the Bluetooth Audio Device as the default after you pair the headphones.
If you’re using HFP to connect to a phone as well for the call answering functionality, you must select Custom Mode instead of Express Mode when setting up the headphones connection, and only choose Audio Sink as the desired service. Otherwise, the Toshiba stack will take control of the headphones’ HFP connection whenever it can and your phone won’t be able to stay connected to the headphones.
AVRCP only works in Windows Media Player, not Winamp, even using the method described in the sidebar in this article, which is a major problem.
Nokia PC Suite causes problems with the playback, even if Machine A is playing music to your headphones, Machine B is running Nokia PC Suite and your phone is connected via Bluetooth to both machines. That basically means you can’t use your Nokia phone to do Bluetooth transfers or as a Bluetooth modem while you’re listening to music.
Unlike the Broadcom stack, you don’t have to mess around with disabling services to get it to work, and the software allows you to make a shortcut to your headphones on the desktop (causing them to connect) which makes it much quicker to recover when you get disconnected.
On my laptop, when you come out of sleep or hibernate mode, the headphones won’t connect anymore with the Toshiba stack, and you have to re-pair them or reboot. The Broadcom stack doesn’t seem to have that issue.
Basically, the latest version of the stack (August 2007) has all the same benefits and problems as mentioned above. One great benefit to A2DP in this version of the stack is that it will automatically revert your soundcard settings from/to Bluetooth Audio Device whenever the headphones are disconnected or reconnected. Although the previous version did this as well at the system level, it was not reflected in any currently running audio applications. This meant you either had to restart them or change the output in the application’s options window every time you disconnect or reconnect the headphones. In v5.10.12, the output is changed automatically in all the running applications when the connection state changes.
(if you use Winamp for music playback, this means the annoying ‘DirectSound output error’ dialog is gone forever!)
AVRCP still only works in Media Player.
BlueSoleil is reported by many to be the best, most reliable and feature-rich Bluetooth Stack available, including full Vista support, A2DP support and AVRCP for many players including Winamp, Foobar2000 and iTunes.
I tried v5.0.5 build 178 on a desktop with a D-Link DBT-122 USB Bluetooth adapter, and a Fujitsu Siemens LifeBook P1610D laptop with an integrated Toshiba Bluetooth adapter. In short, I wasn’t able to verify how well the stack worked, because on both machines the software simply reported “No Bluetooth hardware found.”
If your device is supported by BlueSoleil it may well be worth trying; unfortunately I wasn’t able to find a list of compatible adapters online. Please post your experiences with BlueSoleil below!
Broadcom Bluetooth stack (6.x version)
The article above discusses the 5.x release of Broadcom’s stack.
With version 22.214.171.12400 (released June 2007) I can report that the stack’s behaviour appears to be identical with all the same benefits and problems.
Broadcom / WIDCOMM stack update issues
Since I originally wrote the article, some users have reported that the online Broadcom update (see link in References below) downloads the software then fails to install. As d7racerx points out below, it seems you have to unplug your Bluetooth adapter before you run the updater, wait for it to ask you to insert it (before the update downloads) and then do so. I can verify that the download seems to fail when the device is already plugged in, and seems to succeed when you start with it unplugged. If you’re having problems downloading the Broadcom stack, please try this technique!
It really is the case, unfortunately, that using Bluetooth A2DP headphones in Vista is a pain in the ass. Not only are they unnecessarily complicated to configure, but if you go out of range for long enough to become disconnected, switching them off and on again doesn’t always reconnect you (although it usually does), and you still have to stop and restart the current track. Having to disable all the Bluetooth support tools to listen to music can be irritating if you are using laptops, phones and PCs with Bluetooth connections together, and for when you have to fix the headphone connection when it breaks.
Overall though, I would say that when it does work (which is the majority of the time), it works great and it’s very nice not to be tied to your desk with a headphone cable, which how I usually used to be tethered to my work 🙂 Auto-reverting to the non-Bluetooth defalt soundcard is very handy when the batteries run flat, and the seamless switching between PC and phone (a feature provided by the headset, not Vista) is great.
Vista’s Bluetooth support is clearly immature and needs alot of work in both usability and reliability, but we could say the same of most current generation cellphones since they mostly aren’t A2DP-ready either.
I hope you enjoyed the article. Please share your Bluetooth audio experiences below!
Dev-Hack: Uncrippling Bluetooth in Vista RTM – another approach to the Broadcom stack; I haven’t tried this myself, the page remarks that the technique doesn’t work for A2DP playback.