Answered by:
Issue with connecting to Bluetooth device with RfcommDeviceService

Question
-
I am unsure if this is a driver, windows or a application issue but I was wondering if anyone else has seen anything like this. I have the following code that looks for Bluetooth service that I can connect too (I have extra Debug statements to track my issue down):
try { Debug.WriteLine("***" + serviceInfo.Name + ": " + serviceInfo.Id); Debug.WriteLine("Getting service"); RfcommDeviceService service = await RfcommDeviceService.FromIdAsync(serviceInfo.Id); Debug.WriteLine("Got Service"); if (service != null) { Debug.WriteLine("----" + service.ToString()); foundDeviceCallback(serviceInfo.Name,_devices); } else { Debug.WriteLine("fromIdAsync returned null"); } } catch (Exception e) { Debug.WriteLine(e); }
This code works perfectly on one tablet that is running “Windows 8.1” with the following Bluetooth drivers:
Provider: Intel
Date: 12/16/2013
Version: 17.0.1401.422
I have another (newer) tablet that will not connect to the same Bluetooth device. This tablet has the same hardware but is running “Windows 8.1 with Bing” and the following Bluetooth drivers:
Provider: Intel
Date: 4/22/2014
Version: 17.0.1405.460
The first time I run the application, on the tablet that will not connect to our Bluetooth device, it asks me if I want to allow the connection and I select yes. After that, every time my application attempts to connect to the Bluetooth device it experiences one of two issues.
Issue one: Exception thrown:
***XXXXXX: \\?\BTHENUM#{00001101-0000-1000-8000-00805f9b34fb}_VID&00010047_PID&f000#7&6fe93ec&0&000780668A15_C00000000#{b142fc3e-fa4e-460b-8abc-072b628b3c70} Getting service The thread 0xed8 has exited with code 259 (0x103). The thread 0x17dc has exited with code 259 (0x103). The thread 0x17e0 has exited with code 259 (0x103). A first chance exception of type 'System.Exception' occurred in mscorlib.dll System.Exception: No such service is known. The service cannot be found in the specified name space. (Exception from HRESULT: 0x8007277C) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at xxxxx.com.xxxxx.bluetooth.xxxx.BluetoothDiscovery.<StartDiscovery>d__0.MoveNext()
Issue two: Null is returned from RfcommDeviceService.FromIdAsync()
Got devices: 1 Found device ***xxxxxxx : \\?\BTHENUM#{00001101-0000-1000-8000-00805f9b34fb}_VID&00010047_PID&f000#7&6fe93ec&0&000780668A15_C00000000#{b142fc3e-fa4e-460b-8abc-072b628b3c70} Getting service Got Service fromIdAsync returned null
I did attempt to downgrade the Bluetooth drivers with ones that I downloaded from Intel’s site but the installer will not let me downgrade the drivers. I did try several older versions of my application on the newer tablet but get the same issues.
Has anyone seen an issue like this? Does anyone have any suggestions on what I might try to get my application to work on the newer tablet?
Thanks,
Jon
Friday, January 9, 2015 6:04 PM
Answers
-
The hardware manufacture walked me through removing the 17.0.1405.460 version of the Intel Bluetooth drivers and the installation of the older 17.0.1401.422 version. Once we did that my application started working again. So the issue was the newer drivers.
- Marked as answer by Jon Hoffman123 Monday, January 12, 2015 1:06 PM
Monday, January 12, 2015 1:05 PM
All replies
-
Jon - if you remove/re-pair the BT device, does it start working?
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Friday, January 9, 2015 6:59 PMModerator -
No it does not.
- Marked as answer by Jon Hoffman123 Monday, January 12, 2015 1:05 PM
- Unmarked as answer by Jon Hoffman123 Monday, January 12, 2015 1:05 PM
Friday, January 9, 2015 7:03 PM -
Can you provide a sample so I can test this locally?
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.Monday, January 12, 2015 1:04 PMModerator -
The hardware manufacture walked me through removing the 17.0.1405.460 version of the Intel Bluetooth drivers and the installation of the older 17.0.1401.422 version. Once we did that my application started working again. So the issue was the newer drivers.
- Marked as answer by Jon Hoffman123 Monday, January 12, 2015 1:06 PM
Monday, January 12, 2015 1:05 PM