Re: 115200bps

Kurt Wachmann (Kurt.Wachmann@netman.dk)
Mon, 10 Jul 1995 11:06:35 +0200 (MET DST)


On Thu, 6 Jul 1995, Dirk-Jan Koopman wrote:

> Can someone explain how to obtain 115200 bs as it appears to be
> impossible to get 2.5.8 to set this explicitly on the serial (errno=2).
> The highest I can get is 38400
>

The problem is that the standards (POSIX, SVID whatever) all define speeds
up to and including 38400. Most systems can run faster that this, and
provide a proprietary (i.e. non-portable) way of doing it.

In Linux, you can use the "setserial" program. If you are writing a Linux-
specific program, you can do what setserial does (but please think twice
before doing it).

The setserial program sets a flag for the serial device, changing the
meaning of speed 38400. If you type "setserial /dev/ttyS0 spd_vhi" and
then start your application (setting the port speed to 38400), it will
actually be set to 115200 bits/s.

The flag is only changed by issuing a new setserial command.

(maybe the termios and stty man pages could contain a reference to
setserial, as this question comes up often enough...)

/Kurt