openssm_

A cross-platform, read-only Subaru Select Monitor reader in Zig. Drives a Tactrix OpenPort 2.0 over USB and serves live SSM data over JSON IPC — one portable core, many clients.

● hardware bring-up done Zig 0.15 macOS · Linux · Windows USB CDC · no sudo · no libusb SSM2 · SSM3 · SSM4 read-only

What it is

Subaru diagnostics live in three eras: SSM2 on the 4800-baud K-line, SSM3 as SSM-over-CAN, and SSM4 as UDS/ISO14229 for 2007+ vehicles. openssm aims for close to 1:1 parity with the read functions of the dealership SSM3/SSM4 tools.

It is a hardware daemon: one process owns the OpenPort and speaks the protocols, then exposes a JSON-lines endpoint so a CLI, GUI, logger, or dashboard can all build on the same data. No J2534 DLL, no vendor driver.

The protocol core is pure Zig and OS-agnostic — only the serial backend and a tiny platform shim are platform-specific — so the same daemon runs on macOS, Linux, and Windows and cross-compiles to all three.

Architecture

clientsCLI · GUI · TUI · logger · dashboard
↓ JSON-lines · unix socket / TCP ↓
portable core · pure Zig · no OS calls
ipc.zig session.zig device.zig openport.zig ssm.zig transport.zig
↓
platform shim serial.zig · posix termios | win32 comm · platform.zig
↓
hardwareOpenPort 2.0 → ECU · SSM2 / SSM3-CAN / UDS

Quick start

# build + test
zig build && zig build test

# cross-compile the same core everywhere
zig build -Dtarget=x86_64-linux-musl
zig build -Dtarget=x86_64-windows-gnu

# device info + battery voltage
./zig-out/bin/openssm probe

# open the K-line SSM channel, send ECU init
./zig-out/bin/openssm kline

# serve IPC (or: mock-serve to develop clients with no car)
./zig-out/bin/openssm serve --unix /tmp/openssm.sock

# query it
printf '{"id":1,"method":"probe"}\n' | nc -U /tmp/openssm.sock
# {"id":1,"result":{"firmware":"main code version : 1.17.4877","vbatt_mv":0}}

Roadmap