SUMMARY: Setting the baud rate of serial port

From: Rob Weltman (
Date: Mon Feb 21 1994 - 23:00:52 CST

The following was my question:

> What is the "right" way to set the baud rate of a serial port? I have done
> it with "tip -9600 /dev/cua0" and then exited tip, but there must be a
> better way!

Suggestions were:

- Set up /etc/remote with an entry for cua0. I already had this. The problem was
   with dialing in, not dialing out.

- Make sure there is an appropriate entry in /etc/gettytab. I had that, too.

- Redirect stty. That was news to me! The simple case "stty 9600 >/dev/cua0"
does not
   work, apparently, because the setting reverts when the process exits. The
   probably works: "(stty 9600 -parity,...; sleep 100000000) > /dev/ttya",
but a more
   elegant solution is "stty 9600 < /dev/cua0". That did the trick!

- Use the eeprom program. My SUN is a 4/330, so doesn't have ttya-mode, but
   "eeprom ttya_baud=9600" sets the non-volatile setting for the port. I am
not sure
   this setting is ever referred to, though, beyond boot, so the stty trick
seems to
   be the one to use whenever the port is in an unknown state.

Thanks to all: (Daniel R. Bidwell)
odinba!odin!jeff@uunet.UU.NET (Jeff Tate) (Dave Weitzel) (Colin McFadyen) (Pete Welcher) (Glenn Satchell - Uniq Professional Services) (Jeffrey M. Kaiserman) (Brett Lymn) (Dirk Boenning) (Leon Avery)

| Rob Weltman |
| Microguild, Inc. (415)-428-3693 |
| 888 Villa Street, suite 500 fax (415)-428-3696 |
| Mountain View, CA 94041 |

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:56 CDT