Sunday, February 23, 2014

Connecting Parallel Port Printers via USB to your new Laptop or Desktop


  This article addresses two issues: 1. Connecting parallel port printers via USB; and 2. Accessing USB connected printers from old DOS programs. These thoughts alone may stop many businesses from thinking about migrating old applications forward to Windows 7 from XP. I will outline possible solutions.

While much of the home crowd (and younger crowd) using computers these days may not be familiar with the "parallel port", it is still a common interface used with many older printers in business. It is also referred to as the IEEE 1284 interface. The connection on the computer end normally has a DB25F connector while the printer has a Centronics-36F connector as in the pictures below.


Fewer desktop computers built in the last few years, and rarely laptops, nor nettops include the parallel port interface. As computers got smaller, old legacy interfaces have been eliminated to save space, in favour of faster interfaces such as USB (universal serial bus). Most printers built today include a USB interface, and may also include a wired network or wireless network interface.


While many of you might suggest just getting a new printer, there are still many business and retail POS (Point-of-Sale) systems that still utilize and rely on parallel-interface printers such as the Okidata dot-matrix printers, various thermal printers, and some sturdy HP LaserJet models.

As strange as it may sound to some, it is still possible to buy brand new Okidata ML320 9-pin dot-matrix printers, a standard in many industries, where the use of continuous or multi-part forms is a requirement. The current versions of these printers typically include both parallel and USB interfaces so physically connecting them to a modern PC is generally not an issue.

The problem I did run into recently was being able to find a PCI parallel port card for a desktop computer. Finding such a card these days at the retail level is unlikely, so eBay probably becomes a good source for this type of item. In general, adding a PCI parallel card is an easy process with a desktop computer and will work without any special setup (and you wouldn't need this article) rather than going the route of a USB to parallel adapter. Of course this won't help you with any new laptop or netbook which don't have room for such an interface.

What I did find was a Centronics 36-pin parallel printer to USB adapter. Though this is a bit of a specialty item, you might find them in your local computer store, but certainly easily found on eBay very inexpensively.


It works simply enough. Connect the big end to your parallel interface printer, and plug the small end into an available USB port on your computer. Windows 7, Vista, or XP should instantly recognize the new hardware device.


Depending on the printer you may still need to complete the setup of the new printer via Control Panel > Devices and Printers > Add a printer. Follow through with my example.


Select to Add a Local Printer and select the appropriate USB Port. Although not obvious on the outside, or even within Windows, each USB port is numbered internally, so it will be important to always use the same USB port for this printer.  Actually this rule really applies to any USB printer.



Add a Share Name for this printer to be used in a subsequent step.



If you plan to share this printer with other computers within your workgroup you need to turn on File and Printer Sharing. Go to Control Panel > Network and Sharing Center > Advanced sharing settings > File and printer sharing > Turn on file and printer sharing.


Now you have a working parallel printer accessible from any Windows application. But what about your old DOS application?

DOS predated USB ports, so most DOS applications will only permit LPT1, LPT2, and LPT3, etc. While your DOS application should run in a Command prompt (CMD) Window, it still wants to access printer ports directly. For this we will use a little network redirection tip. In this example, our DOS program is configured to print to LPT2.

The following command will redirect LPT2 output to the Printer Share Name Okidata. At a CMD prompt enter the command:

net use LPT2 \\%computername%\printer-share-name /persistent:yes


Note: To remove this assignment, enter the following at a CMD prompt:
net use LPT2 /delete

Start your DOS program. Print to LPT2 and your output will be directed to the USB printer. Remember it is important to always use the same USB port for this printer. The only problem I encountered was after a system restart. The printer should be turned on when Windows is restarted to ensure that the "network redirection" takes effect.

---------------------------------------------------------------------------------------------------------------------------------------

Another reader, Mark, recently wrote and raised a good question about connecting a parallel-port security key (aka dongle) similar to the SentinelPro dongle shown below. These devices were popular with expensive CAD software and POS systems, but in recent years these security keys have been replaced with USB dongles. You may be quite satisfied using an older version of software without having to upgrade to the more expensive current version. In other situations, the software company is out of business yet you are required to keep using the software but now need to replace the computer hardware.
Unfortunately, the USB to 25-pin parallel adapter won't actually make your computer see this as a parallel port. It is still a USB port so your older software won't be expecting to find the security key there.

The risk is quite high when having to use any dongle -- it could stop working, it could be stolen, or in the case of parallel port dongles, it may be difficult to migrate to new hardware (planned or required). I sought a way to circumvent the hardware dongle for one of my clients. This was not an issue of getting around licensing, but for protecting the investment in the software and ensuring that we could continue using the software regardless of the hardware issues.

I found a company called SafeKey International located in Manitoba, Canada. After reviewing their site you can contact Robert by email at sales@safe-key.com or by phone at (204)669-4639 with a description of the software in use and the equipment involved. SafeKey has been successful with just about every type of parallel port dongle.

SafeKey provides a program (on their site) that will read the contents of your dongle. They then provide a custom driver or small TSR program that you simply start before your protected software and the SafeKey software emulates the hardware dongle. The product they provided my client has worked seamlessly under Windows 2000, XP, Vista, and Windows 7, and without a parallel port present -- no dongle needs to be attached. We put the original dongle away for safe-keeping.

The solution for you will depend on the software you are running and the type of dongle in use. I would be interested in hearing of any solutions other readers find.

Update: February 22, 2013

A reader from Thailand had a recent inquiry. They were using some POS (Point-of-Sale) software under Windows 7 32-bit with AIO (All-in-one) Touchscreen computers. Since they couldn't add extra PCI interface cards, their question was how to connect two POS printers; one having a parallel (Centronics 36F) interface and the other with a serial (DB25F) interface.

In this case I recommended a USB to Centronics 36M (IEEE-1284 Type B) adapter; and a USB to RS232 DB9M Serial adapter, with DB9F to DB25M adapter. Again, to remind everyone, these adapters do not add parallel and serial ports respectively -- they connect the devices to USB ports. If your software is able to print directly to a USB port, then you should have no problem. If however, your software can only communicate with a parallel port (LPTn:) or a serial port (COMn:) then you will need to follow steps in my article. Redirecting COM ports should work similar to redirecting LPT ports (although personally I have not had the need to try it).

No comments:

Post a Comment

BID Toolbar

BID Bottom