mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
wsjtx - Initial work to add PnP support for WSJT-X 2.7.0
This commit is contained in:
+8
-1
@@ -124,8 +124,15 @@
|
|||||||
* [ ] Confirm callsign
|
* [ ] Confirm callsign
|
||||||
* [ ] Confirm flamp modem syncs with fldigi modem
|
* [ ] Confirm flamp modem syncs with fldigi modem
|
||||||
|
|
||||||
|
# WSJT-X
|
||||||
|
|
||||||
|
* [ ] Available via application search
|
||||||
|
* [ ] Callsign and grid displayed
|
||||||
|
* [ ] Tune up + full TX power out
|
||||||
|
* [ ] Decode data
|
||||||
|
|
||||||
## Offline Resources
|
## Offline Resources
|
||||||
|
|
||||||
* [ ] `offline` folder on Desktop
|
* [ ] `offline` folder on Desktop
|
||||||
* [ ] Check `nets` folder for `amrron` and `ghostnet`
|
* [ ] Check `nets` folder for `amrron` and `ghostnet`
|
||||||
* [ ] Test gpg signature verifcation gpg crypto doc
|
* [ ] Test gpg signature verifcation (see gpg crypto doc)
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[Common]
|
||||||
|
Mode=FT8
|
||||||
|
|
||||||
|
[Configuration]
|
||||||
|
CATNetworkPort=127.0.0.1:4532
|
||||||
|
MyCall=N0CALL
|
||||||
|
MyGrid=DM33
|
||||||
|
PTTport=/dev/et-cat
|
||||||
|
Polling=1
|
||||||
|
Rig=Hamlib NET rigctl
|
||||||
|
SoundInName="sysdefault:CARD=ET_AUDIO"
|
||||||
|
SoundOutName="sysdefault:CARD=ET_AUDIO"
|
||||||
Executable
+138
@@ -0,0 +1,138 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 22 March 2026
|
||||||
|
# Purpose : Wrapper script for starting WSJT-X with PnP support
|
||||||
|
#
|
||||||
|
# Preconditions
|
||||||
|
# 1. Supported radio and audio interface are connected and properly detected
|
||||||
|
#
|
||||||
|
# Postconditions
|
||||||
|
# 1. Stop all running EmComm Tools modes
|
||||||
|
# 2. WSJT-X audio settings updated
|
||||||
|
# 3. WSJT-X started
|
||||||
|
. /opt/emcomm-tools/bin/et-common
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "usage: $(basename $0) <command>"
|
||||||
|
echo " start - Update config and start WSJT-X"
|
||||||
|
echo " update-config - Update config"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -ne 1 ]; then
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify_user() {
|
||||||
|
notify-send \
|
||||||
|
-t 5000 \
|
||||||
|
--app-name="EmComm Tools" \
|
||||||
|
"$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
|
||||||
|
# Ensure that we have a pre-initialized CAT control connection for select radios
|
||||||
|
prime_rigctld_conn
|
||||||
|
|
||||||
|
/opt/emcomm-tools/bin/et-kill-all && update-config && /usr/bin/wsjtx &
|
||||||
|
|
||||||
|
if [ ! -e /dev/et-gps ]; then
|
||||||
|
notify-send -u critical -i \
|
||||||
|
/usr/share/icons/Yaru/48x48/status/dialog-information.png \
|
||||||
|
"No GPS. Ensure your time is accurate when WSJTX starts."
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
update-config() {
|
||||||
|
|
||||||
|
WSJTX_CONF_FILE="${HOME}/.config/WSJT-X.ini"
|
||||||
|
|
||||||
|
if [[ ! -e "${WSJTX_CONF_FILE}" ]]; then
|
||||||
|
et-log "Creating ${WSJTX_CONF_FILE} missing. Creating from template."
|
||||||
|
cp /etc/skel/.config/WSJT-X.ini ${WSJTX_CONF_FILE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||||
|
|
||||||
|
# Update configuration with current callsign and grid
|
||||||
|
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||||
|
GRID=$(et-system-info grid)
|
||||||
|
|
||||||
|
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||||
|
notify_user "Can't start WSJT-X. No callsign set. Run: et-user."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i "s|^MyCall.*|MyCall=${CALLSIGN}|" ${WSJTX_CONF_FILE}
|
||||||
|
sed -i "s|^MyGrid.*|MyGrid=${GRID}|" ${WSJTX_CONF_FILE}
|
||||||
|
|
||||||
|
et-log "Updated WSJT-X configuration with user callsign '${CALLSIGN}' and grid: '${GRID}'"
|
||||||
|
|
||||||
|
# 1. Check if the symlink was created by the udev rules
|
||||||
|
if [ -e /dev/et-audio ]; then
|
||||||
|
|
||||||
|
# 2. Check that this device was properly tagged with the ET_AUDIO env variable with a udev rule
|
||||||
|
APLAY_OUT=$(arecord -l | grep ET_AUDIO)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
AUDIO_DEVICE=$(echo $APLAY_OUT | cut -d"," -f2 | cut -d":" -f1 | awk '{print $2}')
|
||||||
|
|
||||||
|
# WSJT-X has an issue decoding the received audio following a
|
||||||
|
# transmission when the device below is used.
|
||||||
|
#
|
||||||
|
#WSJTX_AUDIO_DEVICE="plughw:CARD=ET_AUDIO,DEV=${AUDIO_DEVICE}"
|
||||||
|
#
|
||||||
|
# Instead, the following device solves this issue:
|
||||||
|
WSJTX_AUDIO_DEVICE="sysdefault:CARD=ET_AUDIO"
|
||||||
|
|
||||||
|
et-log "Using '${WSJTX_AUDIO_DEVICE}' for WSJT-X configuration."
|
||||||
|
|
||||||
|
# 3. Check for existing WSJT-X sound configuration
|
||||||
|
|
||||||
|
## Update input
|
||||||
|
grep "^SoundInName" ${WSJTX_CONF_FILE}
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
sed -i "s|^SoundInName.*|SoundInName=\"${WSJTX_AUDIO_DEVICE}\"|" ${WSJTX_CONF_FILE}
|
||||||
|
else
|
||||||
|
echo "SoundInName=\"${WSJTX_AUDIO_DEVICE}\"" >> ${WSJTX_CONF_FILE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Update output
|
||||||
|
grep "^SoundOutName" ${WSJTX_CONF_FILE}
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
sed -i "s|^SoundOutName.*|SoundOutName=\"${WSJTX_AUDIO_DEVICE}\"|" ${WSJTX_CONF_FILE}
|
||||||
|
else
|
||||||
|
echo "SoundOutName=\"${WSJTX_AUDIO_DEVICE}\"" >> ${WSJTX_CONF_FILE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Configure ALSA settings for sound card
|
||||||
|
/opt/emcomm-tools/bin/et-audio update-config
|
||||||
|
|
||||||
|
else
|
||||||
|
et-log "No ET_AUDIO device detected."
|
||||||
|
notify_user "Can't start WSJT-X. No ET_AUDIO device detected."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
et-log "No ET_AUDIO device plugged in."
|
||||||
|
notify_user "Can't start WSJT-X. No supported audio device plugged in."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
update-config)
|
||||||
|
update-config
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid command."
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=wsjtx
|
||||||
|
Comment=Amateur Radio Weak Signal Operating
|
||||||
|
Exec=/opt/emcomm-tools/bin/et-wsjtx start
|
||||||
|
Icon=wsjtx_icon
|
||||||
|
Terminal=false
|
||||||
|
X-MultipleArgs=false
|
||||||
|
Type=Application
|
||||||
|
Categories=AudioVideo;Audio;HamRadio;
|
||||||
|
StartupNotify=true
|
||||||
Executable
+39
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 22 March 2026
|
||||||
|
# Purpose : Install WSJT-X
|
||||||
|
set -e
|
||||||
|
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
|
||||||
|
trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR
|
||||||
|
|
||||||
|
. ./env.sh
|
||||||
|
. ../overlay/opt/emcomm-tools/bin/et-common
|
||||||
|
|
||||||
|
APP="wsjtx"
|
||||||
|
VERSION="2.7.0"
|
||||||
|
FILE="wsjtx_${VERSION}_amd64.deb"
|
||||||
|
URL="https://sourceforge.net/projects/wsjt/files/wsjtx-${VERSION}/${FILE}"
|
||||||
|
|
||||||
|
et-log "Installing ${APP} ${VERSION}..."
|
||||||
|
|
||||||
|
et-log "Installing dependencies..."
|
||||||
|
|
||||||
|
apt install \
|
||||||
|
fonts-font-awesome \
|
||||||
|
fonts-open-sans \
|
||||||
|
libboost-filesystem1.74.0 \
|
||||||
|
libboost-log1.74.0 \
|
||||||
|
libboost-thread1.74.0 \
|
||||||
|
libqcustomplot2.0 \
|
||||||
|
-y
|
||||||
|
|
||||||
|
if [[ ! -e "${ET_DIST_DIR}/${FILE}" ]]; then
|
||||||
|
et-log "Downloading ${APP}: ${URL}"
|
||||||
|
download_with_retries ${URL} ${FILE}
|
||||||
|
mv -v ${FILE} ${ET_DIST_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
dpkg -i "${ET_DIST_DIR}/${FILE}"
|
||||||
|
|
||||||
|
et-log "Updating ${APP} launcher icon to support PNP..."
|
||||||
|
cp -v ../overlay/usr/share/applications/wsjtx.desktop /usr/share/applications/
|
||||||
+4
-1
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 16 March 2024
|
# Date : 16 March 2024
|
||||||
# Updated : 14 March 2026
|
# Updated : 22 March 2026
|
||||||
# Purpose : Main installer for EmComm Tools Community (ETC)
|
# Purpose : Main installer for EmComm Tools Community (ETC)
|
||||||
|
|
||||||
. ./env.sh
|
. ./env.sh
|
||||||
@@ -108,3 +108,6 @@ exitIfNotRoot
|
|||||||
|
|
||||||
# Install offline resources
|
# Install offline resources
|
||||||
./install-offline-lib.sh
|
./install-offline-lib.sh
|
||||||
|
|
||||||
|
# Install WSJT-X (FT8)
|
||||||
|
./install-wsjtx.sh
|
||||||
|
|||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 22 March 2026
|
||||||
|
# Purpose : Test JS8Call installation
|
||||||
|
|
||||||
|
OUT=$(which js8call)
|
||||||
|
exit $?
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 22 March 2026
|
||||||
|
# Purpose : Test WSJT-X installation
|
||||||
|
|
||||||
|
OUT=$(which wsjtx)
|
||||||
|
exit $?
|
||||||
Reference in New Issue
Block a user