[comp.dcom.modems] RS-232C

ron@topaz.rutgers.edu (Ron Natalie) (01/01/70)

Some day my worst fears will be realized.  I'll find a piece of
equipment that comes with a wire that has a 110 Volt power plug
on one end and a MOD-TAP RJ-11 on the other.

-Ron

roy@phri.UUCP (Roy Smith) (08/16/87)

	In article <2849@phri.UUCP> I asserted that RS-232 has no flow
control.  BTW, I meant RS-232C; I should have been more specific.  To be
honest, I don't even know what RS-232A and RS-232B are.

In article <1102@gilsys.UUCP> mc68020@gilsys.UUCP (Thomas J Keller) writes:
>      That's an interesting comment, Roy.  I find it difficult to accept, as
> every RS-232 interface standard document I have ever seen includes the RTS
> and CTS [...] If there is no handshaking defined, **WHAT IN THE WORLD ARE
> THESE LINES DEFINED FOR**???????

	Before I launch into this, I should warn people that I am not an
RS-232C guru, so I may be messing up a bit on the details.  This has all
been hashed over in the past, and by people more expert than myself.  It
might be a good idea to go through your archives and find the old
discussions and/or buy the official standard and read it carefully.

	RS-232C was published back in the days when half-duplex connections
were much more common.  The RTS/CTS lines are intended to be used to
negotiate line turn-around in a half-duplex connection.  When the the DTE
(Data Terminal Equipment, i.e. computer or terminal) wants to send
something it asserts RTS (Request To Send).  When the DCE (Data
Communications Equipment, i.e. modem) is ready to accept this transmission,
it asserts CTS (Clear To Send).

	DTR (Data Terminal Ready) and DSR (Data Set Ready) are used to
negotiate answering and hanging up the phone.  When a DTE is ready to
accept a connection (e.g. Unix has finished booting and getty is running),
the DTE asserts DTR.  When a call comes in to the DCE, it looks to see if
DTR is asserted, and if it is, answers the call and asserts DSR.  The DTE,
when it sees DSR asserted, knows that a connection is completed and starts
doing work (e.g. getty's open(2) on the tty line returns).  When the DTE
wants to break the connection (i.e. you logout), it negates DTR which tells
the DCE to drop the phone line.  If the connection gets broken (i.e. you
just hang up the phone), the DCE negates DSR (or is there were CD comes in?
see next paragraph) which tells the DTE that it's all over.  Note that DTR
and DSR should never change during the course of a connection; only at the
start and end of one.

	RI (Ring Indicator) is used by the DCE to tell the DTE that the
phone is ringing.  I'm not sure why this is needed; presumably the DTE
could wait to see RI before asserting DTR if there was some reason why
keeping DTR asserted for a long period of time was a bad idea.  CD (Carrier
Detect) is used by the DCE to tell the DTE that there is carrier; I'm not
sure how this differs from DSR.

	Add in TD (Transmit Data) and RD (Receive Data) and a couple of
grounds (signal and chassis ground; not to be confused or inter-connected)
and you've used 10 pins.  There are another 15, all of which have defined
meanings, most of which most people don't care about.  Also, most people in
the Unix or (generic) PC world will never see a half-duplex connection in
their lives.  Since hardware flow-control is indeed a good thing to have in
many situations, some manufacturers have taken it upon themselves to
implement hardware flow control in all sorts of interesting, non-standard
ways.  RTS/CTS handshake seems to be the most common, but I've seen DTR/DSR
handshaking as well (even worse).

	Now, as I've said before, if you do RTS/CTS handshaking, you havn't
implemented RS-232C.  That's not to say that you havn't implemented
something potentially good, just that you havn't followed the standard.
Along the same lines, lots of manufacturers have taken it upon themselves
to decide that a DB-25 takes up too much space given that most of the pins
aren't used any more (when's the last time you saw a secondary channel or
the clock lines used?) and used smaller connectors.  DEC seems to like
DB-9's, while Apple has gone off and adopted those mini DIN connectors and
other people are using full-size DIN plugs.  Other manufacturers have also
decided that since most printer and terminal connections are not going to
have modems in the line anyway, they should just go ahead and put DCE ports
on their computers and let people use straight cables.  And keeping track
of proper sex is just hopeless.

	With all that in mind, I think what we need is a new standard which
implements hardware handshaking, smaller connectors, etc.  Until such a
standard is adopted, however, fie on manufacturers who make up their own
and call it RS-232C.
-- 
Roy Smith, {allegra,cmcl2,philabs}!phri!roy
System Administrator, Public Health Research Institute
455 First Avenue, New York, NY 10016

ron@topaz.rutgers.edu (Ron Natalie) (08/16/87)

>	RS-232C was published back in the days when half-duplex connections
> were much more common.  The RTS/CTS lines are intended to be used to
> negotiate line turn-around in a half-duplex connection.  When the the DTE
> (Data Terminal Equipment, i.e. computer or terminal) wants to send
> something it asserts RTS (Request To Send).  When the DCE (Data
> Communications Equipment, i.e. modem) is ready to accept this transmission,
> it asserts CTS (Clear To Send).

This is correct, it isn't just for half-duplex transmissions though.

Your definitions of DTR/DSR/RI/CD are a bit off.
DSR indicates the modem is happy and ready for work.
DTR means a willingness on the host to answer the call
RI means there is a call coming in
CD means that there is good signal

What happens is that the modem is powered up, it asserts DSR.
The phone RINGS, RI is asserted.
The modem then checks for DTR and only answers the phone when it
    is asserted.
The modem then answers the phone.
While carrier is detected CD is asserted.

Generally, the host should watch CD to see if the connection went
away.  DSR going away means for some reason the modem itself gave
up (like it was turned off).

russell@imtec.co.uk (Russell Brown) (08/18/87)

In article <2853@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>
>	With all that in mind, I think what we need is a new standard which
>implements hardware handshaking, smaller connectors, etc.......

I agree whole-heartedly that we need a new simple interconnection standard for
async serial devices - he says whilst buried under a pile of 25/15/9way male
and female connectors with bits of wire flying everywhere :-). However I fear
that we (the industry) are much too conservative to adopt such a sensible thing
(unless IBM does it's  normal trick of dictating to the rest of us :-)

The CCTA (the U.K. Governments Central Computer & Telecoms Agency) came up with
a new simple standard called S 5/7 based on DIN type connectors. The basic
cable had a ground, data in, data out, handshake in and handshake out - all
thats needed for your average cable. The 7 bit of the S 5/7 meant that two
additional lines for Data carrier detect were implemented. The bottom line was
that a simple 5 wire cable could connect anything to anything or a 7 wire for
the more exotic devices. Two possible types of cable rather than the mess we
live with now.

Well what happened to this I hear you ask? As far as I can remember the only
company to fit an S 5/7 connector was Thorn EMI - there was of course no
connection between this and the fact that they were receiving CCTA backed
funding :-)

As I said, it needs something like IBM fitting a new standard to something like
the PC. Looks like we're stuck with good old RS232 and all its permutations for
the forseeable future - rats!

 ------------------------------------------------------------------------
| Russell Brown                      | Voice: +44 733 234433             |
| Imtec Computers Ltd.               | UUCP: ...!mcvax!ukc!{inset,stc}!  |
| 18 Manasty Road, Orton Southgate   |                     imtec!russell |
| Peterborough, Cambs, PE2 0UP, UK   | EMAIL: russell@imtec.co.uk        |
 ------------------------------------------------------------------------

strider@mtuxo.UUCP (M.COVINGTON) (08/19/87)

In article <14000@topaz.rutgers.edu>, ron@topaz.rutgers.edu (Ron Natalie) writes:
> >	RS-232C was published back in the days when half-duplex connections
> > were much more common.  The RTS/CTS lines are intended to be used to
> > negotiate line turn-around in a half-duplex connection.  When the the DTE
> 
> This is correct, it isn't just for half-duplex transmissions though.
> 
> Your definitions of DTR/DSR/RI/CD are a bit off.
.
.
> While carrier is detected CD is asserted.
> 
> Generally, the host should watch CD to see if the connection went
> away.  DSR going away means for some reason the modem itself gave
> up (like it was turned off).

True.  Also, generally the modem will not provide CTS unless it has detected
carrier and asserted CD.


	+---------------------+---------------------------------------------+
        |   Ty Covington      |	"Given a choice between two evils...        |
	|   mtuxo!strider     |	 I always pick the one I never tried before"|
	|   201-898-6246      |	     -Mae West-		                    |
        |		      |					            |
        +---------------------+---------------------------------------------+
        | Disclaimer:                                                       |
        |       -Why settle for fried,                                      |
        |          when you can get net.flame broiled?-                     |
        |  The secretary has disavowed all knowledge of my activities       |
      	+-------------------------------------------------------------------+

sl@van-bc.UUCP (Stuart Lynne) (08/20/87)

In article <635@imtec.co.uk> Russell Brown <russell@imtec.co.uk> writes:
>In article <2853@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
>>
>>	With all that in mind, I think what we need is a new standard which
>>implements hardware handshaking, smaller connectors, etc.......

How about AT&T using RJ45 Telephone style jacks for their 3B line of
computers. In theory you are supposed to be able to buy the appropriate type
of DB25 adaptor for each piece RS-232 equipment you have and then just use 8
conductor cable with an RJ45 at each end.


Modtap also makes a complete system using these type of adaptors. It doesn't
seem compatible with AT&T's, but seems to have more variations on how you
can hook things up. They define everything in terms of DTESYS/DCESYS, 
DTEDROP/DCEDROP, 4w/6w/8w drops. If you can figure out what each end of your
cable should be, DTE/DCE, SYS/DROP, then determine which of 4w/6w/8w you
need, then just order the appropriate parts.


I havn't actually used either of these systems yet. I'm about to though,
Bell Tech uses the AT&T version on it's ICC card for IBM PC/AT's.

Anyone who has used either of these systems care to comment on their pro's
and con's. Do they really work as well as advertised?


-- 
{ihnp4!alberta!ubc-vision,uunet}!van-bc!Stuart.Lynne Vancouver,BC,604-937-7532

phil@amdcad.AMD.COM (Phil Ngai) (08/21/87)

We use MOD-TAP extensively and are quite satisfied with their
products.  We have somewhere around a thousand of their RS-232
adapters. I worked in networking for two years and not once did I see
a mis-wired or faulty adapter. That's something that's too easily
taken for granted. They did have a problem where the screws fell out
in shipment but that has been fixed for a long time. 

I know the RS-232C spec pretty well and had to interface some weird
equipment on occasion. For example, Bridge Communications has a
network management port on their GS/3 routers which we wanted to
access without walking or driving over to the router. We planned to
use our (separate) terminal network for this, but both the GS/3 and
the terminal network was DCE. With real RS-232C cables, you'd have to
make a weird "null-terminal" cable to connect the two. Since we were
using MOD-TAP, I just picked a special adapter for the GS/3 and
snapped in the modular cable and we could communicate. (this scheme
turned out to be useless for other reasons but the MOD-TAP adapter
did what I wanted)

MOD-TAP always had a pre-wired adapter to do the job. That's
important. Not only does it save you the work of inventing a custom
pinout, it saves you the work of documenting it and others the work of
finding your documentation after you leave. 

I recommend you look at using a WECo 258A harmonica in place of the
MOD-TAP. The function is identical and the price is much better,
probably due to WECo's higher volume. Aside from that, I highly
recommend MOD-TAP. 

We looked at Nevada Western but did not like their product as much.

-- 
I speak for myself, not the company.

Phil Ngai, {ucbvax,decwrl,allegra}!amdcad!phil or amdcad!phil@decwrl.dec.com

jbh@mibte.UUCP (09/01/87)

In article <1235@van-bc.UUCP>, sl@van-bc.UUCP writes:
> In article <635@imtec.co.uk> Russell Brown <russell@imtec.co.uk> writes:
> >In article <2853@phri.UUCP> roy@phri.UUCP (Roy Smith) writes:
> >>
> >>	With all that in mind, I think what we need is a new standard which
> >>implements hardware handshaking, smaller connectors, etc.......
> 
> How about AT&T using RJ45 Telephone style jacks for their 3B line of
> computers. In theory you are supposed to be able to buy the appropriate type
> of DB25 adaptor for each piece RS-232 equipment you have and then just use 8
> conductor cable with an RJ45 at each end.
> 
> Modtap also makes a complete system using these type of adaptors. It doesn't
> seem compatible with AT&T's, but seems to have more variations on how you
> can hook things up. They define everything in terms of DTESYS/DCESYS, 
> DTEDROP/DCEDROP, 4w/6w/8w drops. If you can figure out what each end of your
> cable should be, DTE/DCE, SYS/DROP, then determine which of 4w/6w/8w you
> need, then just order the appropriate parts.
> 
> {ihnp4!alberta!ubc-vision,uunet}!van-bc!Stuart.Lynne Vancouver,BC,604-937-7532

TRW also makes this kind of part.  In fact we obtained some from
AT and T.  The d25 plugs come in a variety of configurations,
even a generic male or female kit  but
we used the ones marked printer/terminal and just moved wires
inside if necessary.  Sure beats pulling 25 conductor cable
through the ducts.

Jim Harvey
ihnp4!mibte!jbh