Skip to content
generated from RoeeLupo/template

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.

License

Notifications You must be signed in to change notification settings

RoeeLupo/sdr-chat

Repository files navigation

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
  2. Features
  3. Architecture & Design
  4. Requirements & Dependencies
  5. Installation
  6. Usage
  7. Encryption & Security
  8. Protocol Details
  9. Error Handling & Diagnostics
  10. License
  11. 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
    git clone https://github.com/roeelupo/sdr-chat.git
    cd sdr-chat
  2. Build the projet
    pip install .

Usage

export AES_KEY=$(openssl rand -hex 16)
sdr-chat --help

CLI Mode

sdr-chat --aes-key $AES_KEY
sdr-chat --aes-key "d76df8"

GUI Mode

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 for details.


Author

Roee Lupo
– Self-Proclaimed Engineer & SDR Enthusiast
GitHub · roeelupo@roeelupo.com

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published