🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #11817

Re: 8 bits plus parity

#11817
From: Guy Harris
Date: Fri, 31 Mar 1989 00:26
30 lines
2028 bytes
>Is there a way to get a Sun 3 serial port to send and receive 8 data bits
>plus a parity bit?

If you're running a release prior to 4.0, you'd have to write your own tty
driver or somehow bang the Z8530 chip's registers yourself.  There may be
a consulting special that does this.

If you're running 4.0 or a later release, *and* your software "owns" the
serial port, it's easy - you can do it on *any* Sun serial port (CPU, ALM,
ALM-2) on *any* model of Sun.  Use the TCSETS or TCSETA-family "ioctl"s to
set the character size to CS8, turn PARENB on, and turn PARODD off if you
want odd parity.  See TERMIO(4). 

If your software *doesn't* "own" the serial port - e.g., if you're trying
to hook up a "login" terminal - it's more difficult.  For example, to make
an 8-bits-plus-parity terminal work as a login terminal, you'd have to
convince "getty" and "login" to set the port up using the aforementioned
"ioctl"s; however, they do not, at present, have support for that.  You'd
have to set the terminal to 7 bits plus parity (or 8 bits plus no parity,
except that there's a bug in the current version of "login" wherein it
forcibly sets the tty to 7 bits plus parity), and then, once you've logged
in, do

	stty cs8 parenb

and then change the terminal's character size and parity settings.

If you're trying to talk to some specialized box that hangs off a serial
port, you probably have software that "owns" the serial port, so it should
be straightforward.
Technical Details
Message-ID: <1180@auspex.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
References: <8903032036.AA01163@amadeus.mitre.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: auspex!guy@uunet.uu.net (Guy Harris)
Newsgroups: comp.sys.sun
Subject: Re: 8 bits plus parity
Keywords: SunOS
Message-ID: <1180@auspex.UUCP>
Date: 31 Mar 89 00:26:19 GMT
References: <8903032036.AA01163@amadeus.mitre.org>
Sender: usenet@rice.edu
Organization: Auspex Systems, Santa Clara
Lines: 30
Approved: Sun-Spots@rice.edu
Original-Date: 18 Mar 89 23:00:08 GMT
X-Sun-Spots-Digest: Volume 7, Issue 217, message 6 of 11