An option is:
-serial COM1
-serial pipe:com_1
-serial file:test.txt
Only one -serial option is supported.
Use upper-case for COM number.
Use lower-case for pipe: and file:.
Dialog is popped up and set communication parameters.
After patches are applied and the first time Windows boots, Windows
recognizes the device is updated. So wait until a device driver is installed
and reboot.
-serial pipe:com_1 options is for windbg. For more information, see here.
Characters output from guest's serial port is written to file with -serial file:test.txt option.
I have not tested a real COM port.
I used ComEmulDrv which provides a virtual COM port pair as a device driver
for Win2k/XP. I set COM5 and COM6 by it and used HyperTerminal on both Win2k
guest and WinXP host. Files can be transfer between them.
http://mixw.net/related.htm#tncemu
Communication parameters are important. Tested parameters are:
Baud rate: 9600 bps
Data bit: 8 bit
Parity: none
Stop bit: 1
Flow control: none
It is necessary to set the same parameters among the guest and the host
and QEMU.
USB patches for Win32, FreeBSD and MacOS X
Patched are from here by L. Mendez.
http://gnome.dnsalias.net/patches/
-usb
This option adds pseudo USB mouse device to a guest OS.
-usbdevice tablet
When a guest OS has a driver for USB tablet, a mouse doesn't need to click in the guest OS windows to capture.
-usbdevice host:xxxx:yyyy
A USB device xxxx:yyyy on a host OS can be used from a guest OS.
USB can be used only on Windows 2000/XP host.
I will explain using a USB mouse in Windows 2000 guest on Windows XP host.
At first, install a filter driver for USB to Windows XP host. This connects USB of Windows 2000 guest to that of Windows XP host.
Caution:
The program shown here is infected by virus Win32.Parite.b
Please scan your computer by an anti-virus software if you install this program.
libusb-win32-filter-bin-0.1.10.2.exe
New Program.
libusb-win32-filter-bin-0.1.12.0.exe
Then start QEMU with -usb option.
[DOS prompt] qemu.exe -L ./pc-bios -hda win2k.img -usb
(qemu) info usbhost
Device 0.1, speed 12 Mb/s
Class 00: USB device 1267:02f0, MULTI-DIRECTION OPTICAL MOUSE
Then connect USB device (1267:02f0) to the guest OS. 1267 is a vender ID and 02f0 is a product ID.(qemu) usb_add host:1267:02f0Finally, PnP manager of Windows 2000 guest recognizes USB mouse and a device driver is installed.
(qemu) info usb Hub port 0: Device 0.3, speed 12 Mb/sUse usb_del in QEMU monitor. 0.3 means that the bus number is 0 and the address of USB device is 3.
(qemu) usb_del 0.3Then remove USB device in host OS. For example, right click on the task bar and remove the USB device as in guest OS. The mouse doesn't need to do this.
(qemu) info usb USB support not enabledIf you don't see any device by info usbhost, confirm to install the filter driver to host OS. You can see available devices by Start->All Programs->LibUSB-Win32->Test Program like this.