Skip to content

Commit e9bf6aa

Browse files
committed
docs: add acoustic packet structure table to README
1 parent e0ddcdb commit e9bf6aa

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,26 @@ This project allows two devices to communicate with each other completely offlin
4747
3. **Decoding**: The receiver continuously polls audio data via an `AnalyserNode` performing Fast Fourier Transforms (FFT). It detects the handshake using SNR, precisely aligns itself using the Sync Preamble, and then records the strongest frequencies over time to rebuild the packet.
4848
4. **Verification**: Once a packet is received, its CRC32 is checked. If it matches, the data is pushed to the final payload.
4949

50+
### Acoustic Packet Structure
51+
52+
Each transmission is stripped into 64-byte maximum payloads and wrapped in a 10-byte protocol envelope before being sent over the air as FSK audio:
53+
54+
| Segment | Size | Description |
55+
|---|---|---|
56+
| `chunkIndex` | 2 bytes | The 0-based index of the current chunk |
57+
| `totalChunks`| 2 bytes | Total count of chunks in the transmission |
58+
| `payloadLen` | 2 bytes | Length of the data payload in this packet |
59+
| `payload` | 0-64 bytes | The raw data payload slice |
60+
| `crc32` | 4 bytes | 32-bit checksum of the header and payload |
61+
5062
## Limitations & Future Ideas
5163

5264
- **Bitrate**: Current speeds are around ~37 bps. Future versions will optimize the DSP loop to increase throughput.
5365
- **Distance**: Environmental noise heavily impacts reliability. Devices must be relatively close in a quiet room for uncorrupted transmission. Error correction coding (like Reed-Solomon) is planned to recover flipped bits automatically.
5466

5567
## Deployment
5668

57-
This repository includes a GitHub Action for deploying natively to GitHub Pages (`.github/workflows/deploy.yml`). It also includes a `netlify.toml` for easy deployment to Netlify.
69+
This repository includes a GitHub Action for deploying natively to GitHub Pages (`.github/workflows/deploy.yml`).
5870

5971
---
6072
*Developed by Asmith — asmyth@duck.com*

0 commit comments

Comments
 (0)