Commit graph

84 commits

Author SHA1 Message Date
e7b4d7dedd feat(aten-kvm): add debug logging to protocol and decoder
Instrument the message loop, hermon decoder, and writer thread with
log crate calls to help diagnose framebuffer update and keyboard issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 09:37:14 +00:00
2d38afd4b2 fix(aten-kvm): move keyboard input to writer thread to fix EAGAIN crash
The 5ms read timeout (added for keyboard input polling) caused
read_exact calls inside message handlers to fail with EAGAIN when
large framebuffer updates didn't arrive within the window. This
crashed the session 15-30 seconds after any keyboard input.

Split the socket with try_clone: a dedicated writer thread handles
keyboard events via blocking recv, while the reader uses a 1-second
timeout (only for stop-flag checking). This fixes both the crash and
the non-updating framebuffer (content updates from the server can now
survive long enough to be decoded and displayed).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 00:29:08 +00:00
7f181345d9 docs: update CLAUDE.md with toolbar and error dialog info
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 00:13:26 +00:00
1ca5d42b5e feat(aten-gui): show error dialog on KVM errors and connection failures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 00:10:38 +00:00
035922617f feat(aten-gui): wire toolbar button callbacks to KVM input
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 00:08:01 +00:00
c1d973b131 feat(aten-gui): add toolbar and error dialog to Slint UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 00:04:25 +00:00
d1c8da025a docs: add implementation plan for GUI toolbar and error dialog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:58:50 +00:00
434f128194 docs: add design for GUI toolbar and error dialog
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:56:24 +00:00
cb2cf7557a fix(aten-gui): wrap binary with LD_LIBRARY_PATH for dlopen'd libs
xkbcommon-dl loads libxkbcommon-x11.so via dlopen at runtime, which
isn't covered by the binary's RPATH in nix builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:49:17 +00:00
e45a221a78 chore: update cargoHash in flake.nix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:24:17 +00:00
e6006f5332 docs: update README and CLAUDE.md for keyboard input and winit backend
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:14:15 +00:00
fe6cdb7e1c feat(aten-gui): wire up keyboard input via winit event interception
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:13:08 +00:00
b3cad61184 feat(aten-gui): add physical key to X11 keysym mapping
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:11:04 +00:00
45ffad42ee chore: replace Qt6 deps with winit/X11/Wayland deps in flake.nix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:06:56 +00:00
00b8e62b23 chore(aten-gui): switch from Qt6 to winit backend, add logging deps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:06:52 +00:00
5f3d46de8f feat(aten-kvm): add input channel to session loop, reduce timeout to 5ms
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:05:18 +00:00
0511226611 feat(aten-kvm): add InputEvent type and build_key_event
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:02:48 +00:00
1f1415b601 Add aten-gui keyboard input implementation plan
7 tasks: aten-kvm protocol changes, winit backend switch,
flake.nix Qt6 removal, keymap module, event interception, docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 23:00:38 +00:00
01343ca206 Add aten-gui keyboard input design
Physical key passthrough approach: capture winit PhysicalKey codes,
map to X11 keysyms via fixed table, send as independent key events.
Avoids local keymap dependency entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 22:53:55 +00:00
2bdda6b0e6 fix(aten-kvm): reuse encoding from first frame for subsequent updates
The BMC's GetDecoder is a singleton factory that creates a decoder on
the first frame and reuses it for all subsequent frames. The BMC sends
encoding 0x00 for incremental frames after the initial 0x59 (Hermon)
frame, which was incorrectly rejected as unsupported.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 22:12:11 +00:00
42d1960dc0 Remove obsolete plans 2026-03-11 22:07:50 +00:00
74ad76f4b4 fix: support hostnames in KVM connect, update README
- Use ToSocketAddrs instead of parse::<SocketAddr> so hostnames resolve
- Update README.md to reflect aten-gui is now a KVM console viewer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:57:39 +00:00
5591771984 chore: update flake.nix and CLAUDE.md for aten-kvm
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:54:35 +00:00
72639cfb78 feat(aten-gui): implement KVM console viewer with Slint display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:51:56 +00:00
ac496fe03f feat(aten-kvm): implement KvmSession run loop with message dispatch
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:48:13 +00:00
2128d5b58f feat(aten-kvm): implement Hermon tile decoder (full frame + incremental)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:44:58 +00:00
3b1bc6c992 feat(aten-kvm): implement RFB handshake and message parsers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:41:22 +00:00
468513ae7b feat(aten-kvm): add Hermon pixel format conversion (RGB555, 8bpp)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:37:38 +00:00
0880305189 feat: scaffold aten-kvm crate with public types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:35:34 +00:00
01d1287e7a docs: update CLAUDE.md and README.md for aten-gui
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:32:52 +00:00
3c070978a1 Add aten-kvm implementation plan
7 tasks: scaffold crate, Hermon pixel conversion, tile decoder,
RFB protocol, session run loop, GUI integration, nix/docs update.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:28:17 +00:00
f75cd70e23 Add aten-kvm + aten-gui KVM viewer design
Display-only KVM console: RFB protocol with Hermon (WPCM450) video
decoder, Slint framebuffer display, no keyboard/mouse input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:23:15 +00:00
f91bd29742 fix: fix QMAKE path and CRLF line endings in flake.nix
The qtbase setup hook sets QMAKE to a path inside the setup-hook
derivation that doesn't contain an actual qmake binary. Combined
with CRLF line endings injecting \r into shell variable values,
this caused qttypes to compile with cfg(no_qt), producing a Slint
binary with no functional Qt backend.

Fix by overriding QMAKE in preBuild (nix build) and shellHook
(devShell), and converting flake.nix to Unix line endings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:05:37 +00:00
c6d2aa7413 feat: add aten-gui to flake, update devShell with Qt6 deps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:28:10 +00:00
a497333a07 feat: scaffold aten-gui crate with Slint Qt6 hello world
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:20:04 +00:00
2c75675678 Add aten-gui phase 1 implementation plan
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:12:40 +00:00
1edac4e33b Update CLAUDE.md 2026-03-11 20:11:59 +00:00
19ed947202 Add aten-gui phase 1 design doc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:11:30 +00:00
df86f2bd51 docs: flesh out README.md and CLAUDE.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:53:44 +00:00
ab11099787 chore: remove Go implementation, now replaced by Rust
The Rust rewrite in crates/aten-mount/ has full feature parity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:49:03 +00:00
c07e22f844 fix: add READ TRACK INFORMATION (0x52) and fix unknown opcode behavior
The server could not open the virtual CD-ROM block device because the
Linux kernel sends READ TRACK INFORMATION during device enumeration and
our client was returning ILLEGAL REQUEST instead of track data.

Implemented the 0x52 handler by decompiling the firmware's ReadTrackInfo
function (at 0x00128bea). Returns a 28-byte Track Information Block
describing a single Mode 1 data track covering the full disc.

Also fixed the default SCSI opcode handler to match firmware behavior:
the original IsoCommand default case returns no data with status PASS
(no error sense), but we were returning ILLEGAL REQUEST with FAILED
status, which could cause the host OS to reject the device.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:45:01 +00:00
b236cde937 Switch flake.nix build target from Go to Rust
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:57:29 +00:00
5dbc256d6e fix: address code review findings
- Remove panics from build_plugin_packet (return io::Result)
- Drain unknown PDU payloads to prevent stream desync
- Use overflow-safe LBA bounds check in READ(10)/READ(12)
- Move set_nodelay before initial packet exchange
- Move set_read_timeout out of command loop

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:55:31 +00:00
437c6ef446 chore: fix unused import and constant warnings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:49:10 +00:00
de531b2a5c feat: implement aten-mount CLI binary
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:48:37 +00:00
922da15f56 feat: implement SCSI command handlers for aten-mount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:45:20 +00:00
14b91d27bc feat: implement protocol packet builders and PDU header for aten-mount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:43:35 +00:00
83581a7d69 feat: add USB descriptor data for aten-mount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:39:09 +00:00
ad0213d455 feat: implement RC4 encryption for aten-mount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:36:19 +00:00
05c01bfbea feat: scaffold Rust workspace for aten-mount rewrite
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:34:45 +00:00