We are looking to access and use Bluetooth profiles in our WPF application using C# in Visual Studio 2017.
Issue details:
Platform: Windows 10 Pro - version 1803.
Issue brief: We are trying to access Bluetooth profiles via desktop(c#) of connected phones, however on windows 10 the profile show enable but the profiles are not working eg: HFP connects, however, the voice is not heard
We have tested this on following Bluetooth devices:
1.Bluetooth CSR 4.0 Dongle (CSR8510 A10) (Note: this Bluetooth connects and show HFP and works as expected, however, the Bluetooth does not show on the device list and hence we cannot connect programmatically using c#)
2.IOGEAR's Bluetooth 4.0 (Model GBU521W6) (Shows on device list and our application can detect a device, however, HFP is not working as expected both from the application or from normal device section)
Required Profiles:
1.Hands-Free Profile (HFP) 2.Message Access Profile (MAP) 3.Phone Book Access Profile (PBAP)
We have Already Tried with following:
Side note: Our application with same code works on windows 7
You can easily check the Bluetooth version of your Windows 10 PC via the device manager. Press Win+X to open the Start Menu and select Device Manager. Under Bluetooth, you will see several Bluetooth devices. Select your Bluetooth brand and right-click to check the Properties.
Search for Device Manager and click the top result to open the app. Expand the Bluetooth category. Right-click the Bluetooth adapter and select the Properties option.
Go to the Device Manager from the Windows Search. Click on the View Option. Go there and Select Show Hidden Devices. It is usually helpful when the Windows 10 Operating System will create a nested list.
MAP abd PBAP is not a problem because both are OBEX based (which is RFCOMM).
However there can be some problems with HandsFree. It works great with BlueSoile drivers. But with standard microsoft may not work.
The first step it to use BluetoothSetServiceState with HFP UUID to tell windows to install drivers for your device's HFP profile. If function succeed you should see 2 audio devices appeared in your system: one is Inout and other is Output. You can find them using any media API (DirectSound, legacy API).
To be able to work with PBAP and MAP you need anyhow connect to your device through RFCOMM. WinSock or any other way is good.
Please note that the method above works only with Microsoft Bluetooth drivers. Other drivers (BlueSoleil, Toshiba) have absolutely different API so you have to add it into your application if need to support them.
Or you can simple take a look on BluetoothFramework
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With