AristoChen / usb-proxy

A USB proxy based on raw-gadget and libusb
Apache License 2.0
136 stars 29 forks source link

Can I act as a proxy for multiple devices at the same time? #21

Open xucong1018 opened 5 months ago

xucong1018 commented 5 months ago

Can I act as a proxy for multiple devices at the same time? i get the error "ioctl(USB_RAW_IOCTL_RUN)" ,when I'm acting for the second device. Thank you for the answer.

xairy commented 5 months ago

If you have two separate UDCs connected, then it should be possible.

If you have only one UDC, then it's not. Emulating a USB hub is impossible through the Gadget subsystem AFAIK. It might be possible to implement parallel proxying of some 1-configuration 1-interface devices by combing them into a single device with two interfaces, but this likely won't work for many practical use cases.