forked from pool/rtl-sdr
Accepting request 1122951 from home:mnhauke:sdr-devel
- Update to version 2.0.0 * add direct sampling to rtl_sdr * add -D direct sampling flag to rtl_tcp * add blog v4 upconverter gpio switch * fix rtl_tcp error on windows when hints not initialized to 0 * add rtl-sdr blog v4 support * Fix signal handler from getting stuck in an endless loop * lib: Stop applying workaround for libusb < 1.0.9 * lib: force wait state after cancel of usb transfer * rtl_fm: add a new option to select 2nd direct sampling mode * rtl_tcp: put new DEFAULT_* constants in defines * rtl_tcp: Extracted some constants out of printf strings * cmake: populate pkgconfig file with prefix * Add rtl_biast as install target * tuner_r82xx: fix short-write in r82xx_read * Fix for CMake < 3.12.0 * Add missing rtlsdrConfig.cmake * rtl_tcp: Initialize listensocket * rtl_tcp: Add IPv6 support * Use udev uaccess rules * rtl_fm/rtl_power: Improve scanning range parsing * Improve librtlsdr.pc file * lib: enable better UHF reception (>862MHz) for FC0013 * set CMake policy CMP0075 if it exists * rtl_biast: Add rtl_biast * lib: Add GPIO version of the bias tee configuration API * rtl_eeprom: fix warnings * lib: disable usbfs zero-copy support by default * lib: fix memory leak in rtlsdr_open() * lib: Add workaround for Linux usbfs mmap() bug OBS-URL: https://build.opensuse.org/request/show/1122951 OBS-URL: https://build.opensuse.org/package/show/hardware:sdr/rtl-sdr?expand=0&rev=24
This commit is contained in:
parent
20ffe1db6c
commit
7cca92a581
@ -1,19 +1,19 @@
|
|||||||
From b174a5f400f08b04c7595eaabf21484c5c689967 Mon Sep 17 00:00:00 2001
|
From 9a2803f3d003b232e64a9d460d0ce0c78dc4f5b6 Mon Sep 17 00:00:00 2001
|
||||||
From: Martin Hauke <mardnh@gmx.de>
|
From: Martin Hauke <mardnh@gmx.de>
|
||||||
Date: Sat, 15 Apr 2017 20:20:36 +0200
|
Date: Thu, 2 Nov 2023 20:27:06 +0100
|
||||||
Subject: [PATCH] Better udev-handling
|
Subject: [PATCH] Better udev handling
|
||||||
|
|
||||||
---
|
---
|
||||||
CMakeLists.txt | 69 +++++++++++++++++++++++++++-----
|
CMakeLists.txt | 69 +++++++++++++++++++++----
|
||||||
rtl-sdr.rules => rtl-sdr.rules.in | 84 +++++++++++++++++++--------------------
|
rtl-sdr.rules => rtl-sdr.rules.in | 84 +++++++++++++++----------------
|
||||||
2 files changed, 101 insertions(+), 52 deletions(-)
|
2 files changed, 101 insertions(+), 52 deletions(-)
|
||||||
rename rtl-sdr.rules => rtl-sdr.rules.in (73%)
|
rename rtl-sdr.rules => rtl-sdr.rules.in (62%)
|
||||||
|
|
||||||
Index: rtl-sdr-0.5.3+git.20170919/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
===================================================================
|
index bd7b143..50b7d13 100644
|
||||||
--- rtl-sdr-0.5.3+git.20170919.orig/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ rtl-sdr-0.5.3+git.20170919/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -105,16 +105,65 @@ add_custom_target(uninstall
|
@@ -106,16 +106,65 @@ add_custom_target(uninstall
|
||||||
########################################################################
|
########################################################################
|
||||||
# Install udev rules
|
# Install udev rules
|
||||||
########################################################################
|
########################################################################
|
||||||
@ -89,297 +89,183 @@ Index: rtl-sdr-0.5.3+git.20170919/CMakeLists.txt
|
|||||||
|
|
||||||
option(DETACH_KERNEL_DRIVER "Detach kernel driver if loaded" OFF)
|
option(DETACH_KERNEL_DRIVER "Detach kernel driver if loaded" OFF)
|
||||||
if (DETACH_KERNEL_DRIVER)
|
if (DETACH_KERNEL_DRIVER)
|
||||||
Index: rtl-sdr-0.5.3+git.20170919/rtl-sdr.rules
|
diff --git a/rtl-sdr.rules b/rtl-sdr.rules.in
|
||||||
===================================================================
|
similarity index 62%
|
||||||
--- rtl-sdr-0.5.3+git.20170919.orig/rtl-sdr.rules
|
rename from rtl-sdr.rules
|
||||||
+++ /dev/null
|
rename to rtl-sdr.rules.in
|
||||||
@@ -1,142 +0,0 @@
|
index 83fca70..4c0bec6 100644
|
||||||
-#
|
--- a/rtl-sdr.rules
|
||||||
-# Copyright 2012-2013 Osmocom rtl-sdr project
|
+++ b/rtl-sdr.rules.in
|
||||||
-#
|
@@ -16,127 +16,127 @@
|
||||||
-# 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 3 of the License, or
|
# original RTL2832U vid/pid (hama nano, for example)
|
||||||
-# (at your option) any later version.
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-#
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# This program is distributed in the hope that it will be useful,
|
|
||||||
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc.
|
||||||
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# GNU General Public License for more details.
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-#
|
|
||||||
-# You should have received a copy of the GNU General Public License
|
# DigitalNow Quad DVB-T PCI-E card (4x FC0012?)
|
||||||
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-#
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# original RTL2832U vid/pid (hama nano, for example)
|
# Leadtek WinFast DTV Dongle mini D (FC0012)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc.
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666"
|
# Genius TVGo DVB-T03 USB dongle (Ver. B)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# DigitalNow Quad DVB-T PCI-E card (4x FC0012?)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", MODE:="0666"
|
|
||||||
-
|
# Terratec Cinergy T Stick Black (rev 1) (FC0012)
|
||||||
-# Leadtek WinFast DTV Dongle mini D (FC0012)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# Genius TVGo DVB-T03 USB dongle (Ver. B)
|
# Terratec NOXON rev 1 (FC0013)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Terratec Cinergy T Stick Black (rev 1) (FC0012)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", MODE:="0666"
|
# Terratec Deutschlandradio DAB Stick (FC0013)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# Terratec NOXON rev 1 (FC0013)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", MODE:="0666"
|
|
||||||
-
|
# Terratec NOXON DAB Stick - Radio Energy (FC0013)
|
||||||
-# Terratec Deutschlandradio DAB Stick (FC0013)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# Terratec NOXON DAB Stick - Radio Energy (FC0013)
|
# Terratec Media Broadcast DAB Stick (FC0013)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Terratec Media Broadcast DAB Stick (FC0013)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b7", MODE:="0666"
|
# Terratec BR DAB Stick (FC0013)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# Terratec BR DAB Stick (FC0013)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b8", MODE:="0666"
|
|
||||||
-
|
# Terratec WDR DAB Stick (FC0013)
|
||||||
-# Terratec WDR DAB Stick (FC0013)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# Terratec MuellerVerlag DAB Stick (FC0013)
|
# Terratec MuellerVerlag DAB Stick (FC0013)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Terratec Fraunhofer DAB Stick (FC0013)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", MODE:="0666"
|
# Terratec Fraunhofer DAB Stick (FC0013)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# Terratec Cinergy T Stick RC (Rev.3) (E4000)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", MODE:="0666"
|
|
||||||
-
|
# Terratec Cinergy T Stick RC (Rev.3) (E4000)
|
||||||
-# Terratec T Stick PLUS (E4000)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# Terratec NOXON rev 2 (E4000)
|
# Terratec T Stick PLUS (E4000)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# PixelView PV-DT235U(RN) (FC0012)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", MODE:="0666"
|
# Terratec NOXON rev 2 (E4000)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# Astrometa DVB-T/DVB-T2 (R828D)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", MODE:="0666"
|
|
||||||
-
|
# PixelView PV-DT235U(RN) (FC0012)
|
||||||
-# HanfTek DAB+FM+DVB-T
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0133", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# Compro Videomate U620F (E4000)
|
# Astrometa DVB-T/DVB-T2 (R828D)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Compro Videomate U650F (E4000)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", MODE:="0666"
|
# HanfTek DAB+FM+DVB-T
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0133", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# Compro Videomate U680F (E4000)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0133", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", MODE:="0666"
|
|
||||||
-
|
# Compro Videomate U620F (E4000)
|
||||||
-# GIGABYTE GT-U7300 (FC0012)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# DIKOM USB-DVBT HD
|
# Compro Videomate U650F (E4000)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Peak 102569AGPK (FC0012)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", MODE:="0666"
|
# Compro Videomate U680F (E4000)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# KWorld KW-UB450-T USB DVB-T Pico TV (TUA9001)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", MODE:="0666"
|
|
||||||
-
|
# GIGABYTE GT-U7300 (FC0012)
|
||||||
-# Zaapa ZT-MINDVBZP (FC0012)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# SVEON STV20 DVB-T USB & FM (FC0012)
|
# DIKOM USB-DVBT HD
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Twintech UT-40 (FC0013)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", MODE:="0666"
|
# Peak 102569AGPK (FC0012)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# ASUS U3100MINI_PLUS_V2 (FC0013)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", MODE:="0666"
|
|
||||||
-
|
# KWorld KW-UB450-T USB DVB-T Pico TV (TUA9001)
|
||||||
-# SVEON STV27 DVB-T USB & FM (FC0013)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# SVEON STV21 DVB-T USB & FM
|
# Zaapa ZT-MINDVBZP (FC0012)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Dexatek DK DVB-T Dongle (Logilink VG0002A) (FC2580)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", MODE:="0666"
|
# SVEON STV20 DVB-T USB & FM (FC0012)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# Dexatek DK DVB-T Dongle (MSI DigiVox mini II V3.0)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", MODE:="0666"
|
|
||||||
-
|
# Twintech UT-40 (FC0013)
|
||||||
-# Dexatek DK 5217 DVB-T Dongle (FC2580)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# MSI DigiVox Micro HD (FC2580)
|
# ASUS U3100MINI_PLUS_V2 (FC0013)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# Sweex DVB-T USB (FC0012)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", MODE:="0666"
|
# SVEON STV27 DVB-T USB & FM (FC0013)
|
||||||
-
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-# GTek T803 (FC0012)
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", MODE:="0666"
|
|
||||||
-
|
# SVEON STV21 DVB-T USB & FM
|
||||||
-# Lifeview LV5TDeluxe (FC0012)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", MODE:="0666"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-
|
|
||||||
-# MyGica TD312 (FC0012)
|
# Dexatek DK DVB-T Dongle (Logilink VG0002A) (FC2580)
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", MODE:="0666"
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
-
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
-# PROlectrix DV107669 (FC0012)
|
|
||||||
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", MODE:="0666"
|
# Dexatek DK DVB-T Dongle (MSI DigiVox mini II V3.0)
|
||||||
Index: rtl-sdr-0.5.3+git.20170919/rtl-sdr.rules.in
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
===================================================================
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
--- /dev/null
|
|
||||||
+++ rtl-sdr-0.5.3+git.20170919/rtl-sdr.rules.in
|
# Dexatek DK 5217 DVB-T Dongle (FC2580)
|
||||||
@@ -0,0 +1,142 @@
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
+#
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
+# Copyright 2012-2013 Osmocom rtl-sdr project
|
|
||||||
+#
|
# MSI DigiVox Micro HD (FC2580)
|
||||||
+# This program is free software: you can redistribute it and/or modify
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
+# it under the terms of the GNU General Public License as published by
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
+# the Free Software Foundation, either version 3 of the License, or
|
|
||||||
+# (at your option) any later version.
|
# Sweex DVB-T USB (FC0012)
|
||||||
+#
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
+# This program is distributed in the hope that it will be useful,
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# GTek T803 (FC0012)
|
||||||
+# GNU General Public License for more details.
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
+#
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
+# You should have received a copy of the GNU General Public License
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# Lifeview LV5TDeluxe (FC0012)
|
||||||
+#
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
+
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
+# original RTL2832U vid/pid (hama nano, for example)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
# MyGica TD312 (FC0012)
|
||||||
+
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
+# RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc.
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
# PROlectrix DV107669 (FC0012)
|
||||||
+# DigitalNow Quad DVB-T PCI-E card (4x FC0012?)
|
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="@RTLSDR_GROUP@"
|
||||||
+
|
--
|
||||||
+# Leadtek WinFast DTV Dongle mini D (FC0012)
|
2.42.0
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Genius TVGo DVB-T03 USB dongle (Ver. B)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec Cinergy T Stick Black (rev 1) (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec NOXON rev 1 (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec Deutschlandradio DAB Stick (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec NOXON DAB Stick - Radio Energy (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec Media Broadcast DAB Stick (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b7", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec BR DAB Stick (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b8", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec WDR DAB Stick (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec MuellerVerlag DAB Stick (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec Fraunhofer DAB Stick (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec Cinergy T Stick RC (Rev.3) (E4000)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec T Stick PLUS (E4000)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Terratec NOXON rev 2 (E4000)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# PixelView PV-DT235U(RN) (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Astrometa DVB-T/DVB-T2 (R828D)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# HanfTek DAB+FM+DVB-T
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0133", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Compro Videomate U620F (E4000)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Compro Videomate U650F (E4000)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Compro Videomate U680F (E4000)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# GIGABYTE GT-U7300 (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# DIKOM USB-DVBT HD
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Peak 102569AGPK (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# KWorld KW-UB450-T USB DVB-T Pico TV (TUA9001)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Zaapa ZT-MINDVBZP (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# SVEON STV20 DVB-T USB & FM (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Twintech UT-40 (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# ASUS U3100MINI_PLUS_V2 (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# SVEON STV27 DVB-T USB & FM (FC0013)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# SVEON STV21 DVB-T USB & FM
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Dexatek DK DVB-T Dongle (Logilink VG0002A) (FC2580)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Dexatek DK DVB-T Dongle (MSI DigiVox mini II V3.0)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Dexatek DK 5217 DVB-T Dongle (FC2580)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# MSI DigiVox Micro HD (FC2580)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Sweex DVB-T USB (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# GTek T803 (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# Lifeview LV5TDeluxe (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# MyGica TD312 (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
+
|
|
||||||
+# PROlectrix DV107669 (FC0012)
|
|
||||||
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", MODE:="0660", GROUP="@RTLSDR_GROUP@"
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:80a5155f3505bca8f1b808f8414d7dcd7c459b662a1cde84d3a2629a6e72ae55
|
|
||||||
size 134289
|
|
@ -1,51 +0,0 @@
|
|||||||
From f68bb2fa772ad94f58c59babd78353667570630b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steve Markgraf <steve@steve-m.de>
|
|
||||||
Date: Sun, 7 Oct 2018 01:16:07 +0200
|
|
||||||
Subject: [PATCH] lib: Add workaround for Linux usbfs mmap() bug
|
|
||||||
|
|
||||||
The Linux Kernel has a bug on ARM/ARM64 systems where the USB CMA
|
|
||||||
memory is incorrectly mapped to userspace, breaking zerocopy.
|
|
||||||
|
|
||||||
When the Kernel allocates the memory, it clears it with memset().
|
|
||||||
If the mapping worked correctly, we should have zeroed out buffers,
|
|
||||||
if it doesn't, we get random Kernel memory. We now check for this,
|
|
||||||
and fall back to buffers in userspace if that's the case.
|
|
||||||
|
|
||||||
Signed-off-by: Steve Markgraf <steve@steve-m.de>
|
|
||||||
---
|
|
||||||
src/librtlsdr.c | 19 +++++++++++++++++--
|
|
||||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/librtlsdr.c b/src/librtlsdr.c
|
|
||||||
index 433ed5b..89ec903 100644
|
|
||||||
--- a/src/librtlsdr.c
|
|
||||||
+++ b/src/librtlsdr.c
|
|
||||||
@@ -1755,11 +1755,26 @@ static int _rtlsdr_alloc_async_buffers(rtlsdr_dev_t *dev)
|
|
||||||
for (i = 0; i < dev->xfer_buf_num; ++i) {
|
|
||||||
dev->xfer_buf[i] = libusb_dev_mem_alloc(dev->devh, dev->xfer_buf_len);
|
|
||||||
|
|
||||||
- if (!dev->xfer_buf[i]) {
|
|
||||||
+ if (dev->xfer_buf[i]) {
|
|
||||||
+ /* Check if Kernel usbfs mmap() bug is present: if the
|
|
||||||
+ * mapping is correct, the buffers point to memory that
|
|
||||||
+ * was memset to 0 by the Kernel, otherwise, they point
|
|
||||||
+ * to random memory. We check if the buffers are zeroed
|
|
||||||
+ * and otherwise fall back to buffers in userspace.
|
|
||||||
+ */
|
|
||||||
+ if (dev->xfer_buf[i][0] || memcmp(dev->xfer_buf[i],
|
|
||||||
+ dev->xfer_buf[i] + 1,
|
|
||||||
+ dev->xfer_buf_len - 1)) {
|
|
||||||
+ fprintf(stderr, "Detected Kernel usbfs mmap() "
|
|
||||||
+ "bug, falling back to buffers "
|
|
||||||
+ "in userspace\n");
|
|
||||||
+ dev->use_zerocopy = 0;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
fprintf(stderr, "Failed to allocate zero-copy "
|
|
||||||
"buffer for transfer %d\nFalling "
|
|
||||||
"back to buffers in userspace\n", i);
|
|
||||||
-
|
|
||||||
dev->use_zerocopy = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
From be1d1206bfb6e6c41f7d91b20b77e20f929fa6a7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steve Markgraf <steve@steve-m.de>
|
|
||||||
Date: Tue, 16 Jul 2019 23:31:31 +0200
|
|
||||||
Subject: [PATCH] lib: fix memory leak in rtlsdr_open()
|
|
||||||
|
|
||||||
Thanks to Vincent Perrier for reporting the bug.
|
|
||||||
---
|
|
||||||
src/librtlsdr.c | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/librtlsdr.c b/src/librtlsdr.c
|
|
||||||
index 89ec903..d72a0f5 100644
|
|
||||||
--- a/src/librtlsdr.c
|
|
||||||
+++ b/src/librtlsdr.c
|
|
||||||
@@ -1628,6 +1628,9 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
|
|
||||||
return 0;
|
|
||||||
err:
|
|
||||||
if (dev) {
|
|
||||||
+ if (dev->devh)
|
|
||||||
+ libusb_close(dev->devh);
|
|
||||||
+
|
|
||||||
if (dev->ctx)
|
|
||||||
libusb_exit(dev->ctx);
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From 3c263b745121d9f4df95fd06910a00eba98a2f11 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steve Markgraf <steve@steve-m.de>
|
|
||||||
Date: Fri, 1 Nov 2019 02:18:54 +0100
|
|
||||||
Subject: [PATCH] rtl_eeprom: fix warnings
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Account for \0 string terminator when calling strncpy().
|
|
||||||
|
|
||||||
Fixes the following GCC 9 warning:
|
|
||||||
warning: ‘__builtin_strncpy’ specified
|
|
||||||
bound 256 equals destination size
|
|
||||||
---
|
|
||||||
src/rtl_eeprom.c | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/rtl_eeprom.c b/src/rtl_eeprom.c
|
|
||||||
index f562d73..24be900 100644
|
|
||||||
--- a/src/rtl_eeprom.c
|
|
||||||
+++ b/src/rtl_eeprom.c
|
|
||||||
@@ -370,14 +370,14 @@ int main(int argc, char **argv)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (manuf_str)
|
|
||||||
- strncpy((char*)&conf.manufacturer, manuf_str, MAX_STR_SIZE);
|
|
||||||
+ strncpy((char*)&conf.manufacturer, manuf_str, MAX_STR_SIZE - 1);
|
|
||||||
|
|
||||||
if (product_str)
|
|
||||||
- strncpy((char*)&conf.product, product_str, MAX_STR_SIZE);
|
|
||||||
+ strncpy((char*)&conf.product, product_str, MAX_STR_SIZE - 1);
|
|
||||||
|
|
||||||
if (serial_str) {
|
|
||||||
conf.have_serial = 1;
|
|
||||||
- strncpy((char*)&conf.serial, serial_str, MAX_STR_SIZE);
|
|
||||||
+ strncpy((char*)&conf.serial, serial_str, MAX_STR_SIZE - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ir_endpoint != 0)
|
|
@ -1,181 +0,0 @@
|
|||||||
diff --git a/include/rtl-sdr.h b/include/rtl-sdr.h
|
|
||||||
index 3ed13ae..d64701e 100644
|
|
||||||
--- a/include/rtl-sdr.h
|
|
||||||
+++ b/include/rtl-sdr.h
|
|
||||||
@@ -389,6 +389,17 @@ RTLSDR_API int rtlsdr_cancel_async(rtlsdr_dev_t *dev);
|
|
||||||
*/
|
|
||||||
RTLSDR_API int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on);
|
|
||||||
|
|
||||||
+/*!
|
|
||||||
+ * Enable or disable the bias tee on the given GPIO pin.
|
|
||||||
+ *
|
|
||||||
+ * \param dev the device handle given by rtlsdr_open()
|
|
||||||
+ * \param gpio the gpio pin to configure as a Bias T control.
|
|
||||||
+ * \param on 1 for Bias T on. 0 for Bias T off.
|
|
||||||
+ * \return -1 if device is not initialized. 0 otherwise.
|
|
||||||
+ */
|
|
||||||
+RTLSDR_API int rtlsdr_set_bias_tee_gpio(rtlsdr_dev_t *dev, int gpio, int on);
|
|
||||||
+
|
|
||||||
+
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
diff --git a/src/librtlsdr.c b/src/librtlsdr.c
|
|
||||||
index 213e96c..0146298 100644
|
|
||||||
--- a/src/librtlsdr.c
|
|
||||||
+++ b/src/librtlsdr.c
|
|
||||||
@@ -2009,13 +2009,18 @@ int rtlsdr_i2c_read_fn(void *dev, uint8_t addr, uint8_t *buf, int len)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on)
|
|
||||||
+int rtlsdr_set_bias_tee_gpio(rtlsdr_dev_t *dev, int gpio, int on)
|
|
||||||
{
|
|
||||||
if (!dev)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
- rtlsdr_set_gpio_output(dev, 0);
|
|
||||||
- rtlsdr_set_gpio_bit(dev, 0, on);
|
|
||||||
+ rtlsdr_set_gpio_output(dev, gpio);
|
|
||||||
+ rtlsdr_set_gpio_bit(dev, gpio, on);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on)
|
|
||||||
+{
|
|
||||||
+ return rtlsdr_set_bias_tee_gpio(dev, 0, on);
|
|
||||||
+}
|
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
||||||
index 015fd48..8713fba 100644
|
|
||||||
--- a/src/CMakeLists.txt
|
|
||||||
+++ b/src/CMakeLists.txt
|
|
||||||
@@ -91,7 +91,8 @@ add_executable(rtl_fm rtl_fm.c)
|
|
||||||
add_executable(rtl_eeprom rtl_eeprom.c)
|
|
||||||
add_executable(rtl_adsb rtl_adsb.c)
|
|
||||||
add_executable(rtl_power rtl_power.c)
|
|
||||||
-set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power)
|
|
||||||
+add_executable(rtl_biast rtl_biast.c)
|
|
||||||
+set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast)
|
|
||||||
|
|
||||||
target_link_libraries(rtl_sdr rtlsdr_shared convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
@@ -121,6 +122,11 @@ target_link_libraries(rtl_power rtlsdr_shared convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
+target_link_libraries(rtl_biast rtlsdr_shared convenience_static
|
|
||||||
+ ${LIBUSB_LIBRARIES}
|
|
||||||
+ ${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
if(UNIX)
|
|
||||||
target_link_libraries(rtl_fm m)
|
|
||||||
target_link_libraries(rtl_adsb m)
|
|
||||||
diff --git a/src/rtl_biast.c b/src/rtl_biast.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..185e838
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/rtl_biast.c
|
|
||||||
@@ -0,0 +1,101 @@
|
|
||||||
+/*
|
|
||||||
+ * rtl-sdr, turns your Realtek RTL2832 based DVB dongle into a SDR receiver
|
|
||||||
+ * rtl_biast, tool to set bias tee gpio output
|
|
||||||
+ * Copyright (C) 2012 by Steve Markgraf <steve@steve-m.de>
|
|
||||||
+ *
|
|
||||||
+ * 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/>.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <string.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <stdlib.h>
|
|
||||||
+
|
|
||||||
+#ifndef _WIN32
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#else
|
|
||||||
+#include <windows.h>
|
|
||||||
+#include "getopt/getopt.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#include "rtl-sdr.h"
|
|
||||||
+#include "convenience/convenience.h"
|
|
||||||
+
|
|
||||||
+static rtlsdr_dev_t *dev = NULL;
|
|
||||||
+
|
|
||||||
+void usage(void)
|
|
||||||
+{
|
|
||||||
+ fprintf(stderr,
|
|
||||||
+ "rtl_biast, a tool for turning the RTL-SDR.com \n"
|
|
||||||
+ "bias tee or any GPIO ON and OFF. Example to turn on the \n"
|
|
||||||
+ "bias tee: rtl_biast -d 0 -b 1\n"
|
|
||||||
+ "Any GPIO: rtl_biast -d 0 -g 1 -b 1\n\n"
|
|
||||||
+ "Usage:\n"
|
|
||||||
+ "\t[-d device_index (default: 0)]\n"
|
|
||||||
+ "\t[-b bias_on (default: 0)]\n"
|
|
||||||
+ "\t[-g GPIO select (default: 0)]\n");
|
|
||||||
+ exit(1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int main(int argc, char **argv)
|
|
||||||
+{
|
|
||||||
+ int i, r, opt;
|
|
||||||
+ int dev_index = 0;
|
|
||||||
+ int dev_given = 0;
|
|
||||||
+ uint32_t bias_on = 0;
|
|
||||||
+ uint32_t gpio_pin = 0;
|
|
||||||
+ int device_count;
|
|
||||||
+
|
|
||||||
+ while ((opt = getopt(argc, argv, "d:b:g:h?")) != -1) {
|
|
||||||
+ switch (opt) {
|
|
||||||
+ case 'd':
|
|
||||||
+ dev_index = verbose_device_search(optarg);
|
|
||||||
+ dev_given = 1;
|
|
||||||
+ break;
|
|
||||||
+ case 'b':
|
|
||||||
+ bias_on = atoi(optarg);
|
|
||||||
+ break;
|
|
||||||
+ case 'g':
|
|
||||||
+ gpio_pin = atoi(optarg);
|
|
||||||
+ break;
|
|
||||||
+ default:
|
|
||||||
+ usage();
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (!dev_given) {
|
|
||||||
+ dev_index = verbose_device_search("0");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (dev_index < 0) {
|
|
||||||
+ exit(1);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ r = rtlsdr_open(&dev, dev_index);
|
|
||||||
+ rtlsdr_set_bias_tee_gpio(dev, gpio_pin, bias_on);
|
|
||||||
+
|
|
||||||
+exit:
|
|
||||||
+ /*
|
|
||||||
+ * Note - rtlsdr_close() in this tree does not clear the bias tee
|
|
||||||
+ * GPIO line, so it leaves the bias tee enabled if a client program
|
|
||||||
+ * doesn't explictly disable it.
|
|
||||||
+ *
|
|
||||||
+ * If that behaviour changes then another rtlsdr_close() will be
|
|
||||||
+ * needed that takes some extension flags, and one of them should
|
|
||||||
+ * be to either explicitly close the biast or leave it alone.
|
|
||||||
+ */
|
|
||||||
+ rtlsdr_close(dev);
|
|
||||||
+
|
|
||||||
+ return r >= 0 ? r : -r;
|
|
||||||
+}
|
|
@ -1,27 +0,0 @@
|
|||||||
From 1dff8e0b4c5681cf2cbc6d4ab0aa0bee30c5ed09 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Larsson <banan@ludd.ltu.se>
|
|
||||||
Date: Mon, 17 Feb 2020 01:20:24 +0100
|
|
||||||
Subject: [PATCH] lib: enable better UHF reception (>862MHz) for FC0013
|
|
||||||
|
|
||||||
---
|
|
||||||
src/tuner_fc0013.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/tuner_fc0013.c b/src/tuner_fc0013.c
|
|
||||||
index 78b696e..5984dfb 100644
|
|
||||||
--- a/src/tuner_fc0013.c
|
|
||||||
+++ b/src/tuner_fc0013.c
|
|
||||||
@@ -248,11 +248,11 @@ int fc0013_set_params(void *dev, uint32_t freq, uint32_t bandwidth)
|
|
||||||
if (ret)
|
|
||||||
goto exit;
|
|
||||||
|
|
||||||
- /* disable UHF & enable GPS */
|
|
||||||
+ /* enable UHF & disable GPS */
|
|
||||||
ret = fc0013_readreg(dev, 0x14, &tmp);
|
|
||||||
if (ret)
|
|
||||||
goto exit;
|
|
||||||
- ret = fc0013_writereg(dev, 0x14, (tmp & 0x1f) | 0x20);
|
|
||||||
+ ret = fc0013_writereg(dev, 0x14, (tmp & 0x1f) | 0x40);
|
|
||||||
if (ret)
|
|
||||||
goto exit;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
From 222517b506278178ab93182d79ccf7eb04d107ce Mon Sep 17 00:00:00 2001
|
|
||||||
From: "A. Maitland Bottoms" <bottoms@debian.org>
|
|
||||||
Date: Sun, 8 May 2016 18:57:29 -0400
|
|
||||||
Subject: [PATCH] Improve librtlsdr.pc file
|
|
||||||
|
|
||||||
librtlsdr.pc should declare -lusb-1.0 in Libs.private section
|
|
||||||
to exclude usb library from dynamic linking.
|
|
||||||
References to libusb headers are not needed in Cflags, since these
|
|
||||||
headers are not used by external rtlsdr API, but this is optional.
|
|
||||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784912
|
|
||||||
---
|
|
||||||
librtlsdr.pc.in | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/librtlsdr.pc.in b/librtlsdr.pc.in
|
|
||||||
index 5e55049..e46519a 100644
|
|
||||||
--- a/librtlsdr.pc.in
|
|
||||||
+++ b/librtlsdr.pc.in
|
|
||||||
@@ -6,6 +6,6 @@ includedir=@includedir@
|
|
||||||
Name: RTL-SDR Library
|
|
||||||
Description: C Utility Library
|
|
||||||
Version: @VERSION@
|
|
||||||
-Cflags: -I${includedir}/ @RTLSDR_PC_CFLAGS@
|
|
||||||
-Libs: -L${libdir} -lrtlsdr -lusb-1.0
|
|
||||||
-Libs.private: @RTLSDR_PC_LIBS@
|
|
||||||
+Cflags: -I${includedir}/
|
|
||||||
+Libs: -L${libdir} -lrtlsdr
|
|
||||||
+Libs.private: -lusb-1.0 @RTLSDR_PC_LIBS@
|
|
@ -1,57 +0,0 @@
|
|||||||
From f2a9a81c4be95a6e9da97ec784f893d98a43f289 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "A. Maitland Bottoms" <bottoms@debian.org>
|
|
||||||
Date: Thu, 24 Aug 2017 05:27:57 -0400
|
|
||||||
Subject: [PATCH] rtl_fm/rtl_power: Improve scanning range parsing
|
|
||||||
|
|
||||||
---
|
|
||||||
src/rtl_fm.c | 13 +++++++++++++
|
|
||||||
src/rtl_power.c | 8 ++++++++
|
|
||||||
2 files changed, 21 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/rtl_fm.c b/src/rtl_fm.c
|
|
||||||
index b163979..283542d 100644
|
|
||||||
--- a/src/rtl_fm.c
|
|
||||||
+++ b/src/rtl_fm.c
|
|
||||||
@@ -926,8 +926,21 @@ void frequency_range(struct controller_state *s, char *arg)
|
|
||||||
int i;
|
|
||||||
start = arg;
|
|
||||||
stop = strchr(start, ':') + 1;
|
|
||||||
+ if (stop == (char *)1) { // no stop or step given
|
|
||||||
+ s->freqs[s->freq_len] = (uint32_t) atofs(start);
|
|
||||||
+ s->freq_len++;
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
stop[-1] = '\0';
|
|
||||||
step = strchr(stop, ':') + 1;
|
|
||||||
+ if (step == (char *)1) { // no step given
|
|
||||||
+ s->freqs[s->freq_len] = (uint32_t) atofs(start);
|
|
||||||
+ s->freq_len++;
|
|
||||||
+ s->freqs[s->freq_len] = (uint32_t) atofs(stop);
|
|
||||||
+ s->freq_len++;
|
|
||||||
+ stop[-1] = ':';
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
step[-1] = '\0';
|
|
||||||
for(i=(int)atofs(start); i<=(int)atofs(stop); i+=(int)atofs(step))
|
|
||||||
{
|
|
||||||
diff --git a/src/rtl_power.c b/src/rtl_power.c
|
|
||||||
index 625d818..6204de2 100644
|
|
||||||
--- a/src/rtl_power.c
|
|
||||||
+++ b/src/rtl_power.c
|
|
||||||
@@ -437,8 +437,16 @@ void frequency_range(char *arg, double crop)
|
|
||||||
/* hacky string parsing */
|
|
||||||
start = arg;
|
|
||||||
stop = strchr(start, ':') + 1;
|
|
||||||
+ if (stop == (char *)1) {
|
|
||||||
+ fprintf(stderr, "Bad frequency range specification: %s\n", arg);
|
|
||||||
+ exit(1);
|
|
||||||
+ }
|
|
||||||
stop[-1] = '\0';
|
|
||||||
step = strchr(stop, ':') + 1;
|
|
||||||
+ if (step == (char *)1) {
|
|
||||||
+ fprintf(stderr, "Bad frequency range specification: %s\n", arg);
|
|
||||||
+ exit(1);
|
|
||||||
+ }
|
|
||||||
step[-1] = '\0';
|
|
||||||
lower = (int)atofs(start);
|
|
||||||
upper = (int)atofs(stop);
|
|
@ -1,144 +0,0 @@
|
|||||||
From 8985b45e1fe1a5d50c5e1dc4c7c306705e602445 Mon Sep 17 00:00:00 2001
|
|
||||||
From: "A. Maitland Bottoms" <bottoms@debian.org>
|
|
||||||
Date: Sun, 3 Sep 2017 16:22:55 -0400
|
|
||||||
Subject: [PATCH] rtl_tcp: Add IPv6 support
|
|
||||||
|
|
||||||
I've prepared this patch in response to Debian bug #870804
|
|
||||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870804
|
|
||||||
|
|
||||||
It passes the text from the -a and -p options through
|
|
||||||
getaddrinfo() and uses the first result that has a valid
|
|
||||||
socket with a successful bind.
|
|
||||||
|
|
||||||
While not a complete bind to all possible valid names, it
|
|
||||||
does appear to address the use case of the bug submitter
|
|
||||||
without completely changing the program flow.
|
|
||||||
---
|
|
||||||
src/rtl_tcp.c | 72 +++++++++++++++++++++++++++++++++++++++------------
|
|
||||||
1 file changed, 55 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c
|
|
||||||
index da6057b..42b90cb 100644
|
|
||||||
--- a/src/rtl_tcp.c
|
|
||||||
+++ b/src/rtl_tcp.c
|
|
||||||
@@ -30,6 +30,7 @@
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
+#include <netdb.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#else
|
|
||||||
@@ -371,10 +372,18 @@ static void *command_worker(void *arg)
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int r, opt, i;
|
|
||||||
- char* addr = "127.0.0.1";
|
|
||||||
- int port = 1234;
|
|
||||||
+ char *addr = "127.0.0.1";
|
|
||||||
+ char *port = "1234";
|
|
||||||
uint32_t frequency = 100000000, samp_rate = 2048000;
|
|
||||||
- struct sockaddr_in local, remote;
|
|
||||||
+ struct sockaddr_storage local, remote;
|
|
||||||
+ struct addrinfo *ai;
|
|
||||||
+ struct addrinfo *aiHead;
|
|
||||||
+ struct addrinfo hints;
|
|
||||||
+ char hostinfo[NI_MAXHOST];
|
|
||||||
+ char portinfo[NI_MAXSERV];
|
|
||||||
+ char remhostinfo[NI_MAXHOST];
|
|
||||||
+ char remportinfo[NI_MAXSERV];
|
|
||||||
+ int aiErr;
|
|
||||||
uint32_t buf_num = 0;
|
|
||||||
int dev_index = 0;
|
|
||||||
int dev_given = 0;
|
|
||||||
@@ -413,10 +422,10 @@ int main(int argc, char **argv)
|
|
||||||
samp_rate = (uint32_t)atofs(optarg);
|
|
||||||
break;
|
|
||||||
case 'a':
|
|
||||||
- addr = optarg;
|
|
||||||
+ addr = strdup(optarg);
|
|
||||||
break;
|
|
||||||
case 'p':
|
|
||||||
- port = atoi(optarg);
|
|
||||||
+ port = strdup(optarg);
|
|
||||||
break;
|
|
||||||
case 'b':
|
|
||||||
buf_num = atoi(optarg);
|
|
||||||
@@ -515,16 +524,42 @@ int main(int argc, char **argv)
|
|
||||||
pthread_cond_init(&cond, NULL);
|
|
||||||
pthread_cond_init(&exit_cond, NULL);
|
|
||||||
|
|
||||||
- memset(&local,0,sizeof(local));
|
|
||||||
- local.sin_family = AF_INET;
|
|
||||||
- local.sin_port = htons(port);
|
|
||||||
- local.sin_addr.s_addr = inet_addr(addr);
|
|
||||||
+ hints.ai_flags = AI_PASSIVE; /* Server mode. */
|
|
||||||
+ hints.ai_family = PF_UNSPEC; /* IPv4 or IPv6. */
|
|
||||||
+ hints.ai_socktype = SOCK_STREAM;
|
|
||||||
+ hints.ai_protocol = IPPROTO_TCP;
|
|
||||||
+
|
|
||||||
+ if ((aiErr = getaddrinfo(addr,
|
|
||||||
+ port,
|
|
||||||
+ &hints,
|
|
||||||
+ &aiHead )) != 0)
|
|
||||||
+ {
|
|
||||||
+ fprintf(stderr, "local address %s ERROR - %s.\n",
|
|
||||||
+ addr, gai_strerror(aiErr));
|
|
||||||
+ return(-1);
|
|
||||||
+ }
|
|
||||||
+ memcpy(&local, aiHead->ai_addr, aiHead->ai_addrlen);
|
|
||||||
+
|
|
||||||
+ for (ai = aiHead; ai != NULL; ai = ai->ai_next) {
|
|
||||||
+ aiErr = getnameinfo((struct sockaddr *)ai->ai_addr, ai->ai_addrlen,
|
|
||||||
+ hostinfo, NI_MAXHOST,
|
|
||||||
+ portinfo, NI_MAXSERV, NI_NUMERICSERV | NI_NUMERICHOST);
|
|
||||||
+ if (aiErr)
|
|
||||||
+ fprintf( stderr, "getnameinfo ERROR - %s.\n",hostinfo);
|
|
||||||
+
|
|
||||||
+ listensocket = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
|
|
||||||
+ if (listensocket < 0)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ r = 1;
|
|
||||||
+ setsockopt(listensocket, SOL_SOCKET, SO_REUSEADDR, (char *)&r, sizeof(int));
|
|
||||||
+ setsockopt(listensocket, SOL_SOCKET, SO_LINGER, (char *)&ling, sizeof(ling));
|
|
||||||
|
|
||||||
- listensocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
|
||||||
- r = 1;
|
|
||||||
- setsockopt(listensocket, SOL_SOCKET, SO_REUSEADDR, (char *)&r, sizeof(int));
|
|
||||||
- setsockopt(listensocket, SOL_SOCKET, SO_LINGER, (char *)&ling, sizeof(ling));
|
|
||||||
- bind(listensocket,(struct sockaddr *)&local,sizeof(local));
|
|
||||||
+ if (bind(listensocket, (struct sockaddr *)&local, sizeof(local)))
|
|
||||||
+ fprintf(stderr, "rtl_tcp bind error: %s", strerror(errno));
|
|
||||||
+ else
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
ioctlsocket(listensocket, FIONBIO, &blockmode);
|
|
||||||
@@ -535,11 +570,11 @@ int main(int argc, char **argv)
|
|
||||||
|
|
||||||
while(1) {
|
|
||||||
printf("listening...\n");
|
|
||||||
- printf("Use the device argument 'rtl_tcp=%s:%d' in OsmoSDR "
|
|
||||||
+ printf("Use the device argument 'rtl_tcp=%s:%s' in OsmoSDR "
|
|
||||||
"(gr-osmosdr) source\n"
|
|
||||||
"to receive samples in GRC and control "
|
|
||||||
"rtl_tcp parameters (frequency, gain, ...).\n",
|
|
||||||
- addr, port);
|
|
||||||
+ hostinfo, portinfo);
|
|
||||||
listen(listensocket,1);
|
|
||||||
|
|
||||||
while(1) {
|
|
||||||
@@ -559,7 +594,10 @@ int main(int argc, char **argv)
|
|
||||||
|
|
||||||
setsockopt(s, SOL_SOCKET, SO_LINGER, (char *)&ling, sizeof(ling));
|
|
||||||
|
|
||||||
- printf("client accepted!\n");
|
|
||||||
+ getnameinfo((struct sockaddr *)&remote, rlen,
|
|
||||||
+ remhostinfo, NI_MAXHOST,
|
|
||||||
+ remportinfo, NI_MAXSERV, NI_NUMERICSERV);
|
|
||||||
+ printf("client accepted! %s %s\n", remhostinfo, remportinfo);
|
|
||||||
|
|
||||||
memset(&dongle_info, 0, sizeof(dongle_info));
|
|
||||||
memcpy(&dongle_info.magic, "RTL0", 4);
|
|
@ -1,25 +0,0 @@
|
|||||||
From f427883320cbb65e254644717f5d7963e37bbd1d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steve Markgraf <steve@steve-m.de>
|
|
||||||
Date: Wed, 26 Feb 2020 23:52:02 +0100
|
|
||||||
Subject: [PATCH] rtl_tcp: Initialize listensocket
|
|
||||||
|
|
||||||
Older versions of GCC will complain that it can be used
|
|
||||||
uninitialized - which is not the case, but it breaks our Jenkins
|
|
||||||
build as we build with -Werror.
|
|
||||||
---
|
|
||||||
src/rtl_tcp.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c
|
|
||||||
index 42b90cb..562198f 100644
|
|
||||||
--- a/src/rtl_tcp.c
|
|
||||||
+++ b/src/rtl_tcp.c
|
|
||||||
@@ -394,7 +394,7 @@ int main(int argc, char **argv)
|
|
||||||
void *status;
|
|
||||||
struct timeval tv = {1,0};
|
|
||||||
struct linger ling = {1,0};
|
|
||||||
- SOCKET listensocket;
|
|
||||||
+ SOCKET listensocket = 0;
|
|
||||||
socklen_t rlen;
|
|
||||||
fd_set readfds;
|
|
||||||
u_long blockmode = 1;
|
|
@ -1,714 +0,0 @@
|
|||||||
diff -up librtlsdr-0.6.0/CMakeLists.txt.aaaa librtlsdr-0.6.0/CMakeLists.txt
|
|
||||||
--- librtlsdr-0.6.0/CMakeLists.txt.aaaa 2018-08-26 14:54:51.000000000 +0200
|
|
||||||
+++ librtlsdr-0.6.0/CMakeLists.txt 2021-07-11 20:54:05.540782656 +0200
|
|
||||||
@@ -1,41 +1,44 @@
|
|
||||||
-# Copyright 2012 OSMOCOM Project
|
|
||||||
+# Copyright 2012-2020 Osmocom Project
|
|
||||||
#
|
|
||||||
# This file is part of rtl-sdr
|
|
||||||
#
|
|
||||||
-# GNU Radio is free software; you can redistribute it and/or modify
|
|
||||||
+# 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 3, or (at your option)
|
|
||||||
-# any later version.
|
|
||||||
+# the Free Software Foundation, either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
#
|
|
||||||
-# GNU Radio is distributed in the hope that it will be useful,
|
|
||||||
+# 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 GNU Radio; see the file COPYING. If not, write to
|
|
||||||
-# the Free Software Foundation, Inc., 51 Franklin Street,
|
|
||||||
-# Boston, MA 02110-1301, USA.
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Project setup
|
|
||||||
########################################################################
|
|
||||||
-cmake_minimum_required(VERSION 2.6)
|
|
||||||
-project(rtlsdr C)
|
|
||||||
+cmake_minimum_required(VERSION 3.7.2)
|
|
||||||
+
|
|
||||||
+# workaround for https://gitlab.kitware.com/cmake/cmake/issues/16967
|
|
||||||
+if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
|
||||||
+ project(rtlsdr)
|
|
||||||
+else()
|
|
||||||
+ project(rtlsdr C)
|
|
||||||
+endif()
|
|
||||||
|
|
||||||
#select the release build type by default to get optimization flags
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
|
||||||
set(CMAKE_BUILD_TYPE "Release")
|
|
||||||
message(STATUS "Build type not specified: defaulting to release.")
|
|
||||||
endif(NOT CMAKE_BUILD_TYPE)
|
|
||||||
-set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
|
|
||||||
|
|
||||||
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
|
||||||
+list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
|
|
||||||
|
|
||||||
-if(NOT LIB_INSTALL_DIR)
|
|
||||||
- set(LIB_INSTALL_DIR lib)
|
|
||||||
-endif()
|
|
||||||
+include(GNUInstallDirs)
|
|
||||||
+include(GenerateExportHeader)
|
|
||||||
+include(CMakePackageConfigHelpers)
|
|
||||||
|
|
||||||
# Set the version information here
|
|
||||||
set(VERSION_INFO_MAJOR_VERSION 0) # increment major on api compatibility changes
|
|
||||||
@@ -63,12 +66,12 @@ endif()
|
|
||||||
########################################################################
|
|
||||||
# Find build dependencies
|
|
||||||
########################################################################
|
|
||||||
-find_package(PkgConfig)
|
|
||||||
-find_package(LibUSB)
|
|
||||||
if(WIN32 AND NOT MINGW)
|
|
||||||
set(THREADS_USE_PTHREADS_WIN32 true)
|
|
||||||
endif()
|
|
||||||
find_package(Threads)
|
|
||||||
+find_package(PkgConfig)
|
|
||||||
+pkg_check_modules(LIBUSB libusb-1.0 IMPORTED_TARGET)
|
|
||||||
|
|
||||||
if(NOT LIBUSB_FOUND)
|
|
||||||
message(FATAL_ERROR "LibUSB 1.0 required to compile rtl-sdr")
|
|
||||||
@@ -76,27 +79,12 @@ endif()
|
|
||||||
if(NOT THREADS_FOUND)
|
|
||||||
message(FATAL_ERROR "pthreads(-win32) required to compile rtl-sdr")
|
|
||||||
endif()
|
|
||||||
-########################################################################
|
|
||||||
-# Setup the include and linker paths
|
|
||||||
-########################################################################
|
|
||||||
-include_directories(
|
|
||||||
- ${CMAKE_SOURCE_DIR}/include
|
|
||||||
- ${LIBUSB_INCLUDE_DIR}
|
|
||||||
- ${THREADS_PTHREADS_INCLUDE_DIR}
|
|
||||||
-)
|
|
||||||
-
|
|
||||||
-#link_directories(
|
|
||||||
-# ...
|
|
||||||
-#)
|
|
||||||
-
|
|
||||||
-# Set component parameters
|
|
||||||
-#set(INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "" FORCE)
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Create uninstall target
|
|
||||||
########################################################################
|
|
||||||
configure_file(
|
|
||||||
- ${CMAKE_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
|
|
||||||
+ ${PROJECT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
|
|
||||||
@ONLY)
|
|
||||||
|
|
||||||
@@ -126,10 +114,26 @@ else (DETACH_KERNEL_DRIVER)
|
|
||||||
message (STATUS "Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON to enable")
|
|
||||||
endif (DETACH_KERNEL_DRIVER)
|
|
||||||
|
|
||||||
+option(ENABLE_ZEROCOPY "Enable usbfs zero-copy support" OFF)
|
|
||||||
+if (ENABLE_ZEROCOPY)
|
|
||||||
+ message (STATUS "Building with usbfs zero-copy support enabled")
|
|
||||||
+ add_definitions(-DENABLE_ZEROCOPY=1)
|
|
||||||
+else (ENABLE_ZEROCOPY)
|
|
||||||
+ message (STATUS "Building with usbfs zero-copy support disabled, use -DENABLE_ZEROCOPY=ON to enable")
|
|
||||||
+endif (ENABLE_ZEROCOPY)
|
|
||||||
+
|
|
||||||
+########################################################################
|
|
||||||
+# Install public header files
|
|
||||||
+########################################################################
|
|
||||||
+install(FILES
|
|
||||||
+ include/rtl-sdr.h
|
|
||||||
+ include/rtl-sdr_export.h
|
|
||||||
+ DESTINATION include
|
|
||||||
+)
|
|
||||||
+
|
|
||||||
########################################################################
|
|
||||||
# Add subdirectories
|
|
||||||
########################################################################
|
|
||||||
-add_subdirectory(include)
|
|
||||||
add_subdirectory(src)
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
@@ -153,10 +157,10 @@ IF(CMAKE_CROSSCOMPILING)
|
|
||||||
UNSET(RTLSDR_PC_LIBS)
|
|
||||||
ENDIF(CMAKE_CROSSCOMPILING)
|
|
||||||
|
|
||||||
-set(prefix ${CMAKE_INSTALL_PREFIX})
|
|
||||||
+set(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
set(exec_prefix \${prefix})
|
|
||||||
-set(libdir \${exec_prefix}/${LIB_INSTALL_DIR})
|
|
||||||
set(includedir \${prefix}/include)
|
|
||||||
+set(libdir \${exec_prefix}/lib)
|
|
||||||
|
|
||||||
CONFIGURE_FILE(
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/librtlsdr.pc.in
|
|
||||||
@@ -165,10 +169,38 @@ CONFIGURE_FILE(
|
|
||||||
|
|
||||||
INSTALL(
|
|
||||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/librtlsdr.pc
|
|
||||||
- DESTINATION ${LIB_INSTALL_DIR}/pkgconfig
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
|
||||||
)
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
+# Create CMake Config File
|
|
||||||
+########################################################################
|
|
||||||
+write_basic_package_version_file(
|
|
||||||
+ "${CMAKE_CURRENT_BINARY_DIR}/rtlsdr/rtlsdrConfigVersion.cmake"
|
|
||||||
+ VERSION ${VERSION}
|
|
||||||
+ COMPATIBILITY AnyNewerVersion
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+configure_file(cmake/rtlsdrConfig.cmake
|
|
||||||
+ "${CMAKE_CURRENT_BINARY_DIR}/rtlsdr/rtlsdrConfig.cmake"
|
|
||||||
+ COPYONLY
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+set(ConfigPackageLocation lib/cmake/rtlsdr)
|
|
||||||
+install(EXPORT RTLSDR-export
|
|
||||||
+ FILE rtlsdrTargets.cmake
|
|
||||||
+ NAMESPACE rtlsdr::
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/rtlsdr/
|
|
||||||
+ )
|
|
||||||
+install(
|
|
||||||
+ FILES
|
|
||||||
+ cmake/rtlsdrConfig.cmake
|
|
||||||
+ "${CMAKE_CURRENT_BINARY_DIR}/rtlsdr/rtlsdrConfigVersion.cmake"
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/rtlsdr/
|
|
||||||
+ COMPONENT Devel
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+########################################################################
|
|
||||||
# Print Summary
|
|
||||||
########################################################################
|
|
||||||
MESSAGE(STATUS "Building for version: ${VERSION} / ${LIBVER}")
|
|
||||||
diff --git a/cmake/Modules/FindLibUSB.cmake b/cmake/Modules/FindLibUSB.cmake
|
|
||||||
deleted file mode 100644
|
|
||||||
index abe6ee4..0000000
|
|
||||||
--- a/cmake/Modules/FindLibUSB.cmake
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,55 +0,0 @@
|
|
||||||
-if(NOT LIBUSB_FOUND)
|
|
||||||
- pkg_check_modules (LIBUSB_PKG libusb-1.0)
|
|
||||||
- find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h
|
|
||||||
- PATHS
|
|
||||||
- ${LIBUSB_PKG_INCLUDE_DIRS}
|
|
||||||
- /usr/include/libusb-1.0
|
|
||||||
- /usr/include
|
|
||||||
- /usr/local/include
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
-#standard library name for libusb-1.0
|
|
||||||
-set(libusb1_library_names usb-1.0)
|
|
||||||
-
|
|
||||||
-#libusb-1.0 compatible library on freebsd
|
|
||||||
-if((CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") OR (CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD"))
|
|
||||||
- list(APPEND libusb1_library_names usb)
|
|
||||||
-endif()
|
|
||||||
-
|
|
||||||
- find_library(LIBUSB_LIBRARIES
|
|
||||||
- NAMES ${libusb1_library_names}
|
|
||||||
- PATHS
|
|
||||||
- ${LIBUSB_PKG_LIBRARY_DIRS}
|
|
||||||
- /usr/lib
|
|
||||||
- /usr/local/lib
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
-include(CheckFunctionExists)
|
|
||||||
-if(LIBUSB_INCLUDE_DIRS)
|
|
||||||
- set(CMAKE_REQUIRED_INCLUDES ${LIBUSB_INCLUDE_DIRS})
|
|
||||||
-endif()
|
|
||||||
-if(LIBUSB_LIBRARIES)
|
|
||||||
- set(CMAKE_REQUIRED_LIBRARIES ${LIBUSB_LIBRARIES})
|
|
||||||
-endif()
|
|
||||||
-
|
|
||||||
-CHECK_FUNCTION_EXISTS("libusb_handle_events_timeout_completed" HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED)
|
|
||||||
-if(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED)
|
|
||||||
- add_definitions(-DHAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED=1)
|
|
||||||
-endif(HAVE_LIBUSB_HANDLE_EVENTS_TIMEOUT_COMPLETED)
|
|
||||||
-
|
|
||||||
-CHECK_FUNCTION_EXISTS("libusb_error_name" HAVE_LIBUSB_ERROR_NAME)
|
|
||||||
-if(HAVE_LIBUSB_ERROR_NAME)
|
|
||||||
- add_definitions(-DHAVE_LIBUSB_ERROR_NAME=1)
|
|
||||||
-endif(HAVE_LIBUSB_ERROR_NAME)
|
|
||||||
-
|
|
||||||
-if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
|
||||||
- set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found")
|
|
||||||
- message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}")
|
|
||||||
-else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
|
||||||
- set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
|
|
||||||
- message(STATUS "libusb-1.0 not found.")
|
|
||||||
-endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
|
||||||
-
|
|
||||||
-mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
|
|
||||||
-
|
|
||||||
-endif(NOT LIBUSB_FOUND)
|
|
||||||
diff --git a/cmake/Modules/FindThreads.cmake b/cmake/Modules/FindThreads.cmake
|
|
||||||
deleted file mode 100644
|
|
||||||
index 8028b15..0000000
|
|
||||||
--- a/cmake/Modules/FindThreads.cmake
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,246 +0,0 @@
|
|
||||||
-# Updated FindThreads.cmake that supports pthread-win32
|
|
||||||
-# Downloaded from http://www.vtk.org/Bug/bug_view_advanced_page.php?bug_id=6399
|
|
||||||
-
|
|
||||||
-# - This module determines the thread library of the system.
|
|
||||||
-#
|
|
||||||
-# The following variables are set
|
|
||||||
-# CMAKE_THREAD_LIBS_INIT - the thread library
|
|
||||||
-# CMAKE_USE_SPROC_INIT - are we using sproc?
|
|
||||||
-# CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads?
|
|
||||||
-# CMAKE_USE_PTHREADS_INIT - are we using pthreads
|
|
||||||
-# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
|
|
||||||
-#
|
|
||||||
-# If use of pthreads-win32 is desired, the following variables
|
|
||||||
-# can be set.
|
|
||||||
-#
|
|
||||||
-# THREADS_USE_PTHREADS_WIN32 -
|
|
||||||
-# Setting this to true searches for the pthreads-win32
|
|
||||||
-# port (since CMake 2.8.0)
|
|
||||||
-#
|
|
||||||
-# THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME
|
|
||||||
-# C = no exceptions (default)
|
|
||||||
-# (NOTE: This is the default scheme on most POSIX thread
|
|
||||||
-# implementations and what you should probably be using)
|
|
||||||
-# CE = C++ Exception Handling
|
|
||||||
-# SE = Structure Exception Handling (MSVC only)
|
|
||||||
-# (NOTE: Changing this option from the default may affect
|
|
||||||
-# the portability of your application. See pthreads-win32
|
|
||||||
-# documentation for more details.)
|
|
||||||
-#
|
|
||||||
-#======================================================
|
|
||||||
-# Example usage where threading library
|
|
||||||
-# is provided by the system:
|
|
||||||
-#
|
|
||||||
-# find_package(Threads REQUIRED)
|
|
||||||
-# add_executable(foo foo.cc)
|
|
||||||
-# target_link_libraries(foo ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
-#
|
|
||||||
-# Example usage if pthreads-win32 is desired on Windows
|
|
||||||
-# or a system provided thread library:
|
|
||||||
-#
|
|
||||||
-# set(THREADS_USE_PTHREADS_WIN32 true)
|
|
||||||
-# find_package(Threads REQUIRED)
|
|
||||||
-# include_directories(${THREADS_PTHREADS_INCLUDE_DIR})
|
|
||||||
-#
|
|
||||||
-# add_executable(foo foo.cc)
|
|
||||||
-# target_link_libraries(foo ${CMAKE_THREAD_LIBS_INIT})
|
|
||||||
-#
|
|
||||||
-
|
|
||||||
-INCLUDE (CheckIncludeFiles)
|
|
||||||
-INCLUDE (CheckLibraryExists)
|
|
||||||
-SET(Threads_FOUND FALSE)
|
|
||||||
-
|
|
||||||
-IF(WIN32 AND NOT CYGWIN AND THREADS_USE_PTHREADS_WIN32)
|
|
||||||
- SET(_Threads_ptwin32 true)
|
|
||||||
-ENDIF()
|
|
||||||
-
|
|
||||||
-# Do we have sproc?
|
|
||||||
-IF(CMAKE_SYSTEM MATCHES IRIX)
|
|
||||||
- CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
|
|
||||||
-ENDIF()
|
|
||||||
-
|
|
||||||
-IF(CMAKE_HAVE_SPROC_H)
|
|
||||||
- # We have sproc
|
|
||||||
- SET(CMAKE_USE_SPROC_INIT 1)
|
|
||||||
-
|
|
||||||
-ELSEIF(_Threads_ptwin32)
|
|
||||||
-
|
|
||||||
- IF(NOT DEFINED THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME)
|
|
||||||
- # Assign the default scheme
|
|
||||||
- SET(THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME "C")
|
|
||||||
- ELSE()
|
|
||||||
- # Validate the scheme specified by the user
|
|
||||||
- IF(NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "C" AND
|
|
||||||
- NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "CE" AND
|
|
||||||
- NOT THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE")
|
|
||||||
- MESSAGE(FATAL_ERROR "See documentation for FindPthreads.cmake, only C, CE, and SE modes are allowed")
|
|
||||||
- ENDIF()
|
|
||||||
- IF(NOT MSVC AND THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE")
|
|
||||||
- MESSAGE(FATAL_ERROR "Structured Exception Handling is only allowed for MSVC")
|
|
||||||
- ENDIF(NOT MSVC AND THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME STREQUAL "SE")
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- FIND_PATH(THREADS_PTHREADS_INCLUDE_DIR pthread.h)
|
|
||||||
-
|
|
||||||
- # Determine the library filename
|
|
||||||
- IF(MSVC)
|
|
||||||
- SET(_Threads_pthreads_libname
|
|
||||||
- pthreadV${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}2)
|
|
||||||
- ELSEIF(MINGW)
|
|
||||||
- SET(_Threads_pthreads_libname
|
|
||||||
- pthreadG${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}2)
|
|
||||||
- ELSE()
|
|
||||||
- MESSAGE(FATAL_ERROR "This should never happen")
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- # Use the include path to help find the library if possible
|
|
||||||
- SET(_Threads_lib_paths "")
|
|
||||||
- IF(THREADS_PTHREADS_INCLUDE_DIR)
|
|
||||||
- GET_FILENAME_COMPONENT(_Threads_root_dir
|
|
||||||
- ${THREADS_PTHREADS_INCLUDE_DIR} PATH)
|
|
||||||
- SET(_Threads_lib_paths ${_Threads_root_dir}/lib)
|
|
||||||
- ENDIF()
|
|
||||||
- FIND_LIBRARY(THREADS_PTHREADS_WIN32_LIBRARY
|
|
||||||
- NAMES ${_Threads_pthreads_libname}
|
|
||||||
- PATHS ${_Threads_lib_paths}
|
|
||||||
- DOC "The Portable Threads Library for Win32"
|
|
||||||
- NO_SYSTEM_PATH
|
|
||||||
- )
|
|
||||||
-
|
|
||||||
- IF(THREADS_PTHREADS_INCLUDE_DIR AND THREADS_PTHREADS_WIN32_LIBRARY)
|
|
||||||
- MARK_AS_ADVANCED(THREADS_PTHREADS_INCLUDE_DIR)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT ${THREADS_PTHREADS_WIN32_LIBRARY})
|
|
||||||
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- MARK_AS_ADVANCED(THREADS_PTHREADS_WIN32_LIBRARY)
|
|
||||||
-
|
|
||||||
-ELSE()
|
|
||||||
- # Do we have pthreads?
|
|
||||||
- CHECK_INCLUDE_FILES("pthread.h" CMAKE_HAVE_PTHREAD_H)
|
|
||||||
- IF(CMAKE_HAVE_PTHREAD_H)
|
|
||||||
-
|
|
||||||
- #
|
|
||||||
- # We have pthread.h
|
|
||||||
- # Let's check for the library now.
|
|
||||||
- #
|
|
||||||
- SET(CMAKE_HAVE_THREADS_LIBRARY)
|
|
||||||
- IF(NOT THREADS_HAVE_PTHREAD_ARG)
|
|
||||||
-
|
|
||||||
- # Do we have -lpthreads
|
|
||||||
- CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE)
|
|
||||||
- IF(CMAKE_HAVE_PTHREADS_CREATE)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT "-lpthreads")
|
|
||||||
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- # Ok, how about -lpthread
|
|
||||||
- CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE)
|
|
||||||
- IF(CMAKE_HAVE_PTHREAD_CREATE)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT "-lpthread")
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- IF(CMAKE_SYSTEM MATCHES "SunOS.*")
|
|
||||||
- # On sun also check for -lthread
|
|
||||||
- CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE)
|
|
||||||
- IF(CMAKE_HAVE_THR_CREATE)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT "-lthread")
|
|
||||||
- SET(CMAKE_HAVE_THREADS_LIBRARY 1)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- ENDIF()
|
|
||||||
- ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
|
|
||||||
-
|
|
||||||
- ENDIF(NOT THREADS_HAVE_PTHREAD_ARG)
|
|
||||||
-
|
|
||||||
- IF(NOT CMAKE_HAVE_THREADS_LIBRARY)
|
|
||||||
- # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread
|
|
||||||
- IF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
|
|
||||||
- MESSAGE(STATUS "Check if compiler accepts -pthread")
|
|
||||||
- TRY_RUN(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
|
|
||||||
- ${CMAKE_BINARY_DIR}
|
|
||||||
- ${CMAKE_ROOT}/Modules/CheckForPthreads.c
|
|
||||||
- CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread
|
|
||||||
- COMPILE_OUTPUT_VARIABLE OUTPUT)
|
|
||||||
-
|
|
||||||
- IF(THREADS_HAVE_PTHREAD_ARG)
|
|
||||||
- IF(THREADS_PTHREAD_ARG MATCHES "^2$")
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- MESSAGE(STATUS "Check if compiler accepts -pthread - yes")
|
|
||||||
- ELSE()
|
|
||||||
- MESSAGE(STATUS "Check if compiler accepts -pthread - no")
|
|
||||||
- FILE(APPEND
|
|
||||||
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
||||||
- "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n")
|
|
||||||
- ENDIF()
|
|
||||||
- ELSE()
|
|
||||||
- MESSAGE(STATUS "Check if compiler accepts -pthread - no")
|
|
||||||
- FILE(APPEND
|
|
||||||
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
|
||||||
- "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n")
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
|
|
||||||
-
|
|
||||||
- IF(THREADS_HAVE_PTHREAD_ARG)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT "-pthread")
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY)
|
|
||||||
- ENDIF(CMAKE_HAVE_PTHREAD_H)
|
|
||||||
-ENDIF()
|
|
||||||
-
|
|
||||||
-IF(CMAKE_THREAD_LIBS_INIT)
|
|
||||||
- SET(CMAKE_USE_PTHREADS_INIT 1)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
-ENDIF()
|
|
||||||
-
|
|
||||||
-IF(CMAKE_SYSTEM MATCHES "Windows"
|
|
||||||
- AND NOT THREADS_USE_PTHREADS_WIN32)
|
|
||||||
- SET(CMAKE_USE_WIN32_THREADS_INIT 1)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
-ENDIF()
|
|
||||||
-
|
|
||||||
-IF(CMAKE_USE_PTHREADS_INIT)
|
|
||||||
- IF(CMAKE_SYSTEM MATCHES "HP-UX-*")
|
|
||||||
- # Use libcma if it exists and can be used. It provides more
|
|
||||||
- # symbols than the plain pthread library. CMA threads
|
|
||||||
- # have actually been deprecated:
|
|
||||||
- # http://docs.hp.com/en/B3920-90091/ch12s03.html#d0e11395
|
|
||||||
- # http://docs.hp.com/en/947/d8.html
|
|
||||||
- # but we need to maintain compatibility here.
|
|
||||||
- # The CMAKE_HP_PTHREADS setting actually indicates whether CMA threads
|
|
||||||
- # are available.
|
|
||||||
- CHECK_LIBRARY_EXISTS(cma pthread_attr_create "" CMAKE_HAVE_HP_CMA)
|
|
||||||
- IF(CMAKE_HAVE_HP_CMA)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT "-lcma")
|
|
||||||
- SET(CMAKE_HP_PTHREADS_INIT 1)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- ENDIF(CMAKE_HAVE_HP_CMA)
|
|
||||||
- SET(CMAKE_USE_PTHREADS_INIT 1)
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- IF(CMAKE_SYSTEM MATCHES "OSF1-V*")
|
|
||||||
- SET(CMAKE_USE_PTHREADS_INIT 0)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT )
|
|
||||||
- ENDIF()
|
|
||||||
-
|
|
||||||
- IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
|
|
||||||
- SET(CMAKE_USE_PTHREADS_INIT 1)
|
|
||||||
- SET(Threads_FOUND TRUE)
|
|
||||||
- SET(CMAKE_THREAD_LIBS_INIT )
|
|
||||||
- SET(CMAKE_USE_WIN32_THREADS_INIT 0)
|
|
||||||
- ENDIF()
|
|
||||||
-ENDIF(CMAKE_USE_PTHREADS_INIT)
|
|
||||||
-
|
|
||||||
-INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
-IF(_Threads_ptwin32)
|
|
||||||
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG
|
|
||||||
- THREADS_PTHREADS_WIN32_LIBRARY THREADS_PTHREADS_INCLUDE_DIR)
|
|
||||||
-ELSE()
|
|
||||||
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND)
|
|
||||||
-ENDIF()
|
|
||||||
diff -up librtlsdr-0.6.0/src/CMakeLists.txt.aaaa librtlsdr-0.6.0/src/CMakeLists.txt
|
|
||||||
--- librtlsdr-0.6.0/src/CMakeLists.txt.aaaa 2021-07-08 13:39:12.962332505 +0200
|
|
||||||
+++ librtlsdr-0.6.0/src/CMakeLists.txt 2021-07-08 13:42:22.587472144 +0200
|
|
||||||
@@ -1,69 +1,66 @@
|
|
||||||
-# Copyright 2012 OSMOCOM Project
|
|
||||||
+# Copyright 2012-2020 Osmocom Project
|
|
||||||
#
|
|
||||||
# This file is part of rtl-sdr
|
|
||||||
#
|
|
||||||
-# GNU Radio is free software; you can redistribute it and/or modify
|
|
||||||
+# 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 3, or (at your option)
|
|
||||||
-# any later version.
|
|
||||||
+# the Free Software Foundation, either version 2 of the License, or
|
|
||||||
+# (at your option) any later version.
|
|
||||||
#
|
|
||||||
-# GNU Radio is distributed in the hope that it will be useful,
|
|
||||||
+# 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 GNU Radio; see the file COPYING. If not, write to
|
|
||||||
-# the Free Software Foundation, Inc., 51 Franklin Street,
|
|
||||||
-# Boston, MA 02110-1301, USA.
|
|
||||||
-
|
|
||||||
-MACRO(RTLSDR_APPEND_SRCS)
|
|
||||||
- LIST(APPEND rtlsdr_srcs ${ARGV})
|
|
||||||
-ENDMACRO(RTLSDR_APPEND_SRCS)
|
|
||||||
-
|
|
||||||
-RTLSDR_APPEND_SRCS(
|
|
||||||
- librtlsdr.c
|
|
||||||
- tuner_e4k.c
|
|
||||||
- tuner_fc0012.c
|
|
||||||
- tuner_fc0013.c
|
|
||||||
- tuner_fc2580.c
|
|
||||||
- tuner_r82xx.c
|
|
||||||
-)
|
|
||||||
-
|
|
||||||
-########################################################################
|
|
||||||
-# Set up Windows DLL resource files
|
|
||||||
-########################################################################
|
|
||||||
-IF(MSVC)
|
|
||||||
- include(${CMAKE_SOURCE_DIR}/cmake/Modules/Version.cmake)
|
|
||||||
-
|
|
||||||
- configure_file(
|
|
||||||
- ${CMAKE_CURRENT_SOURCE_DIR}/rtlsdr.rc.in
|
|
||||||
- ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc
|
|
||||||
- @ONLY)
|
|
||||||
-
|
|
||||||
- RTLSDR_APPEND_SRCS(${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc)
|
|
||||||
-ENDIF(MSVC)
|
|
||||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Setup shared library variant
|
|
||||||
########################################################################
|
|
||||||
-add_library(rtlsdr_shared SHARED ${rtlsdr_srcs})
|
|
||||||
-target_link_libraries(rtlsdr_shared ${LIBUSB_LIBRARIES})
|
|
||||||
-set_target_properties(rtlsdr_shared PROPERTIES DEFINE_SYMBOL "rtlsdr_EXPORTS")
|
|
||||||
-set_target_properties(rtlsdr_shared PROPERTIES OUTPUT_NAME rtlsdr)
|
|
||||||
-set_target_properties(rtlsdr_shared PROPERTIES SOVERSION ${MAJOR_VERSION})
|
|
||||||
-set_target_properties(rtlsdr_shared PROPERTIES VERSION ${LIBVER})
|
|
||||||
+add_library(rtlsdr SHARED librtlsdr.c
|
|
||||||
+ tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c)
|
|
||||||
+target_link_libraries(rtlsdr PkgConfig::LIBUSB)
|
|
||||||
+target_include_directories(rtlsdr PUBLIC
|
|
||||||
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
|
|
||||||
+ $<INSTALL_INTERFACE:include> # <prefix>/include
|
|
||||||
+ )
|
|
||||||
+set_target_properties(rtlsdr PROPERTIES DEFINE_SYMBOL "rtlsdr_EXPORTS")
|
|
||||||
+set_target_properties(rtlsdr PROPERTIES OUTPUT_NAME rtlsdr)
|
|
||||||
+set_target_properties(rtlsdr PROPERTIES SOVERSION ${MAJOR_VERSION})
|
|
||||||
+set_target_properties(rtlsdr PROPERTIES VERSION ${LIBVER})
|
|
||||||
+generate_export_header(rtlsdr)
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Setup static library variant
|
|
||||||
########################################################################
|
|
||||||
-add_library(rtlsdr_static STATIC ${rtlsdr_srcs})
|
|
||||||
-target_link_libraries(rtlsdr_static ${LIBUSB_LIBRARIES})
|
|
||||||
+add_library(rtlsdr_static STATIC librtlsdr.c
|
|
||||||
+ tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c)
|
|
||||||
+target_link_libraries(rtlsdr_static PkgConfig::LIBUSB)
|
|
||||||
+target_include_directories(rtlsdr_static PUBLIC
|
|
||||||
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
|
|
||||||
+ $<INSTALL_INTERFACE:include> # <prefix>/include
|
|
||||||
+ )
|
|
||||||
set_property(TARGET rtlsdr_static APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
|
|
||||||
if(NOT WIN32)
|
|
||||||
# Force same library filename for static and shared variants of the library
|
|
||||||
set_target_properties(rtlsdr_static PROPERTIES OUTPUT_NAME rtlsdr)
|
|
||||||
endif()
|
|
||||||
+generate_export_header(rtlsdr_static)
|
|
||||||
+
|
|
||||||
+########################################################################
|
|
||||||
+# Set up Windows DLL resource files
|
|
||||||
+########################################################################
|
|
||||||
+IF(MSVC)
|
|
||||||
+ include(${CMAKE_SOURCE_DIR}/cmake/Modules/Version.cmake)
|
|
||||||
+
|
|
||||||
+ configure_file(
|
|
||||||
+ ${CMAKE_CURRENT_SOURCE_DIR}/rtlsdr.rc.in
|
|
||||||
+ ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc
|
|
||||||
+ @ONLY)
|
|
||||||
+ target_sources(rtlsdr ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc)
|
|
||||||
+ target_sources(rtlsdr_static ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc)
|
|
||||||
+ENDIF(MSVC)
|
|
||||||
|
|
||||||
########################################################################
|
|
||||||
# Setup libraries used in executables
|
|
||||||
@@ -71,13 +68,14 @@ endif()
|
|
||||||
add_library(convenience_static STATIC
|
|
||||||
convenience/convenience.c
|
|
||||||
)
|
|
||||||
-
|
|
||||||
+target_include_directories(convenience_static
|
|
||||||
+ PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
|
||||||
if(WIN32)
|
|
||||||
add_library(libgetopt_static STATIC
|
|
||||||
getopt/getopt.c
|
|
||||||
)
|
|
||||||
target_link_libraries(convenience_static
|
|
||||||
- rtlsdr_shared
|
|
||||||
+ rtlsdr
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
@@ -92,41 +90,40 @@ add_executable(rtl_eeprom rtl_eeprom.c)
|
|
||||||
add_executable(rtl_adsb rtl_adsb.c)
|
|
||||||
add_executable(rtl_power rtl_power.c)
|
|
||||||
add_executable(rtl_biast rtl_biast.c)
|
|
||||||
-set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast)
|
|
||||||
+set(INSTALL_TARGETS rtlsdr rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast)
|
|
||||||
|
|
||||||
-target_link_libraries(rtl_sdr rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_sdr rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-target_link_libraries(rtl_tcp rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_tcp rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-target_link_libraries(rtl_test rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_test rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-target_link_libraries(rtl_fm rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_fm rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-target_link_libraries(rtl_eeprom rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_eeprom rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-target_link_libraries(rtl_adsb rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_adsb rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-target_link_libraries(rtl_power rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_power rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-target_link_libraries(rtl_biast rtlsdr_shared convenience_static
|
|
||||||
+target_link_libraries(rtl_biast rtlsdr convenience_static
|
|
||||||
${LIBUSB_LIBRARIES}
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
)
|
|
||||||
-
|
|
||||||
if(UNIX)
|
|
||||||
target_link_libraries(rtl_fm m)
|
|
||||||
target_link_libraries(rtl_adsb m)
|
|
||||||
@@ -157,8 +154,12 @@ endif()
|
|
||||||
########################################################################
|
|
||||||
# Install built library files & utilities
|
|
||||||
########################################################################
|
|
||||||
-install(TARGETS ${INSTALL_TARGETS}
|
|
||||||
- LIBRARY DESTINATION ${LIB_INSTALL_DIR} # .so/.dylib file
|
|
||||||
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR} # .lib file
|
|
||||||
- RUNTIME DESTINATION bin # .dll file
|
|
||||||
-)
|
|
||||||
+install(TARGETS rtlsdr EXPORT RTLSDR-export
|
|
||||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # .so/.dylib file
|
|
||||||
+ )
|
|
||||||
+install(TARGETS rtlsdr_static EXPORT RTLSDR-export
|
|
||||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # .so/.dylib file
|
|
||||||
+ )
|
|
||||||
+install(TARGETS rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power rtl_biast
|
|
||||||
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
+ )
|
|
||||||
diff --git a/cmake/rtlsdrConfig.cmake b/cmake/rtlsdrConfig.cmake
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..eeff2f3
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/cmake/rtlsdrConfig.cmake
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+include(FindPkgConfig)
|
|
||||||
+pkg_check_modules(LIBUSB libusb-1.0 IMPORTED_TARGET)
|
|
||||||
+
|
|
||||||
+get_filename_component(RTLSDR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
+
|
|
||||||
+if(NOT TARGET rtlsdr::rtlsdr)
|
|
||||||
+ include("${RTLSDR_CMAKE_DIR}/rtlsdrTargets.cmake")
|
|
||||||
+endif()
|
|
@ -1,40 +0,0 @@
|
|||||||
From d794155ba65796a76cd0a436f9709f4601509320 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Derrick Pallas <derrick@pallas.us>
|
|
||||||
Date: Wed, 18 Mar 2020 14:54:48 -0700
|
|
||||||
Subject: [PATCH] tuner_r82xx: fix short-write in r82xx_read
|
|
||||||
|
|
||||||
In r82xx_read, there is a 1-byte I2C write followed by the I2C read. If
|
|
||||||
this I2C write fails, r82xx_read correctly bails out but may return 0.
|
|
||||||
Callers that check whether (rc < 0) will assume that the buffer was written
|
|
||||||
when it has not been, e.g. in r82xx_set_tv_standard where
|
|
||||||
|
|
||||||
priv->fil_cal_code = data[4] & 0x0f;
|
|
||||||
|
|
||||||
consumes a garbage value for data[4].
|
|
||||||
|
|
||||||
This change resolves that issue by copying the error path from r82xx_write.
|
|
||||||
---
|
|
||||||
src/tuner_r82xx.c | 10 ++++++++--
|
|
||||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/tuner_r82xx.c b/src/tuner_r82xx.c
|
|
||||||
index fe52bd9..997abd7 100644
|
|
||||||
--- a/src/tuner_r82xx.c
|
|
||||||
+++ b/src/tuner_r82xx.c
|
|
||||||
@@ -330,8 +330,14 @@ static int r82xx_read(struct r82xx_priv *priv, uint8_t reg, uint8_t *val, int le
|
|
||||||
priv->buf[0] = reg;
|
|
||||||
|
|
||||||
rc = rtlsdr_i2c_write_fn(priv->rtl_dev, priv->cfg->i2c_addr, priv->buf, 1);
|
|
||||||
- if (rc < 1)
|
|
||||||
- return rc;
|
|
||||||
+
|
|
||||||
+ if (rc != 1) {
|
|
||||||
+ fprintf(stderr, "%s: i2c wr failed=%d reg=%02x len=%d\n",
|
|
||||||
+ __FUNCTION__, rc, reg, 1);
|
|
||||||
+ if (rc < 0)
|
|
||||||
+ return rc;
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
rc = rtlsdr_i2c_read_fn(priv->rtl_dev, priv->cfg->i2c_addr, p, len);
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From a4eab76c8cafc6f3ebed8b6757b0643df9453bec Mon Sep 17 00:00:00 2001
|
|
||||||
From: Doug Hammond <doug@lon.dev>
|
|
||||||
Date: Thu, 29 Jul 2021 18:27:17 +0100
|
|
||||||
Subject: [PATCH] rtl_fm: add a new option to select 2nd direct sampling mode
|
|
||||||
|
|
||||||
---
|
|
||||||
src/rtl_fm.c | 15 +++++++++------
|
|
||||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/rtl_fm.c b/src/rtl_fm.c
|
|
||||||
index 283542d..7c84332 100644
|
|
||||||
--- a/src/rtl_fm.c
|
|
||||||
+++ b/src/rtl_fm.c
|
|
||||||
@@ -201,11 +201,12 @@ void usage(void)
|
|
||||||
"\t[-p ppm_error (default: 0)]\n"
|
|
||||||
"\t[-E enable_option (default: none)]\n"
|
|
||||||
"\t use multiple -E to enable multiple options\n"
|
|
||||||
- "\t edge: enable lower edge tuning\n"
|
|
||||||
- "\t dc: enable dc blocking filter\n"
|
|
||||||
- "\t deemp: enable de-emphasis filter\n"
|
|
||||||
- "\t direct: enable direct sampling\n"
|
|
||||||
- "\t offset: enable offset tuning\n"
|
|
||||||
+ "\t edge: enable lower edge tuning\n"
|
|
||||||
+ "\t dc: enable dc blocking filter\n"
|
|
||||||
+ "\t deemp: enable de-emphasis filter\n"
|
|
||||||
+ "\t direct: enable direct sampling 1 (usually I)\n"
|
|
||||||
+ "\t direct2: enable direct sampling 2 (usually Q)\n"
|
|
||||||
+ "\t offset: enable offset tuning\n"
|
|
||||||
"\tfilename ('-' means stdout)\n"
|
|
||||||
"\t omitting the filename also uses stdout\n\n"
|
|
||||||
"Experimental options:\n"
|
|
||||||
@@ -892,7 +893,7 @@ static void *controller_thread_fn(void *arg)
|
|
||||||
/* set up primary channel */
|
|
||||||
optimal_settings(s->freqs[0], demod.rate_in);
|
|
||||||
if (dongle.direct_sampling) {
|
|
||||||
- verbose_direct_sampling(dongle.dev, 1);}
|
|
||||||
+ verbose_direct_sampling(dongle.dev, dongle.direct_sampling);}
|
|
||||||
if (dongle.offset_tuning) {
|
|
||||||
verbose_offset_tuning(dongle.dev);}
|
|
||||||
|
|
||||||
@@ -1119,6 +1120,8 @@ int main(int argc, char **argv)
|
|
||||||
demod.deemph = 1;}
|
|
||||||
if (strcmp("direct", optarg) == 0) {
|
|
||||||
dongle.direct_sampling = 1;}
|
|
||||||
+ if (strcmp("direct2", optarg) == 0) {
|
|
||||||
+ dongle.direct_sampling = 2;}
|
|
||||||
if (strcmp("offset", optarg) == 0) {
|
|
||||||
dongle.offset_tuning = 1;}
|
|
||||||
break;
|
|
@ -1,196 +0,0 @@
|
|||||||
From 1261fbb285297da08f4620b18871b6d6d9ec2a7b Mon Sep 17 00:00:00 2001
|
|
||||||
From: rtlsdrblog <rtlsdrblog@gmail.com>
|
|
||||||
Date: Tue, 22 Aug 2023 04:16:00 +1200
|
|
||||||
Subject: [PATCH] add rtl-sdr blog v4 support
|
|
||||||
|
|
||||||
---
|
|
||||||
include/rtlsdr_i2c.h | 1 +
|
|
||||||
src/librtlsdr.c | 24 ++++++++++++-
|
|
||||||
src/tuner_r82xx.c | 83 ++++++++++++++++++++++++++++++++++++++------
|
|
||||||
3 files changed, 97 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/include/rtlsdr_i2c.h b/include/rtlsdr_i2c.h
|
|
||||||
index 7676689..6faf141 100644
|
|
||||||
--- a/include/rtlsdr_i2c.h
|
|
||||||
+++ b/include/rtlsdr_i2c.h
|
|
||||||
@@ -1,6 +1,7 @@
|
|
||||||
#ifndef __I2C_H
|
|
||||||
#define __I2C_H
|
|
||||||
|
|
||||||
+int rtlsdr_check_dongle_model(void *dev, char *manufact_check, char *product_check);
|
|
||||||
uint32_t rtlsdr_get_tuner_clock(void *dev);
|
|
||||||
int rtlsdr_i2c_write_fn(void *dev, uint8_t addr, uint8_t *buf, int len);
|
|
||||||
int rtlsdr_i2c_read_fn(void *dev, uint8_t addr, uint8_t *buf, int len);
|
|
||||||
diff --git a/src/librtlsdr.c b/src/librtlsdr.c
|
|
||||||
index 096abae..ee13556 100644
|
|
||||||
--- a/src/librtlsdr.c
|
|
||||||
+++ b/src/librtlsdr.c
|
|
||||||
@@ -119,6 +119,8 @@ struct rtlsdr_dev {
|
|
||||||
int dev_lost;
|
|
||||||
int driver_active;
|
|
||||||
unsigned int xfer_errors;
|
|
||||||
+ char manufact[256];
|
|
||||||
+ char product[256];
|
|
||||||
};
|
|
||||||
|
|
||||||
void rtlsdr_set_gpio_bit(rtlsdr_dev_t *dev, uint8_t gpio, int val);
|
|
||||||
@@ -1430,6 +1432,16 @@ int rtlsdr_get_index_by_serial(const char *serial)
|
|
||||||
return -3;
|
|
||||||
}
|
|
||||||
|
|
||||||
+/* Returns true if the manufact_check and product_check strings match what is in the dongles EEPROM */
|
|
||||||
+int rtlsdr_check_dongle_model(void *dev, char *manufact_check, char *product_check)
|
|
||||||
+{
|
|
||||||
+ if ((strcmp(((rtlsdr_dev_t *)dev)->manufact, manufact_check) == 0&& strcmp(((rtlsdr_dev_t *)dev)->product, product_check) == 0))
|
|
||||||
+ return 1;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
@@ -1528,6 +1540,9 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
|
|
||||||
rtlsdr_init_baseband(dev);
|
|
||||||
dev->dev_lost = 0;
|
|
||||||
|
|
||||||
+ /* Get device manufacturer and product id */
|
|
||||||
+ r = rtlsdr_get_usb_strings(dev, dev->manufact, dev->product, NULL);
|
|
||||||
+
|
|
||||||
/* Probe tuners */
|
|
||||||
rtlsdr_set_i2c_repeater(dev, 1);
|
|
||||||
|
|
||||||
@@ -1555,6 +1570,10 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
|
|
||||||
reg = rtlsdr_i2c_read_reg(dev, R828D_I2C_ADDR, R82XX_CHECK_ADDR);
|
|
||||||
if (reg == R82XX_CHECK_VAL) {
|
|
||||||
fprintf(stderr, "Found Rafael Micro R828D tuner\n");
|
|
||||||
+
|
|
||||||
+ if (rtlsdr_check_dongle_model(dev, "RTLSDRBlog", "Blog V4"))
|
|
||||||
+ fprintf(stderr, "RTL-SDR Blog V4 Detected\n");
|
|
||||||
+
|
|
||||||
dev->tuner_type = RTLSDR_TUNER_R828D;
|
|
||||||
goto found;
|
|
||||||
}
|
|
||||||
@@ -1588,7 +1607,10 @@ int rtlsdr_open(rtlsdr_dev_t **out_dev, uint32_t index)
|
|
||||||
|
|
||||||
switch (dev->tuner_type) {
|
|
||||||
case RTLSDR_TUNER_R828D:
|
|
||||||
- dev->tun_xtal = R828D_XTAL_FREQ;
|
|
||||||
+ /* If NOT an RTL-SDR Blog V4, set typical R828D 16 MHz freq. Otherwise, keep at 28.8 MHz. */
|
|
||||||
+ if (!(rtlsdr_check_dongle_model(dev, "RTLSDRBlog", "Blog V4"))) {
|
|
||||||
+ dev->tun_xtal = R828D_XTAL_FREQ;
|
|
||||||
+ }
|
|
||||||
/* fall-through */
|
|
||||||
case RTLSDR_TUNER_R820T:
|
|
||||||
/* disable Zero-IF mode */
|
|
||||||
diff --git a/src/tuner_r82xx.c b/src/tuner_r82xx.c
|
|
||||||
index 997abd7..1510fc3 100644
|
|
||||||
--- a/src/tuner_r82xx.c
|
|
||||||
+++ b/src/tuner_r82xx.c
|
|
||||||
@@ -33,6 +33,10 @@
|
|
||||||
#define MHZ(x) ((x)*1000*1000)
|
|
||||||
#define KHZ(x) ((x)*1000)
|
|
||||||
|
|
||||||
+#define HF 1
|
|
||||||
+#define VHF 2
|
|
||||||
+#define UHF 3
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Static constants
|
|
||||||
*/
|
|
||||||
@@ -1098,8 +1102,23 @@ int r82xx_set_bandwidth(struct r82xx_priv *priv, int bw, uint32_t rate)
|
|
||||||
int r82xx_set_freq(struct r82xx_priv *priv, uint32_t freq)
|
|
||||||
{
|
|
||||||
int rc = -1;
|
|
||||||
- uint32_t lo_freq = freq + priv->int_freq;
|
|
||||||
+ int is_rtlsdr_blog_v4;
|
|
||||||
+ uint32_t upconvert_freq;
|
|
||||||
+ uint32_t lo_freq;
|
|
||||||
uint8_t air_cable1_in;
|
|
||||||
+ uint8_t open_d;
|
|
||||||
+ uint8_t band;
|
|
||||||
+ uint8_t cable_2_in;
|
|
||||||
+ uint8_t cable_1_in;
|
|
||||||
+ uint8_t air_in;
|
|
||||||
+
|
|
||||||
+ is_rtlsdr_blog_v4 = rtlsdr_check_dongle_model(priv->rtl_dev, "RTLSDRBlog", "Blog V4");
|
|
||||||
+
|
|
||||||
+ /* if it's an RTL-SDR Blog V4, automatically upconvert by 28.8 MHz if we tune to HF
|
|
||||||
+ * so that we don't need to manually set any upconvert offset in the SDR software */
|
|
||||||
+ upconvert_freq = is_rtlsdr_blog_v4 ? ((freq < MHZ(28.8)) ? (freq + MHZ(28.8)) : freq) : freq;
|
|
||||||
+
|
|
||||||
+ lo_freq = upconvert_freq + priv->int_freq;
|
|
||||||
|
|
||||||
rc = r82xx_set_mux(priv, lo_freq);
|
|
||||||
if (rc < 0)
|
|
||||||
@@ -1109,16 +1128,60 @@ int r82xx_set_freq(struct r82xx_priv *priv, uint32_t freq)
|
|
||||||
if (rc < 0 || !priv->has_lock)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
- /* switch between 'Cable1' and 'Air-In' inputs on sticks with
|
|
||||||
- * R828D tuner. We switch at 345 MHz, because that's where the
|
|
||||||
- * noise-floor has about the same level with identical LNA
|
|
||||||
- * settings. The original driver used 320 MHz. */
|
|
||||||
- air_cable1_in = (freq > MHZ(345)) ? 0x00 : 0x60;
|
|
||||||
+ if (is_rtlsdr_blog_v4) {
|
|
||||||
+ /* determine if notch filters should be on or off notches are turned OFF
|
|
||||||
+ * when tuned within the notch band and ON when tuned outside the notch band.
|
|
||||||
+ */
|
|
||||||
+ open_d = (freq <= MHZ(2.2) || (freq >= MHZ(85) && freq <= MHZ(112)) || (freq >= MHZ(172) && freq <= MHZ(242))) ? 0x00 : 0x08;
|
|
||||||
+ rc = r82xx_write_reg_mask(priv, 0x17, open_d, 0x08);
|
|
||||||
+
|
|
||||||
+ if (rc < 0)
|
|
||||||
+ return rc;
|
|
||||||
+
|
|
||||||
+ /* select tuner band based on frequency and only switch if there is a band change
|
|
||||||
+ *(to avoid excessive register writes when tuning rapidly)
|
|
||||||
+ */
|
|
||||||
+ band = (freq <= MHZ(28.8)) ? HF : ((freq > MHZ(28.8) && freq < MHZ(250)) ? VHF : UHF);
|
|
||||||
+
|
|
||||||
+ /* switch between tuner inputs on the RTL-SDR Blog V4 */
|
|
||||||
+ if (band != priv->input) {
|
|
||||||
+ priv->input = band;
|
|
||||||
+
|
|
||||||
+ /* activate cable 2 (HF input) */
|
|
||||||
+ cable_2_in = (band == HF) ? 0x08 : 0x00;
|
|
||||||
+ rc = r82xx_write_reg_mask(priv, 0x06, cable_2_in, 0x08);
|
|
||||||
|
|
||||||
- if ((priv->cfg->rafael_chip == CHIP_R828D) &&
|
|
||||||
- (air_cable1_in != priv->input)) {
|
|
||||||
- priv->input = air_cable1_in;
|
|
||||||
- rc = r82xx_write_reg_mask(priv, 0x05, air_cable1_in, 0x60);
|
|
||||||
+ if (rc < 0)
|
|
||||||
+ goto err;
|
|
||||||
+
|
|
||||||
+ /* activate cable 1 (VHF input) */
|
|
||||||
+ cable_1_in = (band == VHF) ? 0x40 : 0x00;
|
|
||||||
+ rc = r82xx_write_reg_mask(priv, 0x05, cable_1_in, 0x40);
|
|
||||||
+
|
|
||||||
+ if (rc < 0)
|
|
||||||
+ goto err;
|
|
||||||
+
|
|
||||||
+ /* activate air_in (UHF input) */
|
|
||||||
+ air_in = (band == UHF) ? 0x00 : 0x20;
|
|
||||||
+ rc = r82xx_write_reg_mask(priv, 0x05, air_in, 0x20);
|
|
||||||
+
|
|
||||||
+ if (rc < 0)
|
|
||||||
+ goto err;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else /* Standard R828D dongle*/
|
|
||||||
+ {
|
|
||||||
+ /* switch between 'Cable1' and 'Air-In' inputs on sticks with
|
|
||||||
+ * R828D tuner. We switch at 345 MHz, because that's where the
|
|
||||||
+ * noise-floor has about the same level with identical LNA
|
|
||||||
+ * settings. The original driver used 320 MHz. */
|
|
||||||
+ air_cable1_in = (freq > MHZ(345)) ? 0x00 : 0x60;
|
|
||||||
+
|
|
||||||
+ if ((priv->cfg->rafael_chip == CHIP_R828D) &&
|
|
||||||
+ (air_cable1_in != priv->input)) {
|
|
||||||
+ priv->input = air_cable1_in;
|
|
||||||
+ rc = r82xx_write_reg_mask(priv, 0x05, air_cable1_in, 0x60);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
err:
|
|
3
rtl-sdr-2.0.0.tar.gz
Normal file
3
rtl-sdr-2.0.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3c2bcd22e44a7e490ae454ca930421beda172e1fe787b998c268faa47537f6d1
|
||||||
|
size 135199
|
@ -1,3 +1,53 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 2 19:09:15 UTC 2023 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
- Update to version 2.0.0
|
||||||
|
* add direct sampling to rtl_sdr
|
||||||
|
* add -D direct sampling flag to rtl_tcp
|
||||||
|
* add blog v4 upconverter gpio switch
|
||||||
|
* fix rtl_tcp error on windows when hints not initialized to 0
|
||||||
|
* add rtl-sdr blog v4 support
|
||||||
|
* Fix signal handler from getting stuck in an endless loop
|
||||||
|
* lib: Stop applying workaround for libusb < 1.0.9
|
||||||
|
* lib: force wait state after cancel of usb transfer
|
||||||
|
* rtl_fm: add a new option to select 2nd direct sampling mode
|
||||||
|
* rtl_tcp: put new DEFAULT_* constants in defines
|
||||||
|
* rtl_tcp: Extracted some constants out of printf strings
|
||||||
|
* cmake: populate pkgconfig file with prefix
|
||||||
|
* Add rtl_biast as install target
|
||||||
|
* tuner_r82xx: fix short-write in r82xx_read
|
||||||
|
* Fix for CMake < 3.12.0
|
||||||
|
* Add missing rtlsdrConfig.cmake
|
||||||
|
* rtl_tcp: Initialize listensocket
|
||||||
|
* rtl_tcp: Add IPv6 support
|
||||||
|
* Use udev uaccess rules
|
||||||
|
* rtl_fm/rtl_power: Improve scanning range parsing
|
||||||
|
* Improve librtlsdr.pc file
|
||||||
|
* lib: enable better UHF reception (>862MHz) for FC0013
|
||||||
|
* set CMake policy CMP0075 if it exists
|
||||||
|
* rtl_biast: Add rtl_biast
|
||||||
|
* lib: Add GPIO version of the bias tee configuration API
|
||||||
|
* rtl_eeprom: fix warnings
|
||||||
|
* lib: disable usbfs zero-copy support by default
|
||||||
|
* lib: fix memory leak in rtlsdr_open()
|
||||||
|
* lib: Add workaround for Linux usbfs mmap() bug
|
||||||
|
- Drop not longer needed patches
|
||||||
|
* rtl-sdr-0001-mmap-bug-arm.patch
|
||||||
|
* rtl-sdr-0002-fix-rtlsdr_open-memory-leak.patch
|
||||||
|
* rtl-sdr-0004-fix-rtl_eeprom-warnings.patch
|
||||||
|
* rtl-sdr-0006-add-rtl_biast.patch
|
||||||
|
* rtl-sdr-0009-fix-FC0013-UHF-reception.patch
|
||||||
|
* rtl-sdr-0010-improve-librtlsdr_pc.patch
|
||||||
|
* rtl-sdr-0011-improve-rtl_power--scanning-range-parsing.patch
|
||||||
|
* rtl-sdr-0013-add-IPV6-for-rtl_tcp.patch
|
||||||
|
* rtl-sdr-0014-initialize-listensocket_in-rtl_tcp.patch
|
||||||
|
* rtl-sdr-0015-modernize-cmake-usage.patch
|
||||||
|
* rtl-sdr-0019-fix-short-write-in-r82xx_read.patch
|
||||||
|
* rtl-sdr-0021-rtl_fm-add-option-for-2nd-direct-sampling-mode.patch
|
||||||
|
* rtl-sdr-0022-add-rtl-sdr-blog-v4-support.patch
|
||||||
|
- Update patch:
|
||||||
|
* 0001-Better-udev-handling.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Sep 9 18:44:47 UTC 2023 - Wojciech Kazubski <wk@ire.pw.edu.pl>
|
Sat Sep 9 18:44:47 UTC 2023 - Wojciech Kazubski <wk@ire.pw.edu.pl>
|
||||||
|
|
||||||
|
38
rtl-sdr.spec
38
rtl-sdr.spec
@ -1,8 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package rtl-sdr
|
# spec file for package rtl-sdr
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -17,33 +16,20 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define sover 0
|
%define sover 2
|
||||||
%define libname librtlsdr%{sover}
|
%define libname librtlsdr%{sover}
|
||||||
%define rtlsdr_group rtlsdr
|
%define rtlsdr_group rtlsdr
|
||||||
|
|
||||||
Name: rtl-sdr
|
Name: rtl-sdr
|
||||||
Version: 0.6.0
|
Version: 2.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Support programs for RTL2832
|
Summary: Support programs for RTL2832
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Productivity/Hamradio/Other
|
Group: Productivity/Hamradio/Other
|
||||||
URL: http://sdr.osmocom.org/trac/wiki/rtl-sdr
|
URL: http://sdr.osmocom.org/trac/wiki/rtl-sdr
|
||||||
#Git-Clone: https://git.osmocom.org/rtl-sdr
|
#Git-Clone: https://git.osmocom.org/rtl-sdr
|
||||||
Source: https://github.com/steve-m/librtlsdr/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source: https://github.com/steve-m/librtlsdr/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
Patch0: 0001-Better-udev-handling.patch
|
Patch0: 0001-Better-udev-handling.patch
|
||||||
Patch1: rtl-sdr-0001-mmap-bug-arm.patch
|
|
||||||
Patch2: rtl-sdr-0002-fix-rtlsdr_open-memory-leak.patch
|
|
||||||
Patch4: rtl-sdr-0004-fix-rtl_eeprom-warnings.patch
|
|
||||||
Patch6: rtl-sdr-0006-add-rtl_biast.patch
|
|
||||||
Patch9: rtl-sdr-0009-fix-FC0013-UHF-reception.patch
|
|
||||||
Patch10: rtl-sdr-0010-improve-librtlsdr_pc.patch
|
|
||||||
Patch11: rtl-sdr-0011-improve-rtl_power--scanning-range-parsing.patch
|
|
||||||
Patch13: rtl-sdr-0013-add-IPV6-for-rtl_tcp.patch
|
|
||||||
Patch14: rtl-sdr-0014-initialize-listensocket_in-rtl_tcp.patch
|
|
||||||
Patch15: rtl-sdr-0015-modernize-cmake-usage.patch
|
|
||||||
Patch19: rtl-sdr-0019-fix-short-write-in-r82xx_read.patch
|
|
||||||
Patch21: rtl-sdr-0021-rtl_fm-add-option-for-2nd-direct-sampling-mode.patch
|
|
||||||
Patch22: rtl-sdr-0022-add-rtl-sdr-blog-v4-support.patch
|
|
||||||
BuildRequires: cmake >= 3.7.2
|
BuildRequires: cmake >= 3.7.2
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@ -80,19 +66,6 @@ Library headers for rtl-sdr driver.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n librtlsdr-%{version}
|
%setup -q -n librtlsdr-%{version}
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch11 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch19 -p1
|
|
||||||
%patch21 -p1
|
|
||||||
%patch22 -p1
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -101,8 +74,7 @@ Library headers for rtl-sdr driver.
|
|||||||
-DUDEV_RULES_PATH=%{_udevrulesdir} \
|
-DUDEV_RULES_PATH=%{_udevrulesdir} \
|
||||||
-DUDEV_RULES_GROUP=%{rtlsdr_group} \
|
-DUDEV_RULES_GROUP=%{rtlsdr_group} \
|
||||||
-DDETACH_KERNEL_DRIVER=ON \
|
-DDETACH_KERNEL_DRIVER=ON \
|
||||||
-DENABLE_ZEROCOPY=ON \
|
-DENABLE_ZEROCOPY=ON
|
||||||
-Wno-dev
|
|
||||||
%make_jobs
|
%make_jobs
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
Loading…
Reference in New Issue
Block a user