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">
|
<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="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="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>
|
</map>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 1 January 2025
|
# Date : 1 January 2025
|
||||||
# Updated : 15 March 2025
|
# Updated : 16 March 2025
|
||||||
# Purpose : Utility for accessing the Bluetooth TNC on the BTECH UV PRO.
|
# Purpose : Utility for accessing the Bluetooth TNC on the BTECH UV PRO.
|
||||||
source /opt/emcomm-tools/bin/et-common
|
source /opt/emcomm-tools/bin/et-common
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ EOF
|
|||||||
stop_all_services
|
stop_all_services
|
||||||
|
|
||||||
echo -e "\nSelect a packet application to start:"
|
echo -e "\nSelect a packet application to start:"
|
||||||
options=("axcall" "QtTermTCP" "Winlink" "Exit")
|
options=("axcall" "QtTermTCP" "Winlink" "YAAC" "Exit")
|
||||||
|
|
||||||
select opt in "${options[@]}"
|
select opt in "${options[@]}"
|
||||||
do
|
do
|
||||||
@@ -293,6 +293,10 @@ EOF
|
|||||||
min http://localhost:8080 1>/dev/null 2>&1
|
min http://localhost:8080 1>/dev/null 2>&1
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
"YAAC")
|
||||||
|
et-yaac start
|
||||||
|
break
|
||||||
|
;;
|
||||||
"Exit")
|
"Exit")
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Authors : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# : Clifton Jones
|
|
||||||
# Date : 1 January 2025
|
# Date : 1 January 2025
|
||||||
# Updated : 15 March 2025
|
# Updated : 16 March 2025
|
||||||
# Purpose : Utility for accessing the Bluetooth TNC on the VGC VR-N76.
|
# Purpose : Utility for accessing the Bluetooth TNC on the BTECH UV PRO.
|
||||||
source /opt/emcomm-tools/bin/et-common
|
source /opt/emcomm-tools/bin/et-common
|
||||||
|
|
||||||
CLEAN_UP=1
|
CLEAN_UP=1
|
||||||
@@ -265,7 +264,7 @@ EOF
|
|||||||
stop_all_services
|
stop_all_services
|
||||||
|
|
||||||
echo -e "\nSelect a packet application to start:"
|
echo -e "\nSelect a packet application to start:"
|
||||||
options=("axcall" "QtTermTCP" "Winlink" "Exit")
|
options=("axcall" "QtTermTCP" "Winlink" "YAAC" "Exit")
|
||||||
|
|
||||||
select opt in "${options[@]}"
|
select opt in "${options[@]}"
|
||||||
do
|
do
|
||||||
@@ -294,6 +293,10 @@ EOF
|
|||||||
min http://localhost:8080 1>/dev/null 2>&1
|
min http://localhost:8080 1>/dev/null 2>&1
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
"YAAC")
|
||||||
|
et-yaac start
|
||||||
|
break
|
||||||
|
;;
|
||||||
"Exit")
|
"Exit")
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 3 November 2024
|
# Date : 3 November 2024
|
||||||
# Updated : 4 November 2024
|
# Updated : 16 March 2025
|
||||||
# Purpose : Wrapper script for starting YAAC with PnP support
|
# Purpose : Wrapper script for starting YAAC with PnP support
|
||||||
#
|
#
|
||||||
# Preconditions:
|
# Preconditions:
|
||||||
# 1. Supported radio and audio interface are connected and properly detected
|
# 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:
|
# Postconditions:
|
||||||
# 1. Callsign is updated in YAAC
|
# 1. Callsign is updated in YAAC
|
||||||
@@ -39,20 +39,23 @@ notify_user() {
|
|||||||
start() {
|
start() {
|
||||||
update-config
|
update-config
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
|
CMD="java -jar /opt/yaac/YAAC.jar"
|
||||||
|
|
||||||
RIGCTLD_OUT=$(ps -ef | grep [d]irewolf)
|
PS_OUT=$(ps -ef | grep "[r]fcomm0")
|
||||||
if [ $? -ne 0 ]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
et-log "Can't start YAAC. Dire Wolf not running."
|
et-log "Starting YAAC in Bluetooth mode with: ${CMD}"
|
||||||
notify_user "Can't start YAAC. Dire Wolf not running."
|
${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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CMD="java -jar /opt/yaac/YAAC.jar"
|
|
||||||
et-log "Starting YAAC with: ${CMD}"
|
|
||||||
|
|
||||||
${CMD}
|
|
||||||
|
|
||||||
else
|
else
|
||||||
et-log "Error updating configuration. Can't start YAAC"
|
et-log "Error updating configuration. Can't start YAAC"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -74,18 +77,29 @@ update-config () {
|
|||||||
cp -v ${YAAC_CONF_FILE_PORTS_TEMPLATE} ${YAAC_CONF_FILE_PORTS}
|
cp -v ${YAAC_CONF_FILE_PORTS_TEMPLATE} ${YAAC_CONF_FILE_PORTS}
|
||||||
sed -i "s|{{ET_CALLSIGN}}|${CALLSIGN}|g" ${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
|
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."
|
et-log "GPS not connected. Removing GPS port from configuration."
|
||||||
sed -i '/GPSD/d' ${YAAC_CONF_FILE_PORTS}
|
sed -i '/GPSD/d' ${YAAC_CONF_FILE_PORTS}
|
||||||
fi
|
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 "Generated the configuration below..."
|
||||||
echo
|
echo
|
||||||
cat ${YAAC_CONF_FILE_PORTS}
|
cat ${YAAC_CONF_FILE_PORTS}
|
||||||
echo
|
echo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|||||||
Reference in New Issue
Block a user