Jump to content
TechEdison

Connecting old Macintosh to the net using serial

Recommended Posts

Can I follow this guide with Raspberry Pi 3? I have a USB <-> Serial adapter and a null modem cable I built for transferring files with StarGate

Share this post


Link to post
Share on other sites

Yes.

 

you will probably need to install ppp on the raspberry pi though:

sudo apt-get install ppp

 

Edited by epooch

Share this post


Link to post
Share on other sites
3 minutes ago, epooch said:

Yes.

 

you will probably need to install ppp on the raspberry pi though:


sudo apt-get install ppp

I'll try this soon ,thank you :)

 

Share this post


Link to post
Share on other sites
1 hour ago, Lutefisky said:

MrGasS27 

 

i just spent many many hours over many days trying to get somewhere with my Pi3 and my Classic II. I finally had some luck with the following posts. 

 

https://jeffhacksthings.wordpress.com/2017/05/14/raspberry-pi-ppp-serial-router/

 

https://www.raspberrypi.org/forums/viewtopic.php?t=149927

 

But even then I struggled a fair bit. 

Good luck. 

In addition to these articles:

 

sudo nano /etc/sysctl.conf
- Find the line net.ipv4.ip_forward=1 and remove the # symbol at the start of the line.

 

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    - Do after every reboot of pi, or make a script that does this so you don't have to.

 

sudo systemctl restart rpippp.service
    - Use this to get the service restarted if it’s not working, this is your friend.

 

Also, keep an eye out for the use of "ttyUSB0" and "eth0" throughout the setup, there are some mistakes in the articles where they don't stay consistent.

Share this post


Link to post
Share on other sites

I'm reading the whole thread after a little bit of time and I'm confused af, maybe someone can write a clean and good described tutorial for connecting the Mac through the Pi to internet, it would be very useful to everyone...

Share this post


Link to post
Share on other sites
On 27/1/2018 at 2:28 AM, Lutefisky said:

MrGasS27 

 

i just spent many many hours over many days trying to get somewhere with my Pi3 and my Classic II. I finally had some luck with the following posts. 

 

https://jeffhacksthings.wordpress.com/2017/05/14/raspberry-pi-ppp-serial-router/

 

https://www.raspberrypi.org/forums/viewtopic.php?t=149927

 

But even then I struggled a fair bit. 

Good luck. 

Thank you, I'm reading these posts, especially the first is explained in a good way, I'll try to follow it! :)

Share this post


Link to post
Share on other sites

This afternoon I became completely crazy, I tried to connect my Pi Zero W (I put the Pi 3 in NesPi case, so it is stuck in that case) with Serial-USB and Null Modem cable with my Quadra 700 on 7.6.1 and on my IIci on 7.1.2, completely no luck... I'll wait for a good tutorial.

Share this post


Link to post
Share on other sites

Okay, finally I "connected" the Iici and Q700 with the Pi Zero W, "PPP UP" in MacPPP but, why can't I surf Internet? I tried Netscape, MacWeb and iCab, no way to go on internet, why?

Share this post


Link to post
Share on other sites

I never had any luck with Linux... I tried for a good hour, the PPPd just wasn't the same as the Mac one.

 

On 2/20/2018 at 6:56 PM, MrGasS27 said:

why can't I surf Internet?

Try using my proxy script and hosting it on your local internet. I was never able to access pages past my local internet from my old mac.

 

Basically the script downloads the website using the internet of a working, modern computer and will pass it on to the Mac which should be able to access local (localhost/192.168.x.x, etc) websites.

Share this post


Link to post
Share on other sites
On 2/20/2018 at 3:56 PM, MrGasS27 said:

Okay, finally I "connected" the Iici and Q700 with the Pi Zero W, "PPP UP" in MacPPP but, why can't I surf Internet? I tried Netscape, MacWeb and iCab, no way to go on internet, why?

Hi, I am the owner/author of the blog jeffhacksthings.wordpress.com, I've moved my blog to a full domain name. It is now at www.retroadventures.net. I've been cleaning things up as I move them, and I found this thread. Anyhow, I'd like to see if I can help you get this working if you are still interested.

 

To make this work, you will need to know what the device name is for your USB serial adapter. Find that by running this command after you plug in the USB device:

dmesg | grep tty

This should give you a result like this; (note that I have three of them plugged into my Pi, so there are three listed here)

[    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.001232] console [tty1] enabled
[    0.930724] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    2.196881] systemd[1]: Expecting device dev-ttyUSBlower_hub24.device...
[    2.204180] systemd[1]: Expecting device dev-ttyUSBlower_hub04.device...
[    2.211368] systemd[1]: Expecting device dev-ttyUSBupper_hub05.device...
[    2.218448] systemd[1]: Expecting device dev-ttyUSBupper_hub03.device...
[    4.676395] usb 1-1.2: pl2303 converter now attached to ttyUSB0
[    4.680188] usb 1-1.3: pl2303 converter now attached to ttyUSB1
[    4.683907] usb 1-1.4: pl2303 converter now attached to ttyUSB2

The last three lines tell me that I have a pl2303 USB serial adapter mapped to ttyUSB0, ttyUSB1 and ttyUSB2. In most cases, if you only have one, it will be ttyUSB0. We'll use that in our examples.

 

The next step is to install PPP:

sudo apt-get install ppp

 

Then you need to configure PPP on your Pi. You should have created a file at /etc/ppp/options.ttyUSB0. Replace the IP addresses with your own.

# /etc/ppp/options.ttyUSB0
noauth
nocrtscts
passive
local
maxfail 0
persist
nodetach
10.101.102.1:10.101.102.2
proxyarp

What you are doing here is setting up a PPP link with two addresses: 10.101.102.1 and 10.101.102.2. The first address here will be assigned to your Pi on the ttyUSB0 device. The second is the address that PPP will be looking for a connection from.

 

After this, you need to create the PPP service, so you can start pppd on the ttyUSB0 device. Create this file at /etc/systemd/system/rpippp.service:

# /etc/systemd/system/rpippp.service
[Unit]
Description=PPP
[Service]
Type=idle
ExecStart=/usr/sbin/pppd -d /dev/ttyUSB0 57600
Restart=always
[Install]
WantedBy=multi-user.target
Alias=ppp.service

Once this is done, you need to setup the forwarding in iptables: (Here, replace the wlan0 with the name of your network device that is used to get your Pi on the Internet.

sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

That should be all of the setup you need on the Pi. Now let's get the Mac configured. To configure the Mac, install MacTCP, MacPPP and MacWeb and configured MacTCP and MacPPP as follows:


MacTCP:

IP address: 10.101.102.2
Obtain Address: Manual
Gateway Address: 10.101.102.1 (PPP address of the Pi)
Subnet Mask: 255.255.255.0
Domain Name Server Information: (Domain name and DNS Server IP Address of your Internet Provider)


MacPPP:

Port: Modem Port
Idle Timeout: None
Echo Interval: Off
Terminal Windows [ ]
Hangup on Close: [X]
Quiet Mode [X]

PPP Server Config:
Port Speed: 57600
Flow Control: None
Tone Dial
Phone Num (blank)
Modem Init (blank)
Modem connect timeout (90) seconds

Back on the Pi, run these commands to start the services: (two commands, one at a time)

sudo systemctl daemon-reload
sudo systemctl enable rpippp.service

 

That should be it. You should have a working PPP connection and it should forward all of your traffic to the internet via iptables. Try this and let me know what your results are. Come by my new blog site and see the rest of my posts, if you are interested.

Share this post


Link to post
Share on other sites
1 hour ago, jefframsey said:

Hi, I am the owner/author of the blog jeffhacksthings.wordpress.com, I've moved my blog to a full domain name. It is now at www.retroadventures.net. I've been cleaning things up as I move them, and I found this thread. Anyhow, I'd like to see if I can help you get this working if you are still interested.

 

To make this work, you will need to know what the device name is for your USB serial adapter. Find that by running this command after you plug in the USB device:


dmesg | grep tty

This should give you a result like this; (note that I have three of them plugged into my Pi, so there are three listed here)


[    0.000000] Kernel command line: 8250.nr_uarts=0 bcm2708_fb.fbwidth=640 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.001232] console [tty1] enabled
[    0.930724] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    2.196881] systemd[1]: Expecting device dev-ttyUSBlower_hub24.device...
[    2.204180] systemd[1]: Expecting device dev-ttyUSBlower_hub04.device...
[    2.211368] systemd[1]: Expecting device dev-ttyUSBupper_hub05.device...
[    2.218448] systemd[1]: Expecting device dev-ttyUSBupper_hub03.device...
[    4.676395] usb 1-1.2: pl2303 converter now attached to ttyUSB0
[    4.680188] usb 1-1.3: pl2303 converter now attached to ttyUSB1
[    4.683907] usb 1-1.4: pl2303 converter now attached to ttyUSB2

The last three lines tell me that I have a pl2303 USB serial adapter mapped to ttyUSB0, ttyUSB1 and ttyUSB2. In most cases, if you only have one, it will be ttyUSB0. We'll use that in our examples.

 

The next step is to install PPP:


sudo apt-get install ppp

 

Then you need to configure PPP on your Pi. You should have created a file at /etc/ppp/options.ttyUSB0. Replace the IP addresses with your own.


# /etc/ppp/options.ttyUSB0
noauth
nocrtscts
passive
local
maxfail 0
persist
nodetach
10.101.102.1:10.101.102.2
proxyarp

What you are doing here is setting up a PPP link with two addresses: 10.101.102.1 and 10.101.102.2. The first address here will be assigned to your Pi on the ttyUSB0 device. The second is the address that PPP will be looking for a connection from.

 

After this, you need to create the PPP service, so you can start pppd on the ttyUSB0 device. Create this file at /etc/systemd/system/rpippp.service:


# /etc/systemd/system/rpippp.service
[Unit]
Description=PPP
[Service]
Type=idle
ExecStart=/usr/sbin/pppd -d /dev/ttyUSB0 57600
Restart=always
[Install]
WantedBy=multi-user.target
Alias=ppp.service

Once this is done, you need to setup the forwarding in iptables: (Here, replace the wlan0 with the name of your network device that is used to get your Pi on the Internet.


sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

That should be all of the setup you need on the Pi. Now let's get the Mac configured. To configure the Mac, install MacTCP, MacPPP and MacWeb and configured MacTCP and MacPPP as follows:


MacTCP:


IP address: 10.101.102.2
Obtain Address: Manual
Gateway Address: 10.101.102.1 (PPP address of the Pi)
Subnet Mask: 255.255.255.0
Domain Name Server Information: (Domain name and DNS Server IP Address of your Internet Provider)


MacPPP:


Port: Modem Port
Idle Timeout: None
Echo Interval: Off
Terminal Windows [ ]
Hangup on Close: [X]
Quiet Mode [X]

PPP Server Config:
Port Speed: 57600
Flow Control: None
Tone Dial
Phone Num (blank)
Modem Init (blank)
Modem connect timeout (90) seconds

Back on the Pi, run these commands to start the services: (two commands, one at a time)


sudo systemctl daemon-reload
sudo systemctl enable rpippp.service

 

That should be it. You should have a working PPP connection and it should forward all of your traffic to the internet via iptables. Try this and let me know what your results are. Come by my new blog site and see the rest of my posts, if you are interested.

Thank you, man! :)

I'll try this in spare time :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×