wecker@cookie.dec.com (DAVE TANSTAAFL WECKER) (09/01/86)
HELP. I am trying to use the serial devices XON/XOFF protocol for handshaking in my terminal emulator (now that I finally went out and bought the manuals (I have NEVER seen so many errors in a technical doc set (unless it's one of ours (DEC) :-) :-3 ) ;-) (you can tell I do a lot of LISP hacking :-) Anyhow, I am going nuts trying to figure out the XON/XOFF protocol. This is why version 1.n and 2.0 used my own. Basically, if you don't use SERF_XDISABLED, when the buffer gets full, an XOFF gets sent to the host (fine) and when the buffer empties (somewhat) an XON gets sent. All of this works as expected. The problem is when the host sends the AMIGA an XOFF. It appears that the port just "shuts down" you don't receive, you don't transmit and you don't get any flags/errors to tell you what happened. Instead you wait forever if you do a DoIO or WaitIO (after trying to send a character). It seems to ignore a host sent XON following this. I have tried this in SHARED mode, EXCLUSIVE mode (with one open) and every other combination I can think of. My current solution (read: hack) is to use XON/XOFF when reading from the port, and to use XDISABLED when writing. This works, but means that all host initiated flow control gets dropped on the floor. Am I making a basic (read: stupid) error, or is there something wrong with the serial device driver? BTW, all of this is doing on 1.1 (since I am not a bona-fide developer (read: cheap)). Any comments/suggestions appreciated. (Especially a code fragment that WORKS.. nothing in the RKM discusses this) thanks! dave ...decwrl!cookie.dec.com!wecker P.S. Yes V2.1 is not far away (mostly bug fixes/enhancements).