This site has moved to a new location. This page will automatically redirect in 5 seconds.

New site

1. Using serial

1.1 Option

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.


1.2 Using serial

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.


2. Using USB

USB patches for Win32, FreeBSD and MacOS X
Patched are from here by L. Mendez.
http://gnome.dnsalias.net/patches/

2.1 option

-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.


1.2 Using USB

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

Press Ctrl-Alt-2 and check USB device ID of host OS in QEMU monotor.
(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:02f0
Finally, PnP manager of Windows 2000 guest recognizes USB mouse and a device driver is installed.

When you want to remove the USB device, remove USB device in guest OS. For example, right click on task bar and select remove the device. The mouse doesn't need to do this. Then check a number of USB bus and address in QEMU monitor.
(qemu) info usb
Hub port 0:
  Device 0.3, speed 12 Mb/s
Use 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.3
Then 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.

After that, unplug the USB device on your machine.

Note: The USB device is recognized by both guest OS and host OS. Remove the device in both them before you unplug the device from your machine.
If you see 'USB support not enabled', confirm to use option -usb at startup.
(qemu) info usb
USB support not enabled
If 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.

You can set the USB device by option -usbdevicce host:1267:02f0 at startup. host:1267:02f0 is explained above.



home