UV Pro - Re-implemented BTECH UV Pro command to support three modes following a connection: axcall, QtTermTCP and Winlink

This commit is contained in:
Gaston Gonzalez
2025-03-15 07:43:27 -07:00
parent fae9030a20
commit 04d11e1306
7 changed files with 330 additions and 104 deletions
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 14 March 2025
# UPdated : 15 March 2025
# Purpose : Stops all services tied to Bluetooth TNC operations
#
# Post Conditions:
# 1. All services started for supporting Bluetooth over serial are stopped.
#
# Note: If you try to re-establish a Bluetooth connection, you will needed to:
# 1. Turn off and turn back on your radio.
# 2. Wait 30 seconds before reconnecting (i.e. ./et-uv-pro connect)
source /opt/emcomm-tools/bin/et-common
stop_all_bt_services() {
PS_OUT=$(ps -ef | grep "[k]issattach");
if [[ $? -eq 0 ]]; then
echo "Killing kissattach processes"
killall kissattach
fi
PS_OUT=$(ps -ef | grep "[r]fcomm0");
if [[ $? -eq 0 ]]; then
ps -ef | grep "[r]fcomm0" | awk '{print $2}' | while read pid; do
echo "Killing rfcomm process: $pid"
kill $pid
done
echo -e "\n${YELLOW}Wait 30 seconds before reconnecting over Bluetooth${NC}\n"
fi
}
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root!"
exit 1
fi
stop_all_bt_services