[comp.sys.next] How to generate BREAK code?

paul@cs.utexas.edu (Supoj Sutanthavibul) (03/05/91)

I have a problem dialing into a modem which needs BREAK code from
the calling party to distinguish between 1200 and 2400 baud calls.
Normally, it will connect at 1200 baud.  But if it receives a BREAK
it will switch to 2400 baud.

There is a BREAK key on the keyboard of the terminal or pc I've used.
How can I generate BREAK on NeXT keyboard since it lacks one?
Btw, I was told that BREAK is not ASCII character.

supoj

madler@pooh.caltech.edu (Mark Adler) (03/05/91)

To generate a break signal in kermit, type the kermit-escape character
(one of control-\, control-], or something else you may have set it to)
and then "b".

To generate a break signal in tip, type tilde, number-sign (~#).

I don't know how to do it in cu.

Mark Adler
madler@pooh.caltech.edu

glenn@heaven.woodside.ca.us (Glenn Reid) (03/05/91)

In article <846@lychee.cs.utexas.edu> paul@cs.utexas.edu (Supoj Sutanthavibul)  
writes:
> There is a BREAK key on the keyboard of the terminal or pc I've used.
> How can I generate BREAK on NeXT keyboard since it lacks one?
> Btw, I was told that BREAK is not ASCII character.

I believe that control-@ (which is control-shift-2) will generate the BREAK
character.  At least that used to do the trick on other UNICES I've used.
I have to admit that I've tried it with modems in the same situation
without luck, but I think there were many other problems at the time.
Give it a try, at least.  Only takes two fingers :-)

--
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		NeXT/PostScript developers
 ..{adobe,next}!heaven!glenn		415-851-1785 (fax 851-1470)

jbryans@beach.csulb.edu (Jack Bryans) (03/06/91)

In article <446@heaven.woodside.ca.us> glenn@heaven.woodside.ca.us (Glenn Reid) writes:
>  I believe that control-@ (which is control-shift-2) will generate the BREAK
>  character.  At least that used to do the trick on other UNICES I've used.

^@ is the null character.  It's value is 0, regardless of radix :-).
A break isn't an ASCII character -- it's the absence of any signal on the
serial line for some period of time.  Short & long breaks may be recognized &
differentiated by some comms equipment.  I forget the timing, but the usual
(short) break is around .25 - .5 sec. & the long one around .75 + or - lord
knows what for absent mindedness.

Jack

eps@toaster.SFSU.EDU (Eric P. Scott) (03/06/91)

There is no BREAK key on the NeXT keyboard, nor it is it possible
to map a key to produce a "BREAK code"--BREAK is an "out-of-band"
signal that has no code value.  It's only needed when connected
to another system.  Every communication program seems to have a
different way to request it:

tip	~ #
kermit	CTRL-\ b

telnet  CTRL-] s e n d SP b r k CR

[ The cu on the NeXT is "fake"--the "real" one uses ~%b ]

					-=EPS=-

rpruess@yoyo.weeg.uiowa.edu (Rex Pruess) (03/06/91)

In article <1401@toaster.SFSU.EDU> eps@toaster.SFSU.EDU (Eric P. Scott) writes:
  > There is no BREAK key on the NeXT keyboard...
  > Every communication program seems to have a different way to request it:
  >
  > tip	~ #
  > kermit	CTRL-\ b

I believe the default for C-Kermit 5A(165) is "CTRL-] b".  And, if you've
set your kermit escape-character to something else, it will be the escape-
character followed by b.
--
Rex Pruess, Weeg Computing Center, Univ of Iowa, Iowa City, IA 52242
rpruess@umaxc.weeg.uiowa.edu (NeXTmail)               (319) 335-5452

mouse@thunder.mcrcim.mcgill.edu (der Mouse) (03/10/91)

In article <JBRYANS.91Mar5142822@beach.csulb.edu>, jbryans@beach.csulb.edu (Jack Bryans) writes:
> In article <446@heaven.woodside.ca.us> glenn@heaven.woodside.ca.us (Glenn Reid) writes:
>> [...stuff about break "characters"...]
> ^@ is the null character.  It's value is 0, regardless of radix :-).
> A break isn't an ASCII character -- it's the absence of any signal on
> the serial line for some period of time.

Just to be picky, it's the *presence* of signal, not *absence* of
signal.  The absence of signal, corresponding to the SPACE condition of
the line (not to be confused with the ' ' character), simply indicates
an idle line.  The SPACE->MARK transition indicates the beginning of
the start bit; normally, this is followed by some number of bits
(typically 8) and then the stop bit; just as the start bit always is
one bit time in the MARK condition, the stop bit is always one bit time
in the SPACE condition.  If the line is found to be in the MARK
condition during the stop bit's time slot, this is a framing error.  A
break condition simply consists of holding the line in the MARK state
long enough to guarantee the generation of a framing error.

(Hmmm.  I hope I haven't got SPACE and MARK interchanged....)

> Short & long breaks may be recognized & differentiated by some comms
> equipment.

Well yes, there's that too.  In addition to the out-of-band information
"framing error occurred", more information can be carried by the length
of time the MARK signal persists.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

madler@pooh.caltech.edu (Mark Adler) (03/11/91)

der Mouse ponders:

>> (Hmmm.  I hope I haven't got SPACE and MARK interchanged....)

Yep, you got 'em backwards.  (I had to look it up to check.)

The resting state of an RS-232 (422, 423) line is MARK.  A start bit
is a SPACE.  A break is a very long SPACE.  Of course, this means little
without knowing what a MARK and SPACE are.  A MARK (the resting state) is
a negative voltage, and in the data, corresponds to a binary one.
A SPACE is a positive voltage, and corresponds to a binary zero.
Confused yet?  Also, for the control lines, a SPACE means that the
control is asserted, and a MARK means it ain't.

Mark (space) Adler
madler@pooh.caltech.edu