Author Topic: Looking for help: Capture printer data on parallel port  (Read 13970 times)

0 Members and 1 Guest are viewing this topic.

Offline BicuricoTopic starter

  • Super Contributor
  • ***
  • Posts: 1712
  • Country: pt
    • VMA's Satellite Blog
Looking for help: Capture printer data on parallel port
« on: January 08, 2018, 10:43:36 pm »
Hi,

I am trying to support a friend with this issue: he is about to purchase a test equipment, which only has a centronics (parallel port) interface.

This is supposed to be used with a printer to obviously print out the test reports. The problem is of course that it is difficult to find printers with a parallel port nowadays and the test equipment only supports these four printers:

HP Thinkjet
EPSON LQ 1000 (24 Dot Matrix)
EPSON FX80 (9 Dot Matrix)
IBM Proprinter XL

My reasoning is that there must be a way to just read out the data sent by the device on the parallel port, transfer it through USB/RS232 to a PC and from there import it as plain text, PDF, or whatever. At this point I don't know if the test equipment sends just text or bitmap pictures, as well.

Does such an interface (let's call it "Virtual Printer") already exist? If so, what do I need to google? I did find this: http://www.photologic.ca/CSC.html, but I don't know if it would work and the price seems a bit excessive, to me.

Is it possible to read parallel port data into an Arduino? Sorry for the lame question, but I don't know anything about parallel ports...

Thanks,
Vitor

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Looking for help: Capture printer data on parallel port
« Reply #1 on: January 08, 2018, 10:47:57 pm »
Well you could try something like this https://www.amazon.com/Lpt2USB-Parallel-USB-Printer-Adapter/dp/B0015EP2JO

It's not cheap but depending on what you're doing it might be worth it. You could also look around for an older printer that has a parallel port still, they are not that hard to find, my printers both still have it in addition to ethernet and USB.

Probably not too hard to roll your own but you'd have to factor in the value of your time unless it's just for fun.
 

Offline BicuricoTopic starter

  • Super Contributor
  • ***
  • Posts: 1712
  • Country: pt
    • VMA's Satellite Blog
Re: Looking for help: Capture printer data on parallel port
« Reply #2 on: January 08, 2018, 10:59:43 pm »
Thanks, but this adapter you link seems to be the other way around: connect a LPT printer to a USB only computer.
What I need is to interface the LPT output of a test equipment, so that I can redirect it back to a PC, where I grab the data.

The problem is that the device is only compatible with these 4 printer models and those are pretty old and hard to find. Similar printers are sold for crazy prices, too.

This is why I thought about not connecting a real printer, but a "virtual printer" that gets the data from the test equipment and forwards it to a PC, where I can produce a PDF or print it on a modern printer.

This "virtual printer" device would probably have to be able to emulate an Epson FX80 (seems to be the easiest).

Regards,
Vitor

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5669
  • Country: au
Re: Looking for help: Capture printer data on parallel port
« Reply #3 on: January 08, 2018, 11:28:01 pm »
Is the test gear running Windows? Perhaps you could install a virtual printer driver which dumps everything out to file? Or just use the built-in Windows "Print to File" option available in most print dialog boxes (see attached).

I tested this with just a regular PDF document and it outputs the raw PJL (Printer Job Language) data to a file.

There are hardware solutions on the market, such as the Silent Hawk products but they aren't cheap.
 

Offline BicuricoTopic starter

  • Super Contributor
  • ***
  • Posts: 1712
  • Country: pt
    • VMA's Satellite Blog
Re: Looking for help: Capture printer data on parallel port
« Reply #4 on: January 08, 2018, 11:31:19 pm »
Hi,
It doesn't run Windows.
Cheers,
Vitor

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Looking for help: Capture printer data on parallel port
« Reply #5 on: January 09, 2018, 12:32:25 am »
No, the adapter I linked does what you want, look at the description:

"No USB ports on your older computer? This handy adapter plugs into the LPT (DB25) parallel port found on older computers and includes a built-in AC adapter for the power needed to communicate with USB printers."

Consider your test gear an older computer with no USB port.
 

Offline jolshefsky

  • Regular Contributor
  • *
  • Posts: 227
  • Country: us
    • Jason DoesItAll
Re: Looking for help: Capture printer data on parallel port
« Reply #6 on: January 09, 2018, 12:40:38 am »
Not to get your hopes up, but I always thought this would be a neat project. Make a "printer" compatible with the old standards like the Epson FX-80 which would simply write the output to an SD card in PDF format. The first (and perhaps fairly easy) step would be to just dump the binary stream to an SD card and process after-the-fact.

Funny that I have looked at the Raspberry Pi several times but couldn't think of a good use for one ... this particular project seems like a good match.
May your deeds return to you tenfold.
 
The following users thanked this post: ogden

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4414
  • Country: dk
Re: Looking for help: Capture printer data on parallel port
« Reply #7 on: January 09, 2018, 01:38:05 am »
Hi,

I am trying to support a friend with this issue: he is about to purchase a test equipment, which only has a centronics (parallel port) interface.

This is supposed to be used with a printer to obviously print out the test reports. The problem is of course that it is difficult to find printers with a parallel port nowadays and the test equipment only supports these four printers:

HP Thinkjet
EPSON LQ 1000 (24 Dot Matrix)
EPSON FX80 (9 Dot Matrix)
IBM Proprinter XL

My reasoning is that there must be a way to just read out the data sent by the device on the parallel port, transfer it through USB/RS232 to a PC and from there import it as plain text, PDF, or whatever. At this point I don't know if the test equipment sends just text or bitmap pictures, as well.

Does such an interface (let's call it "Virtual Printer") already exist? If so, what do I need to google? I did find this: http://www.photologic.ca/CSC.html, but I don't know if it would work and the price seems a bit excessive, to me.

Is it possible to read parallel port data into an Arduino? Sorry for the lame question, but I don't know anything about parallel ports...

Thanks,
Vitor

an Arduino is probably a bit on the slow side, a fast parallel port can do a few Mbytes/sec

the easiest is probably to get on of those cheap 16 channel usb logic analysers and just process the data afterwards




 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Looking for help: Capture printer data on parallel port
« Reply #8 on: January 09, 2018, 05:40:16 am »
Using a logic analyzer is easier than a $90 adapter that does exactly what he's asking for out of the box?

If I were going to DIY something like this, I'd look at one of the low cost ARM core microcontrollers such as the STM32.
 

Offline fourtytwo42

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: Looking for help: Capture printer data on parallel port
« Reply #9 on: January 09, 2018, 07:33:40 am »
Hi,

I am trying to support a friend with this issue: he is about to purchase a test equipment, which only has a centronics (parallel port) interface.

This is supposed to be used with a printer to obviously print out the test reports. The problem is of course that it is difficult to find printers with a parallel port nowadays and the test equipment only supports these four printers:

HP Thinkjet
EPSON LQ 1000 (24 Dot Matrix)
EPSON FX80 (9 Dot Matrix)
IBM Proprinter XL

My reasoning is that there must be a way to just read out the data sent by the device on the parallel port, transfer it through USB/RS232 to a PC and from there import it as plain text, PDF, or whatever. At this point I don't know if the test equipment sends just text or bitmap pictures, as well.

Does such an interface (let's call it "Virtual Printer") already exist? If so, what do I need to google? I did find this: http://www.photologic.ca/CSC.html, but I don't know if it would work and the price seems a bit excessive, to me.

Is it possible to read parallel port data into an Arduino? Sorry for the lame question, but I don't know anything about parallel ports...

Thanks,
Vitor
Hi Vitor, might help if you specified the equipment concerned but does it have any sort of removable storage media able to output files ? the problem with specific printer support is the data on the centronics port may not be in any universal format.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Looking for help: Capture printer data on parallel port
« Reply #10 on: January 09, 2018, 10:52:01 am »
I once tried to do this for a Textronix scope that had a parallel printer port, following the circuit at https://www-user.tu-chemnitz.de/~heha/basteln/PC/LptCap/index.en.htm I didn't have to time to finish it though, it was quicker to use the floppy drive on the scope and buy a usb-floppy drive.

There are a few converter products on the market, but it's quite a niche application so tend to be pricey. There are so many printer variants, it can be hard to find the right combination of host/printer supported.
Bob
"All you said is just a bunch of opinions."
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2254
  • Country: ca
Re: Looking for help: Capture printer data on parallel port
« Reply #11 on: January 09, 2018, 06:12:32 pm »
Parallel printer port is very simple, and uses a type of handshake for timing. This old gear won't use any of the newfangled fast modes, so you can easily bit-bang the interface (emulating a printer) using any microcontroller. Essentially, you need to capture data when the host (test gear) pulses the strobe line. You need to set a busy line immediately, and pulse the ack line (and clear busy) when done with that byte. Then it repeats. The speed of transmission is thereby limited by the printer, which is a good thing since the characters-per-second speed of any mechanical printer is slower than the raw interface speed. This also makes your data capture job easy. It allows you all the time you need to (for example) send the captured bytes by serial port to a PC for logging.

At least the HP thinkjet using PCL (Printer Control Language) level 1. It should not be difficult to parse this.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26878
  • Country: nl
    • NCT Developments
Re: Looking for help: Capture printer data on parallel port
« Reply #12 on: January 09, 2018, 06:23:13 pm »
Parallel printer port is very simple, and uses a type of handshake for timing. This old gear won't use any of the newfangled fast modes, so you can easily bit-bang the interface (emulating a printer) using any microcontroller. Essentially, you need to capture data when the host (test gear) pulses the strobe line. You need to set a busy line immediately, and pulse the ack line (and clear busy) when done with that byte. Then it repeats. The speed of transmission is thereby limited by the printer, which is a good thing since the characters-per-second speed of any mechanical printer is slower than the raw interface speed. This also makes your data capture job easy. It allows you all the time you need to (for example) send the captured bytes by serial port to a PC for logging.

At least the HP thinkjet using PCL (Printer Control Language) level 1. It should not be difficult to parse this.
I agree. Maybe you need an external flipflop. A couple of decades ago I made an eprom emulator using a 8051. When receiving a character a flipflop was set to signal the printer is busy and software reset it so the computer could send the next character. This worked like a charm because I could print commands and hex files to it at around 200kB/s which was way quicker than RS232.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1029
  • Country: us
Re: Looking for help: Capture printer data on parallel port
« Reply #13 on: January 09, 2018, 06:30:31 pm »
Yes, I agree too. The emulator for a centronics interface is very simple. https://en.wikipedia.org/wiki/Parallel_port  I'd use something like an Arduino Nano. Probably 12 pins needed to emulate the printer. Just spit the received bytes out the USB serial port.  Will need to interpret page feed and other commands.
 

Offline nali

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: gb
Re: Looking for help: Capture printer data on parallel port
« Reply #14 on: January 09, 2018, 06:49:13 pm »
This seems to do what you want, but they don't seem to have released it yet...

http://www.retroprinter.com/about-the-retro-printer/what-does-the-retro-printer-do/
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Looking for help: Capture printer data on parallel port
« Reply #15 on: January 09, 2018, 08:09:19 pm »
The Arduino could almost certainly capture the data, but what about the other half of the equation, communicating with a modern printer via USB or perhaps ethernet. It's going to have to be a printer that has a real controller on board, not one of those cheap ones that rely on a Windows driver to do most of the work. Of course you could capture onto an SD card or something but that creates another step.
 
The following users thanked this post: ivan747

Offline BicuricoTopic starter

  • Super Contributor
  • ***
  • Posts: 1712
  • Country: pt
    • VMA's Satellite Blog
Re: Looking for help: Capture printer data on parallel port
« Reply #16 on: January 09, 2018, 08:32:15 pm »
This seems to do what you want, but they don't seem to have released it yet...

http://www.retroprinter.com/about-the-retro-printer/what-does-the-retro-printer-do/

YES! That is *exactly* what I want! Thanks! I will keep an eye on this and if the proce is right, there is no reason to try and develop something on my own.

To answer a few questions:

1) I cannot say which test equipment it is, because it is an ongoing deal, which has not been concluded, yet.
2) I don't want to actually print, I just want to capture the data and if it is just text, write my own report with it on the PC.
3) All the info I have on the test equipment is what I already posted. I don't know if the output to the printer is just text or bitmap, as well.

You have all given me some great ideas. I will now see if the device is in fact purchased.

Regards,
Vitor


Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Looking for help: Capture printer data on parallel port
« Reply #17 on: January 09, 2018, 08:54:44 pm »
The printers you mention are all compatible with the IBM Proprinter, or at least will print the straight ASCII that they are likely to be getting on the port, so your capture is easier, as all you will get is a few control characters on every page ( form feed, CR LF) then the data then a end of page parameter of FF, making it easy. Otherwise they might put the printer into graphics mode, which will be similar, just a lot more bitmapped data lines and then an escape sequence for the end of page.

Both are easy to decode, though the graphic printout will be poor resolution, while the ASCII will be best delivered in a monospaced font to whatever device you are displaying on so it does not have jagged lines.
 

Offline BicuricoTopic starter

  • Super Contributor
  • ***
  • Posts: 1712
  • Country: pt
    • VMA's Satellite Blog
Re: Looking for help: Capture printer data on parallel port
« Reply #18 on: January 09, 2018, 09:10:41 pm »
The device has two dip switches dedicated to select one of the 4 printe rmodels. I agree that the difference between them is probably minor and related to some control characters.

I started this thread as I was asked if the test equipment could be used to DOCUMENT measurements, without owning one of the four supported printer models.

Of course I searched eBay for a cheap listing of those printers, but there is none being sold, at least at reasonable prices.

I think I can now say that a solution is possible and it consists in hooking up some form of Arduino and send the decoded bytes from the test equipment over USB/serial port to the PC for further processing/formatting.

I thought that this application would be of general interest, as there is probably a lot of older test equipment in this situation: works fine, but only output is through some old centronics printer.

Now I need to see if the test equipment is indeed purchased and if so, I will look further into this. I keep mentioning Arduino, because I feel confortable in considering I will be able to program it as opposed to some other microcontroller. I am not a low level programmer. Also, I don't think that ther will be any timing issues, as stated before: LPT is as fast as the printer allows.

I remember that those old dot matrix printer would allow some escape sequence, where each byte would be interpreted as a vertical line of 8 pixels (or something like that). This would generate the bitmap graphics. At this point I don't know if the test equipment supports this, but I think I would be able to reconstruct the bitmap with some VB .net programming.

The linked Retro Printer looks spot on, but I just realized that there doesn't seem to be much going on... Last entry of June 2017, before 2015. Probably a dead project, unfortunately. If only they knew that there is another market besides retro computing: test equipment!  :)

Regards,
Vitor

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Looking for help: Capture printer data on parallel port
« Reply #19 on: January 09, 2018, 09:34:16 pm »
Given all the information, I think the arduino or other microcontroller would be a reasonable fit, either log the images to a SD card for later retrieval or send them out to the PC over RS232, either one is likely to be not too difficult.
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5669
  • Country: au
Re: Looking for help: Capture printer data on parallel port
« Reply #20 on: January 09, 2018, 10:07:30 pm »
This seems to do what you want, but they don't seem to have released it yet...

http://www.retroprinter.com/about-the-retro-printer/what-does-the-retro-printer-do/

I was looking at this a few years ago, but it seems there has been no movement on this project since 2015. Might be worth contacting them.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11471
  • Country: ch
Re: Looking for help: Capture printer data on parallel port
« Reply #21 on: January 09, 2018, 11:37:51 pm »
The Brother HL-L5000D has a parallel port and both IBM Proprinter and Epson FX emulation. In theory, a drop-in replacement printer.

There should be tons of old printer models (especially business models) that have compatible emulation, eBay (or the local equivalent) should offer many options.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11471
  • Country: ch
Re: Looking for help: Capture printer data on parallel port
« Reply #22 on: January 09, 2018, 11:46:06 pm »
And a bit of further browsing shows that a bunch of Oki printers (both laser and dot matrix) have parallel ports and Epson FX and/or IBM Proprinter support.

I don’t think people realize how important those features still are in a lot of legacy business environments.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11471
  • Country: ch
Re: Looking for help: Capture printer data on parallel port
« Reply #23 on: January 09, 2018, 11:51:16 pm »
Finally, it appears that IBM Proprinter format has actually been subsumed into a larger standard called “Personal Printer Data Stream”, so if you see a printer with PPDS support, it appears it should theoretically work.

Some similar thing might be the case on the Epson side, where ESC/P appears to encompass Epson LQ.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11471
  • Country: ch
Re: Looking for help: Capture printer data on parallel port
« Reply #24 on: January 10, 2018, 12:04:45 am »
I also found this doodad, which is designed to connect to a parallel port and capture the data, and outputs it to USB for printing. It does no data format conversion, but presumably one could capture the data somehow and parse it.

http://www.lpt2usb.com/lpt-to-usb-adapter

The Photologic product line you linked to is similar, and they expressly say customers have done things like this.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf