stty problem

Georg Feil ghfeil at white.toronto.edu
Wed Nov 22 05:36:00 AEST 1989


>X-Sun-Spots-Digest: Volume 8, Issue 198, message 11 of 18
>>I can't seem to alter the options of /dev/ttya or /dev/ttyb on my SPARC
>>station 1...
>
>Just out of curiousity, I looked into this problem on our SPARCstation 1
>(run- ning 4.0.3). I found that the device must be turned on in the file
>/etc/ttytab (ie: the fourth field of the entry for ttya must read "on");
>Mark Hickey          Computervision Division

I have recently been having a similar problem with a Sun 3/50 OS4.0.1.  I
want to set /dev/ttyb to use 8 bits/char no parity instead of the default
7 bits/even parity. Using 'stty -parenb cs8 >/dev/ttyb' gives no errors
but also has no effect. I tried changing the std.9600 entry for ttyb in
/etc/ttytab to something else, but this has no effect if the device is
'off'.  I guess the std.9600 is for the getty program only.

I finally resorted to writing a program that uses ioctl(2) to set the
device as required. The trick is that the updated settings persist *only
as long as the file to /dev/ttyb is open*. Ttyb is mysteriously reset to
the default state immediately afterwards. In my case I was using cat(1) to
dump files across a serial line, so now I use my own simple version of cat
that reconfigures the port first.

Anyone have any ideas on how to make changes persist? Where are the
default settings entered? (I'm not a sysadmin, so I have no clue.)

Thanks,
Georg.



More information about the Comp.sys.sun mailing list