Encrypted, Bidirectional SDR Chat over FSK
A lightweight Python & C applicatoin enabling reliable, two-way chat over software-defined radios (e.g. USRP B205mini). Messages are framed with CRC-16, AES-256 encrypted, and exchanged using an RTS/CTS handshake to maximize link reliability.
- Overview
- Features
- Architecture & Design
- Requirements & Dependencies
- Installation
- Usage
- Encryption & Security
- Protocol Details
- Error Handling & Diagnostics
- License
- Author
SDR-Chat turns a USRP SDR into a secure text chat device. It combines Python for control and GUI, C for performance-critical modulation/demodulation, and UHD for radio interfacing.
- FSK Modulation & Demodulation
FSK at configurable baud rates. - AES-256 Encryption
Encrypting every message payload. - CRC-16 Error Detection
Catching transmission errors before decryption. - RTS/CTS Handshake
Simple link-establishment protocol to avoid collisions. - CLI & GUI Frontends
Lightweight terminal mode or a minimal GUI. - Configurable Parameters
Frequency, gain, baud rate, preamble length, and more via flags or config file.
+-----------+ +-----------+ +------------+ +----------+
| main.py | <--> | C module | <--> | UHD | <--> | SDR |
| (Python) | | (FSk) | | drivers | | hardware |
+-----------+ +-----------+ +------------+ +----------+
^
|
+--------+
| GUI UI |
+--------+
- Hardware
- Ettus USRP B200mini or B205mini (other UHD-compatible radios may work).
- Software
- Python 3.8+
- UHD drivers & firmware
- C compiler (GCC/Clang)
- Clone the repo
git clone https://github.com/roeelupo/sdr-chat.git cd sdr-chat - Build the projet
pip install .
export AES_KEY=$(openssl rand -hex 16)
sdr-chat --helpsdr-chat --aes-key $AES_KEY
sdr-chat --aes-key "d76df8"sdr-chat --aes-key $AES_KEY --gui- AES-256-CBC for payload confidentiality.
- Each message includes a random IV—prepended to the ciphertext.
- Pre-shared key or config file specifies AES key.
| Field | Size | Description |
|---|---|---|
| Preamble | 16 bits | 0xAA55 pattern for sync |
| Header | 8 bits | Payload length & flags |
| Payload | 0–256 bytes | AES-encrypted message |
| CRC-16 | 16 bits | CRC-16 of header+payload |
- FSK frequencies: mark = +5 kHz, space = –5 kHz offset by center frequency.
- RTS/CTS: short control frames before data exchange to reserve the channel.
- CRC Failures: Logged to console/GUI; peer will automatically retransmit.
- Timeouts: If no CTS received within 500 ms, CLI retries handshake.
Distributed under the MIT License. See LICENSE for details.
Roee Lupo
– Self-Proclaimed Engineer & SDR Enthusiast
– GitHub · roeelupo@roeelupo.com