EmbeddedRelated.com
Forums

Virtual LPT Driver?

Started by ds19968902 February 19, 2007
does anyone know of a utility or driver that i can use to add a
virtual lpt port (hardware accessible, not printer port) to a notebook
without one?

my aim would be to write some code that would read and write to this
virtual lpt and have a wrapper that would in turn send and receive
jtag cmds/data using the ftdi2232 and there jtag.dll

thanks!

An Engineer's Guide to the LPC2100 Series

I don't think that there is a way of doing this.

The LPT port is just a couple D type latches at an IO address.
There has never been a standard way of accessing it, programs used
to just write to it directly.
User programs under 2k, XP etc can't access IO space directly, they
need to use a device driver.
It is fairly easy to still do this, either by writing your own
device driver or using a generic device driver like giveio.sys
You can only create a virtual device if there is a known software
access point that you can emulate, in DOS days this was int21, but
few programs used int21 to access the lpt, it was just as easy (if
not easier) to write directly.

What program are you trying to intercept? The only possibility would
be to write a replacement device driver for that program, faking the
one the program originally used and performing the redirection you
require. If the original was not open source, you are going to find
reverse engineering it a huge task.

Saying all this, but the following product does seem to have
achieved what you are after. Though I expect it implements a printer
interface, not a bit bang interface as used for JTAG
http://www.usbgear.net/item_157.html
Found on http://www.lvr.com/parport.htm

--- In l..., "ds19968902" wrote:
>
> does anyone know of a utility or driver that i can use to add a
> virtual lpt port (hardware accessible, not printer port) to a
notebook
> without one?
>
> my aim would be to write some code that would read and write to
this
> virtual lpt and have a wrapper that would in turn send and receive
> jtag cmds/data using the ftdi2232 and there jtag.dll
>
> thanks!
>
ds19968902 schrieb:
> does anyone know of a utility or driver that i can use to add a
> virtual lpt port (hardware accessible, not printer port) to a notebook
> without one?
>
> my aim would be to write some code that would read and write to this
> virtual lpt and have a wrapper that would in turn send and receive
> jtag cmds/data using the ftdi2232 and there jtag.dll

Well, there is something that at least comes close to what you want to
do; it's a selfmade USB-parallel-adapter that comes with a driver that
simulates the parallel port's hardware, thus enabling (most)
applications to use this USB-parallel-adapter to "wiggle" on some of
it's signal lines.
Some parallel port ISP programmers do work with this selfmade project.

The specific thing about this adapter is the driver that intercepts
software's accesses to the parallel port's hardware, thus enabling the
device to do much more than a standard USB-parallel-printer adapter.

http://www-user.tu-chemnitz.de/~heha/bastelecke/Rund%20um%20den%20PC/USB2LPT/index.html.en

___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Appologies for replying to to my own reply, but I have thought of a
way of doing this that *may* work in all cases, though my knowledge
of device drivers and IO protection is very limited.

Create a device driver which owns the parallel port, re-writing any
existing privilage tables. Any other device driver which tries to
access the parallel port IO address will cause a GPF. Re-direct
this GPF to a handler which tidies up and sends messages to your
software.
--- In l..., "Jason Morgan"
wrote:
>
> I don't think that there is a way of doing this.
>
> The LPT port is just a couple D type latches at an IO address.
> There has never been a standard way of accessing it, programs used
> to just write to it directly.
> User programs under 2k, XP etc can't access IO space directly,
they
> need to use a device driver.
> It is fairly easy to still do this, either by writing your own
> device driver or using a generic device driver like giveio.sys
> You can only create a virtual device if there is a known software
> access point that you can emulate, in DOS days this was int21, but
> few programs used int21 to access the lpt, it was just as easy (if
> not easier) to write directly.
>
> What program are you trying to intercept? The only possibility
would
> be to write a replacement device driver for that program, faking
the
> one the program originally used and performing the redirection you
> require. If the original was not open source, you are going to
find
> reverse engineering it a huge task.
>
> Saying all this, but the following product does seem to have
> achieved what you are after. Though I expect it implements a
printer
> interface, not a bit bang interface as used for JTAG
> http://www.usbgear.net/item_157.html
> Found on http://www.lvr.com/parport.htm
>
> --- In l..., "ds19968902" wrote:
> >
> > does anyone know of a utility or driver that i can use to add a
> > virtual lpt port (hardware accessible, not printer port) to a
> notebook
> > without one?
> >
> > my aim would be to write some code that would read and write to
> this
> > virtual lpt and have a wrapper that would in turn send and
receive
> > jtag cmds/data using the ftdi2232 and there jtag.dll
> >
> > thanks!
>