Author Topic: no device GUID ID in Win 10 for PL25A1 cable  (Read 6297 times)

Scott Birken

  • Member
  • ***
  • Posts: 3
no device GUID ID in Win 10 for PL25A1 cable
« on: January 30, 2017, 02:43:53 pm »
Dear Sirs,

I am attempting to use WinUSB to perform a bulk transfer of bytes over a prolific PL25A1 easy transfer cable.  I have noticed that when the device is plugged into a USB port it installs a different INF file with Win 7 and Win10.
In Windows 7, the INF file includes a fixed device GUID of {bc103702-dd72-406f-9b28-95c868337b59}.  I am able to acquire a pointer to the device with the following code:

DEFINE_GUID(GUID_DEVINTERFACE_TransferCable,
       0xbc103702,0xdd72,0x406f,0x9b,0x28,0x95,0xc8,0x68,0x33,0x7b,0x59);
Interface = SetupDiGetClassDevs(&GUID_DEVINTERFACE_TransferCable,
                                     NULL,
                                     NULL,
                                     DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);

However, in Windows 10, the INF file does not have a device GUID.  It only includes a ClassGUID that is randomly generated when the device is installed.  I am able to connect to the device using its ClassGUID; however since this field is not constant, the C++ code that connects to device needs to be changed to match this random value in the INF file. 

How can I write WinUSB based C++ code that can connect to the prolific cable that will work with both Win 7 and Win 10 and not need to be custom tailored for changing GUIDs?   

Thanks,
Scott


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
« Last Edit: January 30, 2017, 02:59:09 pm by Jan Axelson »

Scott Birken

  • Member
  • ***
  • Posts: 3
Re: no device GUID ID in Win 10 for PL25A1 cable
« Reply #2 on: January 30, 2017, 03:14:21 pm »
Thanks for the quick reply Jan, and I'm sure it obvious that I'm very new to winUSB. 

The issue with using the provided Prolific software is that we are using the cable in a way that it was not built to be used.  Their software, and an SDK they provide as well, is written to transfer files from one machine to another.  We are using the cable to transfer commands rapidly from one PC to another.   Therefore, parsing a file containing the command after it is written is too slow for our needs.

Unfortunately, the second link that you sent didn't really help either since the problem is not that the class GUI changes when no data is send to it.  The issue is writing C++ to a fixed destination, but since the GUID changes with different machines I wanted to know if there was a constant identifier that I could use to connect to the device in Win10. 

Is there a WinUSB means to connect to a device with a PID/VID like LibUSB does instead of a GUID? 

Thanks in advance,
Scott

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: no device GUID ID in Win 10 for PL25A1 cable
« Reply #3 on: January 30, 2017, 06:13:55 pm »
In my WinUSB C# example, take a look at FindDeviceUsingWmi()

http://janaxelson.com/winusb.htm

odsk

  • Member
  • ***
  • Posts: 4
Re: no device GUID ID in Win 10 for PL25A1 cable
« Reply #4 on: February 01, 2017, 02:58:29 pm »
Scott;
I am new to USB like you.

For windows 10, would you look under registry\HKey_local machine\system\currentControlSet\Enum\USB\VIDxxxx&PIDxxxx\deviceParamters if it contains DeviceInterfaceGuid?
It is possible that you find in there.