[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

RE: Too much data? (Flow control...)

Harris, David \(SBS US\) david.k.harris@siemens.com
Mon, 8 May 2006 15:33:18 -0700 (PDT)

  As the name of the term implies, there was a demonstrated need to Control the Flow of the Data in early serial communications systems.     While the newer serial communications systems are capable of faster speeds, the serial comm chips (typically a *ART (UART, DUART, OCTART...) these Async Receiver/Transmitter chips all have built-in buffers... they will hold some data, and signal the controlling CPU that they have data to be collected...     When the *ART buffer is filling, it will see if the Flow Control mode is set. If XON/XOFF or CTS/RTS (software or hardware respectively, or 'in-band' and 'out-of-band flow control) are enabled, the *ART will try to signal the "other end" to hold up the transmission briefly, until the controlling CPU has collected data from the buffer of the *ART, and then the *ART will signal the "all clear" to resume data transmission.     If you don't have a method set, and the *ART buffer is filling, then nothing happens. That is, the *ART cannot try to signal the "other end".. the *ART buffer fills, and it will receive no other bits. So, at that point, any new bits coming in the comm port are dropped, and the controlling CPU will come and pick up what is in the buffer. Then the *ART will start buffering the next bits...this is where your data loss is probably coming from.     Even if you enable the flow control on your console server end, if it doesn't match the supported control on the "other end", then the "other end" won't recognize the signal to hold the transmission...so you'll still lose bits when the pipe is spewing. :-(     If you can't find docs, you can at least experiment. :-)  You already have the data rate set correctly, so try setting your console server end for software flow control, and see if the data loss goes away. (You can test it by trying to get the port to send you data, and then send it XOFF and XON commands, to pause the data stream.     If you are going to try hardware flow control, you need to make sure that your adapters and your cables carry the RTS and CTS leads correctly between both devices.     The flow control is triggered when the buffer is only partly full, since there may be buffers at the other end as well...just because you say "whoa" NOW, there may still be bits in-flight until your signal gets "there", and then there are other bits still in-flight when the "other end" sees your signal. By sending the signal before the buffer is completely full, the *ART makers hope to be able to catch all of the in-flight data before the buffer fills completely. At todays high speeds, that can be a fair bit of data. :-)       -Z-

From: users-bounces@conserver.com [mailto:users-bounces@conserver.com] On Behalf Of keith patton
Sent: Monday, May 08, 2006 10:52 AM
To: Chris Riddoch; users@conserver.com
Subject: Re: Too much data?

Sounds like you have a flow control problem...

The answer depends much on the device you are connected to and what it supports   ( xon/xoff , rts/cts ) 

  Verify what your remote device supports then turn on its corresponding option in the conserver.cf ( ie, ixon, ixoff, etc )

Chris Riddoch <chrisr@digeo.com> wrote:
Hi, folks.

One of my users pointed out that when a very large amount of data comes
in over the serial port, after a few hundred lines, some of it starts
getting lost. At first I thought this might be caused by delays in
sending logging to our samba server, but the same behavior happened when
logging locally, so I don't think it has anything in particular to do
with logging. Terra term doesn't exhibit this behavior, so it's not a
problem ! in whether the data is being sent properly or not, or with the
OS's handling (cough) of serial communications.

These are relatively fast connections: 119200, and it happens regardless
of how many serial ports are attached to a given machine.

Short bursts are fine -- it's only losing data on sustained bursts. Is
it possible there's a temporary buffer getting full and data is getting
lost that way? Has anybody else seen this? I don't see any relevant
options for conserver.cf...

Chris Riddoch
epistemological humility

users mailing list

Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.