Recently I’ve been doing a lot of Retro computing, mostly with the BBC Master 128 last year & this year I’m going to be doing more with other older systems ranging from a Commodore 64 that’s ready to be worked on to operating systems like CP/M & Bulletin Boards (BBS).
As I’m intending on doing some videos later on how bulletin boards were accessed in the old pre-Internet days. Now these days we have WiFi modems available which emulate a dial-up modem & then connect to a bulletin board (they do still exist) over the internet.
But that’s too clean & modern so how about using an old modem? So to do that I wanted to setup a pair of modem’s so that we can reproduce an old dial-up experience.
Most people don’t have a land line anymore, nor are there many BBS’s online that are connected to the old phone system, so the only option is using VoIP to connect them. However if you read online, most people say it’s either not possible or would be painfully slow.
So, let’s see if we can get something working.
VoIP POTS adaptors
First we need some way to connect the modems to the network. For this you need a VoIP Phone Adaptor. These are available online with prices ranging from £30 up, depending on where you look.
I managed to get my hands on a pair of Linksys PAP2T’s for £1.20 in an eBay auction (that’s for both not each, with postage total was £9.20!). These provide 2 POTS ports to connect old phones, fax machines & modems & a 100Mb ethernet port.
These come with a simple (but unsecured) web interface (they default to 192.168.0.5 as their IP address) which you can use to configure them.
As I had two of them I’ve setup one in my home office & the other in my main rack.
Configuring the PBX
Next was to configure them on the PBX. I’m running 3cx on a Raspberry PI 3B+ as my home PBX but you can use Asterisk as well. I created 4 new extensions, 2 for each of these adaptors.
|05||Rack Modem we will dial in to|
|06||Spare, available for a second modem|
|07||Office modem we will dial out from|
Now in the Linksys admin page we have to setup the extension. There’s two sections in the config we need to change.
First is the Proxy and Registration & Subscriber Information sections:
Here the Proxy & Outbound proxy is the address of our PBX.
Under Subscriber Information: User ID is the extension number whilst Password & Auth ID are the authentication it needs to connect to that extension. In 3cx these last two are auto generated and available in the extensions config page.
Below that there’s the Auto Configuration section, make certain it’s set with the following values:
The main part here is that the Preferred Codec is G711a & Use Pref Codec only is set. Using any other codecs (including G711u) there causes the modems not to sync. I’ve also disabled Echo and fax support as that causes it to change the codecs.
Now for the modems. I’m using a pair of US Robotics modems, as that’s the type I had used back in the late 1980’s & 1990’s. You can get hold of these of eBay for about £20.
Just make certain you get the Hardware versions (i.e. with a proper RS232 port) and not a Software modem, specifically if you see one with USB stay clear of it. Software modems do not have a controller on board & rely on software on the computer to work, so if you want to connect it to a retro system it will not work! Same goes for trying to get a software modem running on Linux – it won’t, most of them have outdated drivers which are for Windows 95, NT or XP only.
Raspberry PI Dial-up Server
I’m using a Raspberry PI as the server I also used an RS232-USB adaptor cable to connect the modem to it. These you can easily get for about £8 off Amazon and have a 9 pin male connector on one end. If your modem doesn’t have a cable then you’ll also need an adaptor cable as the modems tend to have a full 25 pin RS232 connector. Most (but not all) modem cables have 9pin on the computer end & 25 pin on the modem end.
To get the PI to answer calls we need some software. As initially I want just the standard login prompt I’m using mgetty which does just that, manages the modem & presents a login prompt:
sudo apt update sudo apt install mgetty
Next we need to create the systemd script /etc/systemd/system/mgetty.service with the following:
sudo vi /etc/systemd/system/mgetty.service
[Unit] Description=Extension 05 Modem USB Documentation=man:mgetty(8) Requires=systemd-udev-settle.service After=systemd-udev-settle.service [Service] Type=simple ExecStart=/sbin/mgetty -x0 -s 57600 /dev/ttyUSB0 Restart=always PIDFile=/var/run/mgetty.pid.ttyUSB0 [Install] WantedBy=multi-user.target
This presumes the USB serial adaptor has presented itself at /dev/ttyUSB0. If it’s the sole one then it will be it.
Next we need to edit /etc/mgetty/mgetty.config and append the following:
port ttyUSB0 speed 9600 data-only y toggle-dtr n login-prompt @ \P login:\040 login-time 60 term vt102
Now start the service:
sudo systemctl daemon-reload sudo systemctl start mgetty
Testing dial-up works
For an initial test I’m just using another Linux box with another modem connected via a USB adaptor. For a terminal I’m using minicom
sudo apt update sudo apt install minicom
With the modem connected it should appear at /dev/ttyUSB0 so start minicom:
minicom -D /dev/ttyUSB0
If this fails you might need to ensure you are in the dialout group.
Once minicom is running you should find the modem is connected. Type ATZ and it should show OK
Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Dec 23 2019, 02:06:26. Port /dev/ttyUSB0, 14:11:29 Press CTRL-A Z for help on special keys atz OK
Now try dialing. Here I’ve got the server on extension 05 so thats the phone number we will dial.
So enter st&N4dt05 & press enter:
at&N4dt05 CONNECT 4800/ARQ/V34/LAPM/V42BIS Debian GNU/Linux ttyUSB0 57600 (4800/ARQ/V34/LAPM/V42BIS) cl-002 ttyUSB0 login:
If you see that then you have successfully dialed your Raspberry PI.
Now in that example we used &N4 which for US Robotics modems tells them to connect at 4800 bps. Remember I said that speeds can be affected with VoIP. Here’s a simple table of some &N commands relate to which speed:
|&N0||AT&N0||Highest link speed|
I’ve only shown some of the options here, you can find more on this page.
Also, if you are going to use a faster speed than 9600 then make certain you have the speed in mgetty.config on the server set to the maximum you want to support.
Here you can see a quick video of this in action.
That’s it for this post. The next one on this subject will be showing this working with something from that era
- USR Robotics modem commands
- Dial UP and PPP server in modern Linux – Hackaday
- mgetty setup on Jessie – Raspberry PI forums
- Sabrent USB 2.0 to Serial (9-Pin) DB-9 RS-232 Converter Cable – Amazon