How do I get *8* data bits *no* parity?

Guy Harris guy at auspex.UUCP
Wed Nov 2 18:05:46 AEST 1988


>As I recall, I tried changing the standard entry:
>
>1200# B1200 HUPCL PARENB CS7 CLOCAL OPOST ONLCR # B1200 HUPCL SANE IXANY TAB3 #login: #1200
>
>to:
>
>1200# B1200 HUPCL CS8 CLOCAL OPOST ONLCR # B1200 HUPCL SANE IXANY TAB3 #login: #1200
>
>but it didn't make any significant difference.  Why not?

Because SANE means "7 bits plus even parity".  Not necessarily my
definition of "sane", but what the hell....

>Why does UNIX default to 7 data bits/even parity, anyway?

Historical reasons, I presume.

>UUCP appears to configure the line before calling out (once again, I'm
>drawing on some fuzzy memories of experiments I ran long ago).

It has to, when using the "g" protocol; that requires an 8-bit data
path.

>While I understand the (intended) value of parity when doing file
>transfers,

Actually, some file transfer protocols use an 8-bit data path, and use
their own checksumming (the "g" protocol mentioned above, for one). 

>for interactive use it seems generally ignored.  If I succeed in
>switching to 8 data bits will there be any unwanted side effects
>I should beware of? 

If you set all your terminals, including dial-ups if any, to 8 bits + no
parity, there shouldn't be a problem - unless other computers dialing in
(e.g., for UUCP) are sending with parity enabled, in which case they may
have trouble logging in.  ("getty" strips the 8th bit itself, but
"getpass", used by "login", doesn't.)

>I was told by one of the tech support folks at microport that the "#" in the
>center of the gettydefs record delimits line condition BEFORE login from
>line condition AFTER login.  Is this correct?

Yes.  That's why the SANE in the "after" settings is undoing the work
you went through to set the character size to 8 bits.  Try replacing
SANE with:

	BRKINT ICRNL IXON OPOST ONLCR CS8 ISIG ICANON ECHO ECHOK

in the "after" settings.

>In general, I'd be fascinated to hear the full story of what is really
>going on in a gettydefs entry.

I got this from prowling the source code; you might try the "getty" and
"gettydefs" man pages, but they may not tell you enough.

>While I can look up the supposed definition of some of these field mnemonics
>(e.g., "PARENB" or "CS7") I feel that the UNIX documentation is extremely
>inadequate in describing the available options and interactions in line
>control settings.

UNIX documentation is often inadequate.



More information about the Comp.unix.wizards mailing list