Author Topic: Checking for compatible driver  (Read 2534 times)

Offline hugin

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Checking for compatible driver
« on: August 27, 2013, 06:56:23 PM »
Hi,

I would like to programmatically check if a compatible Bluetooth (windows generic) has been installed.
Any suggestions how to do that?
It would be great if the framework had such a function already, just as you can check for radios etc.

Thanks!

Offline hugin

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Checking for compatible driver
« Reply #1 on: August 27, 2013, 07:01:00 PM »
Preferably in C# (maybe I should have posted in that forum...)

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3052
  • Karma: 1000
    • Soft Service Company
Re: Checking for compatible driver
« Reply #2 on: August 27, 2013, 07:44:35 PM »
Hello,

I am not sure I undertood what you mean, but WCL detects if supported driver is installed. When you call wclAPI.Load WCL loads all APIs and drivers and you can check if it is available by calling wclAPI.IsTransportExists(wclTransport::trBluetooth) and wclAPI.IsBluetoothAPIExists(wclBluetoothAPI::baMicrosoft) (for MS drivers).

Offline hugin

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Checking for compatible driver
« Reply #3 on: August 28, 2013, 01:18:12 PM »
I'm running an application which continously polls for data on a connected device, and I've experienced that almost all drivers I've checked will disconnect spontaneously maybe every 5 min. This is except the windows generic driver downloaded from bluetoothinstaller.com, as recommended.

E.g. I can start, load and run the btframework on a Windows 8 Pro surface tablet using the default marvell driver, but then it will disconnect after a short period of time. On the other hand, if i disable the driver, and install the windows generic driver it works great.

So I would like my application to check for the used driver, and then ask the user to change the driver...
Thanks!

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3052
  • Karma: 1000
    • Soft Service Company
Re: Checking for compatible driver
« Reply #4 on: August 28, 2013, 01:20:17 PM »
private void FormLoad()
{
  wclAPI.Load();
}

private void CheckForMsDriver()
{
  if (!wclAPI.IsBluetoothAPIExists(wclBluetoothAPI::baMicrosoft))
    MsgBox.Show("Install MS drivers");
}

Offline hugin

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Checking for compatible driver
« Reply #5 on: August 28, 2013, 01:36:25 PM »
Thanks a lot!

Offline hugin

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
Re: Checking for compatible driver
« Reply #6 on: August 28, 2013, 03:08:28 PM »
So this didn't really take me all the way.

The call wclAPI.IsBluetoothAPIExists(wclBluetoothAPI::baMicrosoft) tells me that the Microsoft stack is available by the driver, but not that the driver is the recommended MS Generic Driver, right?

The default driver on a MS Surface Pro tablet is from Marvell Semiconductor, ver 14.69.17056.73, and it states "Microsoft Windows Hardware Compatibility Publisher". Unfortunately, this driver will throw disconnect events every few minutes, while the generic driver does not.

It seems that it is not enough to know whether the MS stack is implemented by the driver - I can only trust the generic driver. No?

Best regards,

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3052
  • Karma: 1000
    • Soft Service Company
Re: Checking for compatible driver
« Reply #7 on: August 28, 2013, 04:07:11 PM »
On Win Vista/7/8 only MS, BlueSoleil and Toshiba driver is available. Also there can be WidComm extention which is generic MS driver but adds some extentions to MS driver. So if WCL detects it as MS then there is MS driver (probaby with extention).

At present WCL can't detect that there is extention but we can add such feature.

 

Sitemap 1 2 3 4 5 6 7 8 9