qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] QEMU, USB passthrough and libusb_set_configuration


From: Manfred Haertel, DB3HM
Subject: [Qemu-discuss] QEMU, USB passthrough and libusb_set_configuration
Date: Sat, 6 May 2017 07:34:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46

QEMU's USB passthrough was not working for my new smartphone.

While analyzing the problem, I found out that a SET CONFIGURATION Request was NACKed by the USB device.

I do not understand why. is it possible, that is was NACKed, because it was the second SET CONFIGURATION request (because it seems that the host already sent a SET CONFIGURATION request before QEMU tried to claim the device)?

Anyway, I wrote a simple program to "fake" a successful call to libusb_set_configuration and did an LD_PRELOAD on this program before starting qemu, and it worked.

Looking at QEMU's code in host-libusb.c, I can see that QEMU does not try to claim the interface if its call to libusb_set_configuration failes, so that's probably the problem.

Though the actual problem may be in the USB device, shouldn't QEMU be more conservative if libusb_set_configuration fails and try to claim the device anyway?

--
Manfred Härtel, DB3HM    mailto:address@hidden
                         http://rz-home.de/mhaertel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]