Skip to content

Windows: enumerate simple devices - #418

Open
Qbicz wants to merge 1 commit into
signal11:masterfrom
Qbicz:enumerate_hid_simple
Open

Windows: enumerate simple devices#418
Qbicz wants to merge 1 commit into
signal11:masterfrom
Qbicz:enumerate_hid_simple

Conversation

@Qbicz

@Qbicz Qbicz commented Jan 8, 2019

Copy link
Copy Markdown

Right now, in hid_open it is checked if the connected devices have
"HIDClass" driver name. This is true for composite devices, but some
simple HID devices only have "Mouse" or "Keyboard" driver name.

With this change, one can enumerate and open these devices.

Signed-off-by: Kubicz, Filip filip.kubicz@nordicsemi.no

Right now, in hid_open it is checked if the connected devices have
"HIDClass" driver name. This is true for composite devices, but some
simple HID devices only have "Mouse" or "Keyboard" driver name.

With this change, one can enumerate and open these devices.

Signed-off-by: Kubicz, Filip <filip.kubicz@nordicsemi.no>
@Qbicz

Qbicz commented Jan 8, 2019

Copy link
Copy Markdown
Author

One of devices that cannot be opened is Dell MS116t, but any mouse which is not part of composite device should be affected.

@Qbicz

Qbicz commented Jan 8, 2019

Copy link
Copy Markdown
Author

The driver name in question is received from SetupDiGetDeviceRegistryPropertyA() https://docs.microsoft.com/en-us/windows/desktop/api/setupapi/nf-setupapi-setupdigetdeviceregistrypropertya

Qbicz added a commit to Qbicz/pyhidapi that referenced this pull request Jan 8, 2019
DLL files with included fix
signal11/hidapi#418

Signed-off-by: Kubicz, Filip <filip.kubicz@nordicsemi.no>
Qbicz added a commit to Qbicz/pyhidapi that referenced this pull request Jan 8, 2019
DLL files with included fix
signal11/hidapi#418

Signed-off-by: Kubicz, Filip <filip.kubicz@nordicsemi.no>
Qbicz added a commit to Qbicz/pyhidapi that referenced this pull request Jan 8, 2019
DLL files with included fix
signal11/hidapi#418

Signed-off-by: Kubicz, Filip <filip.kubicz@nordicsemi.no>
@iwpz

iwpz commented Mar 12, 2019

Copy link
Copy Markdown

this is useful.
my work need to check that if OS have a scanning gun in my list, on my computer works good,but on one of my company's comuputer doesn't working. On that PC hid_enumerate() return nothing,(on my and others' PC hid_enumerate() return mouse/keyboard/scanning gun.
but when i add what this commit changed,its working!

@Qbicz

Qbicz commented Mar 12, 2019

Copy link
Copy Markdown
Author

@iwpz I had similar situation. I turned out I could enumerate my device only when some other equipment (headphones) were attached!

Qbicz added a commit to Qbicz/pyhidapi that referenced this pull request May 27, 2019
DLL files with included fix
signal11/hidapi#418

Signed-off-by: Kubicz, Filip <filip.kubicz@nordicsemi.no>
Qbicz added a commit to Qbicz/pyhidapi that referenced this pull request May 27, 2019
DLL is a HIDAPI C library compiled with Visual Studio 2017 with fix
which enables sending/receiving feature requests on devices claimed by
Windows such as mouse or keyboard:
https://github.com/signal11/hidapi/pull/335/files

For 64-bit Python interpreter a 64-bit DLL library is needed. It is also
provided and will be loaded automatically if the program cannot load
32-bit library.

DLL files also include a fix for enumeration and opening of
non-composite HID devices:
signal11/hidapi#418

DLLs are in "Release" version so they do not require Windows debug
libraries from user.

Signed-off-by: Kubicz, Filip <Filip.Kubicz@nordicsemi.no>
Megamouse pushed a commit to RPCS3/hidapi that referenced this pull request Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants