libftdi Archives

Subject: Re: Example using software flow control?

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Matthew Stock <stock@xxxxxxxxxxx>
Date: Tue, 29 May 2012 15:41:18 +0200
On Sunday, 27. May 2012 23:32:08 Matthew Stock wrote:
> Hello,
> 
> I was wondering if anyone had some examples of using the library
> successfully using software flow control?  I ask because I have an
> application that requires it, and I'm not sure how the FTDI library (or
> the underlying USB library) handle the in-band XON/XOFF signalling.
> Looking at the libftdi code, I can't see how writes are throttled, and
> it seems odd to me that it would be handled in the generic USB code
> (e.g. having the bulk write block).
> 
> I'm not using the library directly - I'm implementing support for FTDI
> on Android for a project, and I've been referencing the libftdi code.
> It's been incredibly helpful.  Everything is working really well until I
> start to write a lot of data.  I'm trying to narrow the problem down -
> an incomplete understanding of FTDI, a bad implementation on my part, a
> problem with Android, etc.

libftdi doesn't have built in support for XON/XOFF, you have to handle this 
at the application level. libftdi was written for the bitbang mode in mind 
in the first place, nowadays it does much more of course.

I don't think it will be part of the core library, since it really 
implements a (common) protocol on top of libftdi. Most people
who need full RS232 communication stick to the ftdio_sio kernel driver.

The wikipedia page on software flow control
http://en.wikipedia.org/wiki/Software_flow_control#Comparison_with_hardware_flow_control

has a good summary why XON/XOFF is "problematic" :)

Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread