About LightLink
LightLink transfers data completely offline using optical communication.
🔒 Privacy & Security
Your data is transferred locally through optical communication. No internet connection, server,
cloud service, or external API is used. All data transfer happens only between the sender screen and
receiver camera on your device.
📱 Progressive Web App
This application works as a PWA. You can install it on your device and use it completely offline. No
backend, no cloud, no external services.
📷 Camera Permission
Camera access depends on browser security rules. If opening index.html directly with file://
protocol does not allow camera access, run the same file through a local server such as python -m http.server 8000
or similar. The application itself still requires no internet connection.
🔄 How It Works
Sender: Converts text or files into binary data, splits into frames, adds CRC32
checksums, renders each frame as a 64×64 grid of black/white cells with calibration markers, and
displays them sequentially on screen.
Receiver: Uses device camera to capture frames, detects calibration markers,
calculates perspective transform, samples the binary grid, validates CRC32, reconstructs original
data, and allows download of files or display of text.
💾 File Transfer
Files are transferred as binary data without Base64 encoding overhead. Each file retains its
original filename, MIME type, and binary content. Large files are split across multiple frames with
CRC32 validation for each frame.
⚙️ Technical Details
Protocol: Custom frame-based protocol with magic bytes, version, transfer ID, frame
numbering, total frame count, data length, filename metadata, and CRC32 checksum.
Grid: 64 × 64 cells with four 8×8 calibration markers in corners for perspective
detection.
Redundancy: Supports out-of-order frames, duplicate detection, and missing frame
identification.
Error Detection: CRC32 on every frame ensures data integrity.
📊 Transfer Modes
Fast (500 ms/frame): Quick transfer but requires steady camera positioning.
Normal (1000 ms/frame): Balanced speed and reliability (recommended).
Reliable (1800 ms/frame): Slower but more robust for poor lighting or camera shake.
⚠️ Limitations
Camera access requires HTTPS or localhost. File:// protocol may not allow camera access in most
browsers due to security restrictions. Maximum reliable transfer distance: approximately 30-50 cm
depending on display and camera quality. Lighting conditions affect frame detection accuracy.