Parallel port... again...

Discussions related to using VirtualBox on Linux hosts.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Parallel port... again...

Post 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
jml9904
Posts: 16
Joined: 8. Jan 2012, 23:43
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows, RHEL, SuSE

Re: Parallel port... again...

Post 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...
anshul makkar
Posts: 28
Joined: 7. Feb 2012, 16:59

Re: Parallel port... again...

Post 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.
jml9904
Posts: 16
Joined: 8. Jan 2012, 23:43
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows, RHEL, SuSE

Re: Parallel port... again...

Post 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.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Parallel port... again...

Post by mpack »

Anshul might be using the new test build, and I would assume it parses the LPT xml section somewhat differently.
anshul makkar
Posts: 28
Joined: 7. Feb 2012, 16:59

Re: Parallel port... again...

Post 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 .
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Parallel port... again...

Post 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.
jml9904
Posts: 16
Joined: 8. Jan 2012, 23:43
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows, RHEL, SuSE

Re: Parallel port... again...

Post 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.
klaus
Oracle Corporation
Posts: 1115
Joined: 10. May 2007, 14:57

Re: Parallel port... again...

Post 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, ...).
jml9904
Posts: 16
Joined: 8. Jan 2012, 23:43
Primary OS: Fedora other
VBox Version: OSE Fedora
Guest OSses: Windows, RHEL, SuSE

Re: Parallel port... again...

Post 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!
patdef
Posts: 5
Joined: 19. Jun 2012, 08:31

Re: Parallel port... again...

Post 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.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Parallel port... again...

Post 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.
patdef
Posts: 5
Joined: 19. Jun 2012, 08:31

Re: Parallel port... again...

Post 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 ?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Parallel port... again...

Post by Perryg »

Try irq="5"
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Parallel port... again...

Post 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?
Post Reply