[usbproxy] Re: USBProxy: relay a HUB

  • From: Dominic Spill <dominicgs@xxxxxxxxx>
  • To: "Y. Zhang" <ygz999@xxxxxxxxx>
  • Date: Thu, 2 Jul 2015 16:15:19 +0100


I'm sorry that it's taken me so long to get back to you on this, I've
been travelling and email has been building up.

On 19 June 2015 at 19:41, Y. Zhang <ygz999@xxxxxxxxx> wrote:

Attached is the USBpcap from my test made on the host, where packets 10-30
are between the host and USBProxy.

Was this captured with USBProxy using the pcap filter?

I wonder if the unresponded requests will reach gadgetFS of USBProxy at all.

I would expect the requests to reach the device (as they have passed
through the filter), but I'm interested to know if the device is
responding to them, and if it is, why those responses are being

Could you use USBMON to produce a second pcap file from the USB host
controller? (https://www.kernel.org/doc/Documentation/usb/usbmon.txt)
This will give us two pcap files that we can compare so that we can
know if the requests are being sent to the device and if the device is

If not,
1- how would one update gadgetFS to have such requests forwarded to

I'm not convinced that the requests aren't getting to USBProxy, I
suspect the problem is in relaying them to the device.

2. when (1) becomes possible, what need be addressed to have further
messages relayed between gadgetFS and the HUB device (via libUSB), such that
the gadgetFS forwards all downstream messages to USBProxy and then to HUB
device (libUSB), which would further broadcast requests to any other devices
inserted into the HUB and relay messages from such device back to gadgetFS
(eventually back to host)?

Yes, I think supporting hubs and proxying multiple devices is a very
useful goal, and I think it should be within our reach. One of the
issues is that we build an internal model of the device descriptors
before we initialise gadgetfs, this model only supports a single
device at this stage. We will need to come up with a sensible
replacement for this model, which may be as simple as writing the
descriptors to a buffer rather than building the model.


Any comments are greatly appreciated!!!


Other related posts: