1
0
Fork 0
Software decoder for FM broadcast radio with RTL-SDR
Go to file
Divye Kapoor e9fe05c4ea Be accurate in disallowing sampling rates in SoftFM.
The rtl-sdr driver code disallows most of the sampling rates below
900 kS/s. However, it allows a small window of sampling rates
between [250001, 300000]. The update to the conditional is along
the lines of the conditions imposed by the RTL SDR driver here:

http://cgit.osmocom.org/rtl-sdr/tree/src/librtlsdr.c

The default sampling rate of 1 MS/s causes severe buffer underruns on
a Raspberry Pi 2. However choosing a sampling rate of 250 kS/s and
lower values for PCM sampling causes successful FM demodulation of
strong FM stations on the device.
2015-11-21 08:20:44 +00:00
AudioOutput.cc Trivial cleanups in header files. 2014-01-03 22:00:31 +01:00
AudioOutput.h Fix incorrect use of uint8_t, FILE, etc. outside std namespace. 2014-01-19 11:43:22 +01:00
CMakeLists.txt Add pthread library in CMakeList. This is required for C++11 threads. 2015-06-02 20:45:37 +02:00
Filter.cc Very slight speed improvement in FIR filters. 2013-12-31 15:19:14 +01:00
Filter.h Code cleanups. 2013-12-31 00:29:52 +01:00
FmDecode.cc Wait a bit longer before accepting stereo lock. 2014-05-29 18:28:59 +02:00
FmDecode.h Pilot PPS logging works. 2014-01-19 15:49:43 +01:00
NOTES.txt Removed failed ideas from TODO list. 2014-05-31 21:07:04 +02:00
README Add note about RTL-SDR version 0.5.3. 2014-05-29 14:42:21 +02:00
RtlSdrSource.cc Implement command-line option for LNA gain. 2014-01-26 20:31:38 +01:00
RtlSdrSource.h Implement command-line option for LNA gain. 2014-01-26 20:31:38 +01:00
SoftFM.h Remove distinction between Coeff and Sample types; they are always the same floating point type. 2013-12-29 00:44:10 +01:00
TODO.txt Removed failed ideas from TODO list. 2014-05-31 21:07:04 +02:00
main.cc Be accurate in disallowing sampling rates in SoftFM. 2015-11-21 08:20:44 +00:00
pyfm.py Add RDS demodulation stuff to pyfm.py. 2014-05-29 19:19:19 +02:00

README

  SoftFM - Software decoder for FM broadcast radio with RTL-SDR
 ---------------------------------------------------------------

SoftFM is a software-defined radio receiver for FM broadcast radio.
It is written in C++ and uses RTL-SDR to interface with RTL2832-based
hardware.

This program is mostly an experiment rather than a useful tool.
The purposes of SoftFM are
 * experimenting with digital signal processing and software radio;
 * investigating the stability of the 19 kHz pilot;
 * doing the above while listening to my favorite radio station.

Having said that, SoftFM actually produces pretty good stereo sound
when receiving a strong radio station.  Weak stations are noisy,
but SoftFM gets much better results than rtl_fm (bundled with RTL-SDR)
and the few GNURadio-based FM receivers I have seen.

SoftFM provides:
 * mono or stereo decoding of FM broadcasting stations
 * real-time playback to soundcard or dumping to file
 * command-line interface (no GUI, no visualization, nothing fancy)

SoftFM requires:
 * Linux
 * C++11
 * RTL-SDR library (http://sdr.osmocom.org/trac/wiki/rtl-sdr)
 * supported DVB-T receiver
 * medium-fast computer (SoftFM takes 25% CPU time on my 1.6 GHz Core i3)
 * medium-strong FM radio signal

For the latest version, see https://github.com/jorisvr/SoftFM


  Installing
  ----------

The Osmocom RTL-SDR library must be installed before you can build SoftFM.
See http://sdr.osmocom.org/trac/wiki/rtl-sdr for more information.
SoftFM has been tested successfully with RTL-SDR 0.5.3.

To install SoftFM, download and unpack the source code and go to the
top level directory. Then do like this:

 $ mkdir build
 $ cd build
 $ cmake ..

 # CMake tries to find librtlsdr. If this fails, you need to specify
 # the location of the library in one the following ways:
 #
 #  $ cmake .. -DCMAKE_INSTALL_PREFIX=/path/rtlsdr
 #  $ cmake .. -DRTLSDR_INCLUDE_DIR=/path/rtlsdr/include -DRTLSDR_LIBRARY_PATH=/path/rtlsdr/lib/librtlsdr.a
 #  $ PKG_CONFIG_PATH=/path/rtlsdr/lib/pkgconfig cmake ..

 $ make

 $ ./softfm -f <radio-frequency-in-Hz>

 # ( enjoy music )


  License
  -------

SoftFM, copyright (C) 2013, Joris van Rantwijk

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, see http://www.gnu.org/licenses/gpl-2.0.html

--