From: Xiaofan C. <xia...@gm...> - 2018-06-29 14:22:16
|
On Fri, Jun 29, 2018 at 9:44 PM, Xiaofan Chen <xia...@gm...> wrote: > On Thu, Jun 28, 2018 at 7:51 PM, Xiaofan Chen <xia...@gm...> wrote: >>> And when I use xusb.exe to check the device's descriptor, it can't open the >>> device like below shows: >> >> Then I think your FW has an issue. Read the above libwdi wiki page >> and see if you can learn something there. >> >>> And then I debug into the source code of LibUsbk's example "open-device", in the >>> function l_EnumKey_Instances() at lusbk_device_list.c file. When enum >>> DeviceInterface, got an error code 259(No more data is available) like below shows: >> >> As mentioned in the previous email, libusbK has a problem -- it will not work >> for your use case unfortunately even if you fix your FW. >> >> You may want to try out libusb Windows -- still you need to fix your FW. Since your FW is already using "DeviceInterfaceGUIDs", the libusbK issue does not affect you. Your FW has an issue. >>> So I guess maybe my FW is missing DeviceInterfaceGUID handling like your >>> previous mail said. But I'm not the expert of device FW, so I'm not sure about this. >>> Do you agree with me or have some other advice? > > You can take a look here at this firmware. It should work with both > libusbK and xusb. > https://github.com/TravisRo/libusb_stm32/blob/master/demo/winusb_loop.c > Ref: https://github.com/pbatard/libwdi/wiki/WCID-Devices#Defining_a_Device_Interface_GUID_or_other_device_specific_properties One item that may be of interest to you, with regards to WCID devices, is the provision of additional device registry settings and especially the provision of the Device Interface GUID that you want your device to be accessed with. Just like with the Compatible ID, this too is done through a Feature Descriptor, called Extended Properties Feature Descriptor and located at wIndex = 0x0005. However, as opposed to the Compatible ID, this should be queried using an Interface Request with the full bmRequestType being set to 0xC1. Your FW needs to handle this. And if you are using Windows XP SP3/Vista/Windows 7, I hear reports sometimes it has a problem, you can test with Windows 10 first. -- Xiaofan |