Experimental R820T/R820T2 rtl-sdr tuner driver that tunes down to 13 MHz or lower.
(From my experiments up to 3.4 MHz on R820T2)
Realtek RTL2832U based hardware can be used as a cheap SDR (Software-defined radio).
This device allows transferring the raw I/Q samples to the your PC/laptop/etc via USB.
History:
2017-2018: Transferring/Backporting new features from new versions and fixes...
2021: Project is now using only cmake build system.
Integrated RTL_NFC code from https://github.com/Iskuri/RTLSDR-NFC
2022-2023: more fixes, add's, and improvements.
Debian/Ubuntu:
sudo apt install build-essential pkg-config cmake git libusb-1.0-0-dev
Arch/Manjaro:
Note: package has added to the AUR, or you can use PKGBUILD.
pacman -S cmake libusb
Visual Studio or MinGW/msys/LLVM Clang MinGW etc...
libusb libusb/releases
pthread-win32 library
Latest CMake or Old CMake for 2003/XP
Recommented for use: Precompiled static libs (build kit)
brew install libusb pkg-config cmake
git clone https://github.com/Mr-Precise/rtl-sdr/
cd rtl-sdr
run cmake and start compilation. cmake will accept some options, e.g.
-DINSTALL_UDEV_RULES=ON
, default isOFF
-DDETACH_KERNEL_DRIVER=ON
, default isOFF
-DENABLE_ZEROCOPY=ON
, default isOFF
-DLINK_RTL_APPS_WITH_STATIC_LIB=ON
, default isOFF
-DINSTALL_STATIC_LIB=ON
, default isON
all cmake options are optional
-DCMAKE_INSTALL_PREFIX=/usr
default install prefix on ubuntu.
mkdir build && cd build
cmake .. -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
using make utility:
make -j$(($(nproc) + 1))
or build using cmake:
cmake --build . --config Release
setup into prefix, usually will require sudo
:
sudo make install
sudo ldconfig
or build & install using cmake:
cmake --build . --config Release --target install
or if you manually build the package from the directory:
make install DESTDIR=build_folder_name
Latest releases builds - for Linux (amd64, i386, amrhf, arm64), macOS intel, Windows: (x86 32/64 + ARM64 MSVC and MinGW cross-builds), Android.
GitHub Actions builds - for Linux amd64 and macOS.
Nightly releases builds - for Linux, macOS, Windows: MSVC and MinGW cross-builds.
- Gqrx
- SDR++
- GNU Radio
- OpenWebRX
- SDRSharp
- CubicSDR
- HDSDR and other Winrad compatible programs using ExtIO_RTL
- etc
- a special USB vendor/product id got reserved at http://pid.codes/ : 0x1209/0x2832
- for such devices the linux kernel's DVB modules are not loaded automatically, thus can be used without blacklisting dvb_usb_rtl28xxu below /etc/modprobe.d/
- this allows to use a second RTL dongle for use with DVB in parallel
- the IDs can be programmed with 'rtl_eeprom -n' or 'rtl_eeprom -g realtek_sdr'
If using find_package:
find_package(rtlsdr REQUIRED)
target_link_libraries(${PROJECT_NAME}
rtlsdr::rtlsdr_static #static library
rtlsdr::rtlsdr_shared #shared library
)
If using pkg_check_modules:
find_package(PkgConfig)
pkg_check_modules(RTLSDR librtlsdr REQUIRED)
include_directories(${RTLSDR_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME}
${RTLSDR_LIBRARIES}
)
If used as a git submodule:
add_subdirectory(rtl-sdr)
include_directories(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/rtl-sdr/include
${CMAKE_CURRENT_SOURCE_DIR}/rtl-sdr/src
)
target_link_libraries(${PROJECT_NAME}
rtlsdr_shared
rtlsdr_static #for static link
convenience_static #only for static link
)
Based on developments by Oliver Jowett from mutability repo