Next Previous Contents

11. Physical Connection

A terminal may be connected to its host computer either by a direct cable connection, via a modem, or via a terminal server.

11.1 Direct Cable Connection.

The simplest and cheapest way to connect a terminal to a host computer is via a direct connection to a serial port on the computer. Most PC's come with a couple of serial ports, but one is usually used by a mouse. For the EIA-232 port, you need a null modem cable that crosses over the transmit and receive wires. Pin 2 at one end is wired to pin 3 at the other end. If you want hardware flow control, you must find out which pins of the terminal (if any) are used for it as different models of terminals use different pins. The diagrams in Serial-HOWTO 7.1 will not work for hardware flow control unless the RTS pin of the terminal is used for flow control. It rarely is ??

Multiport I/O Cards (Adapters)

Additional serial cards may be purchased which have several serial ports on them called "multiport boards" (see Serial-HOWTO 2.3 & 2.4). One company which has below average prices is ByteRunner. For some other brands see Computer ESP

Length Limitations

A cable longer than a 50 feet or so may not work properly at high speed. Much longer lengths sometimes work OK, especially if the speed is low and/or the cable is a special low-capacitance type and/or the electronics of the receiving end are extra sensitive. It is claimed that under ideal conditions at 9600 baud, 1000 feet works OK. One way to cover long distances is to install 2@ line drivers near each serial port so as to convert unbalanced to balanced (and conversely) and then use twisted pair cabling.

Type of Cable

If you expect to use hardware flow control (handshaking) you will likely need to make up your own cable (or order one made). You will need to determine what pins the terminal uses for this and make up a compatible cable. See Hardware Flow Control. Older terminals may have no provision for hardware flow control.

If you don't use hardware flow control a ready-made cable may work OK (if you can find one long enough). A null modem cable is often labeled as a printer cable with "null modem" in fine print. In this cable certain pairs of wires are crossed-over (= flipped or cross-wired). For example, pin 2 on one end goes to pin 3 on the other end, but not all pins are crossed-over. Many ready-made null modem cables will cross over RTS and CTS (Pins 4 & 5) but these are probably not the pins the terminal uses for hardware flow control.

The normal "straight thru" cable will not work unless you are using it as an extension cable in conjunction with either a null modem cable or a null modem adapter (a two-sided connector) to obtain the cross-over effect. Make sure that the connectors on the cable ends will mate with the connectors on the hardware. Most printer cables use a centronics connector on the printer end which will not connect to terminals. One may use twisted-pair telephone cable. Shielded, special low-capacitance cable is best.

A Kludge using Twisted-Pair Cable

Although none of the EIA-232 signals are balanced for twisted pair one may attempt to use twisted-pair cable with it. Use one pair for transmit and another for receive. To do this connect signal ground to one wire in each of these 2 pair. Only part of the signal ground current flows in the desired wire but it may help. Due to the lower inductance of the twisted pair circuit, more return (ground) current will confine itself to the desired path than one would expect from only resistance calculations. This is especially true at higher frequencies since inductive impedance increases with frequency. The rectangular wave of the serial port contains high frequency harmonics.

Cable Grounding

Pin 1 should be chassis ground (also earth ground) but on cheap serial ports it may not even be connected to anything. The signal ground is pin 7 and is usually grounded to chassis ground. This means that part of the signal current will flow thru the ground wires of the building wiring (undesirable). Cable shields are supposed to be only grounded at one end of the cable, but it may be better to ground both ends since it's better to have current in the shield than in the building wiring ??

11.2 Modem Connection

Using a terminal-modem combination (without a computer) one may connect to BBS's. Some BBS's (such a free-nets) permit Internet access via the text browser lynx which will work on text terminals. Thus with an old terminal and external modem, one may connect to the Internet. If one connects to a host computer on which one has an account, then one may sometimes store ones work (or downloads) on the host computer. Of course one may also do this easier with a computer emulating a terminal using a communication program such as Minicom.

Dialing Out From a Terminal

Instead of connecting a terminal (or computer emulating a terminal) directly to a host computer using a cable it may be connected to the host via a telephone line (or dedicated private line) with a modem at each end of the line. The terminal (or computer) will usually dial out on a phone line to a host computer.

This dialing out is commonly done using a PC computer with a modem to call a BBS or ISP where the PC emulates a terminal once it's connected. If you use a real terminal for this it's more difficult since the real terminal isn't very intelligent and doesn't give as much feedback to the user. For dialing out, many terminals can store one or more telephone numbers as messages which may be "set-up" into them and are sent out to the modem by pressing certain function keys. Many modems can also store phone numbers. The modem initiation sequence must precede the telephone number. The host computer may use "mgetty" (a getty for use with modems) to log in someone who has dialed in to the host.

Terminal Gets Dialed Into

A less common situation is for the host computer to dial-out to a terminal. One possible reason for doing this is to save on phone bills where rates are not symmetric. To do this, your modem at your terminal should be set for automatic answer (Register S0 set to 2 will answer on the 2nd ring). You turn on the terminal and modem before you expect a call and when the call comes in you get a login prompt and log in.

The host computer that dials out to your terminal may do so by running the Linux program "callback" (not widely distributed yet) sometimes named "cb". Callback is for having computer A call computer B, and then B hangs up and calls A back. This is what you want if you are using computer A to emulate a terminal. For the case of a real terminal this may be too complex a task so the host may utilize only the "back" part of the callback program. The setup file for callback must be properly configured at the host. Callback makes the call to the terminal and then has mgetty run a login on that port. Mgetty by itself (as of early 1998) is only for dial-in calls but there is work being done to incorporate callback features into it and thus make it able to dial-out. By the time you read this, mgetty may be all you need.

Modem Commands

As of June 1997 there were no detailed listings of modem commands on the Internet for most modems. However Hayes has a list of its commands and many proposed initialization strings were listed. These init strings may not be the best for the terminal situation where sending from the terminal is at very slow typing speeds but where you want the receiving speed as fast as feasible ??

11.3 Terminal Server Connection

A terminal server is something like an intelligent switch that can connect a many terminals (or modems) to one or more computers. It's not a mechanical switch so it may change the speeds and protocalls of the streams of data that go thru it.

One use for it is to connect many terminals (or modems) to a high speed network which connects to host computers. Of course the terminal server must have the computing power and software to run network protocalls so it is in some ways like a computer. The terminal server may interact with the user and ask what computer to connect to, etc. One may sometimes send jobs to a printer thru a terminal server.

A PC today has enough computing power to act like a terminal server for text terminals except that each serial port should have its own hardware interrupt. PC's only have a few spare interrupts for this purpose and since they are hard-wired you can't create more by software. A solution is to use an advanced multiport serial card which has its own system of interrupts.

Today real terminal servers serve more than just terminals. They also serve PC's which emulate terminals, and are sometimes connected to a bank of modems connected to phone lines. If a terminal is connected directly to a modem, the modem at the other end of the line could be connected to a terminal server. In some cases the terminal server by default expects the callers to use PPP packets, something that text terminals don't generate.

11.4 Making or Modifying a Cable

Buy or Make ?

If you need long cables to connect up terminals, how do you get them? Ready-made long cables may be difficult to find, especially if you want to use a minimum (say 4) of conductors. One option is to get them custom made, which is likely to be fairly expensive although you might find someone to make them at prices not too much higher than ready-made cable (I did). Another alternative is to make your own. This may require special tools. If you can find it, used cable can be a real bargain but you will probably need to rewire the connectors. One advantage of making your own cable is that the skills you learn will come in handy if a cable breaks (or goes bad) or if you need to make up another cable in a hurry.

Connectors & Pins

Unfortunately, most cables one purchases today have molded connectors on each end and can't be modified. Others have connectors which unscrew and can be rewired. If you are making up cable or modifying an existing one then you need to know about pins. There are two types: soldered and crimped.

The crimped pins require a special crimping tool and also need an "insertion/extraction" tool. But once you have these tools, making up and modifying cable is a lot faster than soldering. To insert pins just push them in with the tool. Removing a pin with the tool requires some tricks. You must insert the tool tip around the back of the pin. One tool tip requires spreading a little to get it over the wire but for this tip the pin should be easier to remove. Then pull on both the tool and the wire with a gentle jerk. If it doesn't come out, the tool was likely not inserted correctly or you should use another tip that goes more around the pin. Using this tool one may readily convert a straight-thru cable to a null-modem cable, etc.

Don't try soldering unless you know what you're doing or have read about how to do it.


Next Previous Contents