https://github.com/roeelupo/sdr-chat
A lightweight Python & C application enabling reliable, two-way chat over software-defined radios (e.g. USRP B200mini/B205mini). Messages are framed with CRC-16, AES-256 encrypted, and exchanged using an RTS/CTS handshake to maximize link reliability.
https://github.com/roeelupo/sdr-chat
aes c chat crc cts-rts dsp encryption-decryption fsk python sdr
Last synced: about 2 months ago
JSON representation
A lightweight Python & C application enabling reliable, two-way chat over software-defined radios (e.g. USRP B200mini/B205mini). Messages are framed with CRC-16, AES-256 encrypted, and exchanged using an RTS/CTS handshake to maximize link reliability.
- Host: GitHub
- URL: https://github.com/roeelupo/sdr-chat
- Owner: RoeeLupo
- License: mit
- Created: 2025-06-18T12:26:19.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-06-20T18:59:57.000Z (4 months ago)
- Last Synced: 2025-08-21T03:02:50.604Z (about 2 months ago)
- Topics: aes, c, chat, crc, cts-rts, dsp, encryption-decryption, fsk, python, sdr
- Language: Python
- Homepage:
- Size: 151 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SDR-Chat
**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.
---
## Table of Contents
1. [Overview](#overview)
2. [Features](#features)
3. [Architecture & Design](#architecture--design)
4. [Requirements & Dependencies](#requirements--dependencies)
5. [Installation](#installation)
6. [Usage](#usage)
7. [Encryption & Security](#encryption--security)
8. [Protocol Details](#protocol-details)
9. [Error Handling & Diagnostics](#error-handling--diagnostics)
10. [License](#license)
11. [Author](#author)---
## Overview
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.
---
## Features
- **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.---
## Architecture & Design
```
+-----------+ +-----------+ +------------+ +----------+
| main.py | <--> | C module | <--> | UHD | <--> | SDR |
| (Python) | | (FSk) | | drivers | | hardware |
+-----------+ +-----------+ +------------+ +----------+
^
|
+--------+
| GUI UI |
+--------+
```---
## Requirements & Dependencies
- **Hardware**
- Ettus USRP B200mini or B205mini (other UHD-compatible radios may work).
- **Software**
- Python 3.8+
- UHD drivers & firmware
- C compiler (GCC/Clang)---
## Installation
1. **Clone the repo**
```bash
git clone https://github.com/roeelupo/sdr-chat.git
cd sdr-chat
```
2. **Build the projet**
```bash
pip install .
```---
## Usage
```bash
export AES_KEY=$(openssl rand -hex 16)
sdr-chat --help
```### CLI Mode
```bash
sdr-chat --aes-key $AES_KEY
sdr-chat --aes-key "d76df8"
```### GUI Mode
```bash
sdr-chat --aes-key $AES_KEY --gui
```---
## Encryption & Security
- **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.---
## Protocol Details
| 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.---
## Error Handling & Diagnostics
- **CRC Failures**: Logged to console/GUI; peer will automatically retransmit.
- **Timeouts**: If no CTS received within 500 ms, CLI retries handshake.---
## License
Distributed under the **MIT License**. See [LICENSE](https://github.com/RoeeLupo/sdr-chat/blob/master/LICENSE) for details.
---
## Author
**Roee Lupo**
– Self-Proclaimed Engineer & SDR Enthusiast
– [GitHub](https://github.com/roeelupo) · [roeelupo@roeelupo.com](mailto:roeelupo@roeelupo.com)