LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Hardware

A mouse started typing when its adapter’s 72-minute counter wrapped

Steve Chamberlin’s vintage-Apple adapter overhaul also produced a public collection of USB device descriptions, giving other developers a way to reproduce compatibility failures.

Phenakistiscope of Chris Pirillo: he stares at his computer mouse which is suddenly typing by itself
Illustration: LockerGnome

After an hour or so, a mouse began typing keys. That is a memorable way for an adapter to ask for a firmware update.

Steve Chamberlin initially doubted the reports. He “thought it must be a coincidence,” he writes in his October firmware account. One customer described the failure after 30–60 minutes. The counter’s actual cycle was about 72 minutes, so the customer’s estimate and the arithmetic need to stay separate.

The Wombat bridges USB and Apple Desktop Bus in both directions: modern keyboards and mice on vintage Macs, or old ADB peripherals on current computers. Chamberlin developed it for machines including ADB-equipped Macintoshes, the Apple IIgs and some NeXT systems. Translating those inputs means keeping track of what each attached device is supposed to be doing.

A timer rollover broke that bookkeeping. A firmware comparison misread the wrapped counter as an ADB reset, cleared device information and left the adapter incompletely initialized. The arithmetic is straightforward: 2^32 microseconds divided by a million and then by 60 gives about 71.58 minutes. A counter that sounds enormous on a spec sheet can run out before a movie does.

Chamberlin had already found a different numerical trap in September’s compatibility repair. Fancy peripherals had spent years falling into what he called a “regrettable known incompatibility.” A customer supplied a Linux dump of a Logitech Bolt receiver’s HID report descriptor, the description the host reads to understand the device’s reports.

The USB sample code stored the completed transfer length in an 8-bit variable, then compared it with a 16-bit expected length. Anything above 255 bytes failed. That explains why buying a different keyboard could appear to solve the problem: the replacement’s description might fit in the smaller variable. The September fix arrived as firmware 0.3.11.

The wider repair effort produced something other developers can reuse. Chamberlin’s public descriptor corpus contains about 200 devices, with separate files identifying where each sample came from. Those files include annotated descriptions and raw hexadecimal bytes; some also carry recorded input reports. The README distinguishes captured material from descriptions inferred or generated from firmware, and from artificial examples.

That distinction matters if you borrow the collection for your own parser. A captured report can reproduce a particular device’s behavior; an invented example can test a boundary. Neither promises that an entire keyboard, cable and host combination works. The collection makes failures portable enough to investigate without mailing someone a box of mice.

Longer test runs could catch the next timed failure, while reusable descriptors let more developers challenge the assumptions that survive startup. Wombat’s other intermittent failure came from an event queue that dropped arrivals after four pending events. A deeper queue and a timeout fixed that case; the next awkward peripheral still has to get through both startup and the hours afterward.

More Hardware

Every Hardware story →