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

Tip for networking on 68k Mac w/ USB Serial Adapter, RaspberryPi

ToneMalone

Active member
I've recently gotten my SE/30 up and running with Mac OS 8.1, and I have been trying to push it to the limit, on a budget!
Hoping for internet connectivity, I've been following a few tutorials around the web on how to network a Macintosh
using a USB/Serial adapter, an RPI and Slirp. I have had a heck of a time getting this working but I've managed to push 38400 baud through the modem port successfully and load some web pages.
Here's a tip for getting this working properly, I could not find this information on one page relating to old Macs so thought i would share it here.


THE PROBLEM:
On the RPI in 2023, the baud rate for ttyUSB0 always resets to 9600 baud. I read this is due to PYSERIAL sets the default speed, even though in my /boot/cmdline.txt file I've added "console=ttyUSB0,38400 " to the beginning of the text, rebooted, but when loading the terminal up in ConfigPPP, I can only get a distinguishable answer from the Pi when my baud rate is set to 9600 in ConfigPPP.

THE SOLUTION: (after following one of the many tutorials available online) This one was very helpful

-Open ConfigPPP
-in "Config..." set baud rate to 9600
-check "Terminal Window"
-hit OPEN
-hit 'return/enter' on keyboard once in PPP Terminal Window
You should have access to the PI terminal at this point
-type in "stty 38400"
-hit 'return/enter' on keyboard
Pi terminal should answer back with an 'x' (you've just changed the baud rate on the PI's ttyUSB0)
-exit terminal, hit stop
-in ConfigPPP on mac set your baud rate to 38400
-hit OPEN
-now you have access to PI terminal at much greater speed.

I ran my slirp script from here, closed the terminal and it connected almost immediately.
With this method you can bypass the connect script in ConfigPPP as well, and it's neat interacting with the terminal through a USB serial adapter to get where you want to go!
I'm sure there's many ways to skin the cat here but I hope this helps someone else having a similar issue or they can take a snippet of information to find their own way through the maze.

In the tutorial I've linked above, he's changed his DNS to his local router, I did not have to do this and stuck with the IP in the slirp.sh script.

Cheers! - T
macintoshinternet.jpg
 

ymk

Well-known member
Nice work! I plan to try this out.

Is it necessary to pipe the console through the USB adapter?

The console tends to dump warnings and other messages on occasion that I expect would interfere with a SLIP link.
 

ToneMalone

Active member
You may be able to change the baud rate through the pi terminal, using "stty -F /dev/ttyUSB0 38400"
However, in my case Slirp binds up the console created for the USB adapter and says "type 00000 to exit" no other commands can ran through that console until Slirp communications have been nixed. Also, the connect script in ConfigPPP is literally communicating with the console for you, so i don't see a way around it.
I have not experienced any warnings or other messages they may be being sent to the main console of the Pi, not the USB adapter console if that makes sense?
 

ToneMalone

Active member
Slirp offers SLIP, but I set my script to run it in PPP mode

-P signifies PPP connection
#!/bin/bash
slirp -S -b 38400 -P "host addr 10.0.2.1" "dns 10.0.2.3" "asyncmap 000a0000" "mru 500" "mtu 500"
 

ymk

Well-known member
I have not experienced any warnings or other messages they may be being sent to the main console of the Pi, not the USB adapter console if that makes sense?

That makes sense. The man page says an alternate tty can be specified by setting SLIRP_TTY.
 

ToneMalone

Active member
That makes sense. The man page says an alternate tty can be specified by setting SLIRP_TTY.
Interesting! would you have to set this in the actual slirp code? or could you change this in a command script like my slirp.sh file?

I'm only so proficient with linux, the learning curve is steep; I know just enough to be dangerous! lol
 

ymk

Well-known member
Interesting! would you have to set this in the actual slirp code? or could you change this in a command script like my slirp.sh file?

I believe it's an environment variable, so you'd add something like this to your .sh file:

Code:
export SLIRP_TTY=/dev/ttyUSB0
 

Snial

Well-known member
Impressive, I have a TTY USB adapter and an RPI, so maybe I could try that with my PowerBook 1400c!
 

ToneMalone

Active member
I use pppd, it is the simplest solution I found and does not require a script in MacPPP:
cool! I may have to try this
Impressive, I have a TTY USB adapter and an RPI, so maybe I could try that with my PowerBook 1400c!
It's pretty neat I say give it a go! I just pushed it to 57600 and things seem to be working well. I've been playing around with WRP and it loads surprisingly quickly (for what we're working with)
 
Top