Closed xairy closed 8 months ago
LGTM. I will merge it soon! thanks for the PR
I think it makes sense to set it to 64 by default since you mentioned that lots of UDCs require it, and I will probably add a config or a input argument which can disable this behavior in case some UDCs does not expect this behavior
A lot of UDCs require
bMaxPacketSize0
to be at least64
for High Speed devices (usb-proxy always uses High Speed right now) due to their hardware limitations: dwc2, dwc3, musb (also dummy).Thus, patch this value into the device descriptor dynamically.
As mentioned in the comment, Raw Gadget should expose this information, but this is not implemented at the moment.
Providing a lower
bMaxPacketSize0
works fine sometimes, but e.g. providingbMaxPacketSize0
of8
fails withdwc3
with a Windows host (Linux, interestingly, works fine).This issue also came up during the discussion in one of the previous PRs.