guy@uunet.uu.net (Guy Harris) (03/31/89)
>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.
dberg@cod.nosc.mil (David I. Berg) (04/05/89)
fkuhl@amadeus.mitre.org (F. S. Kuhl) writes: > Is there a way to get a Sun 3 serial port to send and receive 8 data bits > plus a parity bit? Put the command "stty pass8" as the first line in your .login file. -- David I. Berg (dberg@nosc.mil) GENISYS Information Systems, Inc., 4250 Pacific Hwy #118, San Diego, CA 92110 MILNET: dberg@nosc.mil UUCP: {akgua decvax dcdwest ucbvax}!sdcsvax!noscvax!dberg