mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
Merge pull request #17 from thetechprepper/feature/qttermtcp
Merging feature/qttermtcp
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
[General]
|
||||
AGWEnable=1
|
||||
AGWHost=127.0.0.1
|
||||
AGWMonEnable=0
|
||||
AGWPaclen=80
|
||||
AGWPort=8000
|
||||
AGWTermCall=N0CALL
|
||||
AGWToCalls=TTPBBS,
|
||||
TermMode=0
|
||||
YAPPPath=
|
||||
singlemodeFormat=1
|
||||
@@ -13,6 +13,7 @@ MODE_ID_NONE="none"
|
||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||
MODE_ID_APRS_CLIENT="aprs-client"
|
||||
MODE_ID_BBS_CLIENT="bbs-client"
|
||||
MODE_ID_BBS_CLIENT2="bbs-client2"
|
||||
MODE_ID_CHAT_CLIENT="chat-chattervox"
|
||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||
@@ -67,6 +68,7 @@ options=()
|
||||
options+=("${MODE_ID_NONE}" "No mode selected")
|
||||
options+=("${MODE_ID_APRS_CLIENT}" "APRS Client (YAAC)")
|
||||
options+=("${MODE_ID_BBS_CLIENT}" "BBS Client (Paracon)")
|
||||
options+=("${MODE_ID_BBS_CLIENT2}" "BBS Client (QtTermTCP)")
|
||||
options+=("${MODE_ID_CHAT_CLIENT}" "Chat (chattervox)")
|
||||
options+=("${MODE_ID_APRS_DIGIPEATER}" "APRS Digipeater")
|
||||
options+=("${MODE_ID_PACKET_DIGIPEATER}" "Packet Digipeater")
|
||||
@@ -102,6 +104,11 @@ if [ $exit_status -eq 0 ]; then
|
||||
et-log "Starting Paracon."
|
||||
et-paracon start
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT2})
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
et-log "Starting QtTermTCP."
|
||||
et-qttermtcp start
|
||||
;;
|
||||
${MODE_ID_CHAT_CLIENT})
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
et-log "Starting chattervox"
|
||||
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 17 December 2024
|
||||
# Purpose : Wrapper script for starting JS8Call with PnP support
|
||||
#
|
||||
# Preconditions
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. The BBS Client (QtTermTCP) mode is started via et-mode.
|
||||
#
|
||||
# Postconditions
|
||||
# 1. Stop all running EmComm Tools modes
|
||||
# 2. QtTermTCP audio settings updated
|
||||
# 3. QtTermTCP started
|
||||
|
||||
CONF_DIR="${HOME}/.config"
|
||||
CONF_FILE="${CONF_DIR}/QtTermTCP.ini"
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " start - Update config and start JS8Call"
|
||||
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() {
|
||||
CWD_DIR=$(pwd)
|
||||
|
||||
cd ${CONF_DIR}
|
||||
|
||||
update-config && /usr/local/bin/QtTermTCP
|
||||
|
||||
cd ${CWD_DIR}
|
||||
}
|
||||
|
||||
update-config () {
|
||||
|
||||
|
||||
[ -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)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start QtTermTCP. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sed -i "s|^AGWTermCall.*|AGWTermCall=${CALLSIGN}|" ${CONF_FILE}
|
||||
sed -i "s|^YAPPPath.*|YAPPPath=${HOME}/Downloads|" ${CONF_FILE}
|
||||
|
||||
et-log "Updated QtTermTCP configuration with user callsign '${CALLSIGN}'"
|
||||
|
||||
# 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
|
||||
## 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 QtTermInfo. No ET_AUDIO device detected."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
et-log "No ET_AUDIO device plugged in."
|
||||
notify_user "Can't start QtTermInfo. 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
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 October 2024
|
||||
# Updated : 5 December 2024
|
||||
# Updated : 17 December 2024
|
||||
# Purpose : Utility script for dumping system information
|
||||
|
||||
function usage() {
|
||||
@@ -177,6 +177,7 @@ case $1 in
|
||||
MODE_ID_NONE="none"
|
||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||
MODE_ID_BBS_CLIENT="bbs-client"
|
||||
MODE_ID_BBS_CLIENT2="bbs-client2"
|
||||
MODE_ID_CHAT_CLIENT="chat-chattervox"
|
||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||
MODE_ID_APRS_CLIENT="aprs-client"
|
||||
@@ -202,6 +203,9 @@ case $1 in
|
||||
${MODE_ID_BBS_CLIENT})
|
||||
echo "BBS Client"
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT2})
|
||||
echo "BBS Client"
|
||||
;;
|
||||
${MODE_ID_CHAT_CLIENT})
|
||||
echo "Chat (chattervox)"
|
||||
;;
|
||||
|
||||
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 17 December 2024
|
||||
# Purpose : Install QtTermTCP
|
||||
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
|
||||
|
||||
APP=qtermtcp
|
||||
VERSION=latest
|
||||
DOWNLOAD_FILE=QtTermSource.zip
|
||||
BIN_FILE=QtTermTCP
|
||||
INSTALL_DIR="/opt/${APP}-${VERSION}"
|
||||
INSTALL_BIN_DIR="${INSTALL_DIR}/bin"
|
||||
LINK_PATH="/opt/${APP}"
|
||||
|
||||
et-log "Installing QtTermTCP build dependencies..."
|
||||
apt install \
|
||||
qtbase5-dev \
|
||||
qtbase5-dev-tools \
|
||||
qt5-qmake \
|
||||
qtchooser \
|
||||
qtmultimedia5-dev \
|
||||
libqt5serialport5-dev \
|
||||
libfftw3-dev \
|
||||
qttools5-dev-tools \
|
||||
-y
|
||||
|
||||
if [ ! -e ${ET_DIST_DIR}/${DOWNLOAD_FILE} ]; then
|
||||
|
||||
URL=http://www.cantab.net/users/john.wiseman/Downloads/${DOWNLOAD_FILE}
|
||||
|
||||
et-log "Downloading QtTermTCP: ${URL}"
|
||||
curl -s -L -o ${DOWNLOAD_FILE} --fail ${URL}
|
||||
|
||||
mv -v ${DOWNLOAD_FILE} ${ET_DIST_DIR}
|
||||
fi
|
||||
|
||||
CWD_DIR=`pwd`
|
||||
|
||||
# Only build once
|
||||
if [ ! -e "${ET_SRC_DIR}/${APP}/${BIN_FILE}" ]; then
|
||||
cd ${ET_SRC_DIR}
|
||||
mkdir -v ${APP} && cd ${APP}
|
||||
unzip ${ET_DIST_DIR}/${DOWNLOAD_FILE}
|
||||
|
||||
et-log "Building QtTermTCP.."
|
||||
qmake && make
|
||||
fi
|
||||
|
||||
[ ! -e ${INSTALL_BIN_DIR} ] && mkdir -v -p ${INSTALL_BIN_DIR}
|
||||
cp -v "${ET_SRC_DIR}/${APP}/${BIN_FILE}" ${INSTALL_BIN_DIR}
|
||||
|
||||
[ -e ${LINK_PATH} ] && rm ${LINK_PATH}
|
||||
ln -s ${INSTALL_DIR} ${LINK_PATH}
|
||||
|
||||
stow -v -d /opt ${APP} -t /usr/local
|
||||
|
||||
cd $CWD_DIR
|
||||
+2
-1
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 16 March 2024
|
||||
# Updated : 4 December 2024
|
||||
# Updated : 17 December 2024
|
||||
# Purpose : Main installer for EmComm Tools OS Community
|
||||
|
||||
. ./env.sh
|
||||
@@ -41,6 +41,7 @@ exitIfNotRoot
|
||||
./install-bbs-client.sh
|
||||
./install-bbs-server.sh
|
||||
./install-chattervox.sh
|
||||
./install-qttermtcp.sh
|
||||
|
||||
# Install modems
|
||||
./install-ardop.sh
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 17 December 2024
|
||||
# Purpose : Test QtTermTCP installation
|
||||
|
||||
OUT=$(which QtTermTCP)
|
||||
exit $?
|
||||
Reference in New Issue
Block a user