Go to file
2023-05-10 17:25:59 +09:30
data Shuffled some files around to clean things up a bit 2023-05-10 11:01:02 +09:30
dependencies Project cleanup 2023-05-10 17:03:49 +09:30
examples Shuffled some files around to clean things up a bit 2023-05-10 11:01:02 +09:30
utilities Project cleanup 2023-05-10 17:03:49 +09:30
.gitignore Project cleanup 2023-05-10 17:03:49 +09:30
filters.py Working FM radio demodulator for NESDR smart radio 2023-05-05 11:19:31 +09:30
fm_demod.py Modified the FM demodulator to work with all input stream formats 2023-05-10 17:02:39 +09:30
README.md Updated README and install instructions 2023-05-10 17:25:59 +09:30
requirements.txt Created an SDRPlay sample generator that is compatible with rtl_sdr interface 2023-05-10 14:06:04 +09:30
sdrplay_sample Modified the FM demodulator to work with all input stream formats 2023-05-10 17:02:39 +09:30
setup Updated README and install instructions 2023-05-10 17:25:59 +09:30

SDRPlay RSP1A demo code

This repository is a demo - it isn't a fully fleshed out system and isn't intended to be. Things might break. It also makes use of some 3rd-party code that we don't have a commercial licence for, so legally this can only be used for demonstration purposes, and only interally.

Getting started

  • Install the SDRPlay device driver & install the project dependencies.
    • ./SDRplay_RSP_API-Linux-3.07.1.run
    • Follow the prompts, there is some audience participation getting the driver installed.
    • Beyond that it should be mostly unattended. SoapySDR & plugins will be installed in the system directories.
  • Run the demos. The demo code is provided by SoapySDR and required minimal modification.
    • cd ./examples/
    • C++ demo: make && ./Example
    • Python demo: ./example.py

Using the radio

The project is currently structured as several independent scripts that pipe raw data to one another. It was easier to integrate everything this way, rather than trying to manage it all as one monolithic program.

nooelec/NESDR Smart

The NESDR Smart is a good starting place as it has a command line utility already, rtl_sdr. This is available as the system package rtl-sdr, which should be automatically installed by the ./setup script.

SDRPlay radio

The script ./sdrplay_sample was built to mimic the interface provided by rtl_sdr, and is nearly a slot in replacement but for the SDRPlay hardware. It is used for producing raw I/Q samples from the radio device, which (assuming you tune to a frequency where an FM radio station is available) can be piped into the FM demodulator fm_demod.py, which itself outputs raw PCM audio.

To run the whole chain at once, tuning to a radio station frequency, demodulating the IQ samples to PCM and rendering to the system audio sink, run the following:

# FM broadcasting is in the VHF Band II space -
# in Australia this is 87.5 MHz to 108 MHz. You can specify the
# frequency as either a plan integer (87500000) or using a suffix:
export station="87.5M"

# You'll want to replace that number with an actual radio station.

./sdrplay_sample -d sdrplay --format CS16 -f ${station} -s 384k | \
  ./fm_demod.py -f CS16 -s 384k -d 32k | \
  sox -t raw -r 32000 -b 16 -c 2 -L -e signed-integer - -d