Re: [Qemu-devel] Re: [PATCH] USB serial device
andrzej zaborowski, le Sat 19 Jan 2008 14:05:20 +0100, a écrit : I applied the patch even though the old values worked ok too. The old values weren't in linux 2.6.12 for instance, and it looks like the new ones are the default ones for the FTDI builderr, so it should be fine now. I also added a chr_close callback for -serial stdio so that I can do usb_add serial::stdio, then usb_del and usb_add serial::stdio again without getting an error on opening stdio. Good, thanks! Samuel
Re: [Qemu-devel] Re: [PATCH] USB serial device
On 13/01/2008, Samuel Thibault [EMAIL PROTECTED] wrote: Samuel Thibault, le Sun 13 Jan 2008 01:55:56 +, a écrit : Here is an updated version, that takes parameters, so as to be able to notably provide the product ID. Can you provide a patch to the .texi docs some time, to document these parameters and an example usb_add line to get the dongle detected under linux? These parameters probably don't need to be specific to this device but evidently nobody needed them yet with the other USB devices so it's ok. There was a small bug, here is a fixed version. I also have a braille device emulation patch which now works, but it probably needs a bit more polishing. Regards
Re: [Qemu-devel] Re: [PATCH] USB serial device
andrzej zaborowski, le Thu 17 Jan 2008 15:09:54 +0100, a écrit : On 13/01/2008, Samuel Thibault [EMAIL PROTECTED] wrote: Samuel Thibault, le Sun 13 Jan 2008 01:55:56 +, a écrit : Here is an updated version, that takes parameters, so as to be able to notably provide the product ID. Can you provide a patch to the .texi docs some time, to document these parameters and an example usb_add line to get the dongle detected under linux? Sure, here it is. Samuel Index: qemu-doc.texi === RCS file: /sources/qemu/qemu/qemu-doc.texi,v retrieving revision 1.179 diff -u -p -r1.179 qemu-doc.texi --- qemu-doc.texi 14 Jan 2008 22:09:11 - 1.179 +++ qemu-doc.texi 17 Jan 2008 14:46:37 - @@ -525,6 +525,10 @@ Pass through the host device identified @item host:vendor_id:product_id Pass through the host device identified by vendor_id:product_id (Linux only). [EMAIL PROTECTED] serial:[EMAIL PROTECTED],[EMAIL PROTECTED]:@var{dev} +Serial converter to host character device @var{dev}, see @code{-serial} for the +available devices. + @end table @end table @@ -1562,7 +1566,7 @@ as necessary to connect multiple USB dev USB devices can be connected with the @option{-usbdevice} commandline option or the @code{usb_add} monitor command. Available devices are: [EMAIL PROTECTED] @var [EMAIL PROTECTED] @code @item @code{mouse} Virtual Mouse. This will override the PS/2 mouse emulation when activated. @item @code{tablet} @@ -1583,6 +1587,16 @@ above but it can be used with the tslib coordinates it reports touch pressure. @item @code{keyboard} Standard USB keyboard. Will override the PS/2 keyboard (if present). [EMAIL PROTECTED] @code{serial}:[EMAIL PROTECTED],[EMAIL PROTECTED]:@var{dev} +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 [EMAIL PROTECTED] option. The @code{vendorid} and @code{productid} options can be +used to override the default 0403:FF00. For instance, [EMAIL PROTECTED] +usb_add serial:productid=FA00:tcp:192.168.0.2: [EMAIL PROTECTED] example +will connect to tcp port of ip 192.168.0.2, and plug that to the virtual +serial converter, faking a Matrix Orbital LCD Display (USB ID 0403:FA00). @end table @node host_usb_devices
Re: [Qemu-devel] Re: [PATCH] USB serial device
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 - 1.1 +++ hw/usb-serial.c 17 Jan 2008 22:44:19 - @@ -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 - 1.181 +++ qemu-doc.texi 17 Jan 2008 22:44:20 - @@ -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: @end example
Re: [Qemu-devel] Re: [PATCH] USB serial device
On 17/01/2008, Samuel Thibault [EMAIL PROTECTED] wrote: andrzej zaborowski, le Thu 17 Jan 2008 15:09:54 +0100, a écrit : On 13/01/2008, Samuel Thibault [EMAIL PROTECTED] wrote: Samuel Thibault, le Sun 13 Jan 2008 01:55:56 +, a écrit : Here is an updated version, that takes parameters, so as to be able to notably provide the product ID. Can you provide a patch to the .texi docs some time, to document these parameters and an example usb_add line to get the dongle detected under linux? Sure, here it is. 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. Regards