Re: 115200bps

H. Peter Anvin (hpa@trantor.storm.net)
12 Jul 1995 16:20:00 GMT


In article <Pine.OSF.3.91.950710105134.24704B-100000@tinderbox.netman.dk>,
Kurt Wachmann <Kurt.Wachmann@netman.dk> 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).
>

SVID, not POSIX. POSIX doesn't mandate any particular form for struct
termios, although Linux (and most other systems) used a form which
makes it easy to support both termios and SysV termio. termio is
limited to 38400 bps since it uses a bit field for speed.

libc 5 (ELF) and libc 4.7 (a.out) both support B57600 and B115200 when
using termios.

(I would still have preferred libc 5 to have gone to a separate field
where the rate is simply a long; that way if some dork has serial
hardware which can do 36122 bps and wants to use it can do so. Oh well.)

/hpa

-- 
PGP public key available - finger hpa@yggdrasil.com
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah