On 2 July 2015 at 20:19, Y. Zhang <ygz999@xxxxxxxxx> wrote:
- about usbmon: it seems to be able to monitor peripheral traffics only. In
the BBB case, only 2u. The gadgetFS is on bus 1 but nothing shows up on 1u.
The usbmon sniffs traffics to hdrc controller only, as such one can only
monitor usb traffics from/to device, not from/to host connected with
gadgetFS.
- the issue with unresponded requests is due to a bug in USBProxy, where
ctl.request==0 is used to imply no control request on
host->control_request(); however, 0 is actually valid (namely get_status).
Since it's dropped, gadgetfs sets POLLHUP (instead of POLLIN) causing any
following requests not being retrieved by USBProxy (by testing POLLIN).
- after fixing the bug with USBProxy mentioned above, I was able to proceed
a bit further.
When I insert a device (say USB stick) into the HUB, the host
starts to perform actions on the port (like set/clear features etc which
seem fine) but eventually gives up due to unresponsive get_descriptor and/or
set_address via address=0. This is one of the major issues. I'd like your
comments on the following:
+ How to retrieve host requests to address 0 (before the host enumerates
the device address)? Apparently address 0 is not the ep0 of the gadgetFS and
I have no idea where to intercept such traffics.
+ If the traffics to address 0 can be handled properly, the next major issue
will be how to intercept traffics to all endpoints (ep0, ...) of the
enumerated device within the gadgetFS (which are in addition to ep0... of
the hub) .