[vbox-dev] Basic Parallel Port support for VirtualBox

Alexander Eichner alexeichi at yahoo.de
Sun Jul 15 21:57:49 GMT 2007


Hi,

I'm currently working on parallel port support for VirtualBox.
This is a first very basic version which implements SPP (Simple Printer
Protocol). ECP and EPP are not supported and even SPP is not fully
implemented (IRQ handling is missing).
It is using the parallel port on Linux hosts via ppdev (no Windows host
supported at the moment).
I tested it with a Led connected to a data line port and I was able to
switch it on and off from a Windows XP Guest.

Howto enable:
1. patch vbox with: patch -Np0 -i vbox-parallel.patch
2. build vbox
3. configure your linux host (all commands as root):

modprobe ppdev
rmmod lp (VirtualBox claims exclusive access to the device)
chmod 666 /dev/parport0 (or add your user to the owner group)

4. Configure your guest:

./VBoxManage setextradata vm_name
"VBoxInternal/Devices/parallel/0/Config/IRQ" 4

./VBoxManage setextradata vm_name
"VBoxInternal/Devices/parallel/0/Config/IOBase" 0x378

./VBoxManage setextradata vm_name
"VBoxInternal/Devices/parallel/0/LUN#0/Driver" HostParallel

./VBoxManage setextradata vm_name
"VBoxInternal/Devices/parallel/0/LUN#0/Config/DevicePath" /dev/parport0

5. Start your guest
6. On windows you must configure the parallel port manually (set the
device resources)
7. Download the lpt monitor from: http://neil.fraser.name/software/lpt/
8. connect a LED to one of the data pins of the parallel port
9. start the program and activate/deactivate the pin, the LED should go
on and off

For developers:

I created a two new interfaces in pdm.h PDMIHOSTDEVICECONNECTOR and
PDMIHOSTDEVICEPORT to support a IOCtl command but maybe it is possible
to enhance the PDMICHAR interface to support it so that the user can
decide if he wants to log the output of the guest device to a file or to
control a host device.

The patch is licensed under the MIT license.

Alexander Eichner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbox-parallel.patch
Type: text/x-patch
Size: 80443 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20070715/5c9ed648/attachment.bin>


More information about the vbox-dev mailing list