A few days ago I wrote about a problem I was having with a Sun
workstation resetting the console port to 7 bits even parity
during boot-up, even if the eeprom settings were set for 8 bits no
parity. This was causing me to received garbled data during boot time
when I ran my console port thru a terminal server, since the server
was configured for 8 bits no parity. Thanks go to the following people:
guyj@apollo.techpac.oz.au (Guy Jones)
birger@vest.sdata.no (Birger A. Wathne)
etnibsd!vsh@uunet.UU.NET (Steve Harris)
Birger had the right answer, it just didn't go quite far enough:
> Perhaps adding "stty cs8 -parenb" (perhaps a -istrip as well?)
> in /etc/rc would help?
I ended up putting the following at the top of /etc/rc:
stty cs8 -parenb -istrip ignpar &
I also needed an stty in /etc/rc.boot, which is where the problems begin:
/sbin/stty cs8 -parenb -istrip ignpar &
This of course means a statically linked stty, since /usr is mounted at
this time. And I added this command to the /.profile so my single-user
shell worked correctly. It wasn't enough to just have it in rc.boot,
because when it exits, it closes the terminal which causes it to reset
to the defaults.
Steve Harris had a good summary of what was happening:
> Just a guess here:
>
> At boot time, the port is controlled by the eeprom settings.
>
> At multi-user time, if there is a getty on the port, the values are
> set from ttytab/gettytab; otherwise, it has default values (taken
> from the eeprom???)
>
> At single-user time, since the serial port could be the console
> (if there is no keyboard), the port is put into 7-bit mode since
> it is expected to be sending ascii characters. I suspect the even
> parity is on output only, and that it ignores input parity.
>
> I'm pretty confident about the first two, the third is just an
> educated :-) guess.
Everything is working great now. Thanks everyone!
jeff
--Jeff Kays Minnesota Supercomputer Center E-Mail: jkays@msc.edu 1200 Washington Avenue South Phone: (612) 626-1824 Minneapolis, Minnesota 55415 Fax: (612) 624-6550
"May fortune favor the foolish"
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:51 CDT