mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
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:
@@ -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"
|
||||
@@ -2,21 +2,21 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 4 June 2025
|
||||
# Update : 5 June 2025
|
||||
# Update : 7 June 2025
|
||||
# Purpose : Wrapper script around dump1090
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. RTL-SDR is connected and detected
|
||||
# 1. RTL-SDR v2 is connected and detected
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. dump1099 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: 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
|
||||
|
||||
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_MAP_HTML="${DUMP1090_CONF_DIR}/gmap.html"
|
||||
|
||||
exit-if-no-sdr
|
||||
|
||||
if [[ ! -e ${DUMP1090_MAP_HTML} ]]; then
|
||||
et-log "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"
|
||||
et-log "Starting dump1090 in ${DUMP1090_CONF_DIR} with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
${CMD}
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
notify-user "RTL-SDR not detected. Please connect it and retry."
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 February 2025
|
||||
# Updated : 5 June 2025
|
||||
# Updated : 7 June 2025
|
||||
# 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 RED="${ESC}[1;31m"
|
||||
export BLUE="${ESC}[1;34m"
|
||||
@@ -22,3 +28,10 @@ show-err-dialog() {
|
||||
notify-user() {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user