mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
YAAC - Added Bluetooth TNC support to YAAC for the UV Pro and VGC VR-N76
This commit is contained in:
@@ -3,4 +3,5 @@
|
||||
<map MAP_XML_VERSION="1.0">
|
||||
<entry key="Port1" value="KISS-over-TCP,localhost,8001,{{ET_CALLSIGN}},,true,TEMP1;;true;false;1;0/-120/10;0;MYCALL"/>
|
||||
<entry key="Port2" value="GPSD,localhost,2947,,,false;;true;false;1;0/-120/10;0;"/>
|
||||
<entry key="Port3" value="Serial_TNC,/dev/rfcomm0,1200,{{ET_CALLSIGN}},,true,TEMP1;;true;false;1;0/-120/10;0;"/>
|
||||
</map>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 January 2025
|
||||
# Updated : 15 March 2025
|
||||
# Updated : 16 March 2025
|
||||
# Purpose : Utility for accessing the Bluetooth TNC on the BTECH UV PRO.
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
@@ -264,7 +264,7 @@ EOF
|
||||
stop_all_services
|
||||
|
||||
echo -e "\nSelect a packet application to start:"
|
||||
options=("axcall" "QtTermTCP" "Winlink" "Exit")
|
||||
options=("axcall" "QtTermTCP" "Winlink" "YAAC" "Exit")
|
||||
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
@@ -293,6 +293,10 @@ EOF
|
||||
min http://localhost:8080 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"YAAC")
|
||||
et-yaac start
|
||||
break
|
||||
;;
|
||||
"Exit")
|
||||
break
|
||||
;;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Authors : Gaston Gonzalez
|
||||
# : Clifton Jones
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 1 January 2025
|
||||
# Updated : 15 March 2025
|
||||
# Purpose : Utility for accessing the Bluetooth TNC on the VGC VR-N76.
|
||||
# Updated : 16 March 2025
|
||||
# Purpose : Utility for accessing the Bluetooth TNC on the BTECH UV PRO.
|
||||
source /opt/emcomm-tools/bin/et-common
|
||||
|
||||
CLEAN_UP=1
|
||||
@@ -265,7 +264,7 @@ EOF
|
||||
stop_all_services
|
||||
|
||||
echo -e "\nSelect a packet application to start:"
|
||||
options=("axcall" "QtTermTCP" "Winlink" "Exit")
|
||||
options=("axcall" "QtTermTCP" "Winlink" "YAAC" "Exit")
|
||||
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
@@ -294,6 +293,10 @@ EOF
|
||||
min http://localhost:8080 1>/dev/null 2>&1
|
||||
break
|
||||
;;
|
||||
"YAAC")
|
||||
et-yaac start
|
||||
break
|
||||
;;
|
||||
"Exit")
|
||||
break
|
||||
;;
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 3 November 2024
|
||||
# Updated : 4 November 2024
|
||||
# Updated : 16 March 2025
|
||||
# Purpose : Wrapper script for starting YAAC with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. Dire Wolf is started
|
||||
# 2. Dire Wolf is started or Bluetooth TNC is connected
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. Callsign is updated in YAAC
|
||||
@@ -39,20 +39,23 @@ notify_user() {
|
||||
start() {
|
||||
update-config
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
if [[ $? -eq 0 ]]; then
|
||||
CMD="java -jar /opt/yaac/YAAC.jar"
|
||||
|
||||
RIGCTLD_OUT=$(ps -ef | grep [d]irewolf)
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start YAAC. Dire Wolf not running."
|
||||
notify_user "Can't start YAAC. Dire Wolf not running."
|
||||
PS_OUT=$(ps -ef | grep "[r]fcomm0")
|
||||
if [[ $? -eq 0 ]]; then
|
||||
et-log "Starting YAAC in Bluetooth mode with: ${CMD}"
|
||||
${CMD}
|
||||
fi
|
||||
|
||||
PS_OUT=$(ps -ef | grep [d]irewolf)
|
||||
if [[ $? -eq 0 ]]; then
|
||||
et-log "Starting YAAC in Dire Wolf mode with: ${CMD}"
|
||||
else
|
||||
et-log "Can't start YAAC. Dire Wolf or Bluetooth TNC services not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CMD="java -jar /opt/yaac/YAAC.jar"
|
||||
et-log "Starting YAAC with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
|
||||
else
|
||||
et-log "Error updating configuration. Can't start YAAC"
|
||||
exit 1
|
||||
@@ -74,18 +77,29 @@ update-config () {
|
||||
cp -v ${YAAC_CONF_FILE_PORTS_TEMPLATE} ${YAAC_CONF_FILE_PORTS}
|
||||
sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${YAAC_CONF_FILE_PORTS}
|
||||
|
||||
|
||||
# Add GPS port only if it is available
|
||||
systemctl status gpsd --no-pager > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
if [[ $? -ne 0 ]]; then
|
||||
et-log "GPS not connected. Removing GPS port from configuration."
|
||||
sed -i '/GPSD/d' ${YAAC_CONF_FILE_PORTS}
|
||||
fi
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[r]fcomm0")
|
||||
if [[ $? -ne 0 ]]; then
|
||||
et-log "Bluetooth TNC not connected. Removing rfcomm port from configuration."
|
||||
sed -i '/Serial_TNC/d' ${YAAC_CONF_FILE_PORTS}
|
||||
fi
|
||||
|
||||
PS_OUT=$(ps -ef | grep "[d]irewolf")
|
||||
if [[ $? -ne 0 ]]; then
|
||||
et-log "Dire Wolf not running. Removing KISS over TCP port from configuration."
|
||||
sed -i '/KISS-over-TCP/d' ${YAAC_CONF_FILE_PORTS}
|
||||
fi
|
||||
|
||||
echo "Generated the configuration below..."
|
||||
echo
|
||||
cat ${YAAC_CONF_FILE_PORTS}
|
||||
echo
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
|
||||
Reference in New Issue
Block a user