BluetoothDeviceInfo.SetServiceState Usage

Topics: Bluetooth - Microsoft, Bluetooth - Widcomm/Broadcom
Apr 10, 2013 at 2:57 AM
Edited Apr 10, 2013 at 3:01 AM
http://www.alanjmcf.me.uk/comms/bluetooth/Bluetooth%20Profiles%20and%2032feet.NET.html#_Toc266869890
and
https://32feet.codeplex.com/wikipage?title=Connecting%20to%20Bluetooth%20Services&referringTitle=Documentation

..says to create the connection to use BluetoothDeviceInfo.SetServiceState however when I do this it simply enables/disables the connection under the Services tab (as noted in the links above). It also then adds/removes hardware in Device Manager. It doesn't actually connect. I can see that might work for a virtual serial port though since then it will be created. You still need to connect to the device though right?

I'm using
BluetoothDeviceInfo.SetServiceState(BluetoothService.AudioSource, true);
and also tried this since it was mentioned explicitly (there are a couple of variations on the same name though)
BluetoothDeviceInfo.SetServiceState(BluetoothService.HandsfreeAudioGateway, true);
I'm trying to force the A2DP connection to actually join up. The device is already successfully paired and I can manually connect it from my phone or from my laptop and that works just fine using the Windows tools or the phone itself (iPhone 5).

I have a Broadcom device and stack installed but as per the other thread 32feet.NET is only reporting one library. Ultimately I need/want to use Widcomm since I need L2CAP but for now I'll settle for anything. My Device Manager shows a "Microsoft Bluetooth Enumerator" and a "ThinPad Bluetooth 4.0". (I've tried the app.config setting but still only see a single stack - the Microsoft one). I should be able to do this with the MS if anything (doco says Widcomm mightn't work)

So then I started looking at:
BluetoothClient.Connect(address, BluetoothService.AudioSource);
But get errors:

A socket operation failed because the destination host was down EC3586xxxxxx:0000110a00001000800000805f9b34fb

My second attempt I didn't really expect to work though.

Am I doing something that just won't work or isn't possible? Is there any way to actually make the connection?

Thanks anyone who might have an idea :)
Christian