Re: Random sloppy serial reads



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.
.



Relevant Pages

  • Re: Y&R Some observations/questions
    ... Wedding on Friday-Monday, ... The writers got a bit hamfisted with this character, ...
    (rec.arts.tv.soaps.cbs)
  • Re: YAPC: Where to go next?
    ... > Dungeon Crawl version 4.0.0 beta 26 character file. ... >Oozer the Brawler (Sludge Elf) ... >(Level 21 Transmuter) ...
    (rec.games.roguelike.misc)
  • Re: Good initiative mechanics?
    ... If you snip everything else I say, ... initiative mechanics too. ... Why not use descending order of one's ... character to have to move more than half a dozen metres to get to cover. ...
    (rec.games.frp.advocacy)
  • Re: Why "Smith" Died
    ... Virginia Madsen's character? ... There was a lot of subtlety right on the ... his gang in the big shootout in "Heat", ...
    (rec.arts.tv)
  • Re: [CRIT] Opening
    ... character development, not one line :-) ... Buy your muse a beer. ... holes in foot-thick walls (with flints in) is not a noise-free process. ...
    (rec.arts.sf.composition)