I have a potential customer with some industrial kit that currently prints to an obsolete parallel port (Centronics) printer. They need to keep the kit but ditch the printer, sending the data to a "black box" instead that logs that data.
I'd like to do this on a Linux box, any suggestions?
Off the top of my head I am thinking I'll need to do a parallel to serial conversion first, then pull the raw serial data into something that can interpret however the data is being encoded for printing. But it's turned out to be quite a hard thing to Google for (although I have found some bits that might be useful). Alternatively I wonder whether the I/O pins on a Pi or Beaglebone could be used to emulate a printer (although I might be way out of my depth there...)
Another approach might be lptcap[1] although that's intended for DOS (FreeDOS??)
[1] http://www.qi.fcen.uba.ar/materias/iqi/paralel1/home.clear.net.nz/pages/khei...
On 22/04/14 11:20, Mark Rogers wrote:
I have a potential customer with some industrial kit that currently prints to an obsolete parallel port (Centronics) printer. They need to keep the kit but ditch the printer, sending the data to a "black box" instead that logs that data.
I'd like to do this on a Linux box, any suggestions?
Off the top of my head I am thinking I'll need to do a parallel to serial conversion first, then pull the raw serial data into something that can interpret however the data is being encoded for printing. But it's turned out to be quite a hard thing to Google for (although I have found some bits that might be useful). Alternatively I wonder whether the I/O pins on a Pi or Beaglebone could be used to emulate a printer (although I might be way out of my depth there...)
Another approach might be lptcap[1] although that's intended for DOS (FreeDOS??)
[1] http://www.qi.fcen.uba.ar/materias/iqi/paralel1/home.clear.net.nz/pages/khei...
On my browser, I go to google and type "Parallel printer to" and many suggestions come up, such as to: USB, Serial, Network, WIFI etc. I'm sure you can get a parallel to Serial adaptor, and then capture the serial data directly, and also sure you can do the same thing with USB. However.... what will you do with it then? You'll have a stream of ascii and printer control codes to decipher. Perhaps doable if it's Epson control codes, but probably quite hard if it's HP's PCL, or similar.
I googled a bit and found this thread.. http://community.spiceworks.com/topic/286501-capture-parallel-printer-output which points to this http://www.pclviewer.com/resources/capture/index.html which sounds like it will do what you want and it's probably a lot simpler to get something off the shelf (assuming it's still available) from someone who can support it and specialises in it.
Alternatively try googling "Parallel Printer data capture" or "Parallel Printer Capture"
HTH. Steve
On 22 April 2014 21:00, steve-ALUG@hst.me.uk wrote:
On my browser, I go to google and type "Parallel printer to" and many suggestions come up, such as to: USB, Serial, Network, WIFI etc. I'm sure you can get a parallel to Serial adaptor, and then capture the serial data directly,
I get the same results when I try but all the ones I see are for connecting a parallel printer to a PC that doesn't have a parallel port, rather than for replacing the printer on a PC (or in this case a non-PC) which does. It's a common problem with search engines when the keywords you need to search for have a much more common meaning which is the reverse of what you need.
However.... what will you do with it then? You'll have a stream of ascii and printer control codes to decipher. Perhaps doable if it's Epson control codes, but probably quite hard if it's HP's PCL, or similar.
Until I see the data I don't know, but the printer itself is a simple dot matrix line printer so I'm hoping it won't be anything too complicated. (What I'm hoping to extract is the raw data rather than images of it as it would be printed.) As the device connected to the printer isn't a PC I'm hoping it's pretty basic in its outut.
http://www.pclviewer.com/resources/capture/index.html which sounds like it will do what you want and it's probably a lot simpler to get something off the shelf (assuming it's still available) from someone who can support it and specialises in it.
That does look close, I'll take a look in more detail at that. It looks like it'll capture an image of what would be printed rather than let me extract the data but it might be good enough and a lot simpler than rolling my own.
Alternatively try googling "Parallel Printer data capture" or "Parallel Printer Capture"
I tried similar searches before but found software for capturing the data going out of the printer port, which would be fine if the printer was attached to a PC, but it's not :-(
On 23/04/14 10:46, Mark Rogers wrote:
On 22 April 2014 21:00, steve-ALUG@hst.me.uk wrote:
On my browser, I go to google and type "Parallel printer to" and many suggestions come up, such as to: USB, Serial, Network, WIFI etc. I'm sure you can get a parallel to Serial adaptor, and then capture the serial data directly,
I get the same results when I try but all the ones I see are for connecting a parallel printer to a PC that doesn't have a parallel port, rather than for replacing the printer on a PC (or in this case a non-PC) which does. It's a common problem with search engines when the keywords you need to search for have a much more common meaning which is the reverse of what you need.
However.... what will you do with it then? You'll have a stream of ascii and printer control codes to decipher. Perhaps doable if it's Epson control codes, but probably quite hard if it's HP's PCL, or similar.
Until I see the data I don't know, but the printer itself is a simple dot matrix line printer so I'm hoping it won't be anything too complicated. (What I'm hoping to extract is the raw data rather than images of it as it would be printed.) As the device connected to the printer isn't a PC I'm hoping it's pretty basic in its outut.
Well, IIRC a /Simple/ dot matrix printer (DMP) can either print
a) simple ASCII characters c/w simple (ish) Epson style printer control codes control codes consisting of stuff like CR/LF Tab (but how many characters?) Bold Italic Form Feed and possibly stuff like Font name, font size etc. and probably a bit more esoteric stuff
b) extended printer control codes, usually manufacturer or printer specific. For this you'll need a good printer specific manual.
c) I'm not entirely sure about this, but I think some printers can be switched into a graphics mode so that for example with an 8 pin print-head, sending 255 (all bits on) would print a vertical bar, 0 would print a pixel wide space, 127 (lower bits on) would print the bottom half of a vertical bar. etc. When I last had a DMP I had to be careful when wordprocessing picking a font that the printer supported in hardware, because if I didn't, the printer would go into this graphics mode and "draw" each line in this graphics mode which was mega-slow because of the much increased amount of data, and produced poor output compared to the printer supported (and optimised) fonts.
d) some DMPs I think could support page control languages like postscript or some propitiatory HP stuff.
IMHO, /Simple/ DMPs are far from simple. Back in the day I used to have no-end of problems with them. :-(
http://www.pclviewer.com/resources/capture/index.html which sounds like it will do what you want and it's probably a lot simpler to get something off the shelf (assuming it's still available) from someone who can support it and specialises in it.
That does look close, I'll take a look in more detail at that. It looks like it'll capture an image of what would be printed rather than let me extract the data but it might be good enough and a lot simpler than rolling my own.
Alternatively try googling "Parallel Printer data capture" or "Parallel Printer Capture"
I tried similar searches before but found software for capturing the data going out of the printer port, which would be fine if the printer was attached to a PC, but it's not :-(
YMMV but that's how I found the product listed above.
Good luck!
Steve
On 23/04/14 12:55, steve-ALUG@hst.me.uk wrote:
On 23/04/14 10:46, Mark Rogers wrote:
On 22 April 2014 21:00, steve-ALUG@hst.me.uk wrote:
Alternatively try googling "Parallel Printer data capture" or "Parallel Printer Capture"
I tried similar searches before but found software for capturing the data going out of the printer port, which would be fine if the printer was attached to a PC, but it's not :-(
If the receiving device has an ECP printer port then this is bi-directional and should allow you to read data from the printer port of the sending computer. see: http://retired.beyondlogic.org/ecp/ecp.pdf from the wikipedia page http://en.wikipedia.org/wiki/Parallel_port.
Should you need a set of Epson codes, including how a bitmap image is built up I have the information buried on my website. I can dig it out if you want it.
Nev
On 24 April 2014 08:20, nev young nev@nevilley.org.uk wrote:
If the receiving device has an ECP printer port then this is bi-directional and should allow you to read data from the printer port of the sending computer.
So: ECP-capable USB/parallel interface + what I'm going to call a "laplink cable" (parallel cross-over) should get me started? That's just what I wanted to hear!
Will the port appear as something I can read under /dev/xxx or will it be more complicated?
see: http://retired.beyondlogic.org/ecp/ecp.pdf from the wikipedia page http://en.wikipedia.org/wiki/Parallel_port.
Useful stuff, thanks.
Should you need a set of Epson codes, including how a bitmap image is built up I have the information buried on my website. I can dig it out if you want it.
I'll let you know! Thanks again,
On 24/04/14 08:20, nev young wrote:
[SNIP]
Should you need a set of Epson codes, including how a bitmap image is built up I have the information buried on my website. I can dig it out if you want it.
I've still got an old Oki Microline parallel printer; two, in fact, plus at least one copy of the manual which has all sorts of codes and strings in it for controlling these things. Let me know if you need anything, and I'll see if I can help.
Cheers, Laurie.
On 24 April 2014 10:15, Laurie Brown laurie@brownowl.com wrote:
I've still got an old Oki Microline parallel printer; two, in fact, plus at least one copy of the manual which has all sorts of codes and strings in it for controlling these things. Let me know if you need anything, and I'll see if I can help.
Thanks Laurie.
I've just ordered two USB/parallel adapters and a "laplink" cable off eBay to experiment with. Now that you mention it I might have an old Star dot matrix printer lurking somewhere (I think it may be long gone though). Although all I really need to do is set up a PC so it *thinks* it is talking to a printer and capture it from another PC (or the same PC on a different port),
On 24/04/14 10:37, Mark Rogers wrote:
I've just ordered two USB/parallel adapters and a "laplink" cable off eBay to experiment with. Now that you mention it I might have an old Star dot matrix printer lurking somewhere (I think it may be long gone though). Although all I really need to do is set up a PC so it *thinks* it is talking to a printer and capture it from another PC (or the same PC on a different port),
Take care with "laplink" cables. Some are back to back cables that connect the d0-d7 signals directly (what I think you want) and some use the 4 data control lines connected to d0-d3 and special software to write nibbles.
http://en.wikipedia.org/wiki/Direct_cable_connection#DCC_with_Parallel_Port
Nev
OK, thanks for the heads up. I'll buzz the cable out before I start.
I do recall laplink cables that worked on older parallel ports by using the handshaking pins rather than the (non-bidirectional) parallel pins so this isn't a surprise, although I'd hope that any newer cable should use all the pins. But then I bought the cable from eBay so buyer beware etc!
On 24 April 2014 14:42, nev young nev@nevilley.org.uk wrote:
On 24/04/14 10:37, Mark Rogers wrote:
I've just ordered two USB/parallel adapters and a "laplink" cable off eBay to experiment with. Now that you mention it I might have an old Star dot matrix printer lurking somewhere (I think it may be long gone though). Although all I really need to do is set up a PC so it *thinks* it is talking to a printer and capture it from another PC (or the same PC on a different port),
Take care with "laplink" cables. Some are back to back cables that connect the d0-d7 signals directly (what I think you want) and some use the 4 data control lines connected to d0-d3 and special software to write nibbles.
http://en.wikipedia.org/wiki/Direct_cable_connection#DCC_with_Parallel_Port
Nev
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!