Getting Amiga 1200 online via PPP in 2022
There are many different options to connect Amiga to the Internet. Most of them are faster and require less setup than what I am going to describe today. So why even bother with PPP. Well, 16-bit LAN PCMCIA cards are harder to find each year, WLAN cards, while easier to obtain (actually I have one), have their own problems with modern routers that broadcast messages unrecognized by the prism2 driver. It's constantly listening for nearby routers and hangs up the whole system as soon as it gets such a message. And I live in a crowded apartment building with lots and lots of routers around... Since PCMCIA was not a way to go for me, up to this point I was using a Wicher 1211 card that provides Ethernet and an SD card reader. It's easy to set up with AmiTCP and I could stop there, but I would rather be able to surf the Interwebz and use my Apollo accelerator at the same time. And I already had a null modem cable at home, so... why not?
Here's a simple tutorial on how to connect your Amiga to the internet with the power of Unix and a serial port!
In terms of hardware, we won't need anything fancy:
- a null modem DB25-DB9 cable (you can buy one online or make your own)
- Unix machine we want to connect to, I'm using ThinkPad X220t running Manjaro Linux, but it shouldn't matter all that much
- if your PC doesn't have a RS232 port, you'd also need a DB9- USB adapter
- and of course an Amiga, in my case it's an A1200 running off WB 3.1 from SD card and the aforementioned Apollo 040 card with 32MB of Fast RAM
Software-wise, we gonna only need pppd on the Unix side, and for Amiga, a bunch of packages from Aminet:
- Baud Bandit, a better and faster serial.device replacement
- ppp.device evaluation version
- AmiTCP 4.0 demo
First, let's replace the default
serial.device with the Baud Bandit driver. It's not a required step, but I've achieved better speed and more stability using it. To use it, first you need to put provided
BaudBandit.device (pay attention to the capitalization, don't change it) into the
DEVS: drawer. There are a few more files in the archive, but unless you are using A2232 serial card, only the
QuickFix is important. Make sure it has the correct executable flags and put it somewhere into your
;Patch OpenDevice() vectors to use BaudBandit.device IF EXIST path:to/QuickFix Execute QuickFix EndIF
Now we need our TCP/IP stack, in this case, AmiTCP 4.0 free version. If you are using the 4.2 commercial edition, keep in mind that the installation of the
ppp.device will look slightly different. Refer to the
PPP.guide for instructions in that case.
I am going to assume you are doing a fresh installation, if not, you can skip to the ppp.device section.
Start the installation. We will be modifying the defaults created by the installer anyway, but to simplify things, that's the setup you want to pick up during the process:
- network interface type:
- default IP address:
0.0.0.0if you have DHCP, your desired address if not
- destination address: local address of your PC, for example, mine was
- netmask and gateway addresses: leave empty
The next step is the
PPP.device itself. The link I've put above is an evaluation version, which has speed limits, but other than that, it contains everything we need.
Unpack the archive. There are two versions of the .device file there -
devs/ppp.device.020.eval. If you have 020 CPU or higher, pick the latter and copy it into your
DEVS:. For convenience, we are also going to copy provided binaries into AmiTCP's
bin that's already in our path:
copy devs/ppp.device.020.eval devs:networks/ppp.device copy all bin/ your:path/to/AmiTCP/bin/
And now, the config file.
ppp.device provides a lot of options (that are described in its guide), but we're doing the simplest setup possible, so we only need one line:
BaudBandit.device 0 19200 192.168.1.26 7WIRE
If you are using DHCP, put
0.0.0.0 instead of a static IP.
0 is your serial device unit number. In most cases, it will be 0, but if you are using a different one, remember to set it correctly. Save the file as
ENV:SANA2/ppp0.config where again
0 is your unit number. Don't forget to copy the file to the
Modifying AmiTCP config
We are almost ready, but still need to make some modifications to the AmiTCP's config files. If you are modifying an existing installation, I strongly advise you to make a backup of those three files:
bin/stopnet, since those are the files we are going to modify.
db/interfaces and put the following line somewhere (remember to set the correct unit number here too):
ppp0 DEV=DEVS:networks/ppp.device UNIT=0 IPTYPE=33 NOARP P2P
Next up is
bin/startnet, few more changes here. If you were doing a fresh install and picked
PPP as your network interface, you'd need to modify a few existing lines, if you were using a different interface, just add them (you may need to comment out previously used interface if they will be causing any conflicts).
;Put somewhere near the beginning of the file online devs:networks/ppp.device 0 ;Change the line starting with "AmiTCP:bin/ifconfig ppp0..." to AmiTCP:bin/ifconfig ppp0 $ppp0iplocal $ppp0ipremote ;Change the line starting with "AmiTCP:bin/route add..." to AmiTCP:bin/route add $ppp0iplocal localhost ;Add this line underneath AmiTCP:bin/route add default $ppp0ipremote
bin/stopnet, simply add this at the end:
offline ppp.device 0
Done! We can move to the PC now.
It will be short, I promise! You just need to add some firewall rules, turn on IP forwarding and start the
pppd. Here's how to do it:
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -o wlp2s0 -j MASQUERADE iptables -A FORWARD -i wlp2s0 -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -A FORWARD -i ppp0 -o wlp2s0 -j ACCEPT
The command to start pppd looks like this:
sudo pppd debug nodetach noauth /dev/ttyUSB0 19200 xonxoff local passive persist 192.168.1.26:192.168.1.27 netmask 255.255.255.0
debug nodetach is optional, but I recommend it, to see what's going on, it will save you time if you misconfigured something.
dev/ttyUSB0 is a tty of your USB <-> serial converter. It may differ for you, use
dmesg | grep tty to find out.
19200 is your baud rate, make sure to use the same value as your ppp0.config.
I am not using DHCP, so
192.168.1.26:192.168.1.27 are values that will be passed as
$ppp0iplocal to the AmiTCP config.
And... that's it! Connect the serial cable, turn on the Amiga, start
pppd and call
startnet in Amiga shell. You should have a slow (but stable) internet connection now.
I'm certainly not an expert, but here are some caveats and problems I've encountered, maybe it will be helpful:
- literally nothing happens: make sure your PC sees the serial adapter and recognizes it correctly
startnethangs up and doesn't even show the usual nagging window (in the free copy): look at the
pppdlogs, if there's some activity indicating Amiga and PC see each other (the easiest sign to look for is a Baud Bandit's info line), there's probably something wrong with the IP/netmask config
Unit is currently offlineerror: check if you are using the correct unit number and if you spelled
BaudBandit.devicecorrectly (it can't be all lowercase)
- rabbit jumps on the Amiga and stops AmiTCP: give him a piece of banana (warning, it's not a permanent solution and may happen again)
If you still experience problems, or found any errors in provided instructions, feel free to contact me via email:
spookbench [at] proton.me