Skip to content
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

Fix USB async events for composite devices #248

Closed
arturmadrzak opened this issue Oct 29, 2020 · 1 comment
Closed

Fix USB async events for composite devices #248

arturmadrzak opened this issue Oct 29, 2020 · 1 comment

Comments

@arturmadrzak
Copy link

Refer to libmtp PR:
Async events (cancel and status) doesn't work for composite devices, when
MTP interface is not located as the first one in the descriptors. Control transfers,
by default are addressed to interface 0 but should be addressed to
actual interface. For this purpose wIndex field should contain
address of target interface.

The error line is located here:

0, 0, req.Data, timeout);

and code should look like:

_pipe->GetDevice()->WriteControl(
			(u8)(usb::RequestType::HostToDevice | usb::RequestType::Class | usb::RequestType::Interface),
			0x64,
			0, _interface_number_, req.Data, timeout);
@whoozle
Copy link
Owner

whoozle commented Oct 30, 2020

Thanks for reporting this, feel free to reopen if it's not working!

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

No branches or pull requests

2 participants