James Gray <[EMAIL PROTECTED]> writes:

> So I'm trying to see if sending a break to the serial port will reset
> the line like my manual cable pulling exercise (after all, unplugging
> a serial cable by definition is a "BREAK" right?).  So how about it
> folks?  Anyone know a neat way to send a serial "BREAK" to a serial
> device in bash/c/c++/perl (no python on the system I'm working  with).
> I've tried:
>
> echo "?BREAK?" > /dev/cua.Serial0  [1]
>
> as root, but no joy.  Any pointers gladly accepted :)

chat can send breaks. Don't know how to drive chat, but at a guess

chat '' BREAK </dev/ttyS0
or
chat '' -BREAK- </dev/ttyS0

I think what's really happening is when you unplug the cable, you
lower DTR (not sure if a break does that), so lowering DTR (and I
guess RTS, if it's high) will probably do what you want.

If you have trouble working out how to lower DTR, I can have a go at a
little C program.

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to