Special thanks goes out to Bob Rau for teaching me this tidbit of information.
Not all serial devices behave properly with the SetBreak and ClearBreak commands. For instance, the FTDI driver (at least for OS X) will only send out a short break for a little less than .1 seconds and ignores the ClearBreak command. Other drivers aren't so assuming, and will continue the break until you call ClearBreak. And I believe that still others won't do a break at all.
So how do you overcome this driver-specific behavior? Why, by generating your own break, of course.
Set your serial control's baud rate to half of the expected rate, and send out a null byte. To the faster (receiving) control, this comes across as a start bit, 0x00 byte, and no stop bit -- a break. So if you normally communicate at 19200 baud, then drop the baud rate down to 9600 and send a null byte. That's a break!
Neato, eh?
Leave a comment