[usbproxy] Re: windows cannot start usb device relayed by USB proxy

  • From: "Y. Zhang" <ygz999@xxxxxxxxx>
  • To: "Kang, Myung" <the.mkang@xxxxxx>, Dominic Spill <dominicgs@xxxxxxxxx>
  • Date: Wed, 10 Jun 2015 17:02:56 -0700

Thank you all for your responses.

More details on my setup
- I have a DC 5V 2A adapter supplying power to BBB; vid and pid are
retrieved by usb-mitm during runtime which matches the device
- OS image is from the GitHub releases page
- usb-mitm source code is the latest from git
- the host (e.g. windows or linux - I also tried linux and had similar
issues too) is able to go through the first few control setup
transactions such that the basic information on the device is
retrieved, such as device type (USBMS, HIB mouse/keyboard, and the
vid/pid). Afterwards, however, certain control message either going to
the device or returning from device freezes at calling
libusb_control_transfer; meanwhile the read thread encounters errors
(e.g. LIBUSE_ERROR_TIMEOUT on device EP81) when relaying setup is
stuck.
+ is it normal to have control messages on EP00 after an endpoint is
created and data relaying is started on the endpoint (e.g. EP81)?

I'm attaching a few captures and hope someone could help in
identifying the issue:
kb-proxy.pcap - relaying a keyboard; stuck as packet 16, where host
didn't received a response for SET CONFIGURATION REQUEST
kb-0proxy.pcap - another test of relaying a keyboard. this one went a
bit further; but packets 18 and 19 were not responded (packet 18 was
stuck in libusb_control_transfer when relaying to device
usbms-proxy - relaying USB mass storage; packet 250-253 were not
responded. either packet 250 or its response was stuck in
libusb_control_transfer)

Thanks,
Yuan

On Wed, Jun 10, 2015 at 11:02 AM, Kang, Myung <the.mkang@xxxxxx> wrote:

Hi all,

I can confirm that it works on Windows 7, using the OS image.
I would see if you have enough power to BBB (DC 5V 2A), make sure VID and PID
are specified correctly in the argument.

Thanks,
MK
--
Myung Kang
MSIT Student
Electrical Engineering & Computer Science, The University of Kansas
the.mkang@xxxxxx +1 234 567 9218

-----Original Message-----
From: usbproxy-bounce@xxxxxxxxxxxxx [mailto:usbproxy-bounce@xxxxxxxxxxxxx] On
Behalf Of Dominic Spill
Sent: Wednesday, June 10, 2015 6:48 AM
To: Y. Zhang
Cc: usbproxy@xxxxxxxxxxxxx
Subject: [usbproxy] Re: windows cannot start usb device relayed by USB proxy

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

Thank you for your response. The issue seems to be with the following
code with libusb_control_transfer gets stuck when relaying certain
setup messages from host to device. This actually happens with a linux
host as well. Do you have any suggestion/comment on how to deal with
it?

It depends on what the control messages are, if the requests ever make it to
the device or if the responses stall?

Are you running the OS image from the GitHub releases page? With the latest
code from git?

Dominic


On Tue, Jun 9, 2015 at 6:38 AM, Dominic Spill <dominicgs@xxxxxxxxx> wrote:
On 7 June 2015 at 19:00, Y. Zhang <ygz999@xxxxxxxxx> wrote:
Hi All,

Has anyone tried a Windows Host?

I know someone has had success with XBox360, although I'm not sure
how similar the USB handling parts of those two OSs are.

I've done some tests and the USB
device relayed by USP proxy cannot be started by Windows. Here is
the test topology:

Host (Windows 7) <=> (USBProxy GadgetFS) (USBProxy LibUSB) <=> USB
device

USBProxy runs on beaglebone black.

Do you have any output from usb-mitm? Have you tried it with other hosts?

I've tried a few USB devices: mass storage, HID mouse, HID keyboard.
None works. Windows 7 does recognize the USB device (mass storage,
HID
mouse/keyboard) but cannot start the device (no proper driver). Is
there any information missing when USBProxy relays from the device
during the setup?

As far as I know there shouldn't be anything missing, USBProxy should
relay all requests to the device. Could you try with logging turned
on (-l) ? Then we may see the requests that the host is making.

Thanks,
Dominic


Attachment: kb-noproxy.pcap
Description: application/cap

Attachment: kb-proxy0.pcap
Description: application/cap

Attachment: usbms-proxy.pcap
Description: application/cap

Other related posts: