-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with HID devices #2
Comments
Same with latest git.
|
But the issue may be related to HIDSharp. |
HIDSharp seems to work. I have a long list of HID device in the system. click to expand
|
That's weird because |
Further tests show that HIDSharp is also not stable for my particular system, sometimes it hangs. So I think it is not a real issue of win-hid-dump (maybe adding retry may help) but rather HIDSharp issues. |
It seems to me the issue is only with Logitech USB receiver. Tested with my home Acer Windows 10 laptop. With Logitech USB Receiver plugged in, it will crash.
Without the Logitech USB Receiver plugged in, it will not crash.
|
HIDSharp does not crash with the Logitech USB receiver plugged in. click to expand
|
I seemed to be having a similar problem with a different device. HIDSharp appeared fine with it and this program worked fine without it plugged in. At least in my case it turned out that the 'manufacturer' value associated with the device was null so as a result when I reached this line in Program.cs:
The |
In my case it is different, it has no issues with "dev.GetManufacturer(), dev.GetProductName(), dev.DevicePath)" but crashes since it can not carry out the operation GetRawReportDescriptor(). The exception points to HIDSharp but HIDSharpDemo seems not to crash, strange. Here I am using git head of HIDSharp. PATH:\?\hid#vid_046d&pid_c534&mi_01&col02#7&2fa52f82&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
Call stack
|
It is a pretty complicated device. Example Logitech USB Receiver. It is a USB Composite Device, under Windows Device Manager, it will show as 9 devices, one USB Composite Device parent, then six devices in Human Interface Devices section, one in mouse and one in keyboard. HIDSharp will show it as six HID devices, one for Interface 0, one for each top level collection of Interface 1 (col 1/2/3/4/5)..
USB Prober output from Mac Mini M1. click to expand
|
If I use the fork here ( https://github.com/afinetapestry/win-hid-dump/tree/main ), the exception seems to point to HIDSharp.
|
I get the same issue with |
okay, I found out it was my dasKeyboard that was the cause.. and of course, it was the last USB device I had to try. Ended up using a automation program, to press enter on the command line window, after 10 seconds to giving me enough time to start it and remove ALL other USB devices other than the one I wanted a report on |
Please refer to this thread: libusb/hidapi#249 The following hidapi pull request has the same limitations. So far the best effort is here using reverse engineering. But it still needs more efforts. |
Could you put the problematic line in try catch block so it does not fail because of a single device?
|
Trying out winHIDdump to learn a bit about the Videonics CP1 device found in my wtf boxes. It shows up in Device Manager under HDI as USB Input Device. The properties/Events shows "Device Not Migrated" event: Last Device Instance Id: USB\VID_1038&PID_2006&MI_00\2&5e99c07&0&0000 winHIDdump says: Unhandled Exception: System.NotSupportedException: Unable to reconstruct the report descriptor. My guess is the device is so old (pre-2000) and vendor gone, that its all unknown to MS. Oh well. maybe I can scavenge it for parts or put in a rPiPico update: i grabbed https://github.com/rene-aguirre/pywinusb and the raw_data.py was able to read all the buttons, sticks, etc on the CP1. |
It crashes on me too. I unplugged my wacom tablet and its not crashing now. WinHIDdump: Unhandled Exception: System.NotSupportedException: Unable to reconstruct the report descriptor. |
Both of these are HidSharp library error, a library that You could try running the HidSharp library's HidSharp is doing a kind of reconstruction of the HID Report Descriptor since Windows does not support interrogating the device directly for this information. I think that error can occur for devices that are not true HID devices (i.e. a device with a driver that creates a "virtual HID" device for applications to use. I think XBox controllers do this) or devices that have a custom driver that overrides the default HID driver. Again, try your device on a different OS or even a different Windows box that doesn't have any extra drivers for the device installed. |
Where is this HidSharp.test.exe? I do not see any HidSharp.zip either. |
For anybody that is having issues with win-hid-dump or HidSharp due to Windows limitations, try installing WSL2 (WSL1 does not support USB device redirection) and redirecting your HID device to it and then use the Linux based usbhid-dump. |
Sorry I didn't provide a direct link earlier: https://www.zer7.com/software/hidsharp That's the homepage for HidSharp. On it is a zip download containing the library and the test file. |
I think in the end hidsharp will not work very well with many devices under Windows. The best effors are here to try to get Windows working with hidapi and Report Descriptor, using reverse engineering approach. Discussions and many test reports here. |
Nice idea. For me I just reboot my Windows laptop to Linux since I use dual-boot. :-) Or I will use my Mac Mini. |
has been closed with the merge of libusb/hidapi#451. So if people are having issues with win-hid-dump or HIDSharp, you can try latest git of hidapi which inlcude the hidtest application. hidtest will dump the report descriptors of the HID devices. |
It does not seem to work with Logitech USB Receiver.
The text was updated successfully, but these errors were encountered: