Skip to content

Correctly get all HID descriptors #116

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hughsie
Copy link
Owner

@hughsie hughsie commented Nov 23, 2023

We have to use the interface number and index, but then most devices just reply with LIBUSB_TRANSFER_STALL (not supported) anyway.

We have to use the interface number and index, but then most devices just reply
with LIBUSB_TRANSFER_STALL (not supported) anyway.
@hughsie
Copy link
Owner Author

hughsie commented Nov 23, 2023

@GamePad64 please

if (g_error_matches(error_local,
G_USB_DEVICE_ERROR,
G_USB_DEVICE_ERROR_NOT_SUPPORTED)) {
g_debug("ignoring: %s", error_local->message);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of feel that it would be more correct to report an error than an empty buffer

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially thought so too; but I've yet to find a device that reports two HID descriptors and actually allows you to request the non-default one. I suspect we have a deeper bug somewhere, but interestingly sudo lsusb -vvvv also shows the same fault.

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