#!/usr/bin/env python3 """ s3_bridge.py — S3 <-> Blastware serial bridge with frame-aware session logging Version: v0.4.0 Key features: - Low CPU: avoids per-byte console printing - Forwards bytes immediately (true bridge) - Frame-aware logging: buffers per direction until ETX (0x03), then logs full frame on one line - Also logs plain ASCII bursts (e.g., "Operating System") cleanly - Dual log output: hex text log (.log) AND raw binary log (.bin) written simultaneously - Interactive annotation: type 'm' + Enter to stamp a [MARK] into both logs mid-capture - Binary sentinel markers: out-of-band FF FF FF FF