v2.2.10 — WS-V2 final delta hunt vs Studio
What's in this release
Forensic re-audit of the WS-V2 connect chain against xTool Studio's atomm-sharedworker after users reported parity-handshake timeout still hitting on v2.2.9. Six byte-level deltas surfaced; all match Studio source where confirmable.
Fixed
- JSON whitespace (HIGH confidence): `json.dumps(payload, separators=(",", ":"))` so payload bytes match Studio's `JSON.stringify` byte-for-byte. Default `json.dumps` inserts spaces around `:` / `,`, altering the on-wire bytes and the payload CRC.
- Heartbeat field order (MEDIUM): now matches Studio's `HEART_MESSAGE` order — `type, method, url, transactionId, data, params, timestamp`.
- TLS context (LOW, speculative): switched `_ssl_context()` from `ssl.create_default_context()` to `SSLContext(PROTOCOL_TLS_CLIENT)` — wider cipher overlap with V2 firmware's TLS stack. Studio inherits Chromium's permissive defaults (no explicit Python-equivalent setting). BassXT uses the PROTOCOL_TLS_CLIENT pattern in its working coordinator.
- `compress=0` reverted (MEDIUM): now defaults to `compress=15`, offering `permessage-deflate; client_max_window_bits=15` — RFC 7692 equivalent to Chromium's valueless offer.
- WS-level RFC 6455 PING/PONG (MEDIUM): added `heartbeat=20.0` to `ws_connect`, mirroring Chromium's implicit WebSocket keepalive.
- Origin header (LOW, exact value): `headers={"Origin": "atomm://renderer"}` — matches Studio's actual handshake Origin (custom `atomm:` scheme registered in Electron `main.js`, renderer page lives at `atomm://renderer/...`).
Verification
JSON output sanity-checked locally:
PARITY: {"type":"request","method":"GET","url":"/v1/user/parity",...}
PING: {"type":"request","method":"GET","url":"/v1/user/ping","transactionId":65510,...}
Compact, no whitespace, same field-order Studio uses.
How to capture trace if it still fails
Settings → Devices & Services → xTool Laser → 3-dot menu → Enable debug logging → repro → log shows precisely which step fails (TLS open / frame TX / frame RX / JSON parse / response match / WS close-code).