Page 2 of 3

Re: Parallel port... again...

Posted: 7. May 2012, 12:09
by mpack
Well, next thing I would try is put the LPT lines back to what Perry said, then consider doing the following in addition :-
old innotek email wrote: 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

Re: Parallel port... again...

Posted: 7. May 2012, 13:59
by jml9904
Once I got the permissions set, that seemed to work... can't test the actual port from here, but at least the host boots now without errors. Progress!
In the config file:

<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4"/>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
</LPT>

and from the command line:

user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/Config/IRQ" 4
user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/Config/IOBase" 0x378
user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/LUN#0/Driver" HostParallel
user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/LUN#0/Config/DevicePath" /dev/parport0

Thanks again. Will see if the hardware actually works once I get on a box where I can test it. Fingers crossed...

Re: Parallel port... again...

Posted: 9. May 2012, 18:31
by anshul makkar
The following configuration worked for me - in home/Virtualbox/<vmname>/<vmname>.vbox file.
<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="5" path="/dev/parport0">
</LPT>

Before configuring parallel port, verify the existence of /dev/parport0 .

Let us know, if this worked. Also share the vbox version deployed.

Re: Parallel port... again...

Posted: 12. May 2012, 17:17
by jml9904
I didn't have any success with just putting "/dev/parport0" on the lpt definition line -- had to add:

user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/Config/IRQ" 4
user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/Config/IOBase" 0x378
user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/LUN#0/Driver" HostParallel
user@host:/virtualbox/XP> VBoxManage setextradata "Windows XP Pro" "VBoxInternal/Devices/parallel/0/LUN#0/Config/DevicePath" /dev/parport0

as well. I'm using VB 4.1.1.4 r77440.

Re: Parallel port... again...

Posted: 12. May 2012, 18:23
by mpack
Anshul might be using the new test build, and I would assume it parses the LPT xml section somewhat differently.

Re: Parallel port... again...

Posted: 14. May 2012, 15:11
by anshul makkar
Yes I am using new test build..
After configuring with set-extradata as mentioned in your latest post, were you able to successfully configure lpt port .
If not, please share the exact error .

Re: Parallel port... again...

Posted: 14. May 2012, 15:16
by Perryg
I have no issues with the port in Linux and have not for some time. But I use the default port for LPT, irq = 5
I suspect that using irq = 4 is why you need to use the setextradata but not sure.

Re: Parallel port... again...

Posted: 15. May 2012, 14:59
by jml9904
Using:

<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="5" path="/dev/parport0"/ >
<Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
</LPT>

didn't work on its own (VERR_CFGM_VALUE_NOT_FOUND), but adding just this line:

<ExtraDataItem name="VBoxInternal/Devices/parallel/0/LUN#0/Config/DevicePath" value="/dev/parport0"/>

seems to have fixed it.

Re: Parallel port... again...

Posted: 23. May 2012, 10:00
by klaus
Really no idea why you don't have success with tweaking the config file - the only reason I can imagine is that you're editing the config while VBoxSVC is running. That won't work, and is the reason for the comment in the config file...

In any case, the parallel port feature will most likely be directly configurable through VBoxManage (and the API) in VirtualBox 4.2, as you can see if you look at the current dev sources (no backport to 4.1 planned). It works now on Windows host, too. OSX is a platform where a parallel port was never available in hardware, and for spending the time on Solaris host we'd need a real justification (customer, ...).

Re: Parallel port... again...

Posted: 26. May 2012, 17:46
by jml9904
Well, the technique seems to work, and I'm happy with it on 4.1; will be watching for the 4.2 implementation. As to MacOS... I don't know anyone cooking PROMs on a Mac, so not sure. But I'd like to thank you, PerryG, and everyone who helped out with this!

Re: Parallel port... again...

Posted: 19. Jun 2012, 09:14
by patdef
Well, I follow all the technique describe previously and I managed to start a virtual XP machine on a Linux host (Debian). I use a VirtualBox version 4.1.16

So I do the following step :
1) modify the machineName.vbox

<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="7" path="/dev/parport0"/>
<Port slot="1" enabled="false" IOBase="0x778" IRQ="7"/>
</LPT>

(I found the adress and irq value in the proc filesystem)

2) manage the machine with the following command

VBoxManage setextradata machineName "VBoxInternal/Devices/parallel/0/Config/IRQ" 7
VBoxManage setextradata machineName "VBoxInternal/Devices/parallel/0/Config/IOBase" 0x378
VBoxManage setextradata machineName "VBoxInternal/Devices/parallel/0/LUN#0/Driver" HostParallel
VBoxManage setextradata machineName "VBoxInternal/Devices/parallel/0/LUN#0/Config/DevicePath" /dev/parport0

3) prepare exclusive access on parport :

modprobe ppdev
rmmod lp
chmod 666 /dev/parport0

4) start my machineName


At a first glance, it seems to work, as the machine start, and as I can check the LPT port is found on the System/Device panel configuration. But I can't use the parallel port for my wish : use an old embedded C compilator which is protected with a sentinel dongle. The sentinel driver can't find the sentinel key.

As a test, I decided to use a lpt.exe software found on this page. neilDOTfraserDOTname/software/lpt/
(sorry, I can't post directly the address, as this is my first day on this forum :( )
I put a led with de resistor on one port of the parallel port connector, and try to drive it directly with the software lpt.exe. Where it works well on a real XP machine, it doesn't on my virtual machine.

So few questions :
- Is there mistake or something that I forget in my configuration ?
- Is there anybody as ever report a success on using a parallel sentinel dongle with VirtualBox ?
- Is it possible to test my parallel port with any other software, method ?


Thanks for your help, I really need to use this old compilator.

Re: Parallel port... again...

Posted: 19. Jun 2012, 11:46
by mpack
Why are you using non-standard base addresses and IRQs? Though I notice "enabled=false" in the line with the odd base address. It just seems like somebody has made random alterations to the instructions with no idea what they do.

Re: Parallel port... again...

Posted: 19. Jun 2012, 13:57
by patdef
Thanks mpack for your quick response. Yes, you are right, I don't fully understand what I should do. This is why I ask some advice. If you know a good place where I can find a complete and working example of what I should do, I will be glad if you share it with me.

So, I thought I must use Irq and base address of my actual hardware configuration. Is it a mistake ? This is why I replace irq 4 by irq 7. And base address is set to 0x378 and 0x778.

I also place an << enable="false" >> for the second line in the vbox file because I thought it was simplier to use only one port.

Nevertheless, I try with the following configuration :

<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4" path="/dev/parport0"/>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
</LPT>

And this one :

<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4" path="/dev/parport0"/>
<Port slot="1" enabled="true" IOBase="0x778" IRQ="4"/>
</LPT>

With the appropriate VBoxManage setextradata commande each time, but it doesn't solve my problem for the moment.

I also try the following one :

<LPT>
<Port slot="0" enabled="true" IOBase="0x378" IRQ="4" path="/dev/parport0"/>
<Port slot="1" enabled="true" IOBase="0x378" IRQ="4"/>
</LPT>

But the VM doesn't start complaining that it is impossible to open tow time the same device.

"Too many instances of a device. (VERR_PDM_TOO_MANY_DEVICE_INSTANCES)."


Have you another ideas or advices ?

Re: Parallel port... again...

Posted: 19. Jun 2012, 14:20
by Perryg
Try irq="5"

Re: Parallel port... again...

Posted: 19. Jun 2012, 14:21
by mpack
The above discussion is IMHO about as complete as you could get, but you seem to have departed from it for some reason?