*BSD News Article 19066


Return to BSD News archive

From: reink@hpuamsa.neth.hp.com (Reinier Kleipool)
Date: Thu, 29 Jul 1993 20:48:17 GMT
Subject: Re: HP LJ 4 on serial port?
Message-ID: <52570015@hpuamsa.neth.hp.com>
Organization: HP-Sales Office-The Netherlands
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpcc05!hpbbn!hpuamsa!reink
Newsgroups: comp.os.386bsd.questions
References: <22eglr$dpq@news.cs.tu-berlin.de>
Lines: 17

aside of any problems with baud rate, parity (none,8) and handshaking,
you should also consider that UN*X uses <LF> as line terminator, so
if you send a UN*X text file to the printer you will only see the
first line. send <ESC>&k2G to your printer before the text file.
This PCL sequence will set your printer to translate <LF> into
<CR><LF>.
  You can put this in a if= script file. somting like:

#!/bin/sh
/usr/bin/printf "\e&k2G"
cat -
/usr/bin/printf "\eE"

the <ESC>E will reset the printer after the printjob.

Reinier Kleipool