I have a C# application that enumerates HID devices on Windows using SetupDiEnumDeviceInterfaces(), SetupDiGetDeviceInterfaceDetail(), HidD_GetAttributes() etc. methods.
Can I use that directly on Linux with the same hardware as it works on Windows, and if yes, do I need to look for specific settings or caveats?
Another related issue to that console application is that if I run it on Linux (latest staging), it does send it any input to as it does to cmd.exe.
Enumerating HID devices on Windows->wine and cmd.exe input
- DarkShadow44
- Level 8
- Posts: 1207
- Joined: Tue Nov 22, 2016 5:39 pm
Re: Enumerating HID devices on Windows->wine and cmd.exe inp
Possibly, why don't you just try it?epigramx wrote:Can I use that directly on Linux with the same hardware as it works on Windows, and if yes, do I need to look for specific settings or caveats?
What do you mean?epigramx wrote:Another related issue to that console application is that if I run it on Linux (latest staging), it does send it any input to as it does to cmd.exe.
Re: Enumerating HID devices on Windows->wine and cmd.exe inp
Apparently if I run hclient.exe (which enumerates devices with their VID and PID properly on windows), on wine I get erroneous VID and PID (e.g. 2516:0014 on hid6) when clearly with "cat /sys/class/hidraw/hidraw6/device/uevent" I get the proper VID and PID as I see it on Windows (057E:0330 in that example). I suspect that's part of the true cause that doesn't let my .exe enumerate HIDs and find the right one.DarkShadow44 wrote:Possibly, why don't you just try it?epigramx wrote:Can I use that directly on Linux with the same hardware as it works on Windows, and if yes, do I need to look for specific settings or caveats?
What do you mean?epigramx wrote:Another related issue to that console application is that if I run it on Linux (latest staging), it does send it any input to as it does to cmd.exe.
Regarding cmd.exe input, Console.ReadKey() is used on windows to get input from a console application but on wine it appears to not receive input (even if a "wine cmd" is run before execution).
- DarkShadow44
- Level 8
- Posts: 1207
- Joined: Tue Nov 22, 2016 5:39 pm
Re: Enumerating HID devices on Windows->wine and cmd.exe inp
Can you provide an example application?
Re: Enumerating HID devices on Windows->wine and cmd.exe inp
It's now a bug report here: https://bugs.winehq.org/show_bug.cgi?id=44279
A compiled hclient.exe is here: http://www.mediafire.com/file/yaoi44c24 ... client.exe
(source is in the bug report)
I have a suspicion there's something wrong when the HID device is provided by Bluetooth or at least when the device is a Wii Remote
A compiled hclient.exe is here: http://www.mediafire.com/file/yaoi44c24 ... client.exe
(source is in the bug report)
I have a suspicion there's something wrong when the HID device is provided by Bluetooth or at least when the device is a Wii Remote
Re: Enumerating HID devices on Windows->wine and cmd.exe inp
I have now pretty much concluded that Wine needs a fix to a bug that doesn't let it enumerate the device at all. This is proven by the fact the bug report includes native software that works with that device fine, even in a generic way with a HID library.