PPP link from Mac to Debian over null modem serial link

I have a 1989 Macintosh SE/30 which, somewhat unusually, has an ethernet card, so it’ simple to put it on my home network — and therefore on to the Internet. However, not everyone is so lucky so I was wondering what else one could do.

The idea is to make a PPP connection — so to the Mac it looks like dial-up using a modem connected to a serial port — from the Mac to Debian which I have running on a Mac Min3,1.

Shopping list:

Here is the FTDI232.

Wiring

The first challenge is to wire RS232 to the Mac. I’m not quite sure how I’ve got it set up because I never know when I'm looking at a pinout which of the front/back of the plug/socket that I’m lookig at. So here’s a diagram that's probably wrong.

Jumper wires fit into the sockets on the Mac’s modem port.

The questions are:

I am up and running using the minus pair and the plus pair not connected; and ground to ground.

Is anybody out there?

The next seep is to check that we can send anything between the two machines. To do this run a serial terminal on each end.

On Debian this is easy with:

# screen /dev/ttyUSB0 9500

On the Mac I used a communications document in Claris Works 4 — was was nice since I used Claris Works 4 a lot in the 1990s but never that document type.

Things that go wrong.

Here’s what happened — eventually — in Claris Works:

The objective is to send and receive text in both directions.

PPP

The final setep is to get Debian to accpet a PPP connection on the serial device, assign addresses to both endpoints, and route it onto the local network and beyond.

On the Mac it's easy! Just set up Config PPP as if it was dialing up, but without a phone number.

On Debian you need pppd and to configure it...

mini31 # cat /etc/ppp/options.ttyUSB0

noccp
noauth
mtu 1410
mru 1410
nodefaultroute
proxyarp
silent
debug
192.168.9.31:192.168.9.30
netmask 255.255.255.0
mini31 # cat /etc/ppp/chap-secrets
se30    *       password *

Finally, before connecting from the Mac you need to start PPP on Debian. (Presumably this can be done automatically somehow?)

mini31 # cat pppd.sh
pppd nodetach debug /dev/ttyUSB0 57600 -crtscts

The trick here is the -crtscts flag that turns off flow control — which is not wired up. I found that it worked at 57600 but at 115200 the Mac would not connect.

Since I already have IP forwarding enabled (/proc/sys/net/ipv4/ip_forward) that was it! First I checked that I could connect to netatalk running on Debian.

And finally to the Internet (IE 3 — which I did genuinely use around 1997 on a Performa 450 and a PowerBook 5300cs).

Starting pppd automatically

Create, say /etc/systemd/system/pppd-ttyUSB0.service, and add:
[Service]
ExecStart=/usr/sbin/pppd nodetach /dev/ttyUSB0 57600 -crtscts
Restart=always
RestartSec=0

[Unit]
Description=pppd on ttyUSB0 for Macs
After=network.target
Wants=network.target

[Install]
WantedBy=multi-user.target

And then:

# systemctl daemon-reload
# systemctl enable pppd-ttyUSB0

The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled using systemctl.

Possible reasons for having this kind of units are:

# systemctl start pppd-ttyUSB0

(Don’t know what all that nonsense is about) Note that:


Home | More stuff | Octad of the week