[comp.dcom.modems] RS232 to modem connection

mz0l+@andrew.cmu.edu (Mohammad Zamanian) (09/10/89)

I have a dumb terminal and a 1200 baud bell-packard modem which I would like
to connect through the RS232 port of the terminal. My connecting cable
has only 4 wires and the connections, as a result, have only 4 pins. I believe
that the pin arrangement is not correct. Would someone please tell me the
correct pin arrangement for this VT100 compatible terminal and the pin
arragement for the modem output line?

with many thanks,
M. Kiumarse Zamanian
qmars@ritz.cive.cmu.edu
mz0l@andrew.cmu.edu

ernie@wpi.wpi.edu (Ernie Gronblom) (09/12/89)

In article <kZ2Mcuy00iQJI9tl8=@andrew.cmu.edu> mz0l+@andrew.cmu.edu (Mohammad Zamanian) writes:
>I have a dumb terminal and a 1200 baud bell-packard modem which I would like
>to connect through the RS232 port of the terminal. My connecting cable
>has only 4 wires and the connections, as a result, have only 4 pins.

I assume the modem also has an RS232 jack for input. The following is the
pinout for an RS232 (25 pin) jack:

2 - Transmitted data
3 - Received data
7 - Signal ground
20 - Data Terminal Ready (DTR) - This is on except when the terminal is off,
                                 off-line, resetting, or when <BREAK> is
                                 pressed.

These are the pins you need to hook up (ie. 2 to 2, 3 to 3, etc.)  Pin 1 is
the chassis ground, but this shouldn't be necessary.  Good luck...

					Ernie

tjfs@tadtec.uucp (Tim Steele) (09/13/89)

Wow, this is my chance to attract a huge flame war!

I have incredibly bigoted opinions on the RS232 "standard".  The
problem seems to be that the "standard" doesn't specify what
connectors should be used, nor what kinds of equipment it may be used
for.

My mental model which has served me pretty well in many complex RS232
tangles is as follows:

RS232 is really about how to connect an item of Data Communications
Equipment (DCE) such as a modem to an item of Data Terminal Equipment
(DTE) such as a terminal.  Anything else is a "perversion" 8-) which
involves bending the standard in some way.

Although the standard doesn't say anything about connectors, there is
a common "de facto" standard using 25 pin D connectors, with the
female connector on the modem and the male connector on the terminal.
Connecting cables are just like power extension cords; they're female
at one end, male at the other and wired straight through (1-1, 2-2 ...
25-25).

If everything was wired that way, RS232 connections would be trivial,
and anything that could physically be plugged together would work.
Unfortunately, there are some strange perversions around that make
life hard.  These are as follows:

a) Cables that don't connect all 25 wires.  Of course, the standard
specifies more wires than you "really" need... indeed, with an
intelligent modem such as a TrailBlazer you can get away with just
Transmit & Receive Data and Signal Ground (that's 2, 3 and 7).  Most
of the other pins exist either so the DTE can tell the DCE something
"extra" (like "Use high speed" or "I'm ready for your data") or vice
versa (like "I can see carrier").  There are also a few pins for
synchronous operation, and even some spare ones!

If you have such a cable, you have to make sure that enough lines are
connected...

b) Misunderstandings between DCE and DTE about the use of various
pins.  For example, one end may expect to hardware handshake using
RTS/CTS whereas the other end may be expecting to use XON/XOFF inband
signalling.

c) Machiavellian manufacturers who fit (usually) female connectors
instead of male ones.  They probably do this to improve their
equipment reliability.  For example, many terminals have a female
connector on the back, wired just as if it were male.  I call these
"female wired as DTE".  One (rather drastic) approach is to either
change the connectors on such equipment or (more practically)
permanently attach a cheap "gender bender" adaptor to make the sex
right.

d) "Perverted" equipment connection.  The simplest example of this is
connecting a terminal directly to a computer instead of via modems.
Both the terminal and the computer are DTE devices (and should of
course be male), so they usually end up being connected with a "null
modem" cable, which is female-female wired straight through.

e) Some mix and match version of the above.

Nasty, isn't it?  Thinks: how about a REAL standard!

Tim
-- 
tjfs@tadtec.uucp   ..!uunet!mcvax!ukc!tadtec!tjfs
Tadpole Technology plc, Titan House, Castle Park, CAMBRIDGE, CB3 0AY, UK
Phone: +44-223-461000   Fax: +44-223-460727   Telex: TADTEC G

mz0l+@andrew.cmu.edu (Mohammad Zamanian) (09/14/89)

Thanks for all the responces to my earlier posting on the pin arrangement
for connecting rs232 port to my packard-bell modem.

the arrangement is:

      2 -- 2
      3 -- 3
      7 -- 7
     20 -- 20

pcf@galadriel.bt.co.uk (Pete French) (09/14/89)

From article <TJFS.89Sep13124529@tadtec.tadtec.uucp>, by tjfs@tadtec.uucp (Tim Steele):
> RS232 is really about how to connect an item of Data Communications
> Equipment (DCE) such as a modem to an item of Data Terminal Equipment
> (DTE) such as a terminal.  Anything else is a "perversion" 8-) which
> involves bending the standard in some way.
> 

True - it was designed for terminal -> modem connections.

> Although the standard doesn't say anything about connectors, there is
> a common "de facto" standard using 25 pin D connectors, with the
> female connector on the modem and the male connector on the terminal.

Are you talking about the V24 stabdard or the RS-232-C standard ? (V24 is
the europeanb version). I dont now about V24 - I have never seen the spec -
but RS-232-C certainly specifies that a 25-way D-connector should be used. It
also specifies the pinout in great detail.

Sorryto say, but the last bit is totally wrong, it should be the female
on the terminal and the male connector on the modem.

> a) Cables that don't connect all 25 wires.  Of course, the standard
> specifies more wires than you "really" need... 

I find that you need at least 8 to be useful. GND, TXD, RXD, DSR, DTR, RTS,
CTS, CD.

> synchronous operation, and even some spare ones!

There are NO spare pins in RS-232-C.

> d) "Perverted" equipment connection.  The simplest example of this is
> connecting a terminal directly to a computer instead of via modems.

You are the only person I have ever met who thinks like me over this one. Most
people assume that terminals connect to computers - not so.

> Nasty, isn't it?  Thinks: how about a REAL standard!

It is, but people dont stick to it.

Part of the problem lies in the bufferring. The standard only provides
handshaking in one direction (DTE -> DCE) via the RTS/CTS lines. Any data
travelling (DCE -> DTE) is expected to be always received. This is fine for
terminal -> modem connections since the termninal should always be capable of
printing or bufferring data received by the modem. A modem is not expected to
stop sending to the terminal when the terminal cannot accept characters since
it has no way of telling the remote end to stop transmitting. This is partly
why you sometimes see the wrong connector on equipment.
oI like RS-232-C , I have made many cables in my life and as far as I can
remember the only "strainght thru" one was to connect a UNIX box to a
modem. 8 wires and it works perfectly. For all those out there who are going
to read this and disaggree with the fact that a computer should look like a
terminal I would like to point out that such things as the production of a login
banner when a call is answered and also the automatic logging out of a user when
the call clears are two things that can only be provided by the DTE interface.

Some terminals are now made to look like modems for connection to a computer
directly. This will provide the above facilities - i.e. when you switch on
the terminal you get a. login page immediately without hitting return and also
when you switch the terminal off you are logged out automatically.

-Pete.


-- 
       -Pete French.               |
  British Telecom Research Labs.   | "The carefree days are distant now,
 Martlesham Heath, East Anglia.    |  I wear my memories like a shroud..."
All my own thoughts (of course)    |                               -SIOUXSIE

tjfs@tadtec.uucp (Tim Steele) (09/14/89)

Whoops, I finished up that posting quickly and as a result made a
silly blunder.

In article <TJFS.89Sep13124529@tadtec.uucp> tjfs@tadtec.uucp (Tim Steele) writes:

> Both the terminal and the computer are DTE devices (and should of
> course be male), so they usually end up being connected with a "null
> modem" cable, which is female-female wired straight through.

Sorry!  That should of course read 'female-female wired with the
appropriate signals crossed over, usually 1-1 2-3 3-2 4-5 5-4 6-20 7-7
20-6'.

Tim
-- 
tjfs@tadtec.uucp   ..!uunet!mcvax!ukc!tadtec!tjfs
Tadpole Technology plc, Titan House, Castle Park, CAMBRIDGE, CB3 0AY, UK
Phone: +44-223-461000   Fax: +44-223-460727   Telex: TADTEC G

Geoffrey.Welsh@p0.f171.n221.z1.fidonet.org (Geoffrey Welsh) (09/15/89)

 > From: tjfs@tadtec.uucp (Tim Steele)
 > Message-ID: <TJFS.89Sep13124529@tadtec.tadtec.uucp>
 
 > I have incredibly bigoted opinions on the RS232 "standard".  The
 
   We all do. Everyone who has worked extensively with RS-232 "conforming"
devices does.
 
 > RS232 is really about how to connect an item of Data Communications
 > Equipment (DCE) such as a modem to an item of Data Terminal Equipment
 > (DTE) such as a terminal.  Anything else is a "perversion" 8-) which
 > involves bending the standard in some way.
 
   That's funny; I recently explained that an RS-232 device has not only a 
gender (of its connector) but a sexual preference (DTE vs. DCE)...
 
 > Although the standard doesn't say anything about connectors, there is
 > a common "de facto" standard using 25 pin D connectors, with the
 > female connector on the modem and the male connector on the terminal.
 
   The practice of putting the male connector on the DTE came in with the IBM 
PC; all micros I saw before that had female RS-232 connectors, regardless of 
"sexual preference".
 
 > Connecting cables are just like power extension cords; they're female
 > at one end, male at the other and wired straight through (1-1, 2-2 ...
 > 25-25).
 
   That's the evolution of the de facto "standard".
 
 > a) Cables that don't connect all 25 wires.  Of course, the standard
 
   They're not bad; what I hate are machines (e.g. Amiga 1000) which do stupid 
things with lines the designers THOUGHT wouldn't be used (all A1000 power 
supply voltages can be accessed through the serial port; this has blown 
several modems that I know of...)
 
 > specifies more wires than you "really" need... indeed, with an
 > intelligent modem such as a TrailBlazer you can get away with just
 > Transmit & Receive Data and Signal Ground (that's 2, 3 and 7).  Most
 > of the other pins exist either so the DTE can tell the DCE something
 > "extra" (like "Use high speed" or "I'm ready for your data") or vice
 > versa (like "I can see carrier").  There are also a few pins for
 > synchronous operation, and even some spare ones!
 
   Ideally the TBit (and other high-speed modems) should be using the RTS and 
CTS lines for hardware handshaking, and all modems should have the DTR and DCD 
lines connected. These all provide unambiguous information more quickly than 
would be possible via characters in the data stream (XON/XOFF, NO CARRIER, the 
"+++" escape sequence, etc.).
 
   Ironically, I'm fairly sure that this is not how the EIA defined the RTS 
and CTS lines' use in the RS-232 spec.
 
 > b) Misunderstandings between DCE and DTE about the use of various
 > pins.  For example, one end may expect to hardware handshake using
 > RTS/CTS whereas the other end may be expecting to use XON/XOFF inband
 > signalling.
 
   Easy solution: be prepared to do all.
 
 > c) Machiavellian manufacturers who fit (usually) female connectors
 > instead of male ones.
 
   See previous note.
 
 > d) "Perverted" equipment connection.  The simplest example of this is
 > connecting a terminal directly to a computer instead of via modems.
 > Both the terminal and the computer are DTE devices (and should of
 > course be male), so they usually end up being connected with a "null
 > modem" cable, which is female-female wired straight through.
 
   Actually, time was that host computers had front ends that were by 
definition DCE. The problem came when we demanded TTY lines to handle both 
terminals AND modems...



--  
Geoffrey Welsh - via FidoNet node 1:221/171
UUCP: {{uunet!}watmath!xenitec!}zswamp!171.0!Geoffrey.Welsh
ARPA: Geoffrey.Welsh@p0.f171.n221.z1.fidonet.org

ken@kdillman.austin.ibm.com (/32767) (09/15/89)

A previous post indicates that DTE to DTE connections use a "straight through" cable.  This type of cable won't work because you'll have both devices shouting at each other on the same wire and listening for each other on the same wire.  In most cases the following will work between DTE's:

	Side A			Side B

	  1			  1
	  2			  3
	  3			  2
	  4			  5
	  5			  4
	  6			 20
	  7			  7
	  20		          6

If the DTE needs to see Carrier Detect on pin 8, the safest way is to loop pin 6 to pin 8 on both sides.  This cable will almost always connect a DTE to another DTE and make both happy (assuming of course that we're talking async here).  Sync is only a matter of another couple of pin swaps to get the sync timing signals cross connected properly.

perry@ccssrv.UUCP (Perry Hutchison) (09/15/89)

>In article <TJFS.89Sep13124529@tadtec.tadtec.uucp> tjfs@tadtec.uucp
(Tim Steele) writes:

> Although the standard doesn't say anything about connectors, there is
> a common "de facto" standard using 25 pin D connectors, with the
> female connector on the modem and the male connector on the terminal.

In article <346@galadriel.bt.co.uk> pcf@galadriel.bt.co.uk (Pete French)
replies:

> RS-232-C certainly specifies that a 25-way D-connector should be used. It
> also specifies the pinout in great detail.
>
> Sorryto say, but the last bit is totally wrong, it should be the female
> on the terminal and the male connector on the modem.

Steele is right on both points here, but he later objects to

> Machiavellian manufacturers who fit (usually) female connectors
> instead of male ones ... For example, many terminals have a female
> connector on the back, wired just as if it were male.  I call these
> "female wired as DTE".

RS-232C specifies the pin numbers, but not the type of connector.  Some
years ago, I spent a long time looking for the connector specification,
and finally found out (through other channels) that Western Electric had
established the DB25 as a de-facto standard when they used it on their
"data sets".

RS-232C also specifies that DCE shall provide a female connector _mounted
on the equipment_ and DTE shall provide a male connector _on a cable_.  This
means that the cable is considered part of the DTE and the manner in which
it is connected to the circuitry is entirely up to the manufacturer.  Even
IBM's 9-pin PC-AT serial ports are not in violation of RS-232C.

French continues:

> Part of the problem lies in the bufferring. The standard only provides
> handshaking in one direction (DTE -> DCE) via the RTS/CTS lines. Any data
> travelling (DCE -> DTE) is expected to be always received. This is fine for
> terminal -> modem connections since the termninal should always be capable of
> printing or bufferring data received by the modem. A modem is not expected to
> stop sending to the terminal when the terminal cannot accept characters since
> it has no way of telling the remote end to stop transmitting.
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The old W.E. 202 datasets (1200 baud, one-way at a time) had a "reverse
channel" facility whereby assertion of "Secondary Request To Send" by the
_receiving_ DTE would cause a "Secondary Carrier Detect" signal to appear
at the _transmitting_ DTE.  The reverse channel capacity was something like
50 baud, and it was intended only for use as a flow control mechanism.

Now the real shocker:  a "null modem", whether constructed as a cable or in
a box, is at least potentially in full compliance with RS-232C!  The standard
says nothing about how DCE shall accomplish its function of transmitting data
between DTE's.

henry@utzoo.uucp (Henry Spencer) (09/19/89)

In article <894.25151214@zswamp.fidonet.org> Geoffrey.Welsh@p0.f171.n221.z1.fidonet.org (Geoffrey Welsh) writes:
>... Let's not forget that the specified DSR/DTR handshake has also been 
>overriden by the use of DTR as a hook control on most modems.

Uh, hook control is precisely what DTR is for.  DSR and DTR weren't meant
for data handshaking either, the attractive-sounding names notwithstanding;
they are for connection handshaking, so to speak.  See the standards, or
the McNamara book, for details.
-- 
"Where is D.D. Harriman now,   |     Henry Spencer at U of Toronto Zoology
when we really *need* him?"    | uunet!attcan!utzoo!henry henry@zoo.toronto.edu