Earlier in the week I stumbled upon a video showing a Dreamcast PC-DC Server running on a RaspberryPi and a python script used to help bridge the connection. The uploader did not include instructions on how to use his software (however he did promise that he would as his software is a work in progress). I decided to make my own version of his software based off of his source code. His software uses a series of AT commands and PPP to connect the modem but mine uses PPP and the Mgetty method.
Here is the video I made to show off the software:
Instructions:
If you already have a PC-DC Server that works using the Mgetty method, you can skip to Step 13
This guide assumes you have either a Debian-based Operating System (Virtual Machine or Otherwise) OR a RaspberryPi running Raspian already initially set up.
I will be using Ubuntu 15.04, everything will be done in a Terminal, however, if your machine is headless SSH will work just fine.
Step 1: Open a Terminal or SSH session.
Step 2: Install mgetty and ppp.
Code: Select all
sudo apt-get install mgetty ppp
Code: Select all
sudo rm /etc/ppp/options && sudo touch /etc/ppp/options
Code: Select all
sudo nano /etc/ppp/options
Code: Select all
debug
login
require-pap
ms-dns 8.8.8.8
proxyarp
ktune

Step 6: Now plug in your modem if you already haven't. We need to figure out where your modem is connected in Linux. this can be accomplished by running dmesg and grepping for "tty" like so:
Code: Select all
sudo dmesg | grep tty
Write it down.
If you're using a USB modem there is a good chance that it will be "ttyACM0"

Step 7: Run ifconfig and write down some numbers.
Code: Select all
sudo ifconfig

Step 8: Remember the "tty***#" value from earlier? Well, now we need it. We need to create a file called /etc/ppp/options.*** but you need to replace the "***" with the value from Step 6, in my case and the case with most USB modems it would be:
Code: Select all
sudo nano /etc/ppp/options.ttyACM0
You also need to think of an IP address that is not being used on your network. A safe bet is usually the first 3 sets of digits from your computer IP address and 200 after it, for example: my computer's IP address is 192.168.0.25, so I would use 192.168.0.200 for the Dreamcast.
You need the address that we got under "Mask:" in Step 7.
So once you get all of your numbers together it will be in this format:
computerIP:dreamcastIP
netmask Mask
So in my case it would be:
Code: Select all
192.168.0.25:192.168.0.200
netmask 255.255.255.0

Step 9: We need to open /etc/ppp/pap-secrets in nano and add a line.
Code: Select all
sudo nano /etc/ppp/pap-secrets
Code: Select all
dream * dreamcast *
Run this command:
Code: Select all
sudo useradd -G dialout,dip,users -c "Dreamcast user" -d /home/dream -g users -s /usr/sbin/pppd dream
Code: Select all
sudo passwd dream

Step 11: We need to replace /etc/mgetty/mgetty.config with our own so run this:
Code: Select all
sudo rm /etc/mgetty/mgetty.config && sudo touch /etc/mgetty/mgetty.config
Code: Select all
sudo nano /etc/mgetty/mgetty.config
Code: Select all
debug 4
fax-id
speed 115200
port ttyACM0
data-only y
issue-file /etc/issue.megetty

Step 12: We're almost there!
Fire up your Dreamcast with Planetweb 2.6 or dreamkey.
Go to Start -> Options -> Internet Connections
Configure the following:
Real Name: Can be anything
User Login: dream
Password: dreamcast
Dial Up Number: 555
Backup number: (leave blank)
DNS1: 0.0.0.0
DNS2: 0.0.0.0

On the Dial Options page set up this:
The rest can be left blank.Modem Init: AT&F0
Dial area code: Off
Blind Dial: On

On the Proxy Settings page click:
User Proxy: No

Step 13: Now we can try it out!
Download the python script attached to this post (or from this mirror: https://www.mediafire.com/?aiecicq47ws1y67) and put it somewhere you can remember on your PC-DC Server. I put it in my home folder.
Change directory to where it is using cd.
Code: Select all
cd /put/directory/here/
Code: Select all
chmod +x dreampi2.py
Code: Select all
nano dreampi2.py
MODEM_DEVICE = "ttyACM0"
to whatever your modem is (Step 6):
Close nano and save with Ctrl + X.MODEM_DEVICE = "modem_goes_here"
Step 14: We're almost there I promise.
You need to install python-pip using this command:
Code: Select all
sudo apt-get install python-pip
Code: Select all
sudo pip install sh
Step 15: RUN!
Run the file using this command:
Code: Select all
sudo ./dreampi2.py

If so, then it worked! You can now connect to the internet on your Dreamcast by just running this script and dialing up on the Dreamcast.
To close the script you need to press Ctrl + C as I didn't implement a way to gracefully close it. Whoops!

ALSO! There is a bug where the script may not see the modem hang up, if this happens, quit the program and restart it.
Thanks to everyone who helped me with this! Dreamcast Planetweb Setup photo credit goes to Kbuzz at http://www.dreamcast-scene.com/
And a big thanks to you guys here at the forum! You've been so helpful!
DOWNLOADS
Attached to this post!
Mirror: https://www.mediafire.com/?aiecicq47ws1y67
Thanks,
-Petri