• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Connecting old Macintosh to the net using serial

epooch

Well-known member
You can reach it at http://ed.macip.net

(I will keeep it online until midnight today CET time...which is around 6 to 9 hours ahead of the USA.)
I missed it!  So glad someone is using ElWhip, even if it is only one person!

That was  a serious challenge to get the TCP/IP stack and PPP stack running in 128K. Maybe it is time to build a web browser for the Mac 128K now...

 
Last edited by a moderator:

camateg

New member
I just realized that I still have an account on this site!  I had been following the macipgw development and collaborating with @mactjaap for some of the pppd implementation and thought I'd follow the post (this one) that he linked me to...

I had chosen an ImageWrite II cable not out of necessity, but convenience because I happened to have one.  I found the following pinouts that might be helpful to someone lacking in obsolete cabling to make their own:

https://www.dr-lex.be/random/pcmodemmaccable.html

Obviously, the intent isn't to connect a modem, but the pinout information is still valid.

I have been experimenting with TTL->RS232 breakouts for the Orange and Raspberry Pis and we both noted that you have to be careful about how you ground things, too...  See point #1:

http://kb3tix.net/mac/linux/2018/01/01/orange-pi-pppd.html

In any event, pppd seems to work pretty well.

 

mactjaap

Well-known member
@epooch and @camateg

Good to see you both on the forum!

Started up the ED web server again. Connected with a $0.80 serial cable from China....(incl. shipping....)

http://ed.macip.net

I'm really very happy with ElWhip. Running a web server on such old machines is really fun. Let's hope you get the vibes to build a serious low end Mac web browser. Browsy is a nice try, but it is returning html code...not what you want.

 
Last edited by a moderator:

beachycove

Well-known member
A couple of years ago I had a website running on a piffling little eMate 300 (via NPDS), which -- rather surprisingly -- managed to serve up a reasonably attractive site of several pages, properly formatted with CSS stylesheets. I took the code from one of the ubiquitous free website templates available, and adapted it lightly for the eMate; use of a simple template with minimal graphics, other than CSS/text-formatted headers, etc., meant that the eMate managed the task. What it didn't do was run it very stably -- NPDS is not all it might be, so Newton web servers tend to crash a lot.

I'd really like to see what a your 128 could do in serving up such a website. Is it possible to use custom html in ElWhip?

Great project, by the way, and it's great to see a website running from a floppy again. Years ago, there was one running on a Plus, if I remember correctly.

I've thought about doing something similar with an SE that I have around here (which, with an ethernet card and MacTCP/MacHTTP, would be a doodle to do), but on your hardware, well, what can one say? You are the man!

 

MrGasS27

Well-known member
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

 

epooch

Well-known member
Yes.

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

Code:
sudo apt-get install ppp
 
Last edited by a moderator:

tanuki65

Well-known member
I never had any luck with RPi <-> Serial networking—if you pull it off please explain how.

 

Lutefisky

Member
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.

 

MrGasS27

Well-known member
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...

 

MrGasS27

Well-known member
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! :)

 

MrGasS27

Well-known member
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.

 

MrGasS27

Well-known member
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?

 

TechEdison

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

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.

 

jefframsey

Well-known member
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.

 

jefframsey

Well-known member
You're welcome. I've subscribed to this thread, so I will be following along.

 
Last edited by a moderator:
Top