Software, technology, sysadmin war stories, and more. Feed
Saturday, April 28, 2012

Downloading on dialups without hardware flow control

My school's Unix box had a bunch of dialups. They weren't always maintained with the greatest of care. Before the days when I got control of the box, we had this ragtag bunch of modems running a variety of god-awful configurations.

Problems were rampant. First, the modems had a poor DTE speed set up. The best practices called for driving the modem at a significant multiple of its maximum connect speed (28800 bps in those days), but that wasn't an option with that hardware. The reason is that we were using this 8-way serial board called a "Riscom/8", and apparently it had a poor choice of crystal as its frequency source. As the story goes, at higher rates, it was unable to hit exactly 38400, 57600, and so on, and the amount of skew was enough to make it unusable.

Worse than that, the dialups did not have working flow control. As I mentioned in my last post about modems, a healthy situation would stream to fill up the buffer, and then the modem would drop CTS. This would make the transmitter stop until the buffer drained a little, at which point it would raise the line and transmissions would start again.

In this case, the modems were (probably) set to do flow control, but the serial hardware and/or tty settings did not recognize it. So, the machine would pound away at the modems and they would drop CTS, but the Unix box wouldn't notice, so it would just keep sending. It wasn't until Zmodem or whatever the user was running cried foul that the transmissions would stop, back up, and restart.

Not surprisingly, this made for horrible data rates.

Some friends of mine who were stuck with using this box as their source of Internet access decided to do something to work around it. They came up with a little hack called "catslow". All it did was "cat" a file to the console while adding delays of its own. It took a lot of tuning, but they were eventually able to make it stay below the saturation rate. This let them download files, however slowly, without having to get a "real" ISP.

Luckily for all involved, things changed. I took over as the sysadmin of that box, and stuff started happening. First, we got rid of the Riscom/8 and installed a new Digiboard. It was a two-part multi-port system where you have a giant board in the machine, a gigantic connector leading to a thick cable and another connector, and then that terminates in a box. That box then fans out to a bunch of DB-25 serial port connectors, plus it can be daisy-chained. It also had the nice property of getting both flow control and high baud rates correct.

Along with doing that, one day my need to tidy things kicked in, and I went in there and just re-cabled the whole mess. I took every single serial cable, modem, power brick, phone cord, and phone jack and labeled them. Then I stacked them in a way where it was neat but could still "breathe" - those Sportsters got hot!

The few times we got to spend money on that box, we made it count.