[BRLTTY] eurobraille driver: bug in serial stuff?

Yannick PLASSIARD yan at mistigri.org
Thu Feb 25 09:19:39 EST 2010


On Thu, Feb 25, 2010 at 08:43:19AM -0500, Dave Mielke wrote:
> [quoted lines by Yannick PLASSIARD on 2010/02/25 at 12:22 +0100]
> 
> >Hi all:
> >	In my eurobraille driver, I always has a message printed by 
> >Input byte missing at offset 8.
> >This message is produced when I get some data from the serial device.
> >To read data from serial device, I use :
> >serialReadData(theDevice, buffer, length, 0, 20);
> >I think the error is here but don't know how to fix it. Any idea ?
> 
> Yes, I do know what the problem is. What you need to do is to pass an extra 
> boolean parameter to each of your input handlers to instruct it to wait or to 
> not wait for the next byte. This boolean should be set to false (don't wait) 
> for the first byte of a packet, but to true (wait) for any of the rest of the 
> bytes of a packet. Right now you can have the situation where it doesn't wait 
> even though it's in the middle of a packet and the rest of the bytes haven't 
> arrived yet.
Due to the fact that my code calls serialReadData() each time it needs 
some data and then reassembles itself a packet. In this situation would 
it be "correct" to tell serialReadData() not to wait for any 
initial/subsequent timeouts ? I investigated and it seems brltty will 
not burn some extra CPU/memory usage and it suppesses the log warning.

> 
> -- 
> Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
> Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the Day of Judgement.
> EMail: dave at mielke.cc | Canada  K2A 1H7   | 2011 Oct 21 is the End of the World.
> http://FamilyRadio.com/                   | http://Mielke.cc/bible/
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty
> 

-- 
Yannick PLASSIARD
yan at mistigri.org
www.mistigri.org
Visitez le premier Podcast francophone sur l'accessibilité des nouvelles technologies : http://www.cecitek.fr/


More information about the BRLTTY mailing list