1

I'm trying to use the BLE feature of the winodws 10 laptop. I've first used the c# based examples available here . I can use the laptop as a BLE peripheral mode as well as the server mode. Now I'd like to implement the same feature in c++. I've found that the API that I should use to implement this is found here.

I followed this example to implement an initial server mode in the windows 10 laptop computer. But I first need the peripheral mode and I tried to add the class ID of my BLE device found from the device manager.

enter image description here

But the SetupDiEnumDeviceInterfaces function fails with the error code 0x103 (No further information)

hDI = SetupDiGetClassDevs(&BluetoothInterfaceGUID, NULL, NULL, DIGCF_PRESENT);
if (hDI == INVALID_HANDLE_VALUE) return NULL;

did.cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
dd.cbSize = sizeof(SP_DEVINFO_DATA);

BOOL isComplete = SetupDiEnumDeviceInterfaces(hDI, NULL, &BluetoothInterfaceGUID, 0, &did);

Any idea why this call fails? Should I be using any other GUID instead of the class GUID?

tybandara
  • 279
  • 2
  • 10
  • i think you should look at this: https://stackoverflow.com/questions/10587914/my-setupdienumdeviceinterfaces-is-not-working – sailfish009 Mar 23 '17 at 12:07
  • Thanks, I can see that they have used the device GUID. But in my case I've used the class GUID. I'm wondering how to get the device GUID of a BLE node in windows 10. – tybandara Mar 24 '17 at 10:37
  • I'm not 100% sure, as I'm not familiar with the technical details of Bluetooth: If you tagged this question with [com] as in "communications port", please remove that tag and use [serial-port] instead. *You will get better answers*. The [com] tag is for the Microsoft Component Object Model, as in "Automation, Type Libraries, OLE, ActiveX, etc.". This question doesn't look like it belongs. – Euro Micelli Mar 25 '17 at 13:58
  • Actually I meant the component object model as the c++ api is based on com as per my understanding. I may be wrong but. There are not much examples available on this – tybandara Mar 25 '17 at 18:22

0 Answers0