Jump to content
mactjaap

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

Recommended Posts

Hello mactjaap and everyone else!

 

I can now confirm that the new image is much better. It boots fine. It includes the magcipgw and netatalk daemons. This far I have only tested that I can reach the orangepione AFS server over my localtalk which is connected to a Dayna Etherprint Mini. It mounts the share on the orangepi perfectly.

 

Haven't got around to test the macipgw part yet. I need to put MacTCP on the orangepi so that I can copy it to my Mac Plus. Will report the back the progress later on.

 

One caveat though. The image is 7.97 Gigabyte uncompressed. The SD card that comes with the OrangePi kit is only 7.95 Gigabyte. Not 100% sure that this will cause any trouble. Maybe a simple fsck will fix possible problems. I didn't take a chance so I used a Samsung which was 8.03 Gigabyte instead.

 

So in all, really good work mactjaap!

 

/Mattis

Share this post


Link to post
Share on other sites

Well.

 

It took me a while to get a grip of how Apple stores files and how to get them on to the machine. I am used to Linux and MacOS X and have never heard of AppleDouble. So it took some time to come up with a solution to first use stuffit expand to repack files into Macbin and then have them unbin:ed on the orangepi netatalk AppleShare directory.

 

Then I simply didn't understand that MacTCP was a setting and not an application. It took some time until I dragged in to the System folder and then it worked. But setting up IP address with MacTCP requires some patience.

 

zbR34KY.png

 

But in the end it worked.

 

Say hello to google DNS!

 

ALZ9GZZ.jpg

 

 

(An Apple Iphone 7 taking a photo of its great grand father. I would have thought might have delivered a better result...)

 

Then onto the topic findin a browser that worked on a Mac Plus with 6.0.7. The number of choices seems to be just one. MacWWW 1.0.3. Not the best browser around. It is not handling much at all actually. It is not very happy with redirects so www.google.com isn't any good. Most pages are simply too complex. And it crashes as soon as one closes a window. 

 

The apache test page on one of my servers works though.

 

JBzUWza.jpg

 

So in all the mactjaap orangepi works perfectly, almost. But it is not his fault. There seems to be a bug in the Ethernet driver of the kernel which causes it to lose Ethernet connection and spam the log file now and then. Restart is the only way out of it.

 

Then of course it isn't very useful since the number of web browsers that are available on 6.0.7 is so limited. Maybe I try to upgrade to system 7 or try to find lynx for system 6.0.7

 

Thanks a lot mactjaap!

 

/Mattis

Share this post


Link to post
Share on other sites
What a great review of the MacIPpi! Thanks for your elaborate comment!
 
I'm very happy to read this. It is for the first time someone uses the MacIPpi in the wild. Also nice to see all the (Swedish) Apple screenshots. To see it actually working is a kick!
 
For the two point Mattis mentioned:
 
1) Which browser to use
2) Ethernet errors
 
1) Browser choice on old macs is difficult. And we have to be honest. In 1986, the time of the Plus, there was no WWW. But there was Telnet! I always love to use it. You can telnet right into the OrangePiOne/MacIPpi with username   orangepi and password   orangepi
You can do all the modern stuff you would like to do onthis Armbian ( Debian)  Linux box. I installed Lynx a Elinks as command line browser. 
Or telnet to places still existing on the internet on port 23:
 
 
 
 
Furthermore I installed an experimental version of WRP

 
WRP is a HTTP proxy service that renders web pages in to GIF images associated with a clickable imagemap of the original web links. It basically allows to use historical and obsolete web browsers on the modern web.

 

 

 
It is a live on the IP address of the orangepi on port 8081. It is very buggy, but first page is never a problem so you can see it for yourself alive. I used it with Netscape 1.1 very nicely
 
2) The Ethernet errors are serious. This Armbian OS is still very experimental. I advice that if you you use the box longer that one part of a day to reboot it. It is also the only way to get the WRP working again after it fails.
 

More requests for features or changes are welcome!

 

Share this post


Link to post
Share on other sites

@Bunsen, this is the general posting about networking and pppd. I mean who has made a connection with an old Mac to a Pi. What serial cable are you usin?. For Mac to PC I have build my own. Is the a standard Mac to Pi serial cable available?

 

I'm confused by your question.  Perhaps we are having language difficulties?

 

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.

 

A USB to serial converter, like that used in the guide I linked, will work exactly the same whether the USB end is connected to a Pi or any other *nix computer.  In that sense, USB to RS232 is "standard", sort of, and the Mac's Localtalk ports are RS232 compatible; one would make the connection via adapters, or a self-made cable like you did.  There are also USB-RS422 converters, if anyone felt that was necessary.

 

There is also a serial port coming from the Pi's GPIO which one could use as an alternative.  This port is at TTL levels, which would require a MAX232 or similar RS232 level shifter chip.  This is an easy (beginner's level even) hardware project documented all over the electronics hobbyist web, is no doubt available from a dozen different vendors as a ready-made shield or HAT, and should work identically to any other serial port on a *nix computer.

 

If someone wanted to get really fancy they could make up a cable with miniDIN-8 on one end and Pi GPIO connector on the other and a MAX232 hidden in the headshell.

 

Which approach is preferable is a decision for the user.

 

 

tl;dr: serial is serial what's the problem?

Share this post


Link to post
Share on other sites

I am not 100% sure what mactjaap want to do but I would assume it is to get rid of at least the LocalTalk to EtherTalk bridge  and maybe the LocalTalk adapter, but still connect to the OrangePi over AppleTalk. Not using PPP over async serial IO. I understand that since one of the beauties of the old Mac is how simple you network them. Plug in the LocalTalk cable and it just works. File sharing, Printers etc. Way before Windows for workgroups.

 

The point is that RS-232C is really only an electrical interface which specify voltage levels and connector usage. It doesn't say anything about the actual level 2 protocol used. In the case of LocalTalk it is not async serial communication. It is HDLC with some twists. The communication takes place on a bus network and uses a CSMA/CA method to access the bus. It means it continuously monitor the same signal that it is sending. The MAU is the LocalTalk adapter.

 

I once saw someone that attached a 8530 chip to a BeagleBone: https://mac68k.info/forums/thread.jspa?threadID=275

 

On the other hand with the horse power of the PRU realtime coprocessor of the Beaglebone it should have been possible to do it in there instead. Or just maybe it would be possible to bit bang in the OrangePi, but it would certainly require some kernel skills to be able to handle it reliably.

 

Doing async serial IO and then put pppd on the eorangepi should on the other hand be comparatively easy if one want to take that route instead.

 

 

/Mattis

Share this post


Link to post
Share on other sites

BTW here is the a pdf of the book "Inside AppleTalk" that probably cover all of what you need to know on AppleTalk and LocalTalk. Way back as a student I bought this book for hard earned money. I had an idea of a project (much like the macippi but using a PC) but it never materialized. I do remember that the Z8530 is a quite annoying chip to program. I still have the book somewhere though.

 

/Mattis

Share this post


Link to post
Share on other sites

My plan for the MacIPgw project (virtual machine and the MacIPpi) was to make it possible to use TCP/IP on old macs without much hassle. So a user with some "normal" equipment should be able to use only an  LocalTalk to EtherTalk bridge and with "my" device in the network and surf the Internet.

 

I also like it that you can combine LocalTalk connections and TCP/IP. That’s why I added a AFP server on the MacIPpi.

I must say that I have made ppp and even slip connections, "Just because it is possible" and to have network fun. 

 

I'm still dreaming to get one device which can be an combination of an LocalTalk bridge and a macipgw. And It was almost made as Mattis saw on the mac86k forum. But unfortunately never finished and in never production. I hope Mac hardware hobbyist  will someday finish this project. I would be more then willing to work together to integrate a working version of macipgw on a device like that!

 

About Bunsen post and the serial RS232 connection. Thank very much for the detailed information about this subject. It is now clear to me that there is no standard way of doing this. No standard cable also.

I will see if I find time to experiment with this. It is very easy to add a ppp daemon to a MacIPpi to provide a solution for people without a LocalTalk bridge, although I think it is much more a hassle than the simple way of adding a hardware or software LocalTalk bridge and a MacIPpi.

Share this post


Link to post
Share on other sites

You're welcome.  I plan to have a go at it myself as soon as I have a Pi or similar and the necessary adapters or a soldering iron in front of me.

My point is mainly that the Localtalk to Ethernet adapters are now so hard to find that they really shouldn't be considered "normal" equipment that people will have lying around, or be able to purchase quickly and cheaply - whereas serial, via either route, is based on components that are in production, dirt cheap, and everywhere.
 

I will see if I find time to experiment with this. It is very easy to add a ppp daemon to a MacIPpi

 

That would be terrific, and I thank you :)

Share this post


Link to post
Share on other sites

If you like I send you an OrangePi as Christmas gift. I have bought a bunch of them. I'm very interested in your solution and really like to copy it. Please PM your address an I send you one.

Share this post


Link to post
Share on other sites

That's most kind of you, mactjaap.  PM sent and merry Christmas to you too :)

 

I'm still dreaming to get one device which can be an combination of an LocalTalk bridge and a macipgw.

 

Well, that's my dream too - and I think a Pi with a serial connection is exactly that.

Share this post


Link to post
Share on other sites

I'm still dreaming to get one device which can be an combination of an LocalTalk bridge and a macipgw. And It was almost made as Mattis saw on the mac86k forum. But unfortunately never finished and in never production. I hope Mac hardware hobbyist  will someday finish this project. I would be more then willing to work together to integrate a working version of macipgw on a device like that!

 

Have you looked into what you could do with the PRU on the Beaglebone Black / Texas Sitara? A really interesting thing. I haven't played with it myself but a guy made a MFM disk emulator based on the PRU coprocessor. It reads the and writes the 5 mbit/s data stream in realtime. I have tested the disk emulator and it works very nice.

 

Essentailly the PRU is executing at 200 MHz hard realtime. No kernel or caches that would make it non-deterministic. It could sample the signal and do full HDLC decoding / encoding as well as CSMA/CA handling, implementing the full link layer. 

 

Unfortunately I have no time for doing such a project but it should sure be very interesting.

Share this post


Link to post
Share on other sites

My point is mainly that the Localtalk to Ethernet adapters are now so hard to find that they really shouldn't be considered "normal" equipment that people will have lying around, or be able to purchase quickly and cheaply - whereas serial, via either route, is based on components that are in production, dirt cheap, and everywhere.

 

Maybe not a commodity, sure. On the other hand the amount of people doings this kind of networking experiments are quite limited. I see these devices all time at Ebay. They are not directly selling quickly. Search for Dayna Etherprint for example. Not extremely high prices.

 

I bought mine from this this organization in Switzerland: http://www.revamp-it.ch/index.php/en/shop-en/externe-netzwerkgeraete-en/dayna-mini-etherprint-plus-detail

Share this post


Link to post
Share on other sites

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.

Edited by Cory5412

Share this post


Link to post
Share on other sites

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.

Edited by techfury90

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by techfury90

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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


 


post-965-0-51840600-1486210796.jpg


Share this post


Link to post
Share on other sites

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!

Edited by dougg3

Share this post


Link to post
Share on other sites

@dougg3

 

 

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.

 

Your project would be perfect! I’m sure a solution like MacIPpi can be built on a BeagleBone Black too.

 

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!

 

 

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!

 

https://mac68k.info/forums/thread.jspa?threadID=275&tstart=0

 

CompletedBoard.jpg

 

 

In this posting about the MacIPpi mattislind also named a few ways to go. Maybe they are also interesting for future development.

 

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

×