-
Notifications
You must be signed in to change notification settings - Fork 427
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
Handle device open exceptions in hidapi and skip unsupported devices #2751
Conversation
@MattHag You'll have to check this PR out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change speeds up the start and detection of devices on macOS
I'm pretty sure the failed CI checks are unrelated to my changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks fine, the pipeline is broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
If VID and PID are both zero, the device is highly unlikely to be HID++ capable. On an Apple Silicon Mac, there are a lot of internal HID class devices on bus ID 0x0, none of which are what we are looking for. In both cases we shouldn't even attempt to open the devices at all.
Not all HID class devices found on the system can be opened,
open_path()
will fail with an unhandled exceptionIOHIDDeviceGetReport failed: (0xE00002C7) (iokit/common) unsupported function
. That has been fixed as well.Update gitignore to include common junk files generated by macOS, and pipenv config which this project doesn't use.