• Hello MLAers! We've re-enabled auto-approval for accounts. If you are still waiting on account approval, please check this thread for more information.

An idea: TCP/IP to serial bridge (modem emulator)

luddite

Host of RetroChallenge
6502
This is an idea that's related to the System 6 Browser topic, but I don't think it belongs in that thread.

How feasible would it be for someone (not me) to write a program to translate TCP/IP to serial? My "vision" involves using any serial-equipped Mac with ethernet as a means to provide internet access for compacts. I know this is sort of possible with IPNetRouter (over LocalTalk, I think), but that program's a horror to set up and feels like using a howitzer to kill flies.

What I'm thinking of is something much simpler: Mac Plus (or whatever) connects to LC580 via printer cable. LC580 pretends it's a modem and relays TCP/IP packets between the interweb and the Plus.

Feasible, or far more complex than I imagine?

 
I have written two programs...

(a) "macipd", a gateway for MacIP on DDP and converts it to and from SLIP.

( B) "slippery", a SLIP to PPP convertor .

Both work in a posix environment, eg Linux, NetBSD, Darwin, OSX.

So the way I run this is...

macipd establishes the AF_APPLETALK socket and handles the IPGATEWAY and IPADDRESS.

It spawns a child process that it talks to using SLIP to exchange the IP packets with the real IP network.

The child process I use talks SLIP on one side to talk the macipd, and PPP on the other side to talk to pppd.

So on my network a compact mac talks as follows...

Code:
Mac -> LocalTalk -> AsantePrint -> Ethernet -> [ macipd -> slippery -> pppd ]
Where macipd, slippery and pppd are running on a NetBSD box.

This can also be:

Code:
Mac -> LocalTalk -> Mac with LocalTalkBridge -> Ethernet -> [ macipd -> slippery -> pppd ]
When I original wrote macipd, the operating systems (Linux, NetBSD) generally supported SLIP on pseudo-terminals, when they dropped this support I then wrote the "slippery" program so my gateway did not need to change, it still talked SLIP.

On a System 6/7 Mac though things are rather different. You would want to use CTB to interface with the serial interface, and then would need total ownership of the ethernet for IP purposes. Eg, would not be able to have MacTCP running.

On a System 8/9 Mac you are in OpenTransport territory, driving the ethernet is quite different, but again you can't have the operating system trying to use IP on the ethernet while you are.

You could use two ethernet interfaces, one for the OS/MacTCP/OT, one for the gateway.

 
Last edited by a moderator:
TCP/IP to serial bridges already exist. I think that there are some standalone ones out there, but the book that I'm reading has a couple of examples for hobby projects. That includes both wired and wireless. Here's the one that they're talking about:

http://www.lantronix.com/device-networking/embedded-device-servers/xport.html

They appear to cost $50 or so.

It sounds like they look like a serial port to the hardware, so the wiring should be minimal and easy to figure out by anyone who understands pinouts. But I don't know how it encapsulates the data. I haven't reached that chapter yet. :)

 
TCP/IP to serial bridges already exist.
You don't really have "TCP/IP to serial bridges". TCP & IP are network protocols, serial is a physical layer thing. Eg you could have ethernet to serial, or wireless to serial.

PPP and SLIP are the two main ways of encapsulating IP packets on a serial link.

You can happily plug a compact mac with MacPPP into a Windows box running RAS or UNIX server running PPPD, only cost is a normal mac serial cable, but you are limited to RS/232 speeds.

Using LocalTalk lets the Mac talk 230kbps.

If you want a serial link out of a Mac that does work at 230kbps, you already have one, it's called 'ADSP Tool'. So all you would need is some component on the network that can read/write ADSP....

Did I mention my "adspd" daemon? It works rather like "inetd" but for ADSP.

So in theory you could make a shim serial port (see Inside Communications Toolbox page 182) that registers itself with CTB, lets the MacPPP use it as a real serial port, then talks ADSP out to a server which then just talks directly to pppd. No major technical problem there, except that MacIP (IP over AppleTalk) already does this in a much better manner.

 
Last edited by a moderator:
Does anyone remember "PatchBay", that worked with Apple's MIDI Manager?

It would be cool if on a mac you could have a similar application that would let you tie lots of inputs and outputs together.

Eg, things could be Terminal Tools, Serial Tools, Serial ports, paired Apple Events (like MPW Shell's stdin/stdout) etc.

So a document would describe a load of things all tied together, editting would be a case of dragging available things from a pallette, and wiring them together on screen by dragging wires from little terminals, output to input.

 
I'm not sure why PPP doesn't do what you want Luddite. Obviously I'm missing something, but I'd like to know what it is.

*I* was hoping you were going to ask about the feasibility of porting uIP to system 4.1 or 3.3 :p

 
I'm not sure why PPP doesn't do what you want Luddite. Obviously I'm missing something, but I'd like to know what it is.
I'm not sure that it doesn't ;-)

The problem is: how to get a compact Mac online in the absence of an EN/SC or similar device or a dial-up internet account.

I realize there are many ways to do this, as porter and II2II have already mentioned, but I thought it would be nice to see a 68K Mac solution...

 
You don't really have "TCP/IP to serial bridges". TCP & IP are network protocols, serial is a physical layer thing. Eg you could have ethernet to serial, or wireless to serial.
To my knowledge, these boards will work independently of a microcontroller that would produce TCP/IP packets. So in a sense, you to have TCP/IP to serial bridges.

You are correct though, they are protocols and you really need to layer protocols on top of TCP for it to be of any value (eg. telnet or HTTP). At this point, I don't know how these bridges are wrapping data so I don't know if they will be useful.

As for equant not knowing why PPP ain't sufficient, well, I can imagine one case: if you want to be able to connect to the internet independent of other computers (in your home). Which is kinda hard if your using DSL or cable services.

 
*I* was hoping you were going to ask about the feasibility of porting uIP to system 4.1 or 3.3 :p
Okay, I'm asking... but there's still the problem that most of us don't have dial-up anymore, so there has to be some way to physically connect your 512K to your router... an EN/SC is obviously the "cleanest" solution, but they're not all that easy to come by.

 
As for equant not knowing why PPP ain't sufficient, well, I can imagine one case: if you want to be able to connect to the internet independent of other computers (in your home). Which is kinda hard if your using DSL or cable services.
Thanks, that's what I wanted to say... but didn't. ;-)

 
but I thought it would be nice to see a 68K Mac solution...
Okay, if I had to do this without AsantePrint and only with 68k Macs I would

(a) use an Mac with localtalk and ethernet to run the LocalTalk bridge (68020 upwards).

( B) use 68030 class machine (eg IIx) running NetBSD m68k to run my macipd/slippery/pppd.

Now you could make the "Mac with localtalk ethernet" run a gateway which does it all, but somebody would have to write it.

Unfortunately NetBSD macs can't use LocalTalk as the drivers don't exist (too software intensive), and A/UX can't have a user level application inject IP packets directly onto the network (slattach does not work with pseudo-terminals), but you *could* hang a serial cable to loopback the modem port onto the printer port to handle SLIP to solve that, but then lose the printer port to do localtalk.

 
Last edited by a moderator:
f you want to be able to connect to the internet independent of other computers (in your home). Which is kinda hard if your using DSL or cable services.
Ok, I see, but I'm unsympathetic. ;)

I'll buy that PDS ethernet cards, Scsi/ethernet adapters and the appletalk/ethernet adapters are hard to find, so we need another solution, but how realistic is it to need to hook up an old-mac to a router in a house with no other computers?

Surely you can find an old laptop cheap with serial and ethernet; throw bsd/linux on it; hide it behind your desk; and call it an "old-mac-ethernet-adapter".

Shoot, even better, just go get some OpenWRT/FreeWRT compatible router for $50 or maybe less put pppd on it and it'll serve ppp to your mac *and* be a router for the other computers that I guess you don't have. :p

 
And uIP has SLIP support in it, so that's nice...

128K Mac -> uIP -> OpenWRT -> internet.

Easy as pi.

 
equant:

Some of us are ancient, back from the days when an Apple II could connect to the internet via a shell account from a local ISP. (Which is fairly rare these days, even with dialup.) So the idea of hooking up an old computer via a new computer seems a bit strange. After all, why wouldn't you just use the new computer for internet access in that case.

Other factors may be involved here too. Full computers are big and noisy and chew up power. A lot of those issues can be reduced if you buy a special device. The AVR32 development kit runs Linux, has an ethernet port and serial (IIRC), is quite low power and quiet and small. Some companies have sold similar devices (without the serial port, so you'd need a USB to RS-232 adapter) in fancy plastic cases. I would imagine that they could be repurposed for an application like this. But you're still pretty much going through a computer so the solution feels somewhat less satisfying.

Oh, and for added credit, what about tossing all of those new computers and just using the old stuff. Around 1997 or 1998 my only computer was an Apple IIe. It was used for everything from writing papers to surfing the web. And I do mean only computer. If I had another computer it was a broken 486. Around 1998, I was using just a Mac IIci on an ADSL connection. I remember some idiot telling me that the Mac IIci was too slow to handle ADSL and that it would be simple to upgrade it to a Pentium by swapping in a new motherboard. > :(

 
Full computers are big and noisy and chew up power.
I run NetBSD on a tiny Neoware box with a flash disk. It does all my MacIP, ADSP, DHCP, routing and DNS forwarding.

.

So the idea of hooking up an old computer via a new computer seems a bit strange.
The modem typically was a computer. Often a tiny little thing that handled the Hayes commands. Unless it was a manual dial, eg with acoustic coupler!

If you have a dial up account, you still can still do the MacPPP/modem thing. If you don't, you have to interface with the network connectivity of today.

At the same time, try and play your 33 RPM LPs on your BluRay.

 
Some of us are ancient, back from the days when an Apple II could connect to the internet via a shell account from a local ISP. (Which is fairly rare these days, even with dialup.)
I get what you're saying. Obviously everyone draws their lines in different places. I won't tell anyone how they decide what makes using old computers worthwhile to them. If one asks, "why not just use the new computer," then that's fine, but I can't relate to why they're trying to get their 68000 on the internet. Surely we're not trying to find solutions for real legacy users are we?

Still, I think the OpenWRT solution isn't bad as far as ease (when compared to the previously mentioned serial/ethernet Xport component from Lantronix) or power/noise (when compared to a host computer). I mean, it's just a router. It "feels" like a legit solution. You can't "just use the router" to access the internet. ;)

And I'm ancient enough. I went for several months with nothing but a Televideo 910 dumb terminal and a modem when my IIsi died in college.

 
Shoot, even better, just go get some OpenWRT/FreeWRT compatible router for $50 or maybe less put pppd on it and it'll serve ppp to your mac *and* be a router for the other computers that I guess you don't have. :p
But how would that work *physically* ??? How do you connect a compact Mac to a router?

 
Going by the PPP reference, it sound like serial cable from modem port to a serial port on the router. Then use MacTCP/MacPPP on the Mac.

 
Hmmm... I didn't know there was such a thing as a router with a serial port. Suddenly this whole thread has become meaningless.

 
Back
Top