ncurses tests

Joel Sherrill joel.sherrill at
Fri Jun 2 19:58:58 UTC 2000

Eric Norum wrote:
> Charles-Antoine Gauthier wrote:
> >
> > Is this the 16-bit baud rate problem that was reported before?
> >
> > FYI, in many console device drivers, the baud rate is represented as a
> > signed 16 bit integer. You can't do more than 32767 bps. This should be
> > fixed if it hasn't.
> >
> 32-bit value in 68360 console driver.
> But here's the problem that OUTWATER <vac4050 at>
> has reported:
> The initial open of a device sets the speed in the termios structure to
> 9600 baud -- see rtems_termios_open.  The smc1Initialize routine doesn't
> use this (???) so the rate stays at the 115.2 kbaud (as OUTWATER has
> configured) for `normal' operation.  When curses starts, it does an
> ioctl to get the termios state, sets non-cooked mode and does an ioctl
> to set the state -- and ends up changing the rate to 9600 baud.
> Now, where's the bug?   Should the smc1Initialize abide by the termios
> speed?  Probably.  But then how would anyone get a power-up serial line
> rate of anything other than 9600 baud?  I'd say that there's some
> configuration information missing on startup -- but where to put it?

This is a hardware problem to solve in a general way.  Baud rate is
but one termios harware setting (character size, parity, stop bits)
even if one ignores the logical settings.   This makes me lean to
being able to override the entire default termios settings.

But then there is the issue of default on a port per port basis. 
In many systems, there are more than more serial port.  I hate
to create a solution for /dev/console and nothing else.

Maybe termios_open should ask the device driver for its initial 
hardware oriented settings for that port with a new termios handler.
If the handler is NULL, then use 9600-8N1.

> --
> Eric Norum                                 eric at
> Canadian Light Source                      Phone: (306) 966-6308
> University of Saskatchewan                 FAX:   (306) 966-6058
> Saskatoon, Canada.

Joel Sherrill, Ph.D.             Director of Research & Development
joel at                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list