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

MacIPpi - Surf the Internet on your old Macintosh with TCP/IP over LocalTalk

Cory5412

Daring Pioneer of the Future
Staff member
Just a side-note:

No, there is no "standard" Mac to Pi cable, just as Mac serial ports are not "standard", but we are accustomed to having to find or make adapters for them. 

My point was that a USB-RS232 converter is a lot easier to find and a lot cheaper ($5 or less on ebay) than a Localtalk-Ethernet converter, and there is no speed difference.  There may be some out there that end in miniDIN-8, but I haven't seen them.  I have seen them ending in bare PCB holes or pin headers: one could solder a Mac miniDIN-8 lead onto there.
Can a Mac using an RS232 cable "dial" into the Pi at LocalTalk speeds of 230 kilobits per second? (Sources say that the maximum practical rate is about 115 kilobits per second.) (This is all with the caveat that I do not actually think there is a way to measure file transfer performance in Mac SSW 7 through Mac OS 9.2.2, where doing this with serial ports to begin with would ever possibly be relevant.)

If not, then I would say that there's still an advantage to using an ethertalk to localtalk adapter.

If there were a USB adapter or an appliance or a new production of ET/LT bridges that did this without needing to go find, say, a Dayna or an iPrint or what-have-you, then that would be great.

Dialing into a pi with serial is a fine idea, I think that good documentation about how to do it is important. Given that people already complain bitterly about the performance of LocalTalk, even on the oldest of Macs, it would make sense to try to build something that can go at at least the LocalTalk speed.

As a super duper brief side-side note, I believe that there are "standard" DIN8 to DB25 and DE9 serial cables. I actually have one, although I never got it working, I was planning on using it for direct file transfers using xmodem or similar. They were used commonly in connecting modems to Macs. If the Pi or other SBC computer in question does not have one of those ports, of course, you'd have to build the correct adapter.

The biggest trouble is probably finding something with an RS422 serial connection (or building it) and then deploying LocalTalk over it. There were ISA cards for LocalTalk on PCs, so although it may be a big effort, it doesn't specifically look impossible.

I, for one, would have an interest in some kind of all-in macipgw or modern localtalk bridge and also netatalk file server appliance. I bet you could interest the Apple II people (especially 16-bit/IIgs people) in it if you can get a2server on there for netbooting the IIgs. Even though I have appletalk bridges, something of that nature would make a few things I want to do a little easier. (Especially if it can talk AppleTalk on both the Ethernet and LocalTalk sides.)

EDIT: Thinking more about serial standards, Apple wasn't even the only company to use Mini-DIN8 connectors for the serial ports on their products. Silicon Graphics did for at least one generation of hardware. the Indy has them, I believe the Indigo2 and Indigo may as well.

 
Last edited by a moderator:

techfury90

Well-known member
You're not gonna get anywhere unless you bitbang HDLC or have a suitable USART (the S is the important part) on the Pi. 

Let me say this one time because people seem to miss it: YOU CANNOT USE A NORMAL SERIAL PORT TO DRIVE LOCALTALK. You need a SYNCHRONOUS port, which uses clock signals for synchronization instead of start/stop bits. It's also the less common type of serial port. End of story. I'm sick of seeing everyone fail to grasp this simple fact regarding serial communications and just go "OOOO A SERIAL PORT CAN WE DRIVE LOCALTALK?!". 

USB-serial adapters are NOT synchronous-capable. End of story.

 
Last edited by a moderator:

mattislind

Member
Yes. There seems to be a widespread misconception here that "serial is serial". Of course it is not just serial. There are different connectors, different voltage levels, different link protocols and different line encodings.

As stated LocalTalk is SDLC/HDLC. But it is using FM0 line-encoding which is self-clocking so external clocks are not necessary. The clock signal is conveyed embedded in the data signal. To extract the clock requires a clock recovery circuit (or software).

I been thinking a bit what can be done. But my time for projects are limited.

1. Bitbanging directly from the OrangePi - requires really good knowledge of how to deal with the kernel to meet real time requirements.

2. SPI-port with external clock recovery hardware circuit. Unfortunately no Linux is supporting Slave mode SPI.

3. SPI-port oversampling the LocalTalk signal with 8 times the speed. 1843200 Hz. Then do clock recovery in software. Can it meet the real-time requirements?

4. Using a simple Atmel AVR uP to do the heavy lifting of the clock-recovery and HDLC framing. Then use Master SPI on the Pi to transfer the data to the Pi.

5. Use the PRU on a Beaglebone Black to do the clock-recovery and HDLC framing.

In any case some external RS-422 adapters are needed.

It would probably be a fun and educational project but as said, my time is limited right now.

 

techfury90

Well-known member
Yep, and the FM0 encoding combined with the lack of separate clock means you need some kind of clock recovery circuit like the SCC had, as you noted. FM0 is also far less common than NRZ or NRZI, so yeah, that's another problem. On top of that, there's the fact that each bit in FM0 may require an additional transition as part of the bit. But with 8x oversampling, that should still be adequate. I've never actually found any concrete data on what the actual signaling rate is: is it 230k or 460k? How was Apple counting bits here? The two possible bit transitions per sent bit? Or just the bit itself? Who knows!

In all honesty, I'd consider option 4 to be the best bet, or maybe option 5. I'm admittedly not familiar with the PRU, although I've heard of it before. I was never a fan of attempting to bit-bang anything from the Linux kernel, it's just not real-time enough, as you've mentioned. Too much hassle. It should be noted that the usual SPI clock rate of an Arduino board using their libraries for SPI is 8mbps. The real question is if the incoming HDLC data can be recovered within a reasonable number of cycles...

Obviously, outgoing isn't the issue there. Recovering the clock on the way in is the real challenge. As far as the actual RS422 interface, that ain't a problem: https://www.maximintegrated.com/en/products/interface/transceivers/rs-485-rs-422-transceivers.html

Pick your poison. :D  I've heard the MAX485 works fairly well, it's just the RS422/485 equivalent of the MAX232, really.

 
Last edited by a moderator:

mactjaap

Well-known member
Very nice to see all the input for a 21th century version of a LocalTalk Bridge! And yes ... many people do not understand the way LocalTalk is working. Let's repeat this time after time but understand that for many people this is complicated matter.

If you would like to connect to the Internet with an old Mac, like a Plus, a RS-232 connection by PPP or SLIP would do the trick. But...you will be missing the fun of having LocalTalk. Great thing about MacIP is that it is used to transport IP packets across AppleTalk. Even if you only have LocalTalk.

Lets try to get people interested in building a prototype of a device like this!

 

mactjaap

Well-known member
Small update. My image for a MacIPpi with the kernel 4.6.0 runs also fine on an Orange Pi Zero. Tested it on a 512MB one and ordered a 256MB one. To see if I get the cheapest Appletalk TCP/IP router in the world. :)  

Download it from: http://cdn.macip.net...e-V2.0.1.img.7z

Read about is on: http://www.macip.net/

And yes the Orange Pi Zero fits perfect in this matchbox, but I wouldn't advice it while in operation......



 

mattislind

Member
Good work Mactjaap!

And a very nice matchbox as well!

I still have the modern-HW-LocalTalk project sitting back in my mind but it won't happen in the near future unfortunately.

 

techknight

Well-known member
It was either dougg3 or bbraun, I cant remember who exactly, created a localtalk interface with a BeagleBone. 

 

dougg3

Well-known member
It was either dougg3 or bbraun, I cant remember who exactly, created a localtalk interface with a BeagleBone. 
It was me, over on the mac68k.info forum. I just haven't had time to complete it. Hardware-wise, it works great. It's a BeagleBone Black cape. It uses an SCC driven by a microcontroller, which talks to the BeagleBone Black through a UART. I have a driver written for it that creates an "lt0" network interface in Linux. I had it working as a LocalTalk-Ethernet bridge using netatalk. The biggest hurdle I was running into (aside from finding free time and motivation to work on the project) was that nobody has been testing LocalTalk interfaces in Linux in a long time, and I believe I was running into kernel bugs related to that, and was starting to get in over my head looking at the kernel's networking internals. I hope to someday finish it up. I know that mactjaap was very interested in it, but unfortunately I just haven't been able to work on projects lately. It would be a perfect match for mactjaap's amazing work!

 
Last edited by a moderator:

mactjaap

Well-known member
[SIZE=10.5pt]@dougg3[/SIZE]

[SIZE=10.5pt] [/SIZE]

[SIZE=10.5pt]Yes, your project of a complete new LocalTalk bridge always fascinated me. We now have FloppyEmu, SCSI2SD, Mac SE/SE/30 Ethernet Card Recreation, etc. but no solution to have a perfect 21th century way for connecting old Macintosh without Ethernet devices to an AppleTalk network by LocalTalk. [/SIZE]

[SIZE=10.5pt]Your project would be perfect! I’m sure a solution like MacIPpi can be built on a BeagleBone Black too.[/SIZE]

[SIZE=10.5pt]Time and the right amount of attention are the enemies of these kind of projects. We all have different things drawing our attention. It would be however great if your project will be alive someday![/SIZE]

[SIZE=10.5pt] [/SIZE]

[SIZE=10.5pt]For the record I publish the link to the post about this development of the LocalTalk bridge. It reads like a book if you like these kind of hardware hacking![/SIZE]

[SIZE=10.5pt]https://mac68k.info/forums/thread.jspa?threadID=275&tstart=0[/SIZE]

[SIZE=10.5pt] [/SIZE]

[SIZE=10.5pt] [/SIZE]

[SIZE=10.5pt]In this posting about the MacIPpi mattislind also named a few ways to go. Maybe they are also interesting for future development.[/SIZE]

 

IlikeTech

Well-known member
If you have a Raspberry Pi or other similair device...please test! It would be very nice if this works right out of the box.
It does not work on the regular raspberry pi, because orange pi images don't have the required boot partition. I tested this. However, I know something about kernel compilation and unix, so if you don't mind, I might try to make a version for the regular pi, or even better, the pi zero.
 
Last edited by a moderator:

mactjaap

Well-known member
@IIikeTech

Sure. Would be great to have it running on more devices. I have bought a RaspBerry Pi lately, so it is also on my "to do" list.

If you know how to compile kernels it is not so difficult.

If you have any question, please feel welcome!

 

mactjaap

Well-known member
I guess you are running Netatalk on your Raspberry Pi. Is that correct?

If so you could run my MacIPgw separatly in a virtual box VM. So you can check configuration. Check things like its afpd.conf, etc.

 

IlikeTech

Well-known member
Well, it shows up in chooser now, so I'll finish up. I'm having a heck of a time getting my LT2Ethernet working.

 

mactjaap

Well-known member
What do you mean with your "LT2Ethernet"? A hardware bridge like an AsantéTalk or Dayna Mini EtherPrint on your Mac or something else?

 
Last edited by a moderator:

IlikeTech

Well-known member
Yea, that. If I connect it with a half crossover it starts showing lots of traffic, and LocalTalk data causes the collision light to flash.

 

mactjaap

Well-known member
The MacIPpi version 4.01

View attachment 8913
 
 
This is a dead cheap Orange Pi One ($9.99 and $13.64 with shipping) will act as MacIP gateway for your old macintosh computers. In the old days you had to have a serious router. f.i a FastPath to get on the Internet. Now this tiny "all in one computer", a so called SoC, can do the trick.
 
This device has some extra's like proxies for old browsers, ssl for old email, text browsing and AFP filesharing over DDP. Plain old AppleTalk file sharing
If you don't have an Orange Pi, have a look at my other project "MacIPgw VM", a software solution with the same possibilities.

http://www.macip.net/?page_id=12

Or use a "lite version" like tinyMacIPgw.iso
 
The MacIPpi will allow you to surf the Internet with your old Macintosh without any problems. Just connect your old Macintosh with a normal LocalTalk bridge, like an Asante AsanteTalk or a Dayna Etherprint to you LAN and startup you MacIPpi. You can also use an old networking Mac with the LocalTalk Bridge control panel to do the work.
You set your Mac with MacTCP on f.i. 172.16.2.2 (anything between 172.16.2.2 and 254, subnet mask 255.255.255.0), as gateway 172.16.2.1 and DNS 8.8.8.8. Or do the same with a TCP/IP control panle, but then choose Connect via: AppleTalk (MacIP) and configure:Using MacIP manually. Same IP information.

Start a TCP/IP kind of program like, Fetch, Telnet or a browser and of you go to the Internet!
So, what do you you have to do to get this up and running:
Order a Orange Pi One

- A good Power adapter, or buy it together with your Orange Pi One.

- Take care for a 8GB SD card and maybe a case or buy everything together as a set.

An Orange Pi Zero 512MB will work too with the same image! Will save you 1 buck....

($8.99 instead of $9.99 for an OrangePi One),

An Orange Pi Zero 256MB will work too with the same image! Will save you 3 bucks....

($6.99 instead of $9.99 for an OrangePi One). But 256MB memory is really very little, so I would advice aginst it. I have seen it working , but I need an "endurance test" to be sure....

 Shipping will take 8 to 14 days.

Download my image from www.macip.net. Current version 4.01

Download image: MacIPpi-V4.01.img

( md5sum:  af67c9dd6a95d9a4aa4eab68272a1b81  - file size: 3.3G )

or the 7zipped version ( some 2.2 GB smaller....)

Download 7zipped image: MacIPpi-V4.01.img.7z

( md5sum:  ccf4640656925bb834f53eb8e59dbf0a - file size: 1.1G )

Use dd on Linux systems (and MacOSX) to put the image on the SD disk.

This will be a command like this:

dd if=MacIPpi-V4.01.img|pv|dd of=/dev/sdX bs=1M

On a Linux/Unix/MacOSX system you can check the name of the SD card with the command:

dmesg

On a Windows system you can use a tool like Win32DiskImager or on Mac/Linux/Windows Etcher

Connect you Orange Pi One to the network with a network cable. It will get an IP address from your home router if you power it on. After a few minutes it will be ready. Take this time because the appletalk daemon needs some time to settle. Even no need to connect a screen. If you want you can login from your Macintosh with Telnet or SSH. You can use IP address 172.16.2.1 to connect. If you want to connect from a Mac OSX, Windows or Linux machine you have to find out the IP address or use a serial console. If you want to login username is: orangepi and password: orangepi

You can become root by entering

$sudo -i

and password orangepi

Features
  • Linux ARMBIAN 5.27 stable Ubuntu 16.04.2
  • FULL NAT on the MacIP connection. You can now surf the Internet without any router configuration
  • sshd started at boot. You can login with ssh. User macipgw can login with ssh. Password is also macipgw. If you like to be root login as root or do a sudo su and enter the macipgw user password: macipgw. Or use user orangepi with password orangepi
  • telnetd started at boot. You can login with telnet. Use user macipgw and password macipgwOr use user orangepi with password orangepi
  • Host name resolution. You can point to gw.macip.net and it is resolved as 172.16.2.1 and you can point to mac.macip.net as your Macintosh with IP address 172.16.2.2. Any IP adres from 1 to 10 is mapped now. So mac.macip.net is 172.16.2.2 (mac02 also). mac03.macip.net is 172.16.2.3, mac04.macip.net is 172.16.2.4, etc
  • motd updated. You now see a lot of information, like all the Macintosh and AppleTalk devices in your network
  • Installed nmap for testing
  • Installed aecho for testing
  • Installed nbplkup for finding AppleTalk devices
  • Some more old services are starting up, besides telnetd and ftpd also tftpd, finger are started. Nice for testing old MacTCP applications. For ftp login with the orangepi account with password orangepi. Or anonymous login with user anonymous and any password. The home directory of user orangepi is also accessable from your Chooser.
  • Web server on port 80 so you can test a web browser. Point it to http://web.macip.netand you will see a page telling you reaches a web page. It is the starting page of the World Wide Web how it was in 1993 at CERN
  • Testing script ( /bin/appletalk-test) running from crontab to test if your AppleTalk is up and running. You will see a bright red led every minute and flashing red led every 15 seconds if appletalk is working. A continuous red led is shown if your AppleTalk is down. (Won't work on the Zero) The green light is the power light.
  • Lynx web browser. Login with telnet user: orangepi and password: orangepi and type the command: lynx
        and you will get the text only web browser so you can surf the web. No support for https                                      

  • Elinks web browser. Login with telnet user: orangepi and password: orangepi and type the command: elinks
        and you will get the text only web browser so you can surf the web.. And yes… support for https! 

      • Add any package you want to add. Use apt install .. or apt-get install .. to install and apt-cache search …       to find packages

MacIPpi  AppleShare File ServerOut of the box AppleShare file sharing with Netatalk 2.2.5 installed.  If you open the Chooser you will find the “MacIPpi”. On this server you will find two volumes:

Home Directory

MacIPpi DISK

User for the shares is: orangepi with password orangepi

I also put some old Internet Abandonware on the disk so you can start right away with some applications

PROXIES- HTTP 1.1 to 1.0 proxy

- Web Rendering Proxy

-  stunnel TLS Proxy ( for email clients without SSL)

HTTP 1.1 to 1.0 proxy

Starts at boot and listens on port 8082. It allows old web browsers (e.g., Netscape 0.9 or Mosaic) to communicate with modern web servers by inserting the missing "Host:" header. Many sites are hosted now on shared servers. That wasn’t the case in the old days. So one IP address had one web servers. HTTPS is not supported!

Read all about it on:

https://www.jwz.org/blog/2008/03/happy-run-some-old-web-browsers-day/

Download old browsers on: http://home.mcom.com/archives/

Web Rendering Proxy

The Web Rendering proxy(WRP) is a HTTP proxy service that renders web pages in to  images associated with a clickable image map of the original web links. It basically allows to use historical and obsolete web browsers on the modern web.

Read all about it on:

https://virtuallyfun.superglobalmegacorp.com/2014/03/11/web-rendering-proxy-update/

https://github.com/tenox7/wrp

WRP version 1.1 is running on port 8080 at startup. For testing a newer version, 1.4, is running on port 8088. And the latest, development version is running on port 8087. All started at boot. It can be interesting to switch now an then to test features. You can also switch if the main proxy has crashed. This can happen. And one drawback, no https support yet.

To start test http://www.park.org/main.htmlor http://www.apple.com in your old browser. These two sites work perfect.

See it in action below:

         

 
 
stunnel email proxy

The stunnel program is designed to work as TLS encryption wrapper between remote clients and local (inetd-startable) or remote servers. The concept is that having non-TLS aware daemons running on your system you can easily set them up to communicate with clients over secure TLS channels.

stunnel can be used to add TLS functionality to commonly used Inetd daemons like POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP, SMTP and HTTP, and in tunneling PPP over network sockets without changes to the source code.

Default configuration for Gmail on board.

Read more about it on:

https://supportdesk.win911.com/support/solutions/articles/1689-configuring-gmail-use-stunnel-as-an-ssl-email-proxy

https://www.stunnel.org/static/stunnel.html

 
Mattis also wrote a nice article about the MacIPpi and a Plus on the web site of the Swedish Dator Museum ( Computer Museum)http://www.datormuseum.se/computers/apple/macintosh-plus

Specs Orange PI:

http://linux-sunxi.org/Orange_Pi_One

Read all about the hard work to get the MacIPpi 4.0 running on:

https://forum.armbian.com/index.php?/topic/3236-appletalkagain/

 
Top