[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] FreeMiNT 1.15.10b



On Sat, Nov 04, 2000 at 06:15:38PM +0200, Martin-Éric Racine wrote:
> Hello Frank!
> 
> I am having problems with these drivers, on kernel 1.15.10b:
> 
> On any port, 'stty < /dev/ttyS[0-4]' manages to read the current
> baudrates to plausible values, but 'stty 9600 > /dev/ttyS[0-4]'
> produces the error "stty: standard input: unable to perform all
> requested operations" (9600 is just an example; any valid speed
> produces the same error).

I would say that is to be expected. The stty linux manpage has this to say:

       Handle  the tty line connected to standard input.  Without
       arguments, prints baud rate, line discipline,  and  devia­
       tions  from  stty sane.  In settings, CHAR is taken liter­
       ally, or coded as in ^c, 0x37, 0177 or 127; special values
       ^- or undef used to disable special characters.

Ie. stty sets the parameters on *stdin*, and if you do a 
stty 9600 > /dev/ttyS[0-4]
stdin is connected to your terminal, which is probably not a serial line but
the console, a toswin window or similar.

Also note that something like
stty 19200 </dev/ttyS0
cat <somefile> >/dev/ttyS0

will probably not work, since the port is closed between the two commands
and probably reset to default values on the second open. Not sure about the
MiNT drivers, but I have seen that behaviour on unix.

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen