Page 1 of 4

Unable to get printer to work via LPT with guest WinXP

Posted: 11. Jan 2013, 19:30
by Stanisław
Hi,

I've been trying to get my HP 850C to work with the guest OS via a parallel cable.
The host is Windows Server 2008, guest OS is Windows XP SP3. I have enabled the LPT support with:

Code: Select all

vboxmanage modifyvm XPPro --lptmode1 LPT1:
vboxmanage modifyvm XPPro --lpt1 0x370 4
But no luck.

In the Device Manager of the guest OS the LPT port is enumerated, and it has the parameters listed above. Windows XP does not see my printer. When I install it manually, I'm unable to print even the test page. All I get is timeout and a message that the printer is out of paper, which ich not true.

It looks like there's no communication with the device at all.

I am using VB/Guest Addons 4.2.6r82870.

Any clues?

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 11. Jan 2013, 20:11
by Perryg
Perhaps it needs to be enabled

Code: Select all

vboxmanage modifyvm XPPro --lpt1 on

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 11. Jan 2013, 20:38
by Stanisław

Code: Select all

VBoxManage.exe: error: Error parsing LPT I/O base 'on'
It looks like there's no separate option for turning LPT's on:

Code: Select all

[--lpt<1-N> off|<I/O base> <IRQ>]
[--lptmode<1-N> <devicename>]

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 11. Jan 2013, 20:53
by Perryg
Post the guests *.vbox file (as an attachment)

Note: you will need to rename the file to .txt to get past the file limitation barrier.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 11. Jan 2013, 21:01
by Stanisław
Here you are.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 11. Jan 2013, 21:14
by Perryg

Code: Select all

 <LPT>
        <Port slot="0" enabled="true" IOBase="0x770" IRQ="4" path="LPT1:"/>
        <Port slot="1" enabled="false" IOBase="0x378" IRQ="4"/>
      </LPT>
From the looks of it the port is enabled and you use the correct IO and IRQ
Try to adjust the guest to match.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 12. Jan 2013, 10:00
by Stanisław
Adjust the guest to match what? There's no way to change I/O ranges and IRQ under Windows XP. All I can do is adjust the VM setting.

With the exact match (VBoxManage.exe modifyvm XPPro --lpt1 0x378 7) I get a bit different results: no timeout, no "lack of paper" message, just an immediate alert that printing has failed, without any reaction of the printer.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 12. Jan 2013, 12:57
by mpack
If it was me I'd just go in and fix the xml with a text editor: 0x378, IRQ4 - and whatever LPT it's called on the host. However, has it crossed your mind that if the host already has this LPT printer port in use then the guest can't use it?

LPT passthrough is a new feature, not well tested. Personally I'd just share the printer on the network as we've done in the past.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 12. Jan 2013, 13:46
by Stanisław
The .vbox file is constantly being overwritten with the "real" settings, so manual edition does not change anything actually.

The printer is available on the host, but it's not used. I tried to put the printer on hold on the host, but got the same effects. I have uninstalled the printer on the host - the same. I got the same effect (immediate popup telling me that printing has failed) even when I turn the printer off.

There are no drivers for this particular printer model for Windows newer than XP, so using a network share is not really a solution. That was the whole point of setting up VirtualBox guest. Currently I am using drivers for another model on my host, they do work well, but only when you don't print documents larger than a dozen pages.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 12. Jan 2013, 15:38
by mpack
Stanisław wrote:The .vbox file is constantly being overwritten with the "real" settings, so manual edition does not change anything actually.
Not possible, assuming you remembered to shut VBox down first.
Stanisław wrote:The printer is available on the host, but it's not used.
AFAIK, if a printer driver is installed on the host, then the LPT port is in use whenever that driver is loaded.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 12. Jan 2013, 16:45
by Stanisław
I have tried to install the generic printer driver on host's LPT1, then map the port with net use, but still no luck. So I decided to remove all real printer drivers from the server properties. They're unloaded now, the spooler service is restarted and I still have exactly the same effect on my guest vm - printing has failed.

Does VBox log its communication with host's ports somewhere? For me it looks as if the print job hadn't left the vm's sandbox at all.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 12. Jan 2013, 16:53
by Stanisław
Now I have tried this:

Code: Select all

      <LPT>
        <Port slot="0" enabled="true" IOBase="0x378" IRQ="7" path="FILE:"/>
        <Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
      </LPT>
with the same effect. No file request on host, a popup telling me that printing has failed on the guest.

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 13. Jan 2013, 13:07
by mpack
I'm not sure what you expected that "FILE:" thing to do. LPT passthrough will only work with parallel ports. It isn't a stream that can be redirected.

How about showing a picture of the "Ports" branch in Device Manager on your Host?

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 13. Jan 2013, 13:32
by Stanisław
That's what I thought about the "FILE:" redirection. I stand corrected then.

Here are the pictures:

http://imageshack.us/photo/my-images/20 ... e01zl.png/
http://imageshack.us/photo/my-images/80 ... age02.png/
http://imageshack.us/photo/my-images/20 ... ge03p.png/

As you can see, there are no loaded drivers that might have been keeping LPT1 busy. It's a German OS, but the settings should be comprehensible anyway ("Never use interrupt" is selected).

Re: Unable to get printer to work via LPT with guest WinXP

Posted: 13. Jan 2013, 14:16
by mpack
I'm not sure about that "never use interrrupts" setting. Unfortunately I no longer have a PC with LPT I can use for comparison. Why do you think that setting is necessary?

Also useful would be a picture of the ports branch from the guests device manager. If there is no LPT1 listed there then try Control Panel "Add new hardware".