Subject: Re: Probs w/ pppd over null modem
To: Johan Carlsson <carlsson@earthling.net>
From: Dr. Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 10/22/1998 11:21:27
On Wed, 21 Oct 1998, Johan Carlsson wrote:

> Sorry if this is slightly off-topic since it involves a PC running FreeBSD
> (I'm goofing around w/ all the BSDs). I'm taking it to this friendly and
> all-knowing list anyway (have mercy ;-).

Since it involces a NetBSD computer, it's in topic. :-)

> So, I'm trying to connect a FreeBSD PC (acheron) w/ a NetBSD IIsi (spock)
> w/ a null-modem cable from PC COM2 to the Mac modem port. FreeBSD 2.7.2
> (homebrewed kernel but I haven't messed w/ sio1 or ppp0) and NetBSD/mac68k
> 1.3.2 GENERICIWMSBC#5, respectively. Since there seems to be some
> arbitrariness wrt how a RS-232 DB-9 to RS-422 DIN-8 null modem should be
> wired I've tried four different ones (see below). The result is the same
> w/ all of them, like this:
> 
> I fire up pppd from the command line on the PC:
> 
> acheron # pppd cuaa1 9600 debug kdebug 7 crtscts modem silent
> 
> And then on the IIsi:
> 
> spock # pppd tty00 9600 debug kdebug 7 crtscts modem

[snip]

Don't stick modem in there. You don't have a modem, and it'll only make
life harder.

> These are the null modems I've tried (one and two are the standard ways,
> I think, three and four are variants based on the FreeBSDish null modem
> found in their Handbook, chapter 14.2.2.1):
> 
>            One:                           Two:
>         DTR -- GPi                     DTR -- GPi
>          TD -- RxD-                     TD -- RxD-
>          RD -- TxD-                     RD -- TxD-
>    DCD, DSR -- HSKo          DCD, DSR, CTS -- HSKo
>         CTS -- TxD+                     SG -- Gnd, RxD+
>          SG -- Gnd, RxD+               RTS -- HSKi
>         RTS -- HSKi
> 
>           Three:                          Four:
>          TD -- RxD-                     TD -- RxD-
>          RD -- TxD-                     RD -- TxD-
>         DCD -- HSKi, TxD+         DCD, DSR -- HSKo, HSKi
>          SG -- Gnd, RxD+                SG -- Gnd, RxD+
>         DSR -- HSKo               CTS, RTS -- GPi
>    CTS, RTS -- GPi
> 
> Electrically speaking they're all OK, I checked w/ a multimeter. Dunno if
> they're sane, though.

Uhm, actually, they're all not sane. :-)

SG -- Gnd, RxD+, TD -- RxD-, RD -- TxD- are all ok. TxD+ should be
ignored. DON'T wire it to any of the inputs as it caries the data stream -
you'll get way too many transitions on these lines & will freak things
out.

Wire DTR to DSR, DCD, and GPi (which is the mac's DCD). That way when the
PC signals DTR, it will think everything's ok (DSR and DCD will be
asserted), and the mac will think that DCD's asserted.

Wire HSKo to CTS and HSKi to RTS.

Assuming this is 1.3.2, don't use crtscts, use cdtrcts. Then you'll turn
on full hardware handshaking (the mac serial port doesn't have an RTS pin,
just CTS, DTR, and DCD).

> Oh yeah, I didn't reboot between all the test (I did kill and restart pppd
> of course). Maybe it would've been good if stty had refreshed the serial
> devices between each test?

On NetBSD, the drivers reset on each first-open (when the device goes from
inactive to active).

Take care,

Bill