Path: utzoo!attcan!uunet!olivea!apple!altos!megadon!clp From: jeff@theory.tn.cornell.com (Jeff Miller) Newsgroups: comp.unix Subject: Summary setting RS232 port to 8 bits on Tek 4301 (mod 4.2 BSD) Message-ID: <2271@megadon.UUCP> Date: 21 Nov 90 00:04:25 GMT Sender: clp@megadon.UUCP Organization: Cornell Theory Center Lines: 19 Approved: clp@megadon.UUCP Apparently-To: uunet!comp-unix In BSD 4.3 it is very easy to do. Simply set the c_cflag, to CS8 (meaning character size = 8). The c_cflag is in the termio.h header and is easy to set using ioctl. Unfortunately, some of the modified versions of BSD do not have the same structures or flags. For a Tektronix running a modified version of 4.2 BSD the structure is called "sgttyb" found in the sgtty.h header. The flags are named "sg_flags" but they do not have a flag for 7 or 8 bit character size. It appears that you can either get 7 bit characters with parity or you can opt for 8 bit characters with no parity. To set it to 8 bits, no parity I received two suggestions. Set the RAW option on the sg_flags or set the LITOUT (Literal Output) option, also in the sg_flags. However, for some applications, including mine, you need 8 bits and a parity bit. As far as I know this is impossible on the 4.2 BSD modified by Tektronix, and may be impossible on other machines as well. I hope someone can prove me wrong in this information. If you know of anything else I can try to set 8 bit, even parity email me: jeff@theory.tn.cornell.com Thanks.