Skip to main content

Serial Protocol (NDJSON)

Transport: USART2 (PA2 TX, PA3 RX) at 115200 baud, 8N1, newline-delimited JSON (\n).

PC → EnderDeck Messages​

Receiving any valid message marks the PC as LIVE.

Type (t)ExampleDescription
hb{"t":"hb"}Keepalive heartbeat
sys{"t":"sys","cpu":34,"ram":62,"gpu":18,"tmp":54,"disk":71,"rx":3,"tx":3,"procs":312}PC telemetry (disk, rx, tx, procs optional)
time{"t":"time","hm":"19:46","dt":"Mer 2 Dic"}Status bar clock & date
vol{"t":"vol","v":72,"m":0,"mic":0,"play":1}Master volume, mute, mic, play state
track{"t":"track","title":"Midnight Telemetry","artist":"EnderDeck","pct":42}Now Playing metadata & progress
agent{"t":"agent","id":"a1","name":"Antigravity","kind":"antigravity","model":"Gemini Pro","st":"wait","msg":"Run git push?"}Upsert agent (kind: antigravity, claude, codex, copilot, cursor, generic; st: idle, run, wait, done, err)
notify{"t":"notify","app":"GitHub","title":"PR Merged","body":"CI passed"}Push toast notification
btn_set{"t":"btn_set","p":0,"i":0,"id":"browser","lbl":"Browser","col":3718648,"on":0}Customize deck button (p: 0–1, i: 0–7, col: 24-bit RGB int)
led{"t":"led","m":0}Set knob LED mode (0–3)

EnderDeck → PC Messages​

Type (t)ExampleTrigger
hello{"t":"hello","fw":"0.6.0","hw":"TFT35_E3_V3.0","name":"EnderDeck"}Boot & every 5 s
btn{"t":"btn","id":"browser","ev":"click"}Deck button tap
agent_resp{"t":"agent_resp","id":"a1","act":"confirm"}Agent confirm or deny
vol_set{"t":"vol_set","v":68,"m":0,"mic":0}Volume slider, mute, or encoder
media{"t":"media","cmd":"play"}prev, play, or next