CSR bluetooth dongle killed by Windows update

An optional update for my USB bluetooth dongle (which I used to connect my Logitech bluetooth keyboard) recently appeared on one of my Windows 7 machines. Trustingly, I proceeded with the update, only to find that afterwards, my keyboard no longer worked! And there was no blueooth icon in the system tray to inspect the status of bluetooth devices. After googling, I found out that this update has killed many people’s bluetooth hardware and the solution is to uninstall it an go back to the default Windows drivers. The solution that worked for me (and others) detailed on this thread, which I will summarise (paste) here:

To accomplish this select “Update Driver Software” from “CSR BlueCore Nanosira” (the working device), then select “Browse my computer for driver software” and then “Let me pick form a list of device drivers on my computer”. In my case Windows presents the new driver from CSR (“CSR BlueCore Nanosira”) and two generic drivers as you can see in screenshot 2.

I selected “Generic Bluetooth Radio” from the list and clicked OK. Then I had “Generic Bluetooth Radio” and “Microsoft Bluetooth Enumerator” back under “Bluetooth Radios” and the Bluetooth icon appeard in the taskbar again. After that I was able to use my bluetooth mouse and keyboard again (even without pairing it again).

Thanks to davewebb8211!

Then you will want to hide that nasty windows update as follows:

bluetooth-update

Using TuneLink with Meridian on Android

I tried some of those cheap FM-transmitters to allow me to play music from my Android in my non-bluetooth enabled car stereo, and no suprises, you get what you pay for. The major problem was the fact that when you get into your car, you have to find your phone, connect it and hit play etc. TuneLink Auto automatically connects to your phone via bluetooth, wherever it is in the car, and then the TuneLink app on the phone starts the music player once connected. So there’s nothing for you to do, but just turn on your ignition and go. It works pretty well, but I had a problem where I didn’t want to use the standard music player on my phone anymore, instead I wanted to use Meridian due to its capability to browse folders (not all my music has ID3 tags that are accurate). In order to make TuneLink activate Meridian to play, it sends the Android headset command (AVRPC), and you have to enable a setting in Meridian to register for receipt of this command. Steps:

  1. Open Meridian
  2. Press Menu, then Preferences
  3. Go to Music and check the Headset Buttons option.

Now TuneLink will trigger Meridian to play automatically.

Bluetooth Service Connector

Bluetooth is still a relatively new technology when it comes to Windows. Although Windows 7 now has a reasonably decent bluetooth stack baked-in, it’s certainly not bug-free. It is not straightforward to control connection of bluetooth services, such as AudioSink, HeadSet, RemoteControl etc. And depending on how ‘dumb’ your bluetooth device is, your only option to get it connected to Windows in some cases (e.g. your device was last connected to a different host, such as your phone) is to completely uninstall and re-discover the device, as discussed on this thread. Weeeak.

I’ve written a small utility that may help with issue (it works for me, but I’ve only tested on my own bluetooth headphones – Sony DR-BT50). It works in conjunction with another utility I recently posted (that allows a program to set the default audio device), and provides control over connecting / disconnecting the available bluetooth services for all your paired bluetooth devices in Windows. It also provides a shortcut specifically for bluetooth audio devices which automates the process of getting a frustratingly silent pair of headphones / speaker to spring into life with a single click.

Download the utility here. I hope it works for you!

Pairing SPP bluetooth devices with Android phones

Update: I have turned the below class into an app which I’ve made available in the Google Play Store called Bluetooth Class Zero. It is a simple application which just enables pairing with bluetooth class zero devices without having to root & patch your phone.

————————————–

I bought a Bluetooth Bee from Seeed Studios, which is an SPP (Serial Port Profile) bluetooth device, with the intention of writing an app for Android that communicates with a remote data logger. Unfortunately, it turns out that there’s a bug in the BroadComm bluetooth stack that is used by most Android phone manufacturers (LG, HTC, Samsung are affected, but not the Google Nexus phones) that prevents discovery to this and all other bluetooth devices that report their Class of Device (CoD) code as 0x00. This is the case for many SPP bluetooth devices, and SPP is probably the most common bluetooth profile (at least it’s the most basic – just straight serial comms) so this bug is pretty nasty.

Basically, if you perform a scan for devices, your SPP device will not show up, and in the logs you will see:

ERROR/DTUN_HCID4(663): Device [00:18:E4:0C:6E:CA] class is 0x00 – skip it.

The code for the Broadcom bluetooth stack is open source, so the bug is plain for all to see here. The bug has been reported on StackOverflow and elsewhere.

Until Broadcom and/or all users of their bluetooth stack fix this issue (by simply removing the IF block that skips devices whose CoD is 0x00), the only way to connect to your SPP device from Android is to read the log files, looking for the above error, extract the device address, and manually initiate a connection in code. After this, your SPP device will appear along with all your other bluetooth devices in the bluetooth settings page on your phone, and you can successfully communicate using the bluetooth API provided by Google.

I have written a re-usable class that implements this workaround, which you can download from here.

How to use (from your Activity class):

(new BluetoothClassZeroDiscoveryTask(
    this, 
    new BluetoothDiscoveryCallback())).execute();

Where BluetoothDiscoveryCallback is a class defined e.g. in your Activity. The call method will be called after the discovery task completes, and is passed the complete list of paired bluetooth devices, including those that are undiscoverable due to the above bug.

private class BluetoothDiscoveryCallback
    implements Action<ArrayList<BluetoothDevice>>
{
	public void call(ArrayList<BluetoothDevice> devices)
	{
		// Now you have the list of ALL available devices, 
		// including those that report class 0x00.
	}
}

// Java equivalent of the built-in Action from C#.
public interface Action<T>
{
	void call(T target);
}

You’ll also need to add READ_LOGS permission to your manifest file:

<uses-permission android:name="android.permission.READ_LOGS" />

Feel free to suggest improvements to the code, I’m new to Android and haven’t done Java in ages 🙂

P.S. Hassle your phone manufacturer to fix this bug so this workaround is not needed!

App Screenshots:

After pressing “Start Discovery”, if any bluetooth class zero devices were found (but ignored), you will get the standard pairing dialog:

After entering the correct PIN code, your device will be listed alongside others in your bluetooth settings:

The app requires Android 2.1+. It’s been tested on the following phones:


Manufacturer Model Android Version Affected Results
LG Optimus One 2.2 Yes Works
HTC Desire HD 2.2 Yes Works, but unfortunately may interfere with networking / bluetooth operation.
Samsung Galaxy S (I9000) 2.2 Yes Fails
Samsung Galaxy Player 50 2.1 Yes Works

The app is free to use, if you find it useful, feel free to make small donation 🙂

A2DP on Windows 7

When I bought a pair of bluetooth stereo headphones, I wanted to make sure they would work on Windows 7, however when I searched for A2DP (Advanced Audio Distribution Profile – the protocol for streaming stereo audio to a bluetooth device), I mostly found posts relating to how A2DP support was missing from Windows 7 RTM.

So when I bought a bluetooth dongle, I went ahead and immediately installed the ancient version of BlueSoleil that came with it. This is an awful piece of software, but it does get your headphones working. However, I started getting random blue-screens which identified BlueSoleil as the culprit. So I investigated my options:

– Install the latest version of BlueSoleil, and provided no further blue-screens occur within the trial period, buy it 🙁
– Install the Toshiba bluetooth stack, and buy if it does the job.
– Remove all 3rd party bluetooth software and try the Microsoft one.

I tried the toshiba bluetooth stack and the audio randomly cut out every few 1 or 2 seconds. So don’t bother with that.
Not wanting to pay for crap software, and spurred on by seeing mention that an update for A2DP support in Windows 7 was pushed out, I decided to give the Microsoft stack a go. Uninstalled Toshiba and Bluesoleil software, then after re-enabling the ‘Bluetooth Support Service’, my headphones were promptly discovered and connected. Audio quality is perfect (no drop-outs), and no need for any 3rd party software.

So, if you’re using Windows 7, don’t bother with BlueSoleil or Toshiba, stick with the Microsoft bluetooth stack.

‘Bluetooth Settings’ link missing in Windows 7 Control Panel

When attempting to add (pair) a new bluetooth device, if no devices are detected it may be that the ‘Bluetooth Support Service‘ is disabled or stopped. Check this by going to:

Start->Run->compmgmt.msc->Services and Applications->Services

Make sure the status for service ‘Bluetooth Support Service’ is ‘Started’ and the startup type is ‘Automatic’. After starting this service, you should now be able to add bluetooth devices to Windows. Starting this service also enables display of the bluetooth settings dialog, which the Windows help points out should be visible in the Control Panel when you search for ‘bluetooth’. Another symptom that this service is not running is that when you right-click the bluetooth system tray icon and choose ‘settings’, nothing happens (i.e. no dialog appears).

To Microsoft: Surely it would have been simple to check whether this service is running before doing bluetooth device discovery or opening the settings dialog, and at least report to the user that they need to start the service (or do it for them ideally) rather than just failing silently.

Muting Bluetooth Headphones

After much research, I recently purchased a pair of Sony BT-50 Bluetooth headphones. They are AWESOME!!!! The only problem is, there’s no way to mute them! In fact, there’s no way to mute any bluetooth headphones except from the ‘mute’ button on the bluetooth device. If you’re listening to music on a PC, volume up/down keys work (from a multimedia keyboard), but not mute. So I’ve written a utility that enables muting of your headphones with a global hotkey, and you can download it for free here.

Note: The program will only work on Windows 7, and you’ll need .Net 4 installed. So you know you’re on the bleeding edge of technology using this. Who knew a feature such as mute was so high-tech 😀

The program uses the CoreAudioAPI library by Ray Molenkamp, and the global hotkey class by Max Bolingbroke. They made this possible.

Btw, the BT-50 headphones don’t come with a USB Bluetooth adaptor, so if you want to use with with a PC (as opposed to a bluetooth-enabled phone), you’ll need to purchase one. I’d advise against going with the $1.00 bluetooth adaptors from China (even with free shipping, wtf?), and instead do your research and find an adaptor that has drivers for Windows 7 and A2DP support.

For Aussies, I can confirm that the Dick Smith Bluetooth 100M USB adapter (not listed on the Dick Smith website, but I found them in the Macquarie park store in Sydney) will work with these headphones, after you wrestle a bit with BlueSoliel (worst usability in software I’ve seen in a while – see below for how to automate connection of the Advanced Audio Service). And you’ll need to swap out the American power supply with an Aussie one – again Dick Smith has the goods. Just make sure the polarity is right: The engraving “CEN” on the jack with the yellow tip should be on the positive side of the connector.

Update: To avoid using BlueSoliel every time you switch on your headphones, you can save the connection as a shortcut. It is placed on your desktop without telling you: