ckclark@athena.mit.edu (Calvin Clark) (01/23/91)
Ok, I give up. I am using the "new" Berkeley tty driver, as described in tty(4). It is reasonably easy to get it to accept eight-bit input, by using 'stty pass8' or by setting the ioctl correctly. However, it seems that if it is set in a mode which does *any* output processing at all, (i.e., anything but 'raw' or 'litout'), it will strip the eighth bit off of the output characters. It makes no difference what the parity is. The tty driver seems totally incapable of doing output processing without stripping off the eighth bit. My questions: (1) Am I correct in this assement? (2) Is there a good alternate tty driver available (besides atty)? (3) Any other suggestions? Thanks in advance for your help. -Calvin INTERNET: ckclark@athena.mit.edu UUCP: ...!mit-eddie!mit-athena!ckclark -- The Hammer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % INTERNET E-MAIL: % Calvin Clark %
gwyn@smoke.brl.mil (Doug Gwyn) (01/24/91)
In article <1991Jan22.175816.12228@athena.mit.edu> ckclark@athena.mit.edu (Calvin Clark) writes: >Ok, I give up. I am using the "new" Berkeley tty driver, >as described in tty(4). It is reasonably easy to get it >to accept eight-bit input, by using 'stty pass8' or by >setting the ioctl correctly. However, it seems that if >it is set in a mode which does *any* output processing >at all, (i.e., anything but 'raw' or 'litout'), it >will strip the eighth bit off of the output characters. There was a bug in the BSD tty handler that made it hard to get 8-bit raw data through the handler. However, the right combination of set/get/set ioctls can work around the bug. stty( ofd, &ttyb ); ioctl( ofd, TIOCLSET, &lflags ); /* following 4.2BSD hack courtesy of Chris Torek */ gtty( ofd, &ttyb ); ioctl( ofd, TIOCSETN, &ttyb ); /* makes LLITOUT stick */
guy@auspex.auspex.com (Guy Harris) (01/25/91)
>There was a bug in the BSD tty handler that made it hard to get 8-bit >raw data through the handler. Hard*er*. The bug to which you're referring (fixed in 4.3BSD) kept even "litout" from setting the hardware into 8-bits-no-parity mode; however, even with the bug fixed, there's no way to tell the pre-4.3-reno BSD tty driver not to strip output characters to 8 bits *before* handing them to the hardware, unless you turn "raw" or "litout" mode on; I assume the original poster didn't want to do that.