Merge pull request #51 from mckeehan/feature/rtl-sdr-v4

Feature/rtl sdr v4
This commit is contained in:
thetechprepper
2025-10-05 09:54:12 -07:00
committed by GitHub
4 changed files with 64 additions and 4 deletions
+1
View File
@@ -36,6 +36,7 @@ ${font DejaVu Sans Mono:size=11}${color yellow}Radio: ${execpi 10 et-system-info
CAT : ${execpi 10 et-system-info et-cat} CAT : ${execpi 10 et-system-info et-cat}
GPS : ${execpi 10 et-system-info et-gps} GPS : ${execpi 10 et-system-info et-gps}
Audio: ${execpi 10 et-system-info et-audio} Audio: ${execpi 10 et-system-info et-audio}
${if_existing /dev/et-sdr}SDR : ${execpi 10 et-system-info et-sdr}${endif}
${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}OPERATOR ${font DejaVu Sans:bold:size=10}${color #8d5133}${alignc}OPERATOR
${font DejaVu Sans Mono:size=11}${color yellow}Callsign: ${execpi 10 et-system-info callsign} ${font DejaVu Sans Mono:size=11}${color yellow}Callsign: ${execpi 10 et-system-info callsign}
+2
View File
@@ -13,3 +13,5 @@
KERNEL=="swradio0", \ KERNEL=="swradio0", \
GROUP="dialout", MODE="0660", SYMLINK+="et-sdr" GROUP="dialout", MODE="0660", SYMLINK+="et-sdr"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", GROUP="dialout", MODE="0660", SYMLINK+="et-sdr"
@@ -15,6 +15,7 @@ function usage() {
echo " et-gps - Show state of GPS interface" echo " et-gps - Show state of GPS interface"
echo " et-time - Show if time is synched via GPS" echo " et-time - Show if time is synched via GPS"
echo " et-mode - Show current mode" echo " et-mode - Show current mode"
echo " et-sdr - Show state of SDR interface"
echo " grid - Current grid square defined by user" echo " grid - Current grid square defined by user"
echo " ip - System IP address" echo " ip - System IP address"
echo " release - EmComm Tools release" echo " release - EmComm Tools release"
@@ -127,6 +128,15 @@ case $1 in
fi fi
;; ;;
et-sdr)
# 1. Check if the symlink was created by the udev rules
if [ -e /dev/et-sdr ]; then
echo "Connected";
else
echo "Not connected";
fi
;;
et-gps) et-gps)
# 1. Check if the symlink was created by the udev rules # 1. Check if the symlink was created by the udev rules
+51 -4
View File
@@ -6,7 +6,54 @@
set -e set -e
et-log "Installing SDR tools..." et-log "Installing SDR tools..."
apt install \ . ./env.sh
rtl-sdr \
librtlsdr-dev \ APP=rtl-sdr
-y REPO=https://github.com/osmocom/rtl-sdr
REPO_SRC_DIR="${ET_SRC_DIR}/${APP}"
[[ ! -e ${ET_SRC_DIR} ]] && mkdir ${ET_SRC_DIR}
CWD_DIR=`pwd`
et-log "Installing ${APP} build dependencies..."
apt purge ^librtlsdr -y
rm -rvf /usr/lib/librtlsdr* /usr/include/rtl-sdr* /usr/local/lib/librtlsdr* /usr/local/include/rtl-sdr* /usr/local/include/rtl_* /usr/local/bin/rtl_*
apt-get install \
libusb-1.0-0-dev \
git \
cmake \
pkg-config \
debhelper \
-y
et-log "Cloning ${APP} repository..."
if [[ ! -e ${REPO_SRC_DIR} ]]; then
mkdir ${REPO_SRC_DIR}
cd ${REPO_SRC_DIR} && git clone ${REPO} src
fi
cd ${REPO_SRC_DIR}/src
et-log "Building ${APP}..."
if [[ ! -e build ]]; then
mkdir build
fi
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
make install
ldconfig
echo 'blacklist dvb_usb_rtl28xxu' | tee --append /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
cd ..
dpkg-buildpackage -b --no-sign
cd ..
dpkg -i librtlsdr0_*
dpkg -i librtlsdr-dev_*
cd ${CWD_DIR}