Author Topic: Can not disconnect completly my device from wclBluetoothHandsFreeClient  (Read 27913 times)

mariluz.costa

  • Guest
Hi everyone,
I'm developing an application to make call from a PC but through bluetooth on my mobile iphone or androidphone.
I pair my device and then I connect it to a wclBluetoothHandsFreeClient.
Everything works fine.

My problems come when I try to disconnect the device.

I do something like my_wclBluetoothHandsFreeClient.Disconnect().
I tried my_wclBluetoothHandsFreeClient.AudioDisconnect() too!

Nothing works.

When I check my_wclBluetoothHandsFreeClient's state it appears as Disconnected. But my phone steel indicates a connection.
I cannot make a call with the mobile phone anymore but music can still be transferring to computer.

Does someone has an idea to disconnect correctly (properly) a device from any Hands Free service?

Thank you for your help!

Mariluz

Sorry for my bad english

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #1 on: January 22, 2016, 04:30:12 PM »
Hi,

Which BlueSoleil version and WCL version do you use?

Also, does Audio connected in this time or it also can not disconnect event if Audio is not connected?

mariluz.costa

  • Guest
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #2 on: January 22, 2016, 05:39:40 PM »
Thank you for your response.

My BlueSoleil version is 10.0.492.1 and WCL 6.14.8.0.

When I do my_wclBluetoothHandsFreeClient.Connect() I connect my device  on HandsfreeAudioGatewayServiceClass_UUID. But I see on BlueSoleil interface that Bluetooth Advanced Audio is connected too.

So when I disconnect using my_wclBluetoothHandsFreeClient.Disconnect() it is only HandsfreeAudioGatewayServiceClass_UUID that is disconnected.
The other still proceed, and I can see it on my phone and in the BlueSoleil interface.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #3 on: January 22, 2016, 05:44:42 PM »
Hello,

Yes, the problem has been reproduced. The BlueSoleil does not release second audio connection when primary connection is released. I am going to fix it. I will update you a little bit later with progress.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #4 on: January 22, 2016, 06:37:45 PM »
Hello,

Ok, the problem is that when you connect to your device BlueSoleil connects to its AVRCP profile by itself. To prevent this you have to disable "Advanced Audio..." service in BlueSoleil settings.

To do so open BlueSoleil properties, switch to Functions tab, select "Advanced Bluetooth Audio" from the list and change its status to "Disabled". I am not sure it is possible to do programmaticaly but I am looking for the way.

mariluz.costa

  • Guest
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #5 on: January 25, 2016, 11:52:15 AM »
Thank you for your help Mike!

I hope you find a way to do it programmaticaly.

Mariluz

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #6 on: January 25, 2016, 12:44:55 PM »
You are very welcome.

I will do all my best to find the way.

mariluz.costa

  • Guest
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #7 on: February 11, 2016, 04:48:23 PM »
Hi Mike,

I discover another issue with this "can't disconnect completely my device". I can't unpair my device if I have not disconnected it first from all services.
Do you confirm? Maybe I don't do it the right way.

Mariluz

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #8 on: February 11, 2016, 05:01:26 PM »
Hi,

Yes, that is correct, you can not unpair cause driver can not remove device's information.

mariluz.costa

  • Guest
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #9 on: February 12, 2016, 05:12:56 PM »
Hi Mike,

You helped me with some issue and now I got another one I hop you can resolve too  :)
I got a serious problem with that lack of functionality of disconnected all services from Bluetooth, or even prevent connexion for some services.
I will try to explain.
We use a device (I will call it Hal) integrating Bluesoleil that doesn't provide a user interface to administrate Bluesoleil.
So we really need to deactivate all unused services and mostly those which are connected by bluesoleil itself, even we doesn't call a function to do that.

Here is a catastrophic scenario a user can experiment:
User switch on Hal, my application using WCL runs and the user paired his device and connected it.
Suddenly my application crashed. My application does all right disposes but I can't disconnect all services. And as I can't disconnect all services I can't unpaired user's device. So the user's device belongs paired and connected to BlueSoleil.
The user has run again my application. My application detects user's paired device. But I can't get which service is connected. And even I could, you explain to me that I could not get the handles. And all this situation is really bad. To work around it, I have to find a way to switch off the Bluetooth to kill that connection!

Mike I need a function to programmatically stop BlueSoleil to connect to its AVRCP profile by itself and even all other services I don't need or i need to programmatically switch off the Bluetooth or simply disconnect all services. This can help too.

    Can you help me with that:
    • programmatically stop BlueSoleil to connect to its AVRCP profile by itself or
    • programmatically switch off the Bluetooth or
    • programmatically simply disconnect all services.

    Thank you for your help.

    Mariluz

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #10 on: February 12, 2016, 05:50:10 PM »
Hi,

The problem that there is no open API to control such BlueSoleil functions as disabling services. Any way I will think on it and may be find the way.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #11 on: February 15, 2016, 10:47:31 AM »
Hi,

It looks I found the way to disconnect all connected devices with BlueSoleil (this will not work with any other driver). I'll keep you updated.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #12 on: February 15, 2016, 06:10:06 PM »
Hi,

I have attached the WCL version with disables Advanced Audio service when you connect to HFP so now it should work as expected and do not "lock" connection when you disconnect from HFP. Please. test it on your side.

[attachment deleted by admin]

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #13 on: February 17, 2016, 05:55:45 AM »
Hi,

It looks the way to find all connection is also found. Please test the version with AVRCP disabling. If it works then I will try to add the methods to disconnect already connected devices.

mariluz.costa

  • Guest
Re: Can not disconnect completly my device from wclBluetoothHandsFreeClient
« Reply #14 on: February 17, 2016, 02:54:10 PM »
Hi Mike,

I have just tested your dll.
It's working for disconnect Advanced Audio service. But I discover that BlueSoleil connect himself to another service. I'm not sure of my translation, but this service's name sounds like "a/v remote control target bluetooth service".

So if you have time your second solution will be very appreciated :)

Thank you Mike!

Mariluz

 

Sitemap 1 2 3 4 5 6 7