Possible Project - slightly off-topic!

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
stefano
Posts: 542
Joined: Tue Dec 11, 2012 9:24 am
Contact:

Re: Possible Project - slightly off-topic!

Post by stefano »

Many Centronics printers (MT80 included) responded to ESC/P dialects, so I searched on Google for a way to convert to ESC/P to Poscript.
I found this page.. could it be useful ?
http://ppr.trincoll.edu/
Bill H
Posts: 163
Joined: Sat Nov 27, 2010 6:05 pm

Re: Possible Project - slightly off-topic!

Post by Bill H »

An Epson (or other printer) to pdf converter would be better. Then all you need to do is print the pdf using whatever printer is installed. There are programs that already do it

http://www.printtransform.com/conversio ... 90-104.php
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: Possible Project - slightly off-topic!

Post by RWAP »

Some interesting solutions - but realistically, it needs to be something simple - so that it can run on Raspberry Linux or similar without any interaction with the user once it is set up for their printer.

Ie. it turns the Raspberry Pi into a print spooler - so you could plug it into any parallel or serial port, and then connect a USB printer to the Raspberry Pi.

No keyboard or monitor, just a psu!
Bill H
Posts: 163
Joined: Sat Nov 27, 2010 6:05 pm

Re: Possible Project - slightly off-topic!

Post by Bill H »

If you have $600 here is a premade solution

http://www.ipcas.com/products/centronic ... inter.html
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: Possible Project - slightly off-topic!

Post by RWAP »

Bill H wrote:If you have $600 here is a premade solution

http://www.ipcas.com/products/centronic ... inter.html
That is just what I was thinking along the lines of - although 400 EUROS / $600 USD / £320 is almost as expensive as buying a new dot matrix printer!

That said, for industry it would be an option - what a shame the price is so high
sascha2000
Posts: 57
Joined: Fri Jul 22, 2011 2:13 pm

Re: Possible Project - slightly off-topic!

Post by sascha2000 »

> but realistically, it needs to be something simple

1) Yes of course, just a process/daemon started during init phase of the Linux kernel. So it runs always in background.

2) The daemon will listen on the port the handshaking lines.

3) If data is present, the daemon will take it, store the same in a file and/or/xor in memory.

4) Data has to be analyzed and as far as possible the conversion strategy has to be decided. For example if it is esc/p without grafics, a pretty simple transition in a plain ascii file is simple.

5) Fork the process and execute lpr tool with according parameters (I think this does the system call of glibc) to print the file. "lpr" can print pdf, postscript, plaintext either ....

6) jmp 1

However there will be some other problems to be solved.

a) If the user attaches several printers on the usb, how can he select the according one ?
b) If the user wants to use a network printer, how to handle the same?
c) Installation of the correct printer driver, I think this is not always automatically possible.
d) How to handle the case that the user wants the rasperry to provide access to the printer over ethernet for other computers. Maybe the user will use his one and only printer without plugging and unplugging it.
e) The user may not only want a printout, but either the PDF/ASCII or whatever file.

For all those cases I think a webinterface for setup is mandatory, implying a webserver like apache. d) and maybe b) could be handeled i.e. by swat, but its really a bloody tool for non technicians.

Further topics may come up like supporting SIO (Atari) printers, commodore printers etc ...

Here some linkz:

http://www.cups.org/documentation.php/options.html
http://www.samba.org/samba/docs/man/Sam ... /SWAT.html
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: Possible Project - slightly off-topic!

Post by RWAP »

I think that to keep costs down as low as possible, a simple device which allows the user to connect one USB printer only is required. If they wanted something more complex - saving as a pdf or using a network printer etc, then they could opt for the more expensive option above.

There are already C programs out there which will take ESC/P output (including graphics) and output it to PCL printers.

As for setting up the device, installing printer drivers etc - possibly the answer there is to provide a way of doing this by the supplier - ie. someone would tell me that they want a way of replacing their Epson LX80 printer - I would tell them to go and choose a printer (maybe from a specific manufacturer), and we can offer them the interface which sits between their equipment and the chosen printer. They just need to let me know which printer they purchase, so that we can set it up on the interface.

Post the interface to them, and they just need to plug it in and go.
sascha2000
Posts: 57
Joined: Fri Jul 22, 2011 2:13 pm

Re: Possible Project - slightly off-topic!

Post by sascha2000 »

Hello,

so I found this esc/p converter for Linux:

http://www.mikrocontroller.net/topic/228565

For a first simple approach this would imply, just to implement a daemon which receives data on the Raspberry GPIO port from the printer port of a computer and writes it to file.

The esc/p converter above creates a PNG file from an ESC/P file.
I am not shure if the PNG can be printed with lpr, but the tool "bmeps" from "dk­tools" can build a PDF from.
I am either not shure if bmeps is available for the raspberry, however porting the same should be manageable.

http://www.ctan.org/tex-archive/support/bmeps

So the queue is, where only the daemon has to be implemented:

Printer-port--->gpio--->daemon--->file--->esc/p converter--->bmeps--->lpr

Regards
Sascha
sascha2000
Posts: 57
Joined: Fri Jul 22, 2011 2:13 pm

Re: Possible Project - slightly off-topic!

Post by sascha2000 »

another link.

this converter handels PCL + ESC/P

http://ppr.trincoll.edu/ppr-doc-1.51/re ... l#see_also

But I must search for the tool source or executable
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: Possible Project - slightly off-topic!

Post by RWAP »

Post Reply