Firmware

More than a USB adapter: a translation layer between the Logitech G13 and modern macOS.

The current firmware has been developed and tested on macOS. Since the Teensy presents itself as a standard USB HID keyboard, the concept is not macOS-specific and should also work on Windows and Linux.

At the center of the G13 Revival project is a Teensy 4.1 running a custom USB firmware stack.
It does far more than forward button presses. The firmware operates simultaneously as a USB host for the Logitech G13 and as a USB client toward macOS, translating legacy HID communication into a modern input device pipeline.

Quick Note

You do not need to understand the firmware internals to use the G13 Revival project.

If you simply want to get your Logitech G13 working again, you can:

  • download the source code
  • flash it to the Teensy 4.1
  • connect the hardware
  • start using the device

This page exists purely for people who are curious about how the project works internally — including USB host communication, HID report decoding and the firmware architecture behind the revival.

What the Firmware Actually Does

The firmware detects the Logitech G13 on the USB host side, parses incoming HID reports, interprets their data structures, and converts them into standard keyboard events for macOS.

At the same time, the firmware architecture was designed with device-specific G13 features in mind. While the current stable release focuses on reliable HID translation, the project has also explored additional communication channels such as the LCD display and device-specific HID feature reports.

USB Host and USB Client at the Same Time

The Teensy 4.1 sits directly between the original hardware and the operating system.

On one side, it behaves as a USB host communicating with the Logitech G13 through the USBHost_t36 stack. On the other side, it presents itself to macOS as a modern HID keyboard device.

This architecture avoids outdated drivers, kernel extensions, or legacy Logitech software entirely.

HID Analysis Instead of Blind Forwarding

Incoming HID traffic is not treated as an opaque byte stream.

A custom HIDDumpController attaches directly to HID collections, monitors interrupt transfers, and decodes HID usages in real time. This layer was essential for understanding how the G13 exposes its keys, HID reports, and vendor-specific interfaces. 

Every incoming HID report acts as both input data and a heartbeat signal for connection monitoring.

Decoding the Logitech G13 Reports

The G13 does not expose its controls as simple keyboard scancodes. The firmware parses report headers, evaluates bit fields and byte ranges, and reconstructs a complete internal key state.

Only actual state changes generate keyboard events, preventing unnecessary repeat traffic and improving reliability during long sessions.

USB Device and Interface Analysis

The firmware also contains dedicated USB analysis utilities.

Device descriptors, interface descriptors, HID collections, and endpoint configurations can all be inspected directly from the Teensy itself. This was critical for reverse-engineering how the G13 exposes its multiple internal interfaces.  

The device is identified through:

  • Vendor ID: 0x046d
  • Product ID: 0xc21c

The firmware can inspect:

  • Interface classes
  • Endpoint types
  • Interrupt polling intervals
  • HID report descriptor sizes

This makes the Teensy behave almost like a compact USB protocol analysis tool during development.

Stability and Runtime Monitoring

The firmware is designed for long uninterrupted runtime.

Logging is event-driven rather than continuous. Instead of flooding the serial console, the system only reports state transitions, stalls, disconnects, or recovery events.

Incoming HID reports also function as a connection heartbeat. If reports stop arriving for too long, the firmware can detect a stalled device state automatically.

Experimental Features

During development, additional Logitech G13 features such as the LCD display, RGB backlight and mode LED control were explored experimentally.

Early firmware versions already included prototype implementations for:

  • LCD framebuffer handling
  • logo transfer attempts
  • HID feature report experiments
  • device-specific HID feature report experiments

However, these features introduced instability during runtime and were therefore removed from the current stable firmware release.

The current firmware intentionally focuses on:

  • stable USB host/client communication
  • reliable HID report translation
  • key mapping
  • long-term runtime stability

The original G13 thumb joystick is currently ignored by the firmware. Since this revival project was primarily designed for left-handed gaming setups, the thumbstick has little practical relevance in the intended use case.

Future firmware revisions may revisit some of the experimental features once the underlying device communication is better understood and can be implemented reliably.

Community input regarding the Logitech G13 protocol is highly appreciated.