Re: Random sloppy serial reads
- From: "Joe Beanfish" <joe@xxxxxxxxxx>
- Date: Fri, 24 Feb 2006 13:48:47 -0500
On Wed, 22 Feb 2006 15:39:52 -0500, nduveruh <Richard.DAnna@xxxxxxxxx> wrote:
[snip c code]
Above is my serial code for Linux, and I am having a problem in which I
sometimes get a sloppy serial read from the other devices on my robot
(and even when testing in hyperterminal). For instance, I will expect
to receive a 'd' serially about 30 times and only receive it accurately
about 20 of them. I will receive another character instead the other 10
times. Is there a flush command that I have to perform to clear the
buffer before each read. I am sending one character and receiving one
character at a time, and I am never expecting to receive two characters
at the same time, so performing a flush all would not hurt my
functionality. I am familiar with the TCSAFLUSH (I believe that is what
it is called), but does this need to be performed often? What could be
causing me to get these seemingly random sloppy reads?
Perhaps you need flow control.
.
- References:
- Random sloppy serial reads
- From: nduveruh
- Random sloppy serial reads
- Prev by Date: Re: Trolltech QT license question
- Next by Date: Makefile, complex targets and dependencies
- Previous by thread: Random sloppy serial reads
- Next by thread: Dynamic loading of code that is not on a filesystem.
- Index(es):
Relevant Pages
|