[comp.sys.m68k] UUCP sending BREAK

david@bdt.UUCP (David Beckemeyer) (08/07/89)

I'm trying to bring up a Motorola Computer System 8000 with HDB UUCP.

The problem is the tty driver doesn't seem to know how to send a BREAK.

The code which generates the break is:

	genbrk(fn)
	register int	fn;
	{
		if (isatty(fn)) 
			(void) ioctl(fn, TCSBRK, 0);
	}

Nothing seems to happen when the above code is executed.  The RS-232
hardware is a Motorola MVME332 8-port RS-232 board.  The Unix version
is SYSTEM V/68 R2V2.2.   Does anybody know how I can make this RS-232
board generate a BREAK?

Thanks.
-- 
David Beckemeyer (david@bdt.UUCP)	| "I'll forgive you Dad...  If you have
Beckemeyer Development Tools		| a breath mint."
478 Santa Clara Ave. Oakland, CA 94610	|    Bart - "The Simpsons"
UUCP: {uunet,ucbvax}!unisoft!bdt!david	|

csg@pyramid.pyramid.com (Carl S. Gutekunst) (08/23/89)

In article <109@bdt.UUCP> david@bdt.UUCP (David Beckemeyer) writes:
>The problem is the tty driver doesn't seem to know how to send a BREAK.
>
>	if (isatty(fn)) 
>		(void) ioctl(fn, TCSBRK, 0);
>
>Nothing seems to happen when the above code is executed.

Ugly. Assuming you have source -- it appears that you do -- the classic work-
around from Version 7 UNIX should suffice. Simply drop the line baud to some
very small number, like B50, transmit a NULL character, and then restore the
speed. At 50 bps, one NULL gives you a nicely shaped 180ms pulse, which will
do for a BREAK almost anywhere.

On 4.3BSD, which has no timed BREAK, I've actually found this works better
than the "normal" technique of forcing the line to a space state, waiting on
an interval timer, then restoring.

<csg>