Re: [libvirt] Constantly changing USB product ID

On Tue, Mar 27, 2012 at 10:48 AM, Jaap Winius <jwinius@umrk.nl> wrote:
Hi folks,
Recently I learned how to configure KVM with USB pass-though functionality. In my case I configured my guest domain with this block of code:
<hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x0c93'/> <product id='0x1772'/> <address bus='1' device='4'/> </source> </hostdev>
At first this worked fine, but then later the guest domain refused to start because the USB device was absent. When I checked, I found that its product ID had mysteriously changed to 1771. Later it was back at 1772. Now it appears that the USB device I am dealing with has a product ID that changes back and forth between 1771 and 1772 at random.
Apparently, the Windows program running on the guest domain is designed to deal with this nonsense, but the question is, Can KVM be configured to deal with it? Something like <product id='0x177*'/> would be useful, but that doesn't work.
Any ideas would be much appreciated.
Thanks,
Jaap
FWIW, if someone needs a device to test a potential patch with just take any rooted Android phone. e.g. an HTC at the HBOOT menu presents itself as a different product ID than when the phone is normally booted. You can also do this with an iPhone, just hold down the power and the home button to boot it into a "recovery" mode where it'll have a different product ID than normal. -- Doug Goldstein

Quoting Doug Goldstein <cardoe@gentoo.org>:
FWIW, if someone needs a device to test a potential patch with just take any rooted Android phone. e.g. an HTC at the HBOOT menu presents itself as a different product ID than when the phone is normally booted. You can also do this with an iPhone, just hold down the power and the home button to boot it into a "recovery" mode where it'll have a different product ID than normal.
Okay, thanks; so now I know that it's not just badly designed hardware that may do this. My device, however, is not a smart-phone or some other consumer device: it's a scanner with a rotating drum on which to mount flexible, reusable photographic plates from an X-ray machine. It's rather expensive too. Of course, it only works with a Windows application. Can you imagine a legitimate reason why a machine like this might keep flipping its product ID? Cheers, Jaap

Hello Jaap, On Thursday 29 March 2012 01:51:21 Jaap Winius wrote:
Okay, thanks; so now I know that it's not just badly designed hardware that may do this. My device, however, is not a smart-phone or some other consumer device: it's a scanner with a rotating drum on which to mount flexible, reusable photographic plates from an X-ray machine. It's rather expensive too. Of course, it only works with a Windows application. Can you imagine a legitimate reason why a machine like this might keep flipping its product ID?
I know of some USB devices which use this trick to load there firmware: Initially the start without a firmware (so the manufacurer doesn't need to put a flash chip on the device) an USB-ID A. Windows detects the device using the ID and uploads the firmware to the device, which then soft-resets itself and re-appears with USB-ID B. Sincerely Philipp -- Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH be open. fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/
participants (3)
-
Doug Goldstein
-
Jaap Winius
-
Philipp Hahn