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

Re: Ultra1, printing via serial port?

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

> 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


Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

Attachment: signature.asc
Description: Digital signature

Reply to: