Connecting two computers via modems (RJ11)

Solution 1:

You might be able to do this if used a phone line simulator - a device that feeds the device the current that phones run off - jagshouse has an article that details how to build them.

A quick google search also indicates that there's prebuilt, commercially available models of the same device, if you were not DIY inclined.

The line simulator should replicate the effect of the two phones being connected over a conventional phone line, and allow you from communicate from one to the other with AT commands.

Solution 2:

Linux has supported ppp since forever. You run pppd, with parameters that tell it which serial port to listen to and other things, and then it makes a ppp0 (or other) interface. You can then configure routing and firewalling (using iptables) like any other interface.

So if all you want to do is play around with ppp you can do it with a null modem cable connecting the serial ports of two systems. If you set the serial port speed to 33.6Kpbs or even lower, and are routing Internet through the ppp connection, you have a pretty good dialup-modem simulation of speed.

If the "ppp client" is Windows, Windows insists that the other end is a modem. What this means is that Windows will always try to send "AT" commands over the serial port before starting to talk ppp over the serial port. AT commands are locally understood by a modem, but are not part of ppp. Not to fear, Linux "ppp" supports a "chat" script that can respond as Windows expects.

Here is an excerpt of the pppd command that got all this started when I was messing with it, you can use it as a template and substitute accordingly:

pppd 115200 netmask $LOCAL_NET_MASK crtscts connect 'chat -v -f /etc/admin/network/winclient.chat' lock local ms-dns $LOCAL_IP ms-wins $LOCAL_IP persist proxyarp silent $PPP_IFACE_ADDRESS $TTY noauth

Under Linux, typically your modem would be attached via a serial port, or that would be emulated by a PCI card or onboard chipset (externals work much better with Linux). The modem implements the V.92 or whatever protocols actually making sound over the phone line.

If you want to simluate that part of it, you can try Softmodem. This will take an audio input and output via JACK and actually do the audio "modulate/demodulate" part a modem is supposed to do (limited to 14Kpbs I believe, though). I couldn't get it working on my server but I don't have a lot of experience with JACK (or an actual audio device on the server other than the PC speaker...)

Solution 3:

You would need to interface the two modems with some form of telephone exchange system. Just hard-wiring them together won't be enough - the PSTN (telephone system) actually provides power through the wires for such things as ringing signals and such.

The closest you could get without a telephone exchange would be to just use a Null Modem cable to link two serial ports together and do away with the actual dialing part of the experience.