From 62989b265031363aa1af7a79d00d5e3b3e25575f Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 29 Nov 2017 19:26:09 +0100 Subject: [PATCH] Added installable udev rule files --- CMakeLists.txt | 4 + udev-rules/52-airspy.rules | 1 + udev-rules/53-adi-plutosdr-usb.rules | 8 ++ udev-rules/53-hackrf.rules | 13 +++ udev-rules/64-limesuite.rules | 5 + udev-rules/88-nuand.rules | 8 ++ fcd.rules => udev-rules/fcd.rules | 0 udev-rules/install.sh | 13 +++ udev-rules/mirisdr.rules | 22 +++++ udev-rules/rtl-sdr.rules | 139 +++++++++++++++++++++++++++ 10 files changed, 213 insertions(+) create mode 100644 udev-rules/52-airspy.rules create mode 100644 udev-rules/53-adi-plutosdr-usb.rules create mode 100644 udev-rules/53-hackrf.rules create mode 100644 udev-rules/64-limesuite.rules create mode 100644 udev-rules/88-nuand.rules rename fcd.rules => udev-rules/fcd.rules (100%) create mode 100755 udev-rules/install.sh create mode 100644 udev-rules/mirisdr.rules create mode 100644 udev-rules/rtl-sdr.rules diff --git a/CMakeLists.txt b/CMakeLists.txt index 5275d71cc..5126bed39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,6 +261,10 @@ endif(LIBUSB_FOUND AND UNIX) install(TARGETS sdrangel DESTINATION bin) #install(TARGETS sdrbase DESTINATION lib) +#install files and directories +install(DIRECTORY udev-rules DESTINATION share/sdrangel) +install(FILES udev-rules/install.sh DESTINATION share/sdrangel/udev-rules PERMISSIONS WORLD_EXECUTE) + ############################################################################## # uninstall target diff --git a/udev-rules/52-airspy.rules b/udev-rules/52-airspy.rules new file mode 100644 index 000000000..5b99532fc --- /dev/null +++ b/udev-rules/52-airspy.rules @@ -0,0 +1 @@ +ATTR{idVendor}=="1d50", ATTR{idProduct}=="60a1", SYMLINK+="airspy-%k", MODE="666", GROUP="plugdev" diff --git a/udev-rules/53-adi-plutosdr-usb.rules b/udev-rules/53-adi-plutosdr-usb.rules new file mode 100644 index 000000000..c3f576400 --- /dev/null +++ b/udev-rules/53-adi-plutosdr-usb.rules @@ -0,0 +1,8 @@ +# allow "plugdev" group read/write access to ADI PlutoSDR devices +# DFU Device +SUBSYSTEM=="usb", ATTRS{idVendor}=="0456", ATTRS{idProduct}=="b674", MODE="0666", GROUP="plugdev" +# SDR Device +SUBSYSTEM=="usb", ATTRS{idVendor}=="0456", ATTRS{idProduct}=="b673", MODE="0666", GROUP="plugdev" +# tell the ModemManager (part of the NetworkManager suite) that the device is not a modem, +# and don't send AT commands to it +SUBSYSTEM=="usb", ATTRS{idVendor}=="0456", ATTRS{idProduct}=="b673", ENV{ID_MM_DEVICE_IGNORE}="1" diff --git a/udev-rules/53-hackrf.rules b/udev-rules/53-hackrf.rules new file mode 100644 index 000000000..d76ada6d3 --- /dev/null +++ b/udev-rules/53-hackrf.rules @@ -0,0 +1,13 @@ +# HackRF Jawbreaker +ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="666", GROUP="plugdev" +# HackRF One +ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="666", GROUP="plugdev" +# rad1o +ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="666", GROUP="plugdev" +# NXP Semiconductors DFU mode (HackRF and rad1o) +ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="666", GROUP="plugdev" +# rad1o "full flash" mode +KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0042", SYMLINK+="rad1o-flash-%k", MODE="666", GROUP="plugdev" +# rad1o flash disk +KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0082", SYMLINK+="rad1o-msc-%k", MODE="666", GROUP="plugdev" +# diff --git a/udev-rules/64-limesuite.rules b/udev-rules/64-limesuite.rules new file mode 100644 index 000000000..ea991f3a5 --- /dev/null +++ b/udev-rules/64-limesuite.rules @@ -0,0 +1,5 @@ +SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="8613", SYMLINK+="stream-%k", TAG+="uaccess" +SUBSYSTEM=="usb", ATTR{idVendor}=="04b4", ATTR{idProduct}=="00f1", SYMLINK+="stream-%k", TAG+="uaccess" +SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="601f", SYMLINK+="stream-%k", TAG+="uaccess" +SUBSYSTEM=="usb", ATTR{idVendor}=="1d50", ATTR{idProduct}=="6108", SYMLINK+="stream-%k", TAG+="uaccess" +SUBSYSTEM=="xillybus", MODE="666", OPTIONS="last_rule" diff --git a/udev-rules/88-nuand.rules b/udev-rules/88-nuand.rules new file mode 100644 index 000000000..c8d182dd4 --- /dev/null +++ b/udev-rules/88-nuand.rules @@ -0,0 +1,8 @@ +# Nuand bladeRF +ATTR{idVendor}=="2cf0", ATTR{idProduct}=="5246", MODE="666", GROUP="plugdev" + +# Nuand bladeRF, legacy VID/PID +ATTR{idVendor}=="1d50", ATTR{idProduct}=="6066", MODE="666", GROUP="plugdev" + +# Cypress Bootloader +ATTR{idVendor}=="04b4", ATTR{idProduct}=="00f3", MODE="666", GROUP="plugdev" diff --git a/fcd.rules b/udev-rules/fcd.rules similarity index 100% rename from fcd.rules rename to udev-rules/fcd.rules diff --git a/udev-rules/install.sh b/udev-rules/install.sh new file mode 100755 index 000000000..1164a0d23 --- /dev/null +++ b/udev-rules/install.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +cp 52-airspy.rules /etc/udev/rules.d/ +cp 88-nuand.rules /etc/udev/rules.d/ +cp fcd.rules /etc/udev/rules.d/ +cp 53-hackrf.rules /etc/udev/rules.d/ +cp 64-limesuite.rules /etc/udev/rules.d/ +cp 53-adi-plutosdr-usb.rules /etc/udev/rules.d/ +cp rtl-sdr.rules /etc/udev/rules.d/ +cp mirisdr.rules /etc/udev/rules.d/ + +udevadm control --reload-rules +udevadm trigger diff --git a/udev-rules/mirisdr.rules b/udev-rules/mirisdr.rules new file mode 100644 index 000000000..5fe494ecb --- /dev/null +++ b/udev-rules/mirisdr.rules @@ -0,0 +1,22 @@ +# +# Copyright 2012 Osmocom MiriSDR project +# +# 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 +# (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 . +# + +# Mirics MSi2500 default (e.g. VTX3D card) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1df7", ATTRS{idProduct}=="2500", MODE:="0666" + +# IO-DATA GV-TV100 stick +SUBSYSTEMS=="usb", ATTRS{idVendor}=="04bb", ATTRS{idProduct}=="0537", MODE:="0666" diff --git a/udev-rules/rtl-sdr.rules b/udev-rules/rtl-sdr.rules new file mode 100644 index 000000000..421345461 --- /dev/null +++ b/udev-rules/rtl-sdr.rules @@ -0,0 +1,139 @@ +# +# Copyright 2012-2013 Osmocom rtl-sdr project +# +# 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 +# (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 . +# + +# original RTL2832U vid/pid (hama nano, for example) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", MODE:="0666" + +# RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc. +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666" + +# DigitalNow Quad DVB-T PCI-E card (4x FC0012?) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", MODE:="0666" + +# Leadtek WinFast DTV Dongle mini D (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", MODE:="0666" + +# Genius TVGo DVB-T03 USB dongle (Ver. B) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", MODE:="0666" + +# Terratec Cinergy T Stick Black (rev 1) (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", MODE:="0666" + +# Terratec NOXON rev 1 (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", MODE:="0666" + +# Terratec Deutschlandradio DAB Stick (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", MODE:="0666" + +# Terratec NOXON DAB Stick - Radio Energy (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", MODE:="0666" + +# 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", MODE:="0666" + +# Terratec WDR DAB Stick (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", MODE:="0666" + +# Terratec MuellerVerlag DAB Stick (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", MODE:="0666" + +# Terratec Fraunhofer DAB Stick (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", MODE:="0666" + +# Terratec Cinergy T Stick RC (Rev.3) (E4000) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", MODE:="0666" + +# Terratec T Stick PLUS (E4000) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", MODE:="0666" + +# Terratec NOXON rev 2 (E4000) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", MODE:="0666" + +# PixelView PV-DT235U(RN) (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", MODE:="0666" + +# Astrometa DVB-T/DVB-T2 (R828D) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", MODE:="0666" + +# Compro Videomate U620F (E4000) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", MODE:="0666" + +# Compro Videomate U650F (E4000) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", MODE:="0666" + +# Compro Videomate U680F (E4000) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", MODE:="0666" + +# GIGABYTE GT-U7300 (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", MODE:="0666" + +# DIKOM USB-DVBT HD +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", MODE:="0666" + +# Peak 102569AGPK (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", MODE:="0666" + +# KWorld KW-UB450-T USB DVB-T Pico TV (TUA9001) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", MODE:="0666" + +# Zaapa ZT-MINDVBZP (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", MODE:="0666" + +# SVEON STV20 DVB-T USB & FM (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", MODE:="0666" + +# Twintech UT-40 (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", MODE:="0666" + +# ASUS U3100MINI_PLUS_V2 (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", MODE:="0666" + +# SVEON STV27 DVB-T USB & FM (FC0013) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", MODE:="0666" + +# SVEON STV21 DVB-T USB & FM +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", MODE:="0666" + +# Dexatek DK DVB-T Dongle (Logilink VG0002A) (FC2580) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", MODE:="0666" + +# Dexatek DK DVB-T Dongle (MSI DigiVox mini II V3.0) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", MODE:="0666" + +# Dexatek DK 5217 DVB-T Dongle (FC2580) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", MODE:="0666" + +# MSI DigiVox Micro HD (FC2580) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", MODE:="0666" + +# Sweex DVB-T USB (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", MODE:="0666" + +# GTek T803 (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", MODE:="0666" + +# Lifeview LV5TDeluxe (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", MODE:="0666" + +# MyGica TD312 (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", MODE:="0666" + +# PROlectrix DV107669 (FC0012) +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", MODE:="0666"