Author Topic: Does the Bluetooth Framework support connect to the headphones?  (Read 161 times)

Offline steam3d

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
I need just to connect or disconnect the headphones (Classic Bluetooth) without sending any data to it. (like on the screenshoot). Can i reach this by using your Bluetooth Framework?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3624
  • Karma: 1000
    • Wireless Communication Libraries
Re: Does the Bluetooth Framework support connect to the headphones?
« Reply #1 on: July 05, 2021, 03:17:47 PM »
Yes, it is possible.

Run BluetoothManager demo application. Discover your device. Then click Enum service and select your Audio service (it is Advanced Audio Gateway or A2DP Gateway). Then click Install Device. To disconnect click Uninstall device.

Offline steam3d

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Does the Bluetooth Framework support connect to the headphones?
« Reply #2 on: July 06, 2021, 11:58:52 AM »
I checked BluetoothManager. Looks like you just turn on / off some of Headphones services to connect / disconnect. (Something like https://docs.microsoft.com/en-us/windows/win32/api/bluetoothapis/nf-bluetoothapis-bluetoothsetservicestate)
It's dirty way and not the same when i click to connect button on paired bluetooth device.

Also the device never get disconnected even if i disable all available device services. There is also another problem, when some audio service change their state from disabled to enabled, the windows recreated the audio endpoint and generate new audio GUID instead use the old one.

In General, this option will not work for me.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3624
  • Karma: 1000
    • Wireless Communication Libraries
Re: Does the Bluetooth Framework support connect to the headphones?
« Reply #3 on: July 06, 2021, 01:00:19 PM »
There is no other documented way to do what you need.

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13