[Printing-user-general] Successful uniprint driver for Sipix A6 Photoprinter

[email protected] (Mark Small) Sat, 5 Aug 2006 15:35:35 +0000 (UTC)
Newsgroups gmane.linux.printing.general
Organization http://www.linuxprinting.org/
Message-ID <[email protected]>
Hi everybody,

After playing around on and off for the last month, I am now successfully 
printing on my Sipix A6 pocket printer.  It is a serial printer meant for 
laptops and PDAs and is dirt cheap on ebay these days because of poor driver 
support on newer versions of Windows, palm and Wince.  

I was able to hack together a uniprint driver after I found that it uses a 
subset of the escp command language.  

First step is to set the proper serial port parameters:

# stty -F /dev/ttyS1 115200 crtscts cs8 -cstopb -parenb

Your serial port may be ttyS0

First I have to resize the postscript document down to A6.

# psresize -w10.5cm -h 14.8cm -Pletter old.ps new.ps

Then I send it through ghostscript:

gs @sipixa6.upp -sPAPERSIZE=a6 -sOutputFile=new.bin new.ps -c quit

Then I send the binary file to the printer:

# cat new.bin > /dev/ttyS1

gs doesn't always put a final cr/lf pair at the end of the binary file, so I 
made a 2 byte file with a cr/lf pair.  So instead I could do:

# cat new.bin fileend.bin > /dev/ttyS1

Here is my uniprint driver.  It has to be in the gs search path.  I put it 
in /use/share/gs-esp/8.15/lib/

# cat /usr/share/gs-esp/8.15/lib/sipixa6.upp

-supModel="SiPix A6 Pocket Printer"
-sDEVICE=uniprint
-dNOPAUSE
-dSAFER
-dupColorModel=/DeviceGray
-dupRendering=/ErrorDiffusion
-dupOutputFormat=/Epson
-r360x360
-dupMargins="{ 20 0 20 0}"
-dupWhiteTransfer="{
1.0         0.0
}"
-dupOutputPins=48
-dupWeaveYPasses=1
-dupFormatXabsolute
-dupBeginPageCommand="<
1b40 0d
>"
-dupEndPageCommand"<0d 0a>"
-dupEndJobCommand"<0a 0a 0a>"
-dupAbortCommand="(\033\100\15\12\12\12    Printout-Aborted\15\12\12\12)"
-dupSetLineFeedCommand="<1b2b>"
-dupWriteComponentCommands="{(\033*\111)}"

Feel free to give this a try.