Show HN: ShadowCat – file transfer through QR Codes in a Browser
ShadowCat offers a brilliantly simple, offline solution for transferring files between devices using QR codes through a browser, specifically targeting old phones with broken wireless radios. This 'Show HN' project resonates with Hacker News for its technical ingenuity in solving a niche but surprisingly common problem. Its appeal lies in its clever design, practicality for data recovery, and fully offline nature.
The Lowdown
ShadowCat is a single-file HTML page designed for optical file transfer between devices using QR codes. Conceived for scenarios where older phones have non-functional wireless communication (BLE, NFC) but still have working cameras and browsers, it provides a robust, offline method to move data.
Key features and operational details include:
- Generate: Encodes text into a single QR code.
- Scan: Decodes a single QR code via camera.
- Send file: Allows users to select a file, which is then chunked and repeatedly cycled as QR codes on screen at a specified frame rate (FPS), with options to pause, resume, or stop.
- Start from: Enables starting the QR code loop at a specific frame index.
- Show frame: Displays a single, static frame for manual re-sending of missing chunks.
- Receive file: Utilizes the device's camera to scan QR codes from the sender, displaying progress, missing chunks, and performing CRC verification upon completion before allowing download.
- Protocol: Uses a simple
QRX1header for metadata (total chunks, filename, size, CRC32) and data packets for base64-encoded chunks, all delimited by|for easy parsing. - Practical notes: Requires HTTPS or localhost for camera access; suggests serving locally with
python3 -m http.server. Advises adjusting chunk size, FPS, or ECC levels for older devices to ensure successful decoding and to manage the typical transfer speed of ~0.83 KB/s raw data.
ShadowCat stands out as an incredibly resourceful tool for data extraction from otherwise isolated devices, demonstrating a creative approach to overcoming hardware limitations with software ingenuity.
The Gossip
Clever Comm-Chains and Companion Creations
Users expressed significant appreciation for ShadowCat's ingenious method of using QR codes for offline file transfer, particularly for its utility with old devices. The author clarified the primary use case, a coffee-mug-damaged phone, which resonated with the community. One commenter shared a similar personal project that used audio frequency modulation instead of QR codes, highlighting a shared interest in creative, 'low-tech' solutions to connectivity problems.
Demo Desires and Deployment Demands
Commenters were eager to interact with ShadowCat, leading to practical suggestions for improving accessibility and showcasing its functionality. Key requests included setting up GitHub Pages to provide a live, browsable demo of the tool, allowing users to immediately experiment without local setup. Additionally, a demo video was requested to visually explain its operation, especially for those unable to immediately access a computer.
Pondering Portable Possibilities
One intriguing discussion point explored the future potential for even greater portability and self-sufficiency. A commenter suggested integrating local Large Language Models (LLMs) to generate the tool itself purely offline. This idea aims to eliminate all external network dependencies, ensuring that the file transfer utility could be created on-demand even in completely isolated environments, pushing the boundaries of its 'offline' nature.