[comp.lang.postscript] handshaking

howeird@hpwrce.HP.COM (Howard Stateman) (07/25/89)

mbmizen@athena.mit.edu (Mark B Mizen) writes:
>>
	>Could someone please explain to me the differences between the 
>three handshake parameters available on the Apple Laserwriter IINT:
>XON/XOFF, DSR/DTR, ETX/ACK.  Microsoft Wored for the IBM PC gives options
>of ETX/ACK with timeout, XON/XOFF with timeout, ETX/ACK with no timeouy
>(use for hardware handshaking), and XON/XOFF with no timeout.  I am
>having what appears to be hanshaking problems and do not know how to 
>determine the correct setting.  Which procol is most reliable?  Thanks.

There are two kinds of handshakes here. Software and hardware. Software
handshakes come in as ASCII on the incoming data line, and have to be seen by
the host's software before they are acted on. Hardware handshakes
are done by pulling the signal on a non-data line low or high, and
keeping it there till the printer is no longer busy. 

XON/XOFF and ETX/ACK are software handshakes. DSR/DTR are hardware handshakes.

Xon/xoff: The printer sends a control S to stop data from the host, and a 
          control Q to start it up again. It is also called DC1/DC3, since
          those were the original ASCII code mnemonic designations for ^Q and
          ^S.
Etx/Ack:  Don't have my ASCII chart on me, so I am not sure if ETX is a 
          ^C or ^D. Ack is ^F.

Other common software handshakes are ENQ/ACK (^E/^F), ACK/NAK (^F/^U)
and the ever popular BREAK/BREAK, which toggles each time the host sees
about 150 ms of ^@ (ASCII 00).

DTR/DSR: Data Terminal Ready is on pin 20 of a 25-pin RS323 connector,
and pin 4 of a 9-pin connector. It is the traditional way a host tells
that a peripheral is connected and online (this signal should be about 5
volts DC when the machine is ready, 0 to -5V when it's not ready). DSR
is Data Set Ready, which used to be used by modems to tell when the phone
was ready to dial. With the advent of auto-dialing modems, this signal
became obsolete, so IBM uses it ;-) along with DTR. Same rules, only
it's pin 6 on a 25-pin or a 9-pin connector. 

Other signals which are used for ready/busy are:
DCD (Data Carrier Detect) pin 8 on a 25-pin, pin 1 on a 9-pin
CTS/RTS (Clear To Send/Ready To Send) pins 5 and 4 on a 25-pin, 8 and 7 on
      a 9-pin.


 --------------------------------------------------------------------
|Howard Stateman, Hewlett-Packard Response Center, Mountain View, CA |
|howeird@hpwrce.HP.COM      or     hplabs!hpwrce!howeird             |
|       This disclaimer intentionally left blank                     |
|--------------------------------------------------------------------|
|"There is less to this than meets the eye"
|--Tallula Bankhead
|--------------------------------------------------------------------|
|Sysop of the Anatomically Correct BBS (415) 364-3739                |
 --------------------------------------------------------------------