[310] in linux-net channel archive
Re: Expect, Send, and dropped characters
daemon@ATHENA.MIT.EDU (Al Longyear)
Fri May 12 11:49:00 1995
From: longyear@netcom.com (Al Longyear)
To: msp@tyrell.net
Date: Fri, 12 May 1995 07:21:21 -0700 (PDT)
Cc: linux-net@vger.rutgers.edu
Reply-To: linux-serial@vger.rutgers.edu
In-Reply-To: <m0s9s2o-0000y1C@carpediem.org> from "M.S. Petrovic" at May 12, 95 05:34:06 am
> I'm using chat as a front end to establishing a connection to a remote
> server host. Unfortunately, characters dropped from the *middle* of the
> "expect" strings often prevent the negotiation from going to successful
> completion. I have seen many references to using only the trailing
> portion of the expect string, should a leading portion be lost, but have
> never seen reference to characters within the string being dropped.
> These observations above are based on a reading of /usr/adm/messages
> during the chat script converstation.
>
> a) What in general can be done about characters interior to an expect
> string being dropped? (Nothing?)
1. Chat does not 'drop' characters from the middle, front, or end of
the string. It reads the characters from the tty buffer and all
characters which the tty driver give to it are 'read'.
The reason for looking for the ending sequence is that sometimes when
older modems connect, the initial character sequences may be garbled
as the modems will confuse the leading start bit of the first
character. Most of the 'modern' modems use a packet checked protocol
which they call 'error-free' communications. V.42 is one such
protocol.
Looking for the ending sequence of "login:" as "ogin:" avoids problems
with (a) the case of the word login as some systems say "Login" while
others say "login" and (b) the "L" being garbled because the initial
noise caused a false zero bit for the start bit.
2. The most common reason for 'dropping' characters is a function of the
interrupt latency. The tty drivers can not get back to servicing the
serial device in time to read the holding register from the UART.
It is usually solved by one of two methods.
a) Invest in a 16550A UART. Be careful of cards which say that they
have 1K fifo buffers and are "16550A compatible".
or,
b) Lower the rate to 9600 Bits Per Second or less.
> b) Most puzzling is: Why do I never see dropped characters, leading,
> trailing, or otherwise, dropped from the same host when I simply dialup
> using kermit or minicom???
Timing.
Please take any additional questions along this line to linux-serial. It
is not a subject for the networking list. Thanks.
--
Al Longyear longyear@netcom.com
Finger for PGP key