firmware/src/evcore_console.c and software/evcore-studio/public/transport.js. The current version is protocol 2. This page describes transport framing, request tags, the full command set, and reply formats.
Transport and framing
The protocol is written for a byte stream and does not depend on the transport. The intended transport is USB CDC over USB-C, which is not implemented yet (roadmap item 77). Today it runs over the simulator’s stdin/stdout.- A command is printable ASCII (32 to 126), at most 63 bytes, and ends with LF or CRLF.
- A lone CR, a control byte, or an overlong line makes the whole line invalid.
- After a receive error the transport calls
EV_ConsoleTransportLost, which discards input through the next LF. - Replies are single lines. The longest reply is
REPORT JSON(under 2,048 bytes).
Request tags (protocol 2)
A host prefixes each command with# and 1 to 9 digits, then a space:
END line:
END, so a person can still type at a terminal. A malformed tag gets the untagged reply ERR invalid tag. An invalid or oversized line also returns ERR invalid or oversized command, because its tag cannot be trusted. A host waiting for a tagged reply treats either as a timeout, meaning the device state is unconfirmed.
Commands
Anything else gets
ERR unknown command. ERR response unavailable means a reply could not be formatted within its buffer. That should not happen, and it is reported rather than truncated.
Reply formats
Fields are space-separatedkey=value pairs. Keys are [a-z_]+. The last field may contain spaces (for example reason=within profile limits), so parse values up to the next key= boundary.
INFO
[A-Za-z0-9._-]{1,32} or unknown.
PROFILES
name is the name the device’s screen shows (or Profile <id>) and runs to the end of the line.
STATUS (also the first line of REPORT)
reason reads not complete until a test finishes. The bit meanings of outputs and faults are the EV_OUT_* and EV_FAULT_* constants in evcore_safety.h.
REPORT sample line
REPORT phase line
REPORT fault line (one per record)
firmware/src/evcore_fault.c. Codes are stable and only ever appended.
CODE reply
SCREEN
top and total place the visible window in the page, for a scroll bar. This mirrors the local screen (firmware/src/evcore_ui.c) so a host can show it; it cannot press the knob. The knob and the STOP button are physical controls and have no protocol command.
SAFETY
LOG
REPORT JSON (report schema 1)
fault_records entry has the same fields as the REPORT fault line, plus value (a number, or null when none applies). fault_records_dropped counts records that did not fit (at most 8 are kept). Non-finite numbers are never written; a report containing one is refused. mismatch_percent is null when no comparison applies. knowledge is the diagnostic code library version; calibration is null until that subsystem exists.
Not yet in the protocol
The following capabilities are planned but not yet implemented:- Capability discovery (
CAPS, roadmap item 59) - Host lease so a remote-started test stops if the host goes silent (item 58)
- Progress events (item 60)
- Live measurement streaming (item 61)
- Knowledge and calibration queries and uploads (items 62 and 63)
- Authentication (item 64)