From b3b6d5196d19638456859114cbe039395a05aa10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 29 Dec 2025 16:20:22 -0500 Subject: [PATCH] Update config add repeater and FUNcube modes --- config | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/config b/config index 47e1e809..3b0b87a4 100755 --- a/config +++ b/config @@ -175,6 +175,76 @@ function transmit_command_cw { exit } +function transmit_command_repeater { + + FILE=/home/pi/CubeSatSim/transmit_dtmf + if [ -f "$FILE" ]; then + + echo "Stopping command and control" + sudo systemctl stop command + + echo "Transmit DTMF start" + gpio write 28 0 # ptt + gpio write 2 1 # tx LED + timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-repeater.conf -t 0l + gpio write 2 0 # tx LED + gpio write 28 1 #ptt + echo "Transmit stop" + + echo "Resuming command and control" + sudo systemctl start command + + else + + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=e" + sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 + echo $STRING > /home/pi/CubeSatSim/t.txt + echo + echo -n "Sending APRS packet to change mode to Repeater" + echo $STRING + sudo touch /home/pi/CubeSatSim/ready + sleep 3 + + fi + + exit +} + +function transmit_command_funcube { + + FILE=/home/pi/CubeSatSim/transmit_dtmf + if [ -f "$FILE" ]; then + + echo "Stopping command and control" + sudo systemctl stop command + + echo "Transmit DTMF start" + gpio write 28 0 # ptt + gpio write 2 1 # tx LED + timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-funcube.conf -t 0l + gpio write 2 0 # tx LED + gpio write 28 1 #ptt + echo "Transmit stop" + + echo "Resuming command and control" + sudo systemctl start command + + else + + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=j" + sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 + echo $STRING > /home/pi/CubeSatSim/t.txt + echo + echo -n "Sending APRS packet to mode FUNcube" + echo $STRING + sudo touch /home/pi/CubeSatSim/ready + sleep 3 + + fi + + exit +} + function transmit_command_beacon { FILE=/home/pi/CubeSatSim/transmit_dtmf @@ -1299,7 +1369,7 @@ elif [ "$1" = "-A" ]; then while [ "$sim" = "y" ] do - echo "Enter the mode number to change: 1=APRS, 2=FSK, 3=BPSK, 4=SSTV, 5=CW" + echo "Enter the mode number to change: 1=APRS, 2=FSK, 3=BPSK, 4=SSTV, 5=CW, 6=Repeater, 7=FUNcube, 10=Beacon on/off" read MODE case $MODE in @@ -1324,6 +1394,18 @@ elif [ "$1" = "-A" ]; then echo "Mode 5 is CW" STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" ;; + 6) + echo "Mode 6 is Repeater" + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=e" + ;; + 7) + echo "Mode 7 is FUNcube" + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=j" + ;; + 10) + echo "Mode 10 is Beacon on/off" + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=o" + ;; *) echo "Unknown mode" STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?"