5
1
I am trying to get a USB-to-Parallel IEEE-1284 cable which is showed as USB Printing Support
in Device manager
to work as a LPT port and tried the answer here. Using this command:
NET USE LPT1: \\[Computer-Name]\Printer /PERSISTENT:YES
The command execute successfully but I can't see the LPT1 in Hardware Devices to get the address to write to it. I know the port I create exits because I made a Java application that lists Serial and Parallel ports using RXTX lib, here is the output:
I added all that LPT ports with the NET
command because my PC doesn't have any. But I don't see them anywhere to get the address and RXTX lib doesn't allow me to get port address AFAIK. Any ideas how to access ports?
EDIT:
Ok, to clarify things a little, I have a USB-to-Parallel IEEE-1284, when you connect it to a Windows XP machine it is showed as an USB Printing Support
device so It doesn't appear as a LPT port because it is designed to work with printers.
I created a Printer with Generic/Text driver and connected it to USB001
port because it is the port of the USB cable. Then I share the printer and create a LPT
port using NET
command. Now I want to write data to that LPT port as I would do with any other native LPT port using for example InpOut32.dll.
If it is not possible to access the port on that way, how can I get access to the port to write/read raw data to it? Not to print a document but to write/read raw data to it as you would do with any parallel port.
Can't you do something like
– martineau – 2013-09-18T04:19:47.993public static final String PARALLEL_PORT = "LPT1";
as shown in the Parallel Communications example code?Historically, LPT1's hardware port address is 0x3BC (see Interfaces).
– martineau – 2013-09-18T04:25:36.460No, I have to use it in another program and I need the port address. Yes, but the address is not the same for every port isn't it? – Andres – 2013-09-18T10:06:08.100
LPT2 and 3 have different fixed addresses (0x378 and 0x278 respectively). These three addresses are the same on all IBM PC-compatible systems.
– martineau – 2013-09-18T12:42:10.050This doesn't seems to work with Parallel Ports created with this method – Andres – 2013-09-25T19:04:33.067
If you are looking for a port address such as 0x378, I don't believe that a "net use lpt?" device has one, nor that it is listed anywhere in Device Manager. – harrymc – 2013-09-26T08:13:14.733
So what kind of an address are you looking for, besides its name of "LPT1"? – harrymc – 2013-09-27T05:57:24.487
I need a way to access the ports, I mean, how can I use them? I can't write a program and ask him to access LPT2 I need the address. – Andres – 2013-09-27T14:58:54.200
Maybe we are all missing the point here (or at least i am). Do you have a "Parallel-to-USB IEEE-1284 cable" as in your question or a "USB-to-Parallel IEEE-1284 cable" as in one of your comments? Maybe you can clarify in your question exactly what printer and connection to your computer you have, and what kind of software (DOS or Windows) is trying to access the printer (and maybe why it needs a port-number). – Rik – 2013-09-27T17:49:07.477
See my edited question, hope is clearer now. – Andres – 2013-09-28T01:37:58.783