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

Dynamically select emulated device speed #11

Open
xairy opened this issue Oct 28, 2023 · 1 comment
Open

Dynamically select emulated device speed #11

xairy opened this issue Oct 28, 2023 · 1 comment

Comments

@xairy
Copy link
Contributor

xairy commented Oct 28, 2023

The proxy currently always uses USB_SPEED_HIGH for emulating devices.

We need to dynamically figure out the actual speed of the device via libusb_get_device_speed and use that for usb_raw_init.

We then also need to improve #10 to patch in the right bMaxPacketSize0 depending on the used speed. Note that the speed provided to usb_raw_init is merely a hint, and the UDC might decide to use a different one. To find out which speed UDC decided to use, we need to resolve xairy/raw-gadget#41 first.

Not a critical issue, filing to not forget.

@AristoChen
Copy link
Owner

Hi,

Thanks for opening this issue, I was aware of the speed issue when I was drafting the code 2 years ago. However, it was not recoreded anywhere so apparently I forgot it, thanks for reminding me!

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