Wednesday, August 26, 2009

Bluetooth Stereo Audio (A2DP) Fixed on Macbook Pro Unibody

Well after 3 solid days of searching, downloading and modifying the various Bluetooth (BT) stacks out there, ive finally been successful in getting my Logitech Freepulse Wireless Headphones to work with my MBP 15" Unibody. Its worth it since i spend 1.5 hours each day travelling on the train, so this really comes in handy. Let me walk you through my experiences (so you can see what didnt work) and finally the resolution that did work.

What I have tried
The following list i have tried over the past few days without success:
  • Uninstalled Windows 7 64-bit and reinstalled 32-bit. See my previous post on the main reasons i did this, but it was also to see if the 32-bit drivers were any different from the 64-bit counterparts - they weren't and the same problems were still evident. My next step will be to revert to 64-bit again to reclaim my memory
  • Discovered that the MS BT stack is extensible, though documentation is so far sketchy at best. Contemplate writing an A2DP profile extension that would provide all Windows users with full A2DP support. I havnt completely disregarded this yet but it looks like it will be significant work to fully support all types of encoding, etc. This idea has been shelved pending my future experiences with the BT stack i now have working
  • Tried to use the seemingly excellent BlueSoleil BT stack 6.4.275. This doesnt support my current adapter out of the box, but using similar techniques to what i describe here, i was able to get it to install. Mixed experiences with this one - the first time after installing i managed to get the BT service to start but could not connect. Subsequently i was never able to get the service to start again - it would always freeze - and i mean FREEZE as in the computer was responsive but hung whenever i tried to shut it down or uninstall BlueSoleil. This did not give me a warm, fuzzy feeling at all. They seem to update frequently though and it does officially support Windows 7 now as well as several, older Apple BT modules so i will definitely try it again once they officially support my hardware
  • Tried to use the Broadcomm BT stack 6.3.0.200. Again, my hardware is not officially supported and this was made trickier by the fact that the installer seems to only be a stub that then downloads the components it detects as necessary. I didnt play around with this one too much and i will be revisiting it now that i have had some success
  • Tried to use the Broadcomm BT stack 6.0.1.5300. I found the full package of this version so i decided to give it a go. After tweaking the INF files i had no success in getting the installer to identify my BT module. This is a problem because if the Broadcomm package can not detect your module, it refuses to install at all, preventing further tweaking. I will likely focus on a later release of Broadcomm anyway
What worked
I ended up having success with the Toshiba BT stack 6.40.02. You can download the latest 32-bit and 64-bit versions from here. Again, the current version of the driver does not support my hardware out of the box, so use the following steps to get it to install:
  1. Extract the contents of the downloaded zip, which will result in another self-extracting executable called v64002T_20090623_x32.exe

  2. Extract the contents of this executable using a suitable program (my persontal favourite is Winrar, but 7-zip should also do it)

  3. Run the silent_install.bat batch file - this will perform a silent installation of the BT stack, so you wont see much on screen except probably a UAC confirmation (if you have it turned on) to confirm the operation. Doing this is better than running the installer normally, since if you do that, it tries to install the BT module as part of the installation. However that will fail because the INF file does not support the current hardware yet

  4. After the silent install has completed, browse to C:\Program File\Toshiba\Bluetooth Toshiba Stack\Drivers\tosrfusb and open the tosrfusb.inf file for editing

  5. Search for [Standard] to go directly to this section. You will see a bunch of entries with the following format:

    %DisplayName%=Section, HardwareID

    We need to add another entry for the BT module in our MBP. Add a new line at the top of the list that looks like this:

    %Apple.DeviceDesc%=TosrfUsb_Device, USB\VID_05AC&PID_8213

    If your Hardware ID for your BT module is different, simply subsititute it for the above. The process to find your hardware ID is outlined below.

  6. You now need to add a description of your BT module to the INF file. Go right to the bottom of the file and you will see a bunch of declarations with the following format:

    Key = "Description"

    We need to add another entry for the BT module in our MBP. Add a new line at the bottom of the list that looks like this:

    Apple.DeviceDesc = "Apple Built-in Bluetooth Module"

    You can actually make the text inside the quotes whatever you want - this is what will appear in the Device Manager for the device

  7. Save the INF file - under Windows 7, depending on your security settings you may be unable to save the file directly since this is a protected location. The easiest way around this is to either edit the file as administrator or save the file to the desktop, then move it back to the folder overwriting the old file

  8. Press the Windows key to open the start menu and type 'Bluetooth Settings' then press enter to start the Toshiba BT manager. This will trigger the Toshiba BT manager to go and discover the BT module in your MBP. With the settings added to the INF above, it should install the necessary drivers, set up the required service as well as shut down the standard MS stack for you. You may be required to restart your computer after this step.

  9. At this point the Toshiba BT stack is installed and ready to use. You can now right click the new BT icon in the system tray and pair with your BT devices


  10. I have discovered a small glitch with my Logitech Freepulse Wireless Headphones when using the Toshiba BT stack. Everytime i pair the headphones it prompts me for the password (0000). If i connect this way (ie headphones initiated the connection) i find the sound does not work at all! However if i initiate the connection from the computer, it pairs without asking for the password and the sound works flawlessly.

  11. By default stereo headphones are set to use low quality with the Toshiba BT stack. To change this, right click the heaphones icon in the Toshiba BT manager and select Detail. Change the Sound Quality setting to High Quality and click OK. Note you will have to reconnect your headphones for this setting to take effect if they are already connected

The only downside to using the Toshiba BT stack is that because this is a non Toshiba piece of hardware, the BT stack only runs for 30 days. I dont believe there is an option to purchase this stack either, unlike the BlueSoleil option. I will leave that limitation as an exercise for you to overcome. I will just say that there are options out there to overcome it.

Works On My Machine!
Please note that this should work on every single MBP 15" Unibody, since they are all the same hardware! However there is always a chance Apple will start using a different BT module in the near future. My machine identifier is MacbookPro5,4 (which can be found using the System Information tool that comes with Windows under the System Model field). The details of my BT module are as follows:

Manufacturer: Broadcom
Firmware Version: 162 (251)
Hardware ID: USB\VID_05AC&PID_8213
HCI Version: 2.1 ($4)
HCI Revision: 251 ($FB)
LMP Version: 2.1 ($4)
LMP Revision: 8610 ($21A2)
Composite Class of Device: 3670284 ($38010C)
Device Class (Major): 1 ($1)
Device Class (Minor): 3 ($3)
Service Class: 448 ($1C0)

Finding Your BT Module Hardware ID
The hardware ID is what is used inside the INF file to uniquely identify a particular configuration of hardware. To find your hardware ID, use the following steps. If it is not the same as mine above then substitute it at the appropriate points in the above steps and it should work. Please post your experiences in the comments!
  1. Go to the start menu and type "Device Manager" then hit enter to open the device manager.

  2. Browse to the Bluetooth section and expand it

  3. Double-click the Generic bluetooth device to open the properties (the name may be different if you have already installed a BT stack - eg Apple Built-in Bluetooth Module if you followed the above steps already)

  4. Go to the details tab

  5. Change the Property list to Hardware Ids

  6. The ID you are after will have the format USB\VID_xxxx&PID_yyyy

Troubleshooting
If it doesnt work, i would suggest looking at the following:
  • Uninstall any other BT stacks you have installed - this includes Widcomm, Broadcom, Toshiba and BlueSoleil. The standard MS stack will always be there but all the other packages seem to now handle it fine and perform the necessary steps to disable it as required
  • Try preventing the MS stack from detecting and installing its drivers by removing the bth.inf and bth.pnf files from C:\Windows\inf (back them up of course). This really shouldnt be necessary though and i have never had to do it with Windows 7
  • Try stopping the Bluetooth Discovery Service
  • Usual stuff like restarting, checking your device ID, etc
  • Pray to the BT gods ...
Final Words
I really, really wish MS would just include the A2DP profile in their built-in MS stack. To be honest i much prefer the built in stack over all the other implementations - it is much simpler, has better icons, integrates better into the various features of Windows 7 and seems to have a lot less services and processes needing to be run. It would be a simple DLL addition to provide the support and is something that OSX now provides out of the box since 10.5. I really cant believe in this day and age they are going to release Windows 7 without it, but this seems to be a reality that we have to work around.

11 comments:

Unknown said...

Saw your post and sang to the heavens at the thought of someone finally figuring this out! Then I tried it myself following every step to the letter and at the very end when I try to add a new connection, I get an error message that reads "Bluetooth is not ready". Womp womp. The only step I couldn't follow was where it asked to do a run a "silent_intall bat" as I don't know how. Could this be what's stopping me from enjoying beautiful music from my expensive stereo bluetooth headset, and gorgeous MBP?

Xca][ibur said...

Apologies for not replying sooner Carlos i have been away. Can you detail exactly where you were asked to run the batch file? If you give me the details im happy to try and walk through it with you and resolve the issue.

cheers

^Gecko^ said...

I've tried both of your methods but haven't been able to get it to work. The Bluesoleil came close and was running, but the software is not pairing with my headset.

Unknown said...

Thanks! This problem has been driving me crazy for over a month now. finally i have a working toshiba stack (7.10.04) on my win7 install on a mid-2009 unibody 13" mbp.
Had to try a few variations, though. the silent install method did not work for me - the cmd wndow seemed to hang.
finally, i installed directly from the extracted msi file. of course, drivers did not install.
edited the inf file as per your instructions (the pid, vid are same for the 13" mbp).
then triggered the driver install by choosing "add new connection". the progress bar simply hung and kept popping up the "plug in a BT device" alert.
so went into windows/ inf and renamed the two files you mention.
went to device manager and manually uninstalled the driver for the "generic bluetooth device". did a scan for hardware changes, and sure enough the bluetooth module showed up with an yellow alert for missing drivers.
manually installed the toshiba driver using the "have disk" option, said yes to install unsigned driver... and voila! it worked.
thanks again. sorry about the rambling post. hope it helps someone else.

Unknown said...

I require step by step instructions that can be followed exactly for Window Vista, without missing any step (even if that step might seem obvious to you guys)
Thanks.

Sur4Die said...

May 2011
This site is the only place that I could find that helped me solve my problem with pairing the Plantronics Backbeat 903+ with the MBP5.3 MacBook Pro (AKA mid2009 MBP). It even worked with A2DP.

Using the rough process outlined here of adding a new hardware descriptor to the inf file I was able to make this work easily with the newest Broadcom driver version 6.2.1.800.

There is no installer wrestling like with other drivers mentioned, just unzip the driver download and modify the inf before running setup.exe. The inf file to edit is located under Win32 or Win64 (depending on your OS)/brcmVista or brcmWin7 (again depending on OS. The inf file is named bcbtums--brcm.inf.

Instead of the [Standard] section as mentioned in the article, start in the [Manufacturer] section. and add the line %Apple.DeviceDesc%=TosrfUsb_Device, USB\VID_05AC&PID_8213 to the end of the section.

Then define the %Apple.deviceDesc% variable in the [Strings] section of the file using the following line Apple.DeviceDesc = "Apple Built-in Bluetooth Module".

Thats it, 2 edits. run the installer's setup.exe. It will complain that the signature is "invalid", but that's because we edited the contents of the driver prior to install, so it's OK.

one more thing, I think I had to hit the play/pause buton on my headset to get audio to start flowing once the PC was playing audio.

Robin Schönenberg said...

Hey great post! You describe exactly my problem, but i got an early 2011 MBP. I tried to modify the files with:

%Apple.DeviceDesc% =Tosrfusb_Device, USB\VID_05AC&PID_821A

and

Apple.DeviceDesc = "Apple Built-in Bluetooth Module"

but it won't work. Any additional advice? Thanks in advance! srobin

Robin Schönenberg said...

Finally it works! Installed BlueSoleil 7, modified the inf-files as described in the other post and now it works 100%. Thanks!

Marcelo NS said...

For bootcamp users with 2011 models (MBA, MBP) I have updated the solution here:

https://discussions.apple.com/message/17671314#17671314

or more comprehensive review here:

https://discussions.apple.com/message/17665845#17665845

Andy said...

Brilliant! Thanks very much. Worked perfectly for me on Windows 7 64-bit. I couldn't get the windows stack working at all! I tried loads of different versions of the broadcom, a couple of bluesoleil with no improvement other than being able to get really low quality mono working. This worked with full DVD-quality audio!

Anonymous said...

Not all devices have the same blue tooth. The one in question here is A2DP. This allows the blue tooth connection to send 2 channels to a device. Of course the device also needs to meet these specs. Standard ear pierces do not have A2DP because no one anticipated a person wanting to listen with one ear. To my knowledge these is no phone that can send music to a regular headset. The phone itself would have to process the A2DP into HSP ( headset profile ) and then send it.
http://www.latestone.com/headsets