Re: serial drivers

Peter Fox (fox@roestock.demon.co.uk)
Tue, 5 Aug 1997 07:37:18 GMT


Gael Gence <spam-registration@news.fuller.edu> wrote:
> I'm wondering about a way (any way, even a trick) to know if the serial
> port has received something. I'd like to write a program able to report
> port state in "real time". I'm using TIOCSERGETLSR to see if data is
> sent -> how can i know if data is received ? I was talking about LSR
> because get_lsr_status is the last thing i've tried.
>
> Thanks for your effort. I appreciate the details. Very clear.

Have a look at my serialmon program available via
http://www.roestock.demon.co.uk/serialmon

It includes a small kernel patch to increment a couple of variables
every time a character is sent or received. These are accessible in
userland via ioctl(fd, TIOCSERGSTRUCT, &info).

I know there are a few problems maintaining accurate data rate
figures under high loads..

Peter.