Re: Serial Communications



tolsen64 <tolsen64@xxxxxxxxxxx> wrote:

> This is not making any sense to me at all. This is the cable I have
> working with the MOXA. Remember, it wasn't scientifically created, but
> it was created by switching wires around until it started working
> (wires must be connected like this otherwise no comms at all). I
> should mention that I have no problems with Proterm 3.1 losing
> characters, only with the BBS. I don't know if this has to do with
> Proterm buffering data or what. It's just the BBS software that is
> losing characters. That's why I'm trying to figure out if it's a
> handshake problem. I need the BBS to catch all data coming in so it
> can connect out to SMTP & NNTP servers and exchange messages.
>
> GS Moxa DB9
> Pin 3 TX- Pin 3 RXD
> Pin 5 RX- Pin 2 TXD
> Pin 6 TX+ Pin 1 DCD
> Pin 1 DTR Pin 4+8 DSR/RTS
> Pin 4+8 RX+/GND Pin 5 GND
> Pin 2 HSKi Pin 6 DTR

Ouch. Lots of weird connections going on there, and some mislabelling.

The standard signals on a DE-9 (not "DB9", by the way) are named from
the point of view of the terminal (computer). Since your cable seems to
be working, I have to assume that your modem is using the normal pinout
for a DE-9, but the signal names have been swapped.

This is the pinout of the PC-AT serial port, which was the first to use
the DE-9 connector. The PC-AT used a male plug.

1 DCD (carrier detect from modem)
2 RxD (data from modem)
3 TxD (data from computer)
4 DTR (data terminal ready from computer)
5 GND (signal ground)
6 DSR (data set ready from modem)
7 RTS (request to send from computer)
8 CTS (clear to send from modem)
9 RI (ring indicator from modem)

A modem with a DE-9 connector should use the same pinout with a female
connector. This allows a straight-through connection to a PC.

Getting back to your cable:

TX+ (IIgs pin 6) should not be connected to anything. It is the
complement of TX-, and is only used when connecting to another RS-422
device. For an RS-232 peripheral, leave it unconnected.

You have IIgs pin 1 (Handshake Out) connected to modem pin 8 (CTS), both
of which are outputs. This is not a good idea.

> Using the example 7-Wire handshake cable your post, I get this:
>
> GS Moxa DB9
> Pin 4 GND Pin 5 GND
> Pin 3 TX- Pin 3 RX
> Pin 5 RX- Pin 2 TX
> Pin 2 HSKi Pin 6 DTR
> Pin 1 DTR Pin 4 DSR
> Pin 7 GPi Pin 7+1 CTS/DCD
> ??+?? Pin 8 RTS

Correcting the signal names, we have:

IIgs Moxa DB9
Pin 4 GND Pin 5 GND
Pin 3 TX- Pin 3 TxD
Pin 5 RX- Pin 2 RxD
Pin 2 HSKi Pin 6 DSR
Pin 1 HSKo Pin 4 DTR
Pin 7 GPi Pin 7+1 RTS/DCD

You should also have IIgs pin 8 (RxD+) connected to GND (pin 4), or
nothing will be received.

This cable probably won't work with an intelligent modem which is
expecting AT commands, because the modem's RTS input will only be active
while its DCD output is active, which means that you can't send any
commands to the modem while it is not connected.

It would be better to connect IIgs pin 1 (HSHKo) to both modem pins 4
(DTR) and 7 (RTS). Leave modem pin 1 (DCD) connected to IIgs pin 7
(GPi), as some software can recognise this as a carrier detect input.

As wired here, the IIgs handshake signals are not useful for
handshaking, only for "presence detect", and to hang up a modem by
dropping HSKo (DTR).

> What would Pin 8 on the DB9 Connect to?

(CTS) Nothing, if you are using HSHKo/HSHKi as DTR/DSR. There are no
inputs left on the IIgs.

The RS-232 standard doesn't define a signal which can be used as a
handshake output from a terminal device (computer). Some devices cheat
by using DTR for this function, but that was not its intended purposes.

With a high-speed modem (2400 bps is high speed!) which supports data
compression and error correction, the modem breaks the RS-232 standard
by redefining the RTS pin as a handshake output from the computer
instead of an "I want to transmit now" request.

This means that if you have such a modem, you should wire your cable as
follows:

IIgs Moxa DB9
Pin 4+8 GND/RXD- Pin 5 GND
Pin 3 TX- Pin 3 TxD
Pin 5 RX- Pin 2 RxD
Pin 2 HSKi Pin 8 CTS
Pin 1 HSKo Pin 7 RTS
Pin 7 GPi Pin 1 DCD

The modem's DTR pin (4) is debatable. You can connect it to the IIgs
hanshake output (pin 1), but if so, you have to configure the modem to
ignore DTR. The default configuration with most modems is to drop the
connection if DTR goes false, which means that you wil lose the
connection whenever the IIgs needs to do handshaking because its input
buffer is full.

It may be better to leave the modem's DTR pin (4) unconnected. The
modem should default to assuming the computer is ready, but you might
need to configure it specially to deal with the lack of an active DTR
signal.

In this configuration, if you also configure the IIgs control panel to
use handshaking and buffering, and your BBS software is behaving
correctly, then everything should work.

--
David Empson
dempson@xxxxxxxxxxxxx
.



Relevant Pages

  • Re: Dr. James Marsters, TTY deaf service developer [Telecom]
    ... pulse-dial the modem. ... both female and male 25 pin connectors for the DTE ports. ... Modems and directly related devices were wired as DCE, ... you couldn't even count on what *KIND* of a connector ...
    (comp.dcom.telecom)
  • Re: OT: Oh woe is me:-(
    ... Broadband modem USB drivers are notoriously unreliable. ... An Ethernet connector looks quite like a BT telephone connector, although slightly narrower and slightly fatter. ...
    (uk.media.radio.archers)
  • OT: Laptop and cables, and MacPPP (was: Finally making use of PowerLisp despite several **horrible**
    ... buying a modem cable that I don't know will work because I don't ... On the back of the laptop, ... I assume the DIN connector is for external keyboard and/or mouse, ... Both computers, and all cables, have been in ...
    (comp.lang.lisp)
  • Re: Any reason to *NOT* wipe the "Receipts" folder?
    ... don't have a SATA connector to work with. ... with an interface a G4 AGP rig can use. ... I wanted a new modem - My old USR v.everything ... but check with the Geek Squad guys over there" <points at ...
    (comp.sys.mac.system)
  • Re: Modem changes behavior after Sarge Update
    ... I can tell by watching the modem that it hangs up ... This type of behavior is usually caused by "dropping DTR". ... figuring out what I need to check in serial port settings or device ... The first step is to find out why the modem is dropping carrier ...
    (Debian-User)