Subject: Re: what is a serial BREAK ?
To: John Clark <jclark@metricsystems.com>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 06/02/2005 16:49:47
In message <429F5EA2.6030406@metricsystems.com>, John Clark writes:
>Johnny Billquist wrote:
>
>>On Thu, 2 Jun 2005, Robert Elz wrote:
>>
>>
>>
>>> Date: Thu, 2 Jun 2005 12:54:38 +0200 (CEST)
>>> From: Johnny Billquist <bqt@Update.UU.SE>
>>> Message-ID: <Pine.LNX.4.62.0506021249200.4692@Psilocybe.Update.UU.SE>
>>>
>>> | Once you get a
>>> | framing error, and the data is all zeroes, you have detected a break.
>>>
>>>That's a risky assumption - some detection hardware/software distinguishes
>>>between a framing error that just happens to occur on a nul character,
>>>and a true break, which is generally required to be a lot longer (perhaps
>>>100ms or so).
>>>
>>>
>>
>>I don't think there is a specified time for a break character. And older
>>hardware have no way to differ between a NUL with framing error, and a
>>break.
>>
>>
>
>I was not able to find a spec on how long break signal was on a Teletype
>33 or similar. But one
>number I saw for a different system, gave 500ms as the time for a 'break
>signal'. The origin of
>the break dates to the use of the telegraph, and detecting a 'broken
>wire' condition, or a 'break
>in messages'.
>
>A quick check on the ubiquitous 16450 serial chip used everywhere seems
>to indicate that
>one of the control bits generates a 'break signal', and as long as that
>bit is asserted, a break
>will be asserted on the serial line. A complementary status/interrupt
>bit is assocated with
>detecting a break signal, which should be longer than a 'NULL' character
>at 110 Baud.
Right. At 110 bps, each byte is 11 bits long (a start bit, 8 data
bits, and two stop bits), so there are 10 chars/sec, which means that a
break signal has to be at least .1 seconds long. I seem to recall
seeing that about .25 seconds was normal.
However, it should not be too long; a break signal of several seconds
is interpreted by at least some modems as a signal to disconnect.
>
>The more 'recent' use of 'break' has been used to synchronize modem
>speeds on ancient
>modems, where the protocol was, 'hit the break key, until a reasonable
>message appears'...
>
Actually, that's more of an artifact: if your speed was wrong, you were
likely to generate framing errors, so it was a natural way to use break.
--Steven M. Bellovin, http://www.cs.columbia.edu/~smb