Re: Events on Serial port



Derek Philip wrote:

Things I should check now then is how reliable the after command is on Windows. I'm assuming the poll period on the uart setting does not affect reading the state of the control lines.

Check that I can read the state of the DSR reliably.

My fconfigure by the way is

fconfigure $fd -mode 115200,n,8,1 -handshake none -translation binary -blocking 0 -buffering none


More timing test tomorrow I think, find out where

I have used expect on occasion for a similar setup.
filevent should work too. ( all on linux, sorry, but)

Set up either a
[fileevent readable .. ]
or
[expect_background .]

have the routines append to a receive buffer.
query the DSR line in these eventscripts.

the unix tty stuff provides a "tty_drain" function.
I have no idea if flush provides that when applied
to a serial chan.

uwe
.