Re: fileevent not working with serial



* "Jason Sheets" <jason.sheets@xxxxxx>
| I've tried adding the fileevent before and after the proc to no
| avail.

Should not make a difference since the filevent only triggers when TCL
becomes idle.

| proc serial_receiver { chan } {
| if { [eof $chan] } {
| puts stderr "Closing $chan"
| catch {close $chan}
| return
| }
| set data [read $chan]
| set size [string length $data]
| puts "received $size bytes: $data"

Apart from the obvious missing close brace for the proc this should
work...

You also need to make sure that the output at the writing end of the
serial port is unbuffered and flushed properly.

R'
.