[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Fwd: Ultra1, printing via serial port?]



Jan-Benedict Glaw wrote:

> On Fri, 2005-07-29 15:13:45 +0200, F. Kappen <kappen@tfh-berlin.de> wrote:
> > The serial port of my Ultra1 is configured like this:
> >
> > myUltra1: # eeprom ttyb-mode
> > ttyb-mode=9600,8,n,1,-
>
> That's how the OBP will use the serial port. This is totally different
> to the options that may be set by the Linux kernel. You can query (and
> set) these with the stty program:
>
> $ stty -F /dev/ttyS0 -a
> speed 9600 baud; rows 0; columns 0; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
> eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
> lnext = ^V; flush = ^O; min = 1; time = 0;
> -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
> -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
> -iuclc -ixany -imaxbel
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
> echoctl echoke
>
> If your printer uses 9k6 8N1, you can try this (disables handshake):
>
> $ stty -F /dev/ttyS1 raw speed 9600 -crtscts cs8 -parenb -cstopb
>
> However, I admit that stty isn't easy to use if you don't know a lot
> about how serial transmissions work...
>
> > ----------------------------------
> > The tty-section of my "/etc/inittab" looks like this:
> >
> > #1:2345:respawn:/sbin/getty 38400 tty1
> > #2:23:respawn:/sbin/getty 38400 tty2
> > #3:23:respawn:/sbin/getty 38400 tty3
> > #4:23:respawn:/sbin/getty 38400 tty4
> > #5:23:respawn:/sbin/getty 38400 tty5
> > #6:23:respawn:/sbin/getty 38400 tty6
>
> Irrelevant, as long as there's not a console configured to the same port
> (and for sure, you won't directly connect your console to a printer, do
> you?)
>
> > myUltra1: # cat ~/.bashrc > /dev/ttyS1
>
> First of all, you need to correctly configure the serial port with stty.
> For the next step, are you sure your printer accepts plain text for
> printing? (Actually, you never ever told us about your exact printer
> model.)
>

Jan-Benedikt,

thank you for suggestions. I tried your proposal

$ stty -F /dev/ttyS1 raw speed 9600 -crtscts cs8 -parenb -cstopb

but, unfortunately, without success. But now I know where to dig deeper into the
material. I shall read the stty info and  I shall fiddle around with the stty
settings.

Btw. my printer is an old HP-laserjet4P. I don't know, if it accepts plain ASCII,
but trying to print a file piped through GHOSTSCRIPT doesn't work either.

Best regards
Friedhelm




Reply to: