Page 1 of 2

LPT1 | Parallel port verification

Posted: 15. Feb 2014, 19:51
by The Mad Prof
Hi all,

First things first.

VirtualBox version:
  • -4.3.6
My system:
  • -Host: Drone - Win8.1 64bit - 8GB Ram - >300GB disc
    -Guest: WinXP - Win7 32bit - 512MB Ram - 10GB disc
My problem:
I want to run a DOS program that uses the LPT1 port on my computer to verificate the license.
I've been trying and searching for a while, but it still not works. For testing purpose i've got a parallel port label printer.
How can i redirect or pass on the parallel code to my printer/ verification device?

Used VirtualBox commands:

Code: Select all

VBoxManage modifyvm WinXP --lpt1 0x378 3
VBoxManage modifyvm WinXP --lptmode1 "LPT1:"
Information about my LPT1 port:
  • I/O range: 0378 - 037F
    I/O range: 0778 - 077F
    DMA: 03
Something i ran into while testing:
Before starting my VirtualBox i can print a testpage in Win8.1, but while running or after running the VirtualBox I can't print anymore.

Thanks in advance!

The Mad Prof

Re: LPT1 | Parallel port verification

Posted: 16. Feb 2014, 02:20
by mpack

Re: LPT1 | Parallel port verification

Posted: 16. Feb 2014, 12:16
by The Mad Prof
mpack wrote:See the discussion in tutorials section.

Sorry, it still doesn't work, that's why I posted this.

Re: LPT1 | Parallel port verification

Posted: 16. Feb 2014, 13:28
by mpack
Well, perhaps you haven't understood it, because you still haven't given the most important info: what is the device name of the physical parallel port on your host? The one you want the guest to talk through? The one you have your physical label printer plugged into? If you're not sure then show me a picture of the "Ports (COM & LPT)" branch in Device Manager on your host.

Re: LPT1 | Parallel port verification

Posted: 16. Feb 2014, 13:46
by The Mad Prof
mpack wrote:Well, perhaps you haven't understood it, because you still haven't given the most important info: what is the device name of the physical parallel port on your host? The one you want the guest to talk through? The one you have your physical label printer plugged into? If you're not sure then show me a picture of the "Ports (COM & LPT)" branch in Device Manager on your host.
LPT1, but i've included the image too. Just in case.

Re: LPT1 | Parallel port verification

Posted: 16. Feb 2014, 15:51
by mpack
You have a Win8.1 host which has a physical LPT1 port? Well, that's unexpected. I didn't think anyone provided LPT connectors on the case anymore.

Returning to your original post.
The Mad Prof wrote: Something i ran into while testing:
Before starting my VirtualBox i can print a testpage in Win8.1, but while running or after running the VirtualBox I can't print anymore.
You mean that the host can't use the LPT1 port? If so, that would be expected behaviour - COM and LPT ports can't be shared, if VirtualBox has it opened then nothing else can use it. In fact this is a good sign since it implies that you've configured the VM correctly, it's accessing the correct host port.

Does an LPTx port appear in the XP Device Manager?

Re: LPT1 | Parallel port verification

Posted: 16. Feb 2014, 21:59
by The Mad Prof
I've upgraded my pc to 8.1 :D
But is LPT better supported on Win7? (I'm asking because you are so shocked)

Here are the pics:
Screens
Screens
WinXP3.png (52.52 KiB) Viewed 13307 times
WinXP detects it, but it has no IRQ...

Oh and by the way, after running the VM, on my host I also can not acces my parallel.

Re: LPT1 | Parallel port verification

Posted: 17. Feb 2014, 13:44
by mpack
If I recall correctly, parallel ports stopped being a default component of desktop PCs back sometime in XP days (earlier for laptops). Since then we've gone through Vista, Win7, Win8 and now Win8.1. I wouldn't have expected an XP era PC to run Win8.x well, and I wouldn't expect a parallel port on anything newer - so that's the only reason for my surprise. I have no knowledge of how well Win8 or Win7 handles LPT ports.
The Mad Prof wrote:WinXP detects it, but it has no IRQ...
As I said in my tutorial, as of now the VirtualBox LPT simulation doesn't include support for interrupts.

Getting low level access to a physical device in Windows has always been a problem, which has gotten much harder in 64 bit Windows, and even more so in Win8. I must concede that there may be some problem with the LPT capture on 64bit Win8.1 hosts. You may have no option but to raise a BugTracker ticket for this problem. The devs probably regard LPT as low priority, so I'm afraid I wouldn't count on a quick resolution.

Re: LPT1 | Parallel port verification

Posted: 27. Feb 2014, 23:29
by gharvan
Don't know if this will be of any assistance—more of a testimonial than actual advice.

I have a homemade desktop built in 2005 by a friend and upgraded with new mobo, AMD 64 chip, HD, memory etc in 2011. I specifically asked for an LPT printer port, originally, because I use an Epson dot-matrix printer (ESC P2 LQ-1070) frequently. It worked fine in XP ( 32 bit) by using the driver for LQ-2500.

About a month ago, I upgraded to Win 7 (32 bit) and had no problem with it recognizing the LPT1 port, but had to change the driver to LQ_2070. It wouldn't print with either the LQ-1070 driver nor the LQ-2500. I also have a multifunction printer on this computer with USB connection.

Last week, I installed VirtualBox and set up XP as the guest in this same computer. I configured a USB port to recognize the multifunction printer (HP 1210 xi) but it balked at recognizing the Epson on LPT1. But after reading mpack's LPT tutorial and following it, I was able to get the Epson working well in VB on the first try. [Thanks, mpack for solving my problem in advance.] I also made it a point to use the same driver as for Win 7 (LQ-2070). The printer also still works well on Win 7.

My point is that it is possible, in general, to use an LPT device in both Win 7 (32 bit) host and XP (32 bit) guest in a fairly modern 64-bit chip computer. I'm also using the same old printer with another computer running Ubuntu 12.04 (64 bit). Both computers are tied to the printer with an automatic switch that senses which computer wants to use the printer. The second computer was also built by the friend in 2009 and has an AMD 64-bit chip.

You're not pursuing an impossible task, because LPT ports can work in some 3 to 5 year old computers running Win 7, but the devil is obviously in the details which are above my skill level.

Re: LPT1 | Parallel port verification

Posted: 26. Jun 2014, 13:33
by Anund
Hey!

I have the same problem, trying to use a license dongle on the parallel port. Windows 7, 64x host and XP-32 bit guest system. I have tried everything you talked about above and the system doesn't find the dongle. Have someone managed to solve this irritating problem?
We have another computer, same host, that's running VMware Player instead and that XP-guest can access the dongle and run the software!! But I want to run Virtualbox instead :wink:

Re: LPT1 | Parallel port verification

Posted: 26. Jun 2014, 15:01
by mpack
Dongles are often specifically designed to be finicky about timing etc. Easy portability is not their objective...

Re: LPT1 | Parallel port verification

Posted: 14. Jun 2016, 22:46
by cghera
I have a Windows 7 host with Windows XP guest.
The host has a working printer on lpt1 port.
I followed the tutorial and added the lpt1 port on the guest. However printing on the guest lpt1 does not send anything on the host printer. Isn't it possible that data pass through to the host printer ? I need an app that works only on Windows xp to print on the lpt1.
On the host the lpt1 has two address ranges and no irq. It is an ecp lpt printer port.
How can I setup the vm?

Re: LPT1 | Parallel port verification

Posted: 15. Jun 2016, 11:57
by mpack
If the host has a working printer then share it using a network share, not some dodgy LPT passthrough feature: which in any case can't work since the host will have the LPT port reserved for the printer.

Re: LPT1 | Parallel port verification

Posted: 16. Jun 2016, 12:08
by cghera
I will try to implement the sharing even though I have a different problem.
The host LPT1 prints normally from command line but the the printer has no driver for Windows 7 (the host). So how will I share it?

Further than that what is the point to have ports (COM/LPT1) in the guest machine if they cannot be used to send data to the physical ports of the host?

Re: LPT1 | Parallel port verification

Posted: 16. Jun 2016, 12:15
by mpack
Your previous post said "the host has a working printer on LPT1 port". No caveats. Hence my previous answer. Perhaps it would be better if you opened your own topic and gave an accurate description of your problem.