andrzej zaborowski, le Thu 17 Jan 2008 23:25:04 +0100, a écrit :
> Thanks, committed although I hoped for something that lets easily test
> that the adapter works, e.g. so that after a usb_add serial:...:stdio
> you can do cat /dev/ttyXXXN in the guest and see what's being typed on
> qemu's stdin. I got the device detected without problems but Linux
> didn't create any new serial ports.

Oh? That's odd, I've no problem here, /dev/ttyUSB0 appears like a charm
and cat & echo work fine.  We should probably use another product ID by
default, which would be more widely automatically recognized.  Here is a
patch.

Samuel
Index: hw/usb-serial.c
===================================================================
RCS file: /sources/qemu/qemu/hw/usb-serial.c,v
retrieving revision 1.1
diff -u -p -r1.1 usb-serial.c
--- hw/usb-serial.c     14 Jan 2008 03:41:02 -0000      1.1
+++ hw/usb-serial.c     17 Jan 2008 22:44:19 -0000
@@ -486,7 +486,7 @@ USBDevice *usb_serial_init(const char *f
 {
     USBSerialState *s;
     CharDriverState *cdrv;
-    unsigned short vendorid = 0x0403, productid = 0xFF00;
+    unsigned short vendorid = 0x0403, productid = 0x6001;
 
     while (*filename && *filename != ':') {
         const char *p;
Index: qemu-doc.texi
===================================================================
RCS file: /sources/qemu/qemu/qemu-doc.texi,v
retrieving revision 1.181
diff -u -p -r1.181 qemu-doc.texi
--- qemu-doc.texi       17 Jan 2008 22:22:45 -0000      1.181
+++ qemu-doc.texi       17 Jan 2008 22:44:20 -0000
@@ -1594,7 +1594,7 @@ Standard USB keyboard.  Will override th
 Serial converter. This emulates an FTDI FT232BM chip connected to host 
character
 device @var{dev}. The available character devices are the same as for the
 @code{-serial} option. The @code{vendorid} and @code{productid} options can be
-used to override the default 0403:FF00. For instance, 
+used to override the default 0403:6001. For instance, 
 @example
 usb_add serial:productid=FA00:tcp:192.168.0.2:4444
 @end example

Reply via email to