et-aircraft - Added support for detecting the RTL-SDR v2 as a new supported ET device. Enforced presence of SDR device before starting dump1090

This commit is contained in:
thetechprepper
2025-06-07 06:07:01 -07:00
parent fa639094a7
commit 87b688159a
3 changed files with 37 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
# Author : Gaston Gonzalez
# Date : 7 June 2025
# Purpose : udev rules for supported SDRs
#
# Supported Devices
# 1. RTL-SDR Blog v2
#
# Preconditions:
# 1. SDR connected via USB cable
#
# Postconditions:
# 1. /dev/et-sdr created
KERNEL=="swradio0", \
GROUP="dialout", MODE="0660", SYMLINK+="et-sdr"
+8 -6
View File
@@ -2,21 +2,21 @@
# #
# Author : Gaston Gonzalez # Author : Gaston Gonzalez
# Date : 4 June 2025 # Date : 4 June 2025
# Update : 5 June 2025 # Update : 7 June 2025
# Purpose : Wrapper script around dump1090 # Purpose : Wrapper script around dump1090
# #
# Preconditions: # Preconditions:
# 1. RTL-SDR is connected and detected # 1. RTL-SDR v2 is connected and detected
# #
# Postconditions: # Postconditions:
# 1. dump1099 is launched # 1. dump1099 is launched
# 2. A map is launched # 2. A map is launched
# TODO: Increse size of aircraft
# TODO: Research why RTL-SDR v4 does not work
# TODO: Check for RTL-SDR device
# TODO: Add a systemd user service to start dump1090 # TODO: Add a systemd user service to start dump1090
# TODO: Use icon and add to launcher # TODO: Use icon and add to launcher
# TODO: Increse size of aircraft
# TODO: Research why RTL-SDR v4 does not work
# TODO: Test RTL-SDR v3
# TODO: Use local new ETC offline map engine # TODO: Use local new ETC offline map engine
source /opt/emcomm-tools/bin/et-common source /opt/emcomm-tools/bin/et-common
@@ -24,6 +24,8 @@ source /opt/emcomm-tools/bin/et-common
DUMP1090_CONF_DIR="${HOME}/.local/share/emcomm-tools/dump1090" DUMP1090_CONF_DIR="${HOME}/.local/share/emcomm-tools/dump1090"
DUMP1090_MAP_HTML="${DUMP1090_CONF_DIR}/gmap.html" DUMP1090_MAP_HTML="${DUMP1090_CONF_DIR}/gmap.html"
exit-if-no-sdr
if [[ ! -e ${DUMP1090_MAP_HTML} ]]; then if [[ ! -e ${DUMP1090_MAP_HTML} ]]; then
et-log "Map HTML not found: ${DUMP1090_MAP_HTML}" et-log "Map HTML not found: ${DUMP1090_MAP_HTML}"
notify-user "Map HTML not found: ${DUMP1090_MAP_HTML}" notify-user "Map HTML not found: ${DUMP1090_MAP_HTML}"
@@ -54,7 +56,7 @@ fi
CMD="dump1090 --net --net-http-port 1090" CMD="dump1090 --net --net-http-port 1090"
et-log "Starting dump1090 in ${DUMP1090_CONF_DIR} with: ${CMD}" et-log "Starting dump1090 in ${DUMP1090_CONF_DIR} with: ${CMD}"
${CMD} ${CMD}
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
notify-user "RTL-SDR not detected. Please connect it and retry." notify-user "RTL-SDR not detected. Please connect it and retry."
+14 -1
View File
@@ -1,9 +1,15 @@
#!/bin/bash #!/bin/bash
# Author : Gaston Gonzalez # Author : Gaston Gonzalez
# Date : 1 February 2025 # Date : 1 February 2025
# Updated : 5 June 2025 # Updated : 7 June 2025
# Purpose : Common environment variables and functions # Purpose : Common environment variables and functions
# Standardized device paths for supported hardware
export ET_DEVICE_AUDIO="/dev/et-audio"
export ET_DEVICE_CAT="/dev/et-cat"
export ET_DEVICE_GPS="/dev/et-gps"
export ET_DEVICE_SDR="/dev/et-sdr"
export ESC="\x1B" export ESC="\x1B"
export RED="${ESC}[1;31m" export RED="${ESC}[1;31m"
export BLUE="${ESC}[1;34m" export BLUE="${ESC}[1;34m"
@@ -22,3 +28,10 @@ show-err-dialog() {
notify-user() { notify-user() {
notify-send -t 5000 --app-name="EmComm Tools" "$1" notify-send -t 5000 --app-name="EmComm Tools" "$1"
} }
exit-if-no-sdr() {
if [[ ! -e ${ET_DEVICE_SDR} ]]; then
et-log "No ${ET_DEVICE_SDR} detected."
exit 1
fi
}