Amusing implications

Eric S. Raymond esr at thyrsus.com
Mon Feb 4 18:39:48 UTC 2019


I found a documentation error.

The page for the modem driver says:

    This driver requires a 9600 bps modem with a Hayes-compatible command
    set and control over the modem data terminal ready (DTR) control line.
    The actual line speed ranges from 1200 bps with USNO to 14,400 bps
    with NIST. The modem setup string is hard-coded in the driver and may
    require changes for nonstandard modems or special circumstances. It
    can be overridden by setting the extended system variable
    "modem_setup" via ntpq.

But look at this:

		setup = get_ext_sys_var("modemsetup");
		if (setup != NULL)
			modem_setup = estrdup(setup);

Yes, that's right, the embedded underscaore in "modem_setup" is wrong.
And we didn't do that - I checked Classic and the documentation bug
dates back at least to 2012.  Probably earlier, I can't be bothered
to do a full bisect on this.

"Who cares?" you might ask.  "Maybe the default modem string just
works.  The Hayes command set is pretty universal after all."

But now we look a little deeper.

/*
 * Modem setup strings. These may have to be changed for
 * some modems.
 *
 * AT	command prefix
 * B1	US answer tone
 * &C0	disable carrier detect
 * &D2	hang up and return to command mode on DTR transition
 * E0	modem command echo disabled
 * L1	set modem speaker volume to low level
 * M1	speaker enabled until carrier detect
 * Q0	return result codes
 * V1	return result codes as English words
 * Y1	enable long-space disconnect
 */
static const char def_modem_setup[] = "ATB1&C0&D2E0L1M1Q0V1Y1";
static const char *modem_setup = def_modem_setup;

Friends, speaking as a person who spent more than his share of effort
wrestling with Hayes-compatible modems back before broadband, I am
here to tell you that this looks very 1980s to me and having it work
in 2019 is almost vanishingly unlikely.

The "Hayes command set" is a bit like Norse runes - the archaic Elder
Futhark versions could make a lot of assumptions and do a lot of
things the Younger Futhark on today's modems can't anymore.  That
there in the comment is Elder Futhark of an ancientness I have not
seen in decades.

There's no *dial* command in there!  The Younger Futhark dial command
would start with ATDT. 

So we have a modem driver that won't work - in fact I'd lay odds it
wouldn't on any modem made in this century. (I think I have a U.S.
Robotics model somewhere in my junk bins, from around 1995, that might
take that string. Maybe.)

The system variable you might poke to make it work is misdocumented.
And the misdocumentation has lingered for at least 7 years.  That's
long enough for a human to be declared legally dead.

I'll fix it, but I think what we *ought* to do is nuke the whole sorry mess.
Any objections?
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

"One of the ordinary modes, by which tyrants accomplish their purposes
without resistance, is, by disarming the people, and making it an
offense to keep arms."
        -- Constitutional scholar and Supreme Court Justice Joseph Story, 1840


More information about the devel mailing list