Project_Detail
All_Projects

HamCarousel

An FSK Data Carousel

View on GitHub
README.md

HamCarousel

Continuously rotating file carousel over FSK radio. Transmit files from an inbox folder; receive and reassemble them on the other end. Built for HackRF TX and RTL-SDR RX on Windows (MSYS2/MinGW64).

Features

  • Continuous carousel — files cycle endlessly, smallest-first
  • Direct FSK at user-selectable baud rates (default 12500)
  • AFSK mode (Bell 202: 1200/2200 Hz)
  • Callsign tagging — receiver identifies the transmitting station
  • Qt6 GUI for both TX and RX with progress bars, cycle tracking, kbps
  • Graceful recovery — receiver picks up partial files on next rotation
  • PID CAROUSEL STATUS — real-time carousel position embedded in every data packet

Hardware

Role Device
TX HackRF One
RX RTL-SDR (R820T2 or similar)

Building (MSYS2 MinGW64)

pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-hackrf \
          mingw-w64-x86_64-rtl-sdr mingw-w64-x86_64-qt6-base
make

Outputs go to build/. DLLs (libhackrf.dll, librtlsdr.dll, Qt6 DLLs, etc.) and the platforms/ folder must live next to the EXEs.

Usage

Transmitter (CLI)

build/file_tx.exe -F inbox -f 145100000 -b 12500 -k -c MYCALL
Flag Default Description
-F <dir> required Folder to scan for files
-f <Hz> 144390000 TX frequency
-b <baud> 1200 Baud rate
-k off Direct FSK mode (use for 4800+ baud)
-D <Hz> baud/2 FSK deviation
-c <call> N0CALL Callsign (max 6 chars)
-g <dB> 30 TX VGA gain (0–47)
-a <0–15> 15 Amplitude
-p off Disable TX amplifier

Receiver (CLI)

build/file_rx.exe -f 145100000 -b 12500 -k -o outbox

Received files land in outbox/. Press Ctrl+C to stop.

GUI

build/file_tx_gui.exe
build/file_rx_gui.exe

Both GUIs show per-file progress bars, carousel position, kbps, and elapsed time.

Protocol

FILE_LIST (type 0x01)

Sent at the start of each file and every 100 chunks within large files.

type(1) | cs_len(1) | callsign(N) | file_count(1) | [id(1) | name_len(1) | name(N) | size(4)]*

FILE_DATA (type 0x02)

type(1) | file_id(1) | chunk_id(2) | total_chunks(2) |
carousel_total(2) | carousel_pos(2) | data(≤500) | CRC(2)
  • file_id: unique ID per file in this carousel
  • chunk_id: 0-based chunk index
  • total_chunks: chunks in this file
  • carousel_total: total chunks across all files in cycle
  • carousel_pos: current position (0-based, wraps)

Each chunk carries up to 500 bytes of file data. CRC-16 protects the payload. HDLC framing with NRZI encoding and bit-stuffing.

How it works

  1. TX scans the inbox folder, sorts files smallest-first
  2. FILE_LIST packet announces available files and callsign
  3. Files are chunked into 500-byte pieces, each wrapped in FILE_DATA + HDLC
  4. Data modulates as direct FSK (±deviation) or AFSK (mark/space tones)
  5. RX demodulates, validates CRC, writes chunks to .part temporary files
  6. On file completion, .part renamed to final filename
  7. Carousel repeats — partial files fill in gaps with each rotation

Default modulation

  • Direct FSK: -k mode, 12500 baud, ±6250 Hz deviation, 2 Msps
  • AFSK: Bell 202, 1200 baud, 1200/2200 Hz mark/space, 2.4 Msps

Folder layout

FSK/
  *.cpp, *.h, Makefile   — source
  build/
    *.exe, *.dll         — binaries & runtime
    platforms/qwindows.dll
    inbox/               — files to transmit
    outbox/              — received files