{"id":28963755,"url":"https://github.com/jumpingkeycaps/ultrasonicfsk","last_synced_at":"2026-04-15T12:35:20.364Z","repository":{"id":295084499,"uuid":"989065928","full_name":"JumpingKeyCaps/UltrasonicFSK","owner":"JumpingKeyCaps","description":"Android POC enabling binary data transmission via ultrasound between two phones without synchronization or pairing, using binary FSK modulation and FFT (Fast Fourier Transform) ","archived":false,"fork":false,"pushed_at":"2025-06-21T02:11:34.000Z","size":714,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-21T03:27:15.211Z","etag":null,"topics":["android-app","compose","fast-fourier-transform","frequency-shift-keying","mvvm","ultrasonic"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JumpingKeyCaps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-23T13:58:29.000Z","updated_at":"2025-06-21T02:11:38.000Z","dependencies_parsed_at":"2025-05-23T16:05:51.113Z","dependency_job_id":null,"html_url":"https://github.com/JumpingKeyCaps/UltrasonicFSK","commit_stats":null,"previous_names":["jumpingkeycaps/ultrasonicfsk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JumpingKeyCaps/UltrasonicFSK","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumpingKeyCaps%2FUltrasonicFSK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumpingKeyCaps%2FUltrasonicFSK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumpingKeyCaps%2FUltrasonicFSK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumpingKeyCaps%2FUltrasonicFSK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JumpingKeyCaps","download_url":"https://codeload.github.com/JumpingKeyCaps/UltrasonicFSK/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumpingKeyCaps%2FUltrasonicFSK/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261601533,"owners_count":23183099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-app","compose","fast-fourier-transform","frequency-shift-keying","mvvm","ultrasonic"],"created_at":"2025-06-24T04:12:31.369Z","updated_at":"2025-10-30T21:23:32.436Z","avatar_url":"https://github.com/JumpingKeyCaps.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"screenshots/logoClear.png\" alt=\"Logo\" width=\"433\" height=\"333\"\u003e\n\u003c/p\u003e\n\n\n# UltrasonicFSK\n\n\u003e Android Proof-of-Concept to transmit binary data between two phones via **ultrasound**, without Bluetooth, Wi-Fi, or pairing.\n\n---\n\n\n ![Status](https://img.shields.io/badge/status-WIP-red)\n![Kotlin](https://img.shields.io/badge/Kotlin-7F52FF?logo=kotlin\u0026logoColor=white)\n![Jetpack Compose](https://img.shields.io/badge/Jetpack%20Compose-4285F4?logo=android\u0026logoColor=white)\n![Android Studio](https://img.shields.io/badge/Android%20Studio-3DDC84?logo=androidstudio\u0026logoColor=white)\n![MVVM](https://img.shields.io/badge/Architecture-MVVM-green)\n![Audio](https://img.shields.io/badge/AudioTrack%2FAudioRecord-PCM%2044.1kHz-yellow)\n![Custom FFT](https://img.shields.io/badge/FFT-Custom-lightgrey)\n\n\n\n\n## Overview\n\nThis Android POC demonstrates binary data transmission via ultrasound between two phones using basic binary FSK modulation, without any prior synchronization or pairing. The project handles environmental acoustic echoes.\n\nUltrasonicFSK converts a text message into **ultrasonic** signals using simple Frequency Shift Keying (FSK):\n\n- **bit 0** → 18,500 Hz  \n- **bit 1** → 18,700 Hz  \n- **bit duration** → 100 ms  \n\nThe receiving phone uses FFT (Fast Fourier Transform) to detect dominant frequencies in real-time and reconstruct the original message.\n\n### Performance\n\n2-FSK (10 bits/s) ---\u003e upgradable to 4-FSK, 8-FSK, ... N-FSK (within 13–20 kHz range) + possible multiplexing.\n\n---\n\n## Features\n\n### Transmitter\n\n- Converts ASCII text to binary\n- FSK encoding: each bit → frequency (0 or 1)\n- Playback using AudioTrack: each frequency is played for 100 ms per bit\n- Optional: preamble insertion (e.g., 10101010) to aid message start detection\n- Optional: checksum (e.g., XOR) for integrity verification\n\n### Receiver\n\n- Continuous capture with AudioRecord\n- Sliding FFT analysis (100 ms window, adjustable stride)\n- Detects the first significant dominant frequency (not necessarily the strongest – crucial with echoes)\n- Filters unexpected frequencies\n- Ignores secondary peaks (echoes/noise)\n- Rebuilds binary frame\n- Converts binary to ASCII text\n- Displays the message in real-time using Jetpack Compose UI\n\n### Echo Handling\n\nUltrasounds can reflect off walls/ceilings, producing delayed signal copies.\n\nImplemented solutions:\n\n- Fixed window: 100 ms per bit\n- Extract first significant spectral peak, not the strongest\n- Optional silence gap (e.g., 20 ms between bits) to let echoes decay\n- Minimum energy threshold to filter noise\n\n### Simplified Transmission Protocol\n\n- Preamble (e.g., 10101010) – marks start of message\n- Message encoded (ASCII → binary)\n- Checksum (simple XOR)\n- Frequency transmission, 100 ms per bit\n- Reception via FFT → frequency → bit → text\n- Long-range audible mode at 3000 Hz (8–10 meters)\n- Short-range ultrasonic mode at 18,500 Hz (1–3 meters)\n- Performance: 2-FSK 10 bits/s (upgradable to 4-FSK, 8-FSK, etc.)\n- Micro-protocol designed to maximize data efficiency within bandwidth limits\n\nFrame structure example:\n\n```\n[STX] [TYPE] [PAYLOAD] [CHECKSUM] [ETX]\n```\n\n- Start marker (STX) / Message type / Compressed payload / End marker (ETX)\n- Optionally uses a dictionary to encode frequent words or commands by index\n- Greatly reduces data size, improves latency and reliability\n- Simple, error-tolerant protocol for noisy environments\n\n---\n\n\n\n## Tech Stack\n\n| Composant         | Implementation                |\n|-------------------|-------------------------------|\n| Audio Output      | `AudioTrack` (PCM 44.1 kHz)   |\n| Audio Input       | `AudioRecord`                 |\n| Traitement        | FFT custom (maison)           |\n| UI                | Jetpack Compose               |\n| Architecture      | MVVM (ViewModel + StateFlow)  |\n\n\n\n---\n\n\n\n## Extras\n\n- Start/Stop bits for framing\n- Simple error correction (redundancy)\n- Real-time audio spectrum visualizer\n\n---\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjumpingkeycaps%2Fultrasonicfsk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjumpingkeycaps%2Fultrasonicfsk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjumpingkeycaps%2Fultrasonicfsk/lists"}