Parallel port on Windows 7

Discussions about using Windows guests in VirtualBox.

Parallel port on Windows 7

Postby PandPP » 18. Feb 2013, 06:03

Folks,

I am trying to get a parallel port working on a Windows 7 guest, under VirtualBox 4.2.6.
I need to use a thermal printer for testing a legacy app under Windows 7.
The Host is XP Pro X64. The LPT1 is working nicely there, with the printer behaving. The driver comes with the ability to do a test print, and all works.

On the host, the default for the LPT is to not use an interrupt, and an I/O range of 0x0378 to 0x037F AND 0x0778 to 0x077F.
I have set it to use an interrupt, and it defaults to IRQ 7.

Now, the doco says that when using the --lpt(1-N) via modifyvm, the I/O & IRQ are what shows under the guest, NOT the host, which doesn't make any sense to me, but, I cheated & set them both to be the same.

So, I've done a
vboxmanage <name> --lptmode1 lpt1
vboxmanage <name> --lpt1 0x378 7

No joy.

So, I have also tried
vboxmanage <name> --lpt1 0x778 7

Still no joy.

Since there are two I/O ranges listed under Windoze, which should I be using?

I have attached the VBox and log files. I have a whole bunch of SnapShots. The lpt is only active for the <Hardware>, but none of the <Snapshot>s. Is that my issue? If so, how do I resolve it?

Thanks for any suggestions,

Peter.
Attachments
VBox.zip
(34.79 KiB) Downloaded 50 times
PandPP
 
Posts: 4
Joined: 18. Feb 2013, 05:22

Re: Parallel port on Windows 7

Postby anshul makkar » 19. Feb 2013, 15:29

The log file that's attached, shows that lpt port is in disabled mode.

Below is the example for configuring parallel port:
vboxmanage modifyvm <vmname> --lptmode1 LPT1
vBoxManage modifyvm <vmname> --lpt1 888 5 . (888 is 0x378. You set it to address that's displayed in the guest lpt properties.)

We don't support interrupts for parallel port so disable interrupt support from the guest printer settings.

Let me know if it doesn't work or if still there is any confusion.

Anshul Makkar
anshul makkar
Oracle Corporation
 
Posts: 28
Joined: 7. Feb 2012, 16:59

Re: Parallel port on Windows 7

Postby PandPP » 19. Feb 2013, 21:54

Anshul,

You say the log shows that LPT1 is disabled. I am not sure where you see that in the log. When I search for lpt in the log, there is only one entry.
Above that is the config for the port, showing that it has happily accepted 0x378 hex as 888 dec.

As I showed in my original post, I have issued the vboxmanage commands you suggested.

The vbox file very clearly shows that lpt1 is enabled=true.

Are you saying that the LPT1 is case sensitive? Is that the only thing I missed?

I don't see how reissuing the same commands I have reissued multiple times already will resolve the issue, personally.

You say that interrupt support for the guest needs to be disabled. That flies completely in the face of the documentation, which clearly states that the values used when issuing the "vBoxManage modifyvm <vmname> --lpt1" are for what is visible in the guest. If the interrupt is not supported, then, what value goes in for the IRQ. Leaving the IRQ blank results in an error.

--lpt<1-N> <I/O base> <IRQ> Specifies the I/O address of the parallel port and the IRQ number that the Parallel Port feature will be using. Use this after --lptmod. I/O base address and IRQ are the values that guest sees i.e. the values avalable under guest Device Manager.


So, are you suggesting I disable interrupt on the Host, or Guest?

Please advise.

Peter.
PandPP
 
Posts: 4
Joined: 18. Feb 2013, 05:22

Re: Parallel port on Windows 7

Postby anshul makkar » 20. Feb 2013, 07:38

Confirm the LPT settings in Win7.vbox. It shows that LPT port as disabled (enabled = false, at least that's what I can see in the attached Win7.vbox file) .
First, make sure that in the lpt port is enabled.

Yes , you need to disable the interrupt support on guest. And its not case sensitive.

Anshul
anshul makkar
Oracle Corporation
 
Posts: 28
Joined: 7. Feb 2012, 16:59

Re: Parallel port on Windows 7

Postby PandPP » 20. Feb 2013, 08:03

Anshul,

You keep saying that the Win7.vbox file shows that the LPT is disabled, only, line 3606 of the Win7.vbox file is:
Code: Select all   Expand viewCollapse view
        <Port slot="0" enabled="true" IOBase="0x378" IRQ="7" path="lpt1"/>


Does that not indicate that in fact the LPT IS enabled?

Peter.
PandPP
 
Posts: 4
Joined: 18. Feb 2013, 05:22

Re: Parallel port on Windows 7

Postby mpack » 20. Feb 2013, 11:13

Anshul said "in the attached .vbox file". Check the .zip you provided earlier.
mpack
Site Moderator
 
Posts: 13166
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Parallel port on Windows 7

Postby PandPP » 20. Feb 2013, 12:36

I did. I downloaded the zip I originally attached, unzipped it, opened Win7.vbox, and looked at line 3606.

Did you?
PandPP
 
Posts: 4
Joined: 18. Feb 2013, 05:22

Re: Parallel port on Windows 7

Postby mpack » 20. Feb 2013, 13:20

PandPP wrote:I did. I downloaded the zip I originally attached, unzipped it, opened Win7.vbox, and looked at line 3606. Did you?

Ah, I was looking at the first machine definition, I didn't notice you were using snapshots. Oh well, I'll leave you to fix it yourself then.
mpack
Site Moderator
 
Posts: 13166
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows XP
VBox Version: PUEL
Guest OSses: Mostly XP


Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 12 guests