4GFSK is a small C++ project for packetized file transfer experiments using a 4-level GFSK-style modem. It currently supports:
- packetization, CRC protection, and reassembly
- baseband simulation with AWGN, frequency offset, and timing offset
- SoapySDR-based over-the-air testing
- full-duplex self-loopback testing on SDR hardware
- a first-pass half-duplex runtime mode for future radio workflows
The current focus is proving out the transfer chain in simulation first, then validating it over the air with hardware such as a USRP B210.
Requirements:
- CMake 3.20+
- a C++20 compiler
pkg-configSoapySDRdevelopment files for OTA mode
Build:
cmake -S . -B build
cmake --build buildRun tests:
ctest --test-dir build --output-on-failureIf SoapySDR is available, OTA support is compiled in automatically. Otherwise, the project still builds and the simulation mode remains available.
Show help:
./build/gfsk_sim --helpKey options:
--mode <simulate|ota>selects software channel or SoapySDR OTA transfer--input <path>uses a real file as the transfer payload--generate-bytes <n>generates a synthetic payload for multi-packet testing--payload-bytes <n>controls packet payload size--duplex <full|half>selects OTA duplex mode--packet-repetitions <n>retransmits each OTA packet burstntimes--freq <Hz>sets OTA RF center frequency--tx-gain <dB>/--rx-gain <dB>set radio gain
Small default simulation:
./build/gfsk_sim --mode simulateLarger multi-packet simulation:
./build/gfsk_sim --mode simulate --generate-bytes 4096Simulation with impairments:
./build/gfsk_sim --mode simulate \
--generate-bytes 4096 \
--snr-db 30 \
--freq-offset 1200 \
--timing-offset 3Full-duplex self-test at 1250 MHz:
./build/gfsk_sim --mode ota \
--duplex full \
--device driver=uhd \
--freq 1250000000 \
--tx-gain 35 \
--rx-gain 35 \
--packet-repetitions 2 \
--generate-bytes 4096Half-duplex runtime example:
./build/gfsk_sim --mode ota \
--duplex half \
--device driver=uhd \
--freq 1250000000 \
--tx-gain 35 \
--rx-gain 35 \
--generate-bytes 4096 \
--turnaround-delay-ms 10Use --input yourfile.bin instead of --generate-bytes when you want to transfer a real file.
- OTA defaults are intentionally more conservative than simulation defaults.
- If you do not explicitly set them, OTA currently falls back to:
--symrate 125000--sps 4
- This gives a
500000sample/second path, which is safer for B210 full-duplex work than the earlier simulation-oriented defaults. - The OTA path currently transmits and receives packet bursts one packet at a time.
- If you are losing an occasional packet, increase
--packet-repetitionsto2or3before pushing the symbol rate higher.
Full duplex is the current validation path for same-radio self-test. That is the mode to use when one SDR is transmitting and receiving its own signal at the same time.
Half duplex is exposed now so the transport path is not locked to full duplex. It is better suited to future workflows involving a second radio, delayed response, or turn-taking rather than immediate same-radio loopback.
- Burst acquisition is still fairly simple and can lose packets under real RF conditions.
- The OTA path is a bounded burst capture, not a continuous packet detector.
- Gain, antenna selection, and physical isolation matter a lot for reliable decode.
- B210 over USB 2 can still be throughput-limited, especially at higher requested sample rates.
- This is an experimental transfer tool, not a hardened production modem.
include/fourgfsk/public headerssrc/modem, framing, simulation, OTA, and CLI implementationtests/regression tests