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

TelePort ADB Modem Protocol?

tashtari

PIC Whisperer
Figured out today what some of what the junk from register 2 means. Not surprising, really, the string comprises a firmware version (first byte), an "ID" number (second through fourth byte), and a manufacture date (low 10 bits of fifth and sixth byte) which, curiously, is specified in the number of weeks since 31 December 1989. Also strange is that the string from Dandu's modem says it was manufactured in 2002, which I can't believe is true - that's way too late in the game for a 2400 baud modem - but this is what the 'about' box in the TelePort ADB control panel says.

Unfortunately, I haven't made any progress trying to get the host to receive data from the modem. I've tried sending it data packets in the same form it sends out, but ZTerm shows no data coming from the modem. I've even tried sending random garbage to fuzz it and see if anything will come up, but nothing did.

Perhaps I'll think of something I haven't tried yet, but I may be up the creek until I can get my hands on one of the actual devices to play with...
 

tashtari

PIC Whisperer
Oh, forgot to mention, I found out a bit more about the service request behavior.

I am now almost sure that the TelePort ADB driver replaces the system's ADB driver when the serial port is open and the modem is active. The behavior is notably different. Besides alternately polling the modem and the mouse when idle, it also does this at much more rapid intervals than usual. The Performa 630 I'm testing this on usually polls at somewhere between 10 and 12 ms, but when the modem is active, the polling interval is somewhere around 3.5 ms.

As I noted before, when the modem is active, the first thing the driver does is turn off the modem's ability to call for an ADB service request, and the reason for this became clear when I had an error in my code (ha)... when there's a service request condition on the bus, the patched ADB driver checks every device except the modem, knowing as it does that it disabled the modem's ability to call for a service request and therefore it couldn't possibly be the modem calling for service. If it is the modem calling for service, it will starve, because the driver will never check it. Interesting edge case.

Tried a few more things to get the host to receive data this morning, to no avail. I suspect (but am not sure) that register 0 may not actually be the channel over which data is sent from the modem to the host, it might be status flags instead, one of which tells the host to talk register 1, which actually delivers the data payload. Still only guesswork, though.

There's someone selling one of these modems on eBay for $125, which seems to me like a ridiculous price. Hopefully one appears for a more sane price, or I might cave...
 

tashtari

PIC Whisperer
Cracked it!

What ended up working surprised me, because I was sure I'd tried it before. I must have been the victim of a bug in my own firmware...

Whether it's talk or listen, the teleport ADB modem uses register 0 as its main communications channel, using ADB frames that are always 8 bytes in length. If the last byte is 0x00-0x7F, then all eight bytes are data. If the last byte is 0x81-0x87, then the first 1-7 bytes in the frame, respectively, are data. Other bytes do not appear to be used in the 8th position.

I am still not sure of the meaning of most of the bits in registers 1 and 2. Bit 1 of register 1 appears to be set when the modem is on, as I think I have said, and bit 14 of register 2 appears to be set and then cleared to send a break character on the line. Fortunately, registers 1 and 2 don't seem to be very important with respect to emulating it as a UART, register 0 is enough for that.

This was a fun project. Only thing I'm wondering now is, what to do with this knowledge? TashModem? I can't imagine that would be very interesting to many people...
 

tafkar

Well-known member
Oh, forgot to mention, I found out a bit more about the service request behavior.

I am now almost sure that the TelePort ADB driver replaces the system's ADB driver when the serial port is open and the modem is active. The behavior is notably different. Besides alternately polling the modem and the mouse when idle, it also does this at much more rapid intervals than usual. The Performa 630 I'm testing this on usually polls at somewhere between 10 and 12 ms, but when the modem is active, the polling interval is somewhere around 3.5 ms.

As I noted before, when the modem is active, the first thing the driver does is turn off the modem's ability to call for an ADB service request, and the reason for this became clear when I had an error in my code (ha)... when there's a service request condition on the bus, the patched ADB driver checks every device except the modem, knowing as it does that it disabled the modem's ability to call for a service request and therefore it couldn't possibly be the modem calling for service. If it is the modem calling for service, it will starve, because the driver will never check it. Interesting edge case.

Tried a few more things to get the host to receive data this morning, to no avail. I suspect (but am not sure) that register 0 may not actually be the channel over which data is sent from the modem to the host, it might be status flags instead, one of which tells the host to talk register 1, which actually delivers the data payload. Still only guesswork, though.

There's someone selling one of these modems on eBay for $125, which seems to me like a ridiculous price. Hopefully one appears for a more sane price, or I might cave...
I have a Teleport Bronze modem that came with the first Mac I ever owned. I'll sell it for US$10 plus shipping.
 

Skate323k137

Well-known member
Whether practically useful or not at the moment, I find this kind of research really fascinating and inspiring. I want to learn a bit more about serial decoding for sure.
 

tashtari

PIC Whisperer
I have a Teleport Bronze modem
Ah, thanks for the offer, but unfortunately the TelePort Bronze is the wrong modem. They're easy to come by and often confused for the TelePort ADB modem because they derive power from the ADB port, but they still send/receive data through the serial port in the conventional manner.
I find this kind of research really fascinating and inspiring.
I'm glad you enjoyed it, and thanks for saying so! I sometimes worry that I'm just rambling on about things about which nobody cares. =D
 

NJRoadfan

Well-known member
Based on what little I can find, there is a Teleport Bronze that is ADB and a "Bronze II" that is serial based with ADB power. A photo of the modem in question would be helpful.
 

tashtari

PIC Whisperer
Really? In my travels, the only "Bronze" one I knew of was the one with a serial port. But if I'm wrong and it really does talk over the ADB interface, I'm definitely interested...
 

Johnnya101

Well-known member
I missed out on the earlier discussion, but don't forget that Apple included ADB with the Laserwriter IIs for a reason... What reason, I'm not sure, and they probably weren't either, but it shows that it was going to be for something neat. Don't know what you'd want to connect to a printer though.
 

NJRoadfan

Well-known member
See: http://www.nzdl.org/cgi-bin/library...a=d&cl=CL2.1&d=HASH015b6a434cab1f3df2061a0b.2

It will not work with the TelePort/Bronze, TelePort A300 (the original ADB modem), or TelePort FullFax modems. Owners of these modems should not attempt to install this software update, as the installer will remove the ADB-specific TelePort software, rendering the modem unusable.
It's not very clear if its a ADB communicating modem or serial. The A861 appears to be the "Bronze II". The "TelePort FullFax" A400 appears to use ADB and communicates at 4800/9600bps (fax only)!


So they made at least two ADB communicating modems.

Hmm, based on old Usenet posts, they may have later renamed the A300 ADB model the "Bronze".
 
Last edited:

tashtari

PIC Whisperer
New discoveries.

Less interesting is the fact that the last byte only seems to be a count of preceding bytes if the upper nibble is 0x8, so it can send/receive 0x90-0xFF as final bytes in a frame, to maximize efficiency.

More interesting, and frankly baffling, is the fact that the byte 0x95 seems to be treated specially, but only from the modem to the mac. If it's followed by another 0x95, one 0x95 is received. If it's followed by any byte other than 0x95, things get weird.

The byte that follows always gets swallowed. I could understand that on its own, perhaps it's some sort of command or event sequence. However, sometimes the byte after that gets swallowed too. The pattern is frankly bizarre and I haven't been able to figure it out yet, nor can I figure out what its purpose is. With all the experimentation I've been doing, you'd think I would have hit on some kind of new behavior, maybe an RLE compression algorithm or something, but no such luck.

Guess I'll just double up my 0x95s in the firmware and that'll be that, but still, what a weird bit of behavior...
 

mdeverhart

Well-known member
It sounds like it’s using the 0x95 as an escape character for some reason - if the next byte is an actual 0x95, it passes it through as data received from the sender. If it’s other values, I would guess that the driver interprets them. I would guess it’s some sort of in-band status protocol, for the modem to pass status back to the driver, but it’s hard to say. I’ve seen similar schemes used for in band signaling on byte-stream interfaces - for example, to delineate between packets (if a packet oriented protocol is being carried on a byte-stream interface like a serial port).
 

tashtari

PIC Whisperer
I guess it's something I'll have to investigate further if I ever get my hands on the real modem...

Meantime, I am watching in amusement as it takes over an hour to transmit a 900 KB file. How did people ever live life at 2400 baud?
 

tashtari

PIC Whisperer
It very well could be! The driver has a little status bar thing up in the menubar that has 'LEDs' labelled 'AA', 'CD', and 'OH'. Nothing I've done so far has managed to make them light up, though. Even if I had the real modem, I'm not sure I've got anything in the house that can generate a dial tone...
 

tashtari

PIC Whisperer
So I've made the firmware I wrote public. =D It emulates an ADB keyboard and mouse into the bargain:

 
Top