Next Topic

Previous Topic

Home

Book Contents

Book Index

Serial Port hand shaking in the MonTel Server

Hand shaking

Hand shaking is used by the Serial port interface to control the flow of data from the PABX (flow control). Not all systems support hand shaking. Those that do use a variety of techniques, and even within those techniques, they don't use them in the same way.

The two basic techniques are hardware and software. In the purest sense both of these are fairly well defined as they originally defined as connecting Computers to Modems in the RS-232C/V.24 standards, however not all systems implement them in the same way.

A Computer is called Data Terminal Equipment (DTE) in serial communications or sometimes called "the host". The PC is then connected by a serial cable to another piece of equipment, say a a modem or a printer, which is called a "Device" or Data Communications Equipment (DCE) or Data Circuit-terminating equipment, which has the same acronym fortunately.

One problem that MonTel faces is that many (but not all) PABXs expect to be talking to a printer, and so they are set up as the DTE or host. Already this can create confusion as to which lines are used to transmit and received, and which lines are used (and how are they used) for hand shaking.

Not only this, by some hardware hand shaking set-ups expect the CTS line to control flow, and others the DTR. Many expect both (as does the specification).

In the case of software flow control, not all systems expect XON or XOFF characters. Some won't transmit unless they regularly receive XON.

And finally, just when we thought we could blame the DCE, a PC does not really have the control over the various lines to fully implemented Hardware flow control, and so to a limited extend it must be simulated. Implementing flow control can be more of an art than a science.

Overcoming these issues

Many of these issues can be over come by using a different cable. For example to connect at DTE to another DTE, you can pretend that both are talking via modems over a phone line. This is why such a cable is called a NULL-Modem cable. In its simplest form with software or no hand shaking a three wire cable with pins two and three crossed over will work.

However, in order to ease installation efforts, especially is the ability to acquire or modify cables is not readily to hand, MonTel can use a variety of hand shaking techniques.

Please note that as MonTel only might every expected to send a handful of characters no hand shaking is implemented for out bound characters. In the MonTel Context, hand shaking is on the in bound stream, since effectively the data flow is one way.

MonTel Hand Shaking options

The following table out lines the options and what type of hand shaking is being attempted. Note that for most situation MonTel is only concerned with controlling the flow from the PABX and not the other way around (since this is, in most situations, one way traffic).

DEFAULT

Use the hand shaking specified by default by the driver (which may well not be correct!).

NOHANDSHAKE

No hand shaking is used. Can use a three wire cable.

NONE

(As above)

XONXOFF

Basic XON XOFF hand shaking or SOFTWARE hand shaking. It is safer to use this with 7 data bits to reduce the possibility of framing errors giving high ASCII characters. Can use a three wire cable.

RTSCTS

A hardware hand shake using only the RST-CTS lines. Must use a suitable cable cable to connect DSR, CTS, RTS and CD or cable that will emulate these functions.

DTRDSR

A hardware hand shake using only the DTR-DSR lines. Must use a suitable cable cable to connect DSR, CTS, RTS and CD or cable that will emulate these functions.

HARDWARE


Uses both DTR-DSR and RST-CTS to handshake. Must use a suitable cable cable to connect DSR, CTS, RTS and CD or cable that will emulate these functions.

RTSDTR

As above (a reminder as to which lines are asserted, but this should not be used now).

XONXOFFCTS

Uses RST-CTS and XONXOFF software hand shaking. Must use a suitable cable cable to connect DSR, CTS, RTS and CD or cable that will emulate these functions.

XONXOFFDTR

Uses DTR-DSR and XONXOFF software hand shaking. Must use a suitable cable cable to connect DSR, CTS, RTS and CD or cable that will emulate these functions.

XONXOFFTIMED

Uses XON-XOFF hand shaking but in addition sends an XON every x number of seconds as specified in SecondsTillAutoResendXon in the PABX.INI file.

XONXOFFDTRTIMED

 
 
Uses DTR-DSR and XONXOFF software hand shaking but in addition sends an XON every x number of seconds as specified in SecondsTillAutoResendXon in the PABX.INI file. Must use a suitable cable cable to connect DSR, CTS, RTS and CD or cable that will emulate these functions.

XONXOFFRTSTIMED

Uses RST-CTS and XONXOFF software hand shaking but in addition sends an XON every x number of seconds as specified in SecondsTillAutoResendXon in the PABX.INI file. Must use a suitable cable cable to connect DSR, CTS, RTS and CD or cable that will emulate these functions.

XONXOFFHARDWARETIMED

Uses HARDWARE and XONXOFF software hand shaking but in addition sends an XON every x number of seconds as specified in SecondsTillAutoResendXon in the PABX.INI file. Must use a suitable cable cable to connect DSR, CTS, RTS abd CD or cable that will emulate these functions.
 
 

In the DOS version of MonTel the DTR and DSR lines are asserted together by using the DTR register, and the RST and CTS are asserted together are asserted together by using the RTS register. (The cables are wired this way). Hardware is asserting both. XONXOFF is performed by sending an XOFF when the buffer is full, and XON when it is ready again from within the MonTel Server.

The following table shows the actions in the MonTel 16 bit DOS version. The values in the table above combine the effects below for the mixed settings.

Hand shake type

Start sending

Stop sending

HARDWARE
Set DSR and RTS.
Set DSR only.
RTSCTS
Set RTS only.
Set all off.
DTRDSR
Set DTR Only.
Set all off.
XONXOFF
Send XON Character.
Send XOFF character.
TIMED
Sends an XON every x number of seconds as specified in SecondsTillAutoResendXon in the PABX.INI file.
N/A

In the Windows version both software and hardware flow control is handled by the Windows driver and not by MonTel.

------------------------------