From b3b6d5196d19638456859114cbe039395a05aa10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 29 Dec 2025 16:20:22 -0500 Subject: [PATCH 01/86] 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=?" From 0dabe37f2ebe51dfa60f0e7c1a69830cf8155c03 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 29 Dec 2025 18:52:13 -0500 Subject: [PATCH 02/86] Update dtmf_aprs_cc.py replace rpitx with transmit --- dtmf_aprs_cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index ad4ef5cf..d7e786fd 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -261,7 +261,7 @@ if __name__ == "__main__": GPIO.output(txLed, 0) GPIO.output(powerPin, 0) - system("sudo systemctl stop rpitx") + system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") print("\n/home/pi/CubeSatSim/config -" + mode) From f3da4360869d535945b0ae8ba83bd4d174f2d15e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 29 Dec 2025 19:28:28 -0500 Subject: [PATCH 03/86] Update dtmf_aprs_cc.py back to counter to avoid double beacon on/off --- dtmf_aprs_cc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index d7e786fd..9a7b25c2 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -109,8 +109,8 @@ if __name__ == "__main__": mode = 'o' change_mode = True -# if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice - if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice + if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice +## if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(powerPin, GPIO.OUT) From f0ff8a638221dc26446ce6f2ddd5044aa67711ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Dec 2025 15:06:05 -0500 Subject: [PATCH 04/86] Update config add space in transmit command print --- config | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config b/config index 3b0b87a4..2d9be60a 100755 --- a/config +++ b/config @@ -60,7 +60,7 @@ function transmit_command_fsk { 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 FSK" + echo -n "Sending APRS packet to change mode to FSK " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 @@ -95,7 +95,7 @@ function transmit_command_bpsk { 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 BPSK" + echo -n "Sending APRS packet to change mode to BPSK " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 @@ -130,7 +130,7 @@ function transmit_command_sstv { 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 SSTV" + echo -n "Sending APRS packet to change mode to SSTV " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 @@ -165,7 +165,7 @@ function transmit_command_cw { 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 CW" + echo -n "Sending APRS packet to change mode to CW " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 @@ -200,7 +200,7 @@ function transmit_command_repeater { 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 -n "Sending APRS packet to change mode to Repeater " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 @@ -235,7 +235,7 @@ function transmit_command_funcube { 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 -n "Sending APRS packet to mode FUNcube " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 @@ -270,7 +270,7 @@ function transmit_command_beacon { 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 toggle Beacon" + echo -n "Sending APRS packet to toggle Beacon " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 From 41dce6c10c9ccb5924f035415535047479ddccb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Dec 2025 15:22:05 -0500 Subject: [PATCH 05/86] Update config add transmit commands e and j --- config | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/config b/config index 2d9be60a..3834838c 100755 --- a/config +++ b/config @@ -1322,10 +1322,20 @@ elif [ "$1" = "-v" ]; then elif [ "$1" = "-e" ]; then - echo "changing CubeSatSim to Repeater mode" - sudo echo "e" > /home/pi/CubeSatSim/.mode + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value - restart=1 + if [ "$1" == "n" ]; then + + transmit_command_repeater + + else + + echo "changing CubeSatSim to Repeater mode" + sudo echo "e" > /home/pi/CubeSatSim/.mode + restart=1 + fi elif [ "$1" = "-n" ]; then @@ -1501,6 +1511,19 @@ elif [ "$1" = "-j" ]; then echo "$value" > /dev/null set -- $value + if [ "$1" == "n" ]; then + + transmit_command_funcube + + else + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + restart=1 + + fi + # if [ "$1" == "n" ]; then # transmit_command_bpsk From a03192d8c8ccd8cc033044a7966c823851844238 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 31 Dec 2025 09:52:00 -0500 Subject: [PATCH 06/86] Create direwolf-transmit-dtmf-repeater.conf --- direwolf/direwolf-transmit-dtmf-repeater.conf | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 direwolf/direwolf-transmit-dtmf-repeater.conf diff --git a/direwolf/direwolf-transmit-dtmf-repeater.conf b/direwolf/direwolf-transmit-dtmf-repeater.conf new file mode 100644 index 00000000..ee60fdf9 --- /dev/null +++ b/direwolf/direwolf-transmit-dtmf-repeater.conf @@ -0,0 +1,5 @@ +ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +CBEACON dest="DTMF-3" info="6 #" delay=0 From 7f1ac695f3cdc7b8a0c4cafcd311584d5ae44c08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 31 Dec 2025 09:53:23 -0500 Subject: [PATCH 07/86] Create direwolf-transmit-dtmf-funcube.conf --- direwolf/direwolf-transmit-dtmf-funcube.conf | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 direwolf/direwolf-transmit-dtmf-funcube.conf diff --git a/direwolf/direwolf-transmit-dtmf-funcube.conf b/direwolf/direwolf-transmit-dtmf-funcube.conf new file mode 100644 index 00000000..b4aff0ef --- /dev/null +++ b/direwolf/direwolf-transmit-dtmf-funcube.conf @@ -0,0 +1,5 @@ +ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +CBEACON dest="DTMF-3" info="7 #" delay=0 From 8938676940d3f526b19fa9f63911f1ea349648cd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:18:32 -0500 Subject: [PATCH 08/86] Create direwolf-transmit-dtmf.conf --- direwolf/direwolf-transmit-dtmf.conf | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 direwolf/direwolf-transmit-dtmf.conf diff --git a/direwolf/direwolf-transmit-dtmf.conf b/direwolf/direwolf-transmit-dtmf.conf new file mode 100644 index 00000000..dc82699d --- /dev/null +++ b/direwolf/direwolf-transmit-dtmf.conf @@ -0,0 +1,4 @@ +ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 From 5ba19277567d19ffbb0c5a42b2db8a13a76cf2c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:35:00 -0500 Subject: [PATCH 09/86] Update config --- config | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/config b/config index 3834838c..bcc63a15 100755 --- a/config +++ b/config @@ -1,5 +1,43 @@ #!/bin/bash +function transmit_command { + + FILE=/home/pi/CubeSatSim/transmit_dtmf + if [ -f "$FILE" ]; then + + mode=1 + cat direwolf/direwolf-transmit-dtmf.conf > direwolf-now.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> direwolf-now.conf + + 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 direwolf-now.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="$1 + 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 "$2 + echo $STRING + sudo touch /home/pi/CubeSatSim/ready + sleep 3 + + fi + + exit +} + function transmit_command_aprs { FILE=/home/pi/CubeSatSim/transmit_dtmf @@ -432,7 +470,8 @@ elif [ "$1" = "-a" ]; then if [ "$1" == "n" ]; then - transmit_command_aprs +# transmit_command_aprs + transmit_command "1" "a" else From fe436e4d8ae0503bc47cb1934dfd295df3ebda47 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:45:41 -0500 Subject: [PATCH 10/86] Update config fix aprs transmit_command --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index bcc63a15..d9a08994 100755 --- a/config +++ b/config @@ -6,7 +6,7 @@ function transmit_command { if [ -f "$FILE" ]; then mode=1 - cat direwolf/direwolf-transmit-dtmf.conf > direwolf-now.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> direwolf-now.conf + cat direwolf/direwolf-transmit-dtmf.conf > direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> direwolf-tmp.conf echo "Stopping command and control" sudo systemctl stop command @@ -14,7 +14,7 @@ function transmit_command { echo "Transmit DTMF start" gpio write 28 0 # ptt gpio write 2 1 # tx LED - timeout 3 direwolf -c direwolf-now.conf -t 0l + timeout 3 direwolf -c direwolf-tmp.conf -t 0l gpio write 2 0 # tx LED gpio write 28 1 #ptt echo "Transmit stop" @@ -24,7 +24,7 @@ function transmit_command { else - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE="$1 + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE="$2 sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 echo $STRING > /home/pi/CubeSatSim/t.txt echo From 6fc06c3781f674a1d1a9eb0d46844159f950f2e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:46:28 -0500 Subject: [PATCH 11/86] Update config fix printout --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index d9a08994..c5475b6b 100755 --- a/config +++ b/config @@ -28,7 +28,7 @@ function transmit_command { 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 "$2 + echo -n "Sending APRS packet to change mode to "$2" " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 From f04e89241b21b8ccf0cd8729806125e1c76726db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:48:38 -0500 Subject: [PATCH 12/86] Update config with print --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index c5475b6b..378bfeae 100755 --- a/config +++ b/config @@ -35,6 +35,8 @@ function transmit_command { fi + echo "To change the mode of this CubeSatSim use config -n" + exit } From 56f042a82c56b087f002a95257f8c9e71c684568 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:49:56 -0500 Subject: [PATCH 13/86] Update config with more prints --- config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config b/config index 378bfeae..c3e26acf 100755 --- a/config +++ b/config @@ -2,6 +2,9 @@ function transmit_command { + echo "CubeSatSim is in Transmit Commands mode" + echo + FILE=/home/pi/CubeSatSim/transmit_dtmf if [ -f "$FILE" ]; then From 313fe6ceb197021ef1c7ab303f9b631ba38228a3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:51:05 -0500 Subject: [PATCH 14/86] Update config fix prints --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index c3e26acf..ff40a1c5 100755 --- a/config +++ b/config @@ -3,7 +3,6 @@ function transmit_command { echo "CubeSatSim is in Transmit Commands mode" - echo FILE=/home/pi/CubeSatSim/transmit_dtmf if [ -f "$FILE" ]; then @@ -38,6 +37,7 @@ function transmit_command { fi + echo echo "To change the mode of this CubeSatSim use config -n" exit From 86fda1d7506d58c40450afc90a230b78cbff59e6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 12:54:11 -0500 Subject: [PATCH 15/86] Update config Transmit Commands prints --- config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index ff40a1c5..edab6982 100755 --- a/config +++ b/config @@ -1383,26 +1383,26 @@ elif [ "$1" = "-e" ]; then elif [ "$1" = "-n" ]; then - echo "changing CubeSatSim to Transmit Commands mode" +# echo "changing CubeSatSim to Transmit Commands mode" value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value if [ "$1" = "n" ]; then - echo "Turning Transmit Command and Control mode OFF" + echo "Turning Transmit Commands mode OFF" echo "Switching to BPSK mode" sudo echo "b" > /home/pi/CubeSatSim/.mode reboot=1 else - echo "Turning Transmit Command and Control mode ON" + echo "Turning Transmit Commands mode ON" sudo echo "n" > /home/pi/CubeSatSim/.mode restart=1 fi elif [ "$1" = "-A" ]; then - echo "Transmit APRS control packets to control another CubeSatSim" + echo "Transmit APRS Commands to control another CubeSatSim" echo value=`cat /home/pi/CubeSatSim/.mode` From 5e66d4f2ed21220d49e727cf93436f5aa6db5011 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 13:00:16 -0500 Subject: [PATCH 16/86] Update config use transmit_command for all modes --- config | 308 ++------------------------------------------------------- 1 file changed, 7 insertions(+), 301 deletions(-) diff --git a/config b/config index edab6982..8429e1ab 100755 --- a/config +++ b/config @@ -43,286 +43,6 @@ function transmit_command { exit } -function transmit_command_aprs { - - 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-aprs.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=a" - 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 APRS " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} - -function transmit_command_fsk { - - 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-fsk.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=f" - 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 FSK " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} - -function transmit_command_bpsk { - - 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-bpsk.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=b" - 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 BPSK " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} - -function transmit_command_sstv { - - 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-sstv.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=s" - 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 SSTV " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} - -function transmit_command_cw { - - 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-cw.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=m" - 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 CW " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - 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 - 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-beacon.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=o" - 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 toggle Beacon " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} - echo "CubeSatSim v2.1 configuration tool" echo # echo $1 @@ -475,7 +195,6 @@ elif [ "$1" = "-a" ]; then if [ "$1" == "n" ]; then -# transmit_command_aprs transmit_command "1" "a" else @@ -502,7 +221,7 @@ elif [ "$1" = "-m" ]; then if [ "$1" == "n" ]; then - transmit_command_cw + transmit_command "5" "m" else @@ -528,7 +247,7 @@ elif [ "$1" = "-f" ]; then if [ "$1" == "n" ]; then - transmit_command_fsk + transmit_command "2" "f" else @@ -545,7 +264,7 @@ elif [ "$1" = "-b" ]; then if [ "$1" == "n" ]; then - transmit_command_bpsk + transmit_command "3" "b" else @@ -562,7 +281,7 @@ elif [ "$1" = "-s" ]; then if [ "$1" == "n" ]; then - transmit_command_sstv + transmit_command "4" "s" else @@ -1262,7 +981,7 @@ elif [ "$1" = "-o" ]; then if [ "$1" == "n" ]; then - transmit_command_beacon + transmit_command "10" "o" else echo @@ -1372,7 +1091,7 @@ elif [ "$1" = "-e" ]; then if [ "$1" == "n" ]; then - transmit_command_repeater + transmit_command "6" "e" else @@ -1557,23 +1276,10 @@ elif [ "$1" = "-j" ]; then if [ "$1" == "n" ]; then - transmit_command_funcube + transmit_command "7" "j" else - value=`cat /home/pi/CubeSatSim/.mode` - echo "$value" > /dev/null - set -- $value - restart=1 - - fi - -# if [ "$1" == "n" ]; then - -# transmit_command_bpsk - -# else - echo "changing CubeSatSim to FUNcube mode" sudo echo "j" > /home/pi/CubeSatSim/.mode restart=1 From 6886c7b7eb91c99c752418a0096deb2e48de1846 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 13:01:29 -0500 Subject: [PATCH 17/86] Update config fix typo --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 8429e1ab..d01cd159 100755 --- a/config +++ b/config @@ -1283,7 +1283,7 @@ elif [ "$1" = "-j" ]; then echo "changing CubeSatSim to FUNcube mode" sudo echo "j" > /home/pi/CubeSatSim/.mode restart=1 -# fi + fi elif [ "$1" = "-h" ]; then From 9e06737ae33e19467b9ea2e422e338293e06684e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 13:23:51 -0500 Subject: [PATCH 18/86] Update config print change in dtmf --- config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config b/config index d01cd159..0b47824f 100755 --- a/config +++ b/config @@ -7,6 +7,10 @@ function transmit_command { FILE=/home/pi/CubeSatSim/transmit_dtmf if [ -f "$FILE" ]; then + echo + echo "Sending DTMF tones to change to mode "$1 + echo + mode=1 cat direwolf/direwolf-transmit-dtmf.conf > direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> direwolf-tmp.conf From aaf3cb4a0800a426c63c4af25612d175d00489d7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 13:48:09 -0500 Subject: [PATCH 19/86] Update config try don't stop C2C in transmit dtmf commands --- config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index 0b47824f..9902b2f4 100755 --- a/config +++ b/config @@ -14,8 +14,8 @@ function transmit_command { mode=1 cat direwolf/direwolf-transmit-dtmf.conf > direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> direwolf-tmp.conf - echo "Stopping command and control" - sudo systemctl stop command +# echo "Stopping command and control" +# sudo systemctl stop command echo "Transmit DTMF start" gpio write 28 0 # ptt @@ -25,8 +25,8 @@ function transmit_command { gpio write 28 1 #ptt echo "Transmit stop" - echo "Resuming command and control" - sudo systemctl start command +# echo "Resuming command and control" +# sudo systemctl start command else From 00e54edeef3223bef25d28d4f4cadb585e2ad908 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 13:53:06 -0500 Subject: [PATCH 20/86] Update direwolf-transmit-dtmf.conf change kiss port and agwport for transmit dtmf --- direwolf/direwolf-transmit-dtmf.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/direwolf/direwolf-transmit-dtmf.conf b/direwolf/direwolf-transmit-dtmf.conf index dc82699d..a2fdd69c 100644 --- a/direwolf/direwolf-transmit-dtmf.conf +++ b/direwolf/direwolf-transmit-dtmf.conf @@ -2,3 +2,5 @@ ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 MYCALL AMSAT CHANNEL 0 MODEM 1200 +KISSPORT 8003 +AGWPORT 8004 From cc71a9bf20b9d4ea93e4e0d5c6a798d21d6ade33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:43:41 -0500 Subject: [PATCH 21/86] Update config turn off mode n to specific mode --- config | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/config b/config index 9902b2f4..1cdc92be 100755 --- a/config +++ b/config @@ -1114,9 +1114,15 @@ elif [ "$1" = "-n" ]; then if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" - echo "Switching to BPSK mode" - sudo echo "b" > /home/pi/CubeSatSim/.mode - reboot=1 + if [ "$2 = "-a" ] || [ "$2" = "-f" || [ "$2" = "-b" || [ "$2" = "-s" || [ "$2" = "-m" || [ "$2" = "-e" || [ "$2" = "-j" ] ; then + echo "Switching to mode "${2:1:1} + sudo echo ${2:1:1} > /home/pi/CubeSatSim/.mode + restart=1 + else + echo "Switching to BPSK mode" + sudo echo "b" > /home/pi/CubeSatSim/.mode + restart=1 + fi else echo "Turning Transmit Commands mode ON" sudo echo "n" > /home/pi/CubeSatSim/.mode From e3b18473109d63d686de66cbbbb5923d56f8ba89 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:44:59 -0500 Subject: [PATCH 22/86] Update config check for n for no reboot --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 1cdc92be..3f617e65 100755 --- a/config +++ b/config @@ -55,8 +55,8 @@ echo sudo modprobe snd-aloop -# if [ "$2" = "n" ] ; then -if [ -z "$2" ] ; then + if [ "$2" = "n" ] ; then +#if [ -z "$2" ] ; then noreboot=0 else noreboot=1 From dd02632958edbd009532ff54976735d3d51e29f4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:48:52 -0500 Subject: [PATCH 23/86] Update config missing ] --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 3f617e65..b0650b99 100755 --- a/config +++ b/config @@ -1114,7 +1114,7 @@ elif [ "$1" = "-n" ]; then if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" - if [ "$2 = "-a" ] || [ "$2" = "-f" || [ "$2" = "-b" || [ "$2" = "-s" || [ "$2" = "-m" || [ "$2" = "-e" || [ "$2" = "-j" ] ; then + if [ "$2 = "-a" ] || [ "$2" = "-f" ] || [ "$2" = "-b" ] || [ "$2" = "-s" ] || [ "$2" = "-m" ] || [ "$2" = "-e" ] || [ "$2" = "-j" ] ; then echo "Switching to mode "${2:1:1} sudo echo ${2:1:1} > /home/pi/CubeSatSim/.mode restart=1 From a7dade5daf7824a79917f71a2c0f81737497b2eb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:52:30 -0500 Subject: [PATCH 24/86] Update config missing : --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index b0650b99..6e088042 100755 --- a/config +++ b/config @@ -1114,7 +1114,7 @@ elif [ "$1" = "-n" ]; then if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" - if [ "$2 = "-a" ] || [ "$2" = "-f" ] || [ "$2" = "-b" ] || [ "$2" = "-s" ] || [ "$2" = "-m" ] || [ "$2" = "-e" ] || [ "$2" = "-j" ] ; then + if [ "$2" = "-a" ] || [ "$2" = "-f" ] || [ "$2" = "-b" ] || [ "$2" = "-s" ] || [ "$2" = "-m" ] || [ "$2" = "-e" ] || [ "$2" = "-j" ] ; then echo "Switching to mode "${2:1:1} sudo echo ${2:1:1} > /home/pi/CubeSatSim/.mode restart=1 From 1dad004f08c7ff3e5efe2253a052e882c4e9bcdb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:53:47 -0500 Subject: [PATCH 25/86] Update config fix n --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 6e088042..b72eb500 100755 --- a/config +++ b/config @@ -56,11 +56,11 @@ echo sudo modprobe snd-aloop if [ "$2" = "n" ] ; then -#if [ -z "$2" ] ; then - noreboot=0 -else +#if [ -z "$2" ] ; then # need to swap else if change noreboot=1 echo "Reboot disabled" +else + noreboot=0 fi # echo "No reboot" From 244a27801b1f33cbba5ee0a03741d4540525a795 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:55:53 -0500 Subject: [PATCH 26/86] Update config remove dash --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index b72eb500..824efdd5 100755 --- a/config +++ b/config @@ -1114,9 +1114,9 @@ elif [ "$1" = "-n" ]; then if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" - if [ "$2" = "-a" ] || [ "$2" = "-f" ] || [ "$2" = "-b" ] || [ "$2" = "-s" ] || [ "$2" = "-m" ] || [ "$2" = "-e" ] || [ "$2" = "-j" ] ; then - echo "Switching to mode "${2:1:1} - sudo echo ${2:1:1} > /home/pi/CubeSatSim/.mode + if [ "$2" = "a" ] || [ "$2" = "f" ] || [ "$2" = "b" ] || [ "$2" = "s" ] || [ "$2" = "m" ] || [ "$2" = "e" ] || [ "$2" = "j" ] ; then + echo "Switching to mode "$2 + sudo echo $2 > /home/pi/CubeSatSim/.mode restart=1 else echo "Switching to BPSK mode" From 8fcee2b53507ac3041a2b98fdc6c8dd2920c371a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:58:14 -0500 Subject: [PATCH 27/86] Update config save as new --- config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index 824efdd5..ebdebb0c 100755 --- a/config +++ b/config @@ -1108,15 +1108,17 @@ elif [ "$1" = "-n" ]; then # echo "changing CubeSatSim to Transmit Commands mode" + new=$2 + value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" - if [ "$2" = "a" ] || [ "$2" = "f" ] || [ "$2" = "b" ] || [ "$2" = "s" ] || [ "$2" = "m" ] || [ "$2" = "e" ] || [ "$2" = "j" ] ; then + if [ "$new" = "a" ] || [ "$new" = "f" ] || [ "$new" = "b" ] || [ "$new" = "s" ] || [ "$new" = "m" ] || [ "$new" = "e" ] || [ "$new" = "j" ] ; then echo "Switching to mode "$2 - sudo echo $2 > /home/pi/CubeSatSim/.mode + sudo echo $new > /home/pi/CubeSatSim/.mode restart=1 else echo "Switching to BPSK mode" From ff8a93342043915fe68637bebd329aac7ab0faa1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 14:59:12 -0500 Subject: [PATCH 28/86] Update config fix print new --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index ebdebb0c..74fb6c7e 100755 --- a/config +++ b/config @@ -1117,7 +1117,7 @@ elif [ "$1" = "-n" ]; then if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" if [ "$new" = "a" ] || [ "$new" = "f" ] || [ "$new" = "b" ] || [ "$new" = "s" ] || [ "$new" = "m" ] || [ "$new" = "e" ] || [ "$new" = "j" ] ; then - echo "Switching to mode "$2 + echo "Switching to mode "$new sudo echo $new > /home/pi/CubeSatSim/.mode restart=1 else From b2c72f766a7bf35ba83ff62b15377f9aaba6cb05 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 17:11:36 -0500 Subject: [PATCH 29/86] Update config add check_restart --- config | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/config b/config index 74fb6c7e..a64a7b1c 100755 --- a/config +++ b/config @@ -47,6 +47,21 @@ function transmit_command { exit } +functionn check_restart { + + sudo echo "a" > /home/pi/CubeSatSim/.mode + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + restart=1 + else + reboot=1 + fi + else + restart=1 + fi +} + echo "CubeSatSim v2.1 configuration tool" echo # echo $1 @@ -1116,7 +1131,11 @@ elif [ "$1" = "-n" ]; then if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" - if [ "$new" = "a" ] || [ "$new" = "f" ] || [ "$new" = "b" ] || [ "$new" = "s" ] || [ "$new" = "m" ] || [ "$new" = "e" ] || [ "$new" = "j" ] ; then + if [ "$new" = "a" ] || [ "$new" = "s" ] || [ "$new" = "m" ] ; then + echo "Switching to mode "$new + sudo echo $new > /home/pi/CubeSatSim/.mode + check_restart + elif [ "$new" = "f" ] || [ "$new" = "b" ] || [ "$new" = "e" ] || [ "$new" = "j" ] ; then echo "Switching to mode "$new sudo echo $new > /home/pi/CubeSatSim/.mode restart=1 From 1bbc12acb2b006a38dc45665a9d367e87837cbd1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 17:12:50 -0500 Subject: [PATCH 30/86] Update config typo --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index a64a7b1c..191f464b 100755 --- a/config +++ b/config @@ -47,7 +47,7 @@ function transmit_command { exit } -functionn check_restart { +function check_restart { sudo echo "a" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then From 67ea9f05fd34879e15641159bfa9a8f42d1e43cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 17:29:52 -0500 Subject: [PATCH 31/86] Update config fix check_restart --- config | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config b/config index 191f464b..f71dd468 100755 --- a/config +++ b/config @@ -49,7 +49,10 @@ function transmit_command { function check_restart { - sudo echo "a" > /home/pi/CubeSatSim/.mode + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then From 363ca32dabb27be33eaccc9e4ec33b87ee6f259e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 17:31:59 -0500 Subject: [PATCH 32/86] Update config print restart/reboot result --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index f71dd468..1d02c548 100755 --- a/config +++ b/config @@ -57,8 +57,10 @@ function check_restart { FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 + echo "Need to restart" else reboot=1 + echo "Need to reboot" fi else restart=1 From 89615763248dae1bd01e97370ece61780bc96965 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 17:33:32 -0500 Subject: [PATCH 33/86] Update config move check_restart --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 1d02c548..0a884d07 100755 --- a/config +++ b/config @@ -1137,9 +1137,9 @@ elif [ "$1" = "-n" ]; then if [ "$1" = "n" ]; then echo "Turning Transmit Commands mode OFF" if [ "$new" = "a" ] || [ "$new" = "s" ] || [ "$new" = "m" ] ; then + check_restart echo "Switching to mode "$new sudo echo $new > /home/pi/CubeSatSim/.mode - check_restart elif [ "$new" = "f" ] || [ "$new" = "b" ] || [ "$new" = "e" ] || [ "$new" = "j" ] ; then echo "Switching to mode "$new sudo echo $new > /home/pi/CubeSatSim/.mode From 1cb22b1d43f0ded74b1dfba51cd0e73539f78b32 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 17:40:01 -0500 Subject: [PATCH 34/86] Update config use check_restart everywhere --- config | 68 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/config b/config index 0a884d07..dc721415 100755 --- a/config +++ b/config @@ -57,13 +57,14 @@ function check_restart { FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 - echo "Need to restart" + echo "Need to restart since batt saver" else reboot=1 echo "Need to reboot" fi else restart=1 + echo "Need to restart" fi } @@ -224,17 +225,18 @@ elif [ "$1" = "-a" ]; then else echo "changing CubeSatSim to AFSK mode" + check_restart sudo echo "a" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - else - restart=1 - fi +# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then +# FILE=/home/pi/CubeSatSim/battery_saver +# if [ -f "$FILE" ]; then +# restart=1 +# else +# reboot=1 +# fi +# else +# restart=1 +# fi fi elif [ "$1" = "-m" ]; then @@ -250,17 +252,18 @@ elif [ "$1" = "-m" ]; then else echo "changing CubeSatSim to CW mode" + check_restart sudo echo "m" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - else - restart=1 - fi +# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then +# FILE=/home/pi/CubeSatSim/battery_saver +# if [ -f "$FILE" ]; then +# restart=1 +# else +# reboot=1 +# fi +# else +# restart=1 +# fi fi elif [ "$1" = "-f" ]; then @@ -310,18 +313,19 @@ elif [ "$1" = "-s" ]; then else echo "changing CubeSatSim to SSTV mode" + check_restart sudo echo "s" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then - - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - else - restart=1 - fi +# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then +# +# FILE=/home/pi/CubeSatSim/battery_saver +# if [ -f "$FILE" ]; then +# restart=1 +# else +# reboot=1 +# fi +# else +# restart=1 +# fi fi elif [ "$1" = "-t" ]; then From 67768ae354585a438b0d828727aebc7e4d98ee8f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 17:49:10 -0500 Subject: [PATCH 35/86] Update config remove prints --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index dc721415..7a92b826 100755 --- a/config +++ b/config @@ -57,14 +57,14 @@ function check_restart { FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 - echo "Need to restart since batt saver" +# echo "Need to restart since batt saver" else reboot=1 - echo "Need to reboot" +# echo "Need to reboot" fi else restart=1 - echo "Need to restart" +# echo "Need to restart" fi } From 48c68145e8a6c14d73bc464d70f0359df1faa609 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 18:04:03 -0500 Subject: [PATCH 36/86] Update config remove extra code --- config | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/config b/config index 7a92b826..c9ecaa7c 100755 --- a/config +++ b/config @@ -227,16 +227,7 @@ elif [ "$1" = "-a" ]; then echo "changing CubeSatSim to AFSK mode" check_restart sudo echo "a" > /home/pi/CubeSatSim/.mode -# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then -# FILE=/home/pi/CubeSatSim/battery_saver -# if [ -f "$FILE" ]; then -# restart=1 -# else -# reboot=1 -# fi -# else -# restart=1 -# fi + fi elif [ "$1" = "-m" ]; then @@ -254,16 +245,7 @@ elif [ "$1" = "-m" ]; then echo "changing CubeSatSim to CW mode" check_restart sudo echo "m" > /home/pi/CubeSatSim/.mode -# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then -# FILE=/home/pi/CubeSatSim/battery_saver -# if [ -f "$FILE" ]; then -# restart=1 -# else -# reboot=1 -# fi -# else -# restart=1 -# fi + fi elif [ "$1" = "-f" ]; then @@ -315,17 +297,7 @@ elif [ "$1" = "-s" ]; then echo "changing CubeSatSim to SSTV mode" check_restart sudo echo "s" > /home/pi/CubeSatSim/.mode -# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then -# -# FILE=/home/pi/CubeSatSim/battery_saver -# if [ -f "$FILE" ]; then -# restart=1 -# else -# reboot=1 -# fi -# else -# restart=1 -# fi + fi elif [ "$1" = "-t" ]; then From e90853a50100012265c32ce90456a34d43eeb03e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 18:34:17 -0500 Subject: [PATCH 37/86] Update config check_restart when entering mode n --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index c9ecaa7c..87217b73 100755 --- a/config +++ b/config @@ -1126,9 +1126,9 @@ elif [ "$1" = "-n" ]; then restart=1 fi else - echo "Turning Transmit Commands mode ON" + echo "Switching to Transmit Commands mode" + check_restart sudo echo "n" > /home/pi/CubeSatSim/.mode - restart=1 fi elif [ "$1" = "-A" ]; then From f56f0f6b87377994f3a12487997479cddf3d8b94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 1 Jan 2026 23:26:10 -0500 Subject: [PATCH 38/86] remove extra config files --- direwolf/direwolf-transmit-dtmf-aprs.conf | 5 ----- direwolf/direwolf-transmit-dtmf-beacon.conf | 5 ----- direwolf/direwolf-transmit-dtmf-bpsk.conf | 5 ----- direwolf/direwolf-transmit-dtmf-cw.conf | 5 ----- direwolf/direwolf-transmit-dtmf-fsk.conf | 5 ----- direwolf/direwolf-transmit-dtmf-funcube.conf | 5 ----- direwolf/direwolf-transmit-dtmf-repeater.conf | 5 ----- direwolf/direwolf-transmit-dtmf-sstv.conf | 5 ----- 8 files changed, 40 deletions(-) delete mode 100644 direwolf/direwolf-transmit-dtmf-aprs.conf delete mode 100644 direwolf/direwolf-transmit-dtmf-beacon.conf delete mode 100644 direwolf/direwolf-transmit-dtmf-bpsk.conf delete mode 100644 direwolf/direwolf-transmit-dtmf-cw.conf delete mode 100644 direwolf/direwolf-transmit-dtmf-fsk.conf delete mode 100644 direwolf/direwolf-transmit-dtmf-funcube.conf delete mode 100644 direwolf/direwolf-transmit-dtmf-repeater.conf delete mode 100644 direwolf/direwolf-transmit-dtmf-sstv.conf diff --git a/direwolf/direwolf-transmit-dtmf-aprs.conf b/direwolf/direwolf-transmit-dtmf-aprs.conf deleted file mode 100644 index 786102cd..00000000 --- a/direwolf/direwolf-transmit-dtmf-aprs.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="1 #" delay=0 diff --git a/direwolf/direwolf-transmit-dtmf-beacon.conf b/direwolf/direwolf-transmit-dtmf-beacon.conf deleted file mode 100644 index 6c022dea..00000000 --- a/direwolf/direwolf-transmit-dtmf-beacon.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="10 #" delay=0 diff --git a/direwolf/direwolf-transmit-dtmf-bpsk.conf b/direwolf/direwolf-transmit-dtmf-bpsk.conf deleted file mode 100644 index a0ae9b54..00000000 --- a/direwolf/direwolf-transmit-dtmf-bpsk.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="3 #" delay=0 diff --git a/direwolf/direwolf-transmit-dtmf-cw.conf b/direwolf/direwolf-transmit-dtmf-cw.conf deleted file mode 100644 index 8629754f..00000000 --- a/direwolf/direwolf-transmit-dtmf-cw.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="5 #" delay=0 diff --git a/direwolf/direwolf-transmit-dtmf-fsk.conf b/direwolf/direwolf-transmit-dtmf-fsk.conf deleted file mode 100644 index f197e583..00000000 --- a/direwolf/direwolf-transmit-dtmf-fsk.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="2 #" delay=0 diff --git a/direwolf/direwolf-transmit-dtmf-funcube.conf b/direwolf/direwolf-transmit-dtmf-funcube.conf deleted file mode 100644 index b4aff0ef..00000000 --- a/direwolf/direwolf-transmit-dtmf-funcube.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="7 #" delay=0 diff --git a/direwolf/direwolf-transmit-dtmf-repeater.conf b/direwolf/direwolf-transmit-dtmf-repeater.conf deleted file mode 100644 index ee60fdf9..00000000 --- a/direwolf/direwolf-transmit-dtmf-repeater.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="6 #" delay=0 diff --git a/direwolf/direwolf-transmit-dtmf-sstv.conf b/direwolf/direwolf-transmit-dtmf-sstv.conf deleted file mode 100644 index c58cb77f..00000000 --- a/direwolf/direwolf-transmit-dtmf-sstv.conf +++ /dev/null @@ -1,5 +0,0 @@ -ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 -MYCALL AMSAT -CHANNEL 0 -MODEM 1200 -CBEACON dest="DTMF-3" info="4 #" delay=0 From a68a191dcd71869724981012fa352721610e4717 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 8 Jan 2026 16:20:39 -0500 Subject: [PATCH 39/86] Update README.md updated with Pi OS Bullseye image link --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a649a4f8..c265c913 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ See the Wiki Software Install page for more details: https://github.com/alanbjoh There are two ways to get the CubeSatSim(TM) software for your Pi. -One option is to download the disk image file and write it to a 16GB micro SD card or larger. The image is based on Raspberry Pi OS (Rasbian) Lite, dated December 2020. All software is installed, you just need to login to change your password and set your amateur radio callsign if you have one. You can run the ./update.sh script to update all packages and update and compile the latest CubeSatSim software. +One option is to download the disk image file and write it to a 16GB micro SD card or larger. The image is based on Raspberry Pi OS (Bulleye) Lite. All software is installed, you just need to login to change your password and set your amateur radio callsign if you have one. You can run the ./update.sh script to update all packages and update and compile the latest CubeSatSim software. -The other option is to start with a Raspberry Pi OS (Rasbian) image (Bullseye or Buster works) and run the installation script ./install.sh which will install and compile all the related software. This includes the following packages: +The other option is to start with a Raspberry Pi OS (Rasbian) image (only Bullseye works, Bookworm or Trixie are not compatible) and run the installation script ./install.sh which will install and compile all the related software. This includes the following packages: - wiringpi - git - libasound2-dev @@ -36,11 +36,21 @@ See the Wiki Software Install page for details: [https://github.com/alanbjohnsto ## Installation Script Option Steps -CubeSatSim runs on the Bullseye or Buster version of Raspberry Pi OS (Desktop or Lite), although a Pi Zero or Pi Zero W should only run Lite. Your Pi will need to have internet access to update settings and install packages. +CubeSatSim runs on the Bullseye version of Raspberry Pi OS (Desktop or Lite), although a Pi Zero or Pi Zero W should only run Lite. Your Pi will need to have internet access to update settings and install packages. + +Here is a Bullseye Pi OS image that works: https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2023-05-03/ Here is the file download link: https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-full.img.xz + +You can use this with the Raspberry Pi Imager, but under `OS` you need to choose the `Use Custom` option at the very bottom of the list, then select the downloaded image` 2023-05-03-raspios-bullseye-armhf-full.img.xz` + +Unfortunately, Customization is not supported with a Custom image, so you can't preset your username, password, localization, and WiFi settings. + +So after you write this image to your microSD card, you will need to connect a monitor and keyboard to your Pi Zero 2 to set these things (make sure you set `pi` as the username). After that, you can connect it to your WiFi and turn on ssh and vnc for remote access. + +You can then follow the software installation steps and it work work. The only hiccup is that if you run the installer script while running the Desktop, the Direwolf installation will freeze. But you can just cycle the power to the Pi Zero 2, then run the installer script again and it will complete successfully. Alternatively, if you use `sudo raspi-config` to change to Boot to Console (System/ Boot Auto Login/ Console or Console Auto Login) then the installer script will complete without any issues. *Note:* CubeSatSim expects to be installed as the `pi` user and references many paths in `/home/pi/*`. Installing as a different user will result in configuration files not saving along with many other issues. -To get the software follow these steps: +To install the software follow these steps: `sudo apt-get update` From fff4803bf0a86678b086ef083f2483c49606c3b7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 8 Jan 2026 16:21:48 -0500 Subject: [PATCH 40/86] Update README.md with updated OS instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c265c913..f4ff0cf4 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ CubeSatSim runs on the Bullseye version of Raspberry Pi OS (Desktop or Lite), al Here is a Bullseye Pi OS image that works: https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2023-05-03/ Here is the file download link: https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-full.img.xz -You can use this with the Raspberry Pi Imager, but under `OS` you need to choose the `Use Custom` option at the very bottom of the list, then select the downloaded image` 2023-05-03-raspios-bullseye-armhf-full.img.xz` +You can use this with the Raspberry Pi Imager, but under `OS` you need to choose the `Use Custom` option at the very bottom of the list, then select the downloaded image `2023-05-03-raspios-bullseye-armhf-full.img.xz` Unfortunately, Customization is not supported with a Custom image, so you can't preset your username, password, localization, and WiFi settings. From d324d396ee37869733c9fa3f24e7aae7313d7611 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 8 Jan 2026 16:27:49 -0500 Subject: [PATCH 41/86] Update README.md added link to Bookworm discussion --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f4ff0cf4..608132c6 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ See the Wiki Software Install page for details: [https://github.com/alanbjohnsto CubeSatSim runs on the Bullseye version of Raspberry Pi OS (Desktop or Lite), although a Pi Zero or Pi Zero W should only run Lite. Your Pi will need to have internet access to update settings and install packages. +For the status of our efforts to get the code running on Bookworm, see https://github.com/alanbjohnston/CubeSatSim/discussions/389 + Here is a Bullseye Pi OS image that works: https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2023-05-03/ Here is the file download link: https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-full.img.xz You can use this with the Raspberry Pi Imager, but under `OS` you need to choose the `Use Custom` option at the very bottom of the list, then select the downloaded image `2023-05-03-raspios-bullseye-armhf-full.img.xz` From adf403b860158a1439b2abb32fc307d8f20f801b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 10:23:48 -0500 Subject: [PATCH 42/86] Create motd.txt add motd text --- motd.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 motd.txt diff --git a/motd.txt b/motd.txt new file mode 100644 index 00000000..09ff7ac9 --- /dev/null +++ b/motd.txt @@ -0,0 +1,11 @@ + +This Raspberry Pi has the CubeSatSim v2.x software installed +and runs automatically as systemd cubesatsim.service. For more +information see https://CubeSatSim.org. To update +to the latest version, enter this command: + +CubeSatSim/update + +To see configuration options, enter this command: + +CubeSatSim/config From 5df8e5752f7e99c7bda5d8cf580cbaed07ea3485 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 10:57:41 -0500 Subject: [PATCH 43/86] Update install harmonized with update --- install | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install b/install index 76b2c3da..4351b8e1 100755 --- a/install +++ b/install @@ -10,6 +10,13 @@ else echo "AMSAT 1 0.0 0.0" > /home/pi/CubeSatSim/sim.cfg fi +if [[ $(grep 'cubesatsim' /etc/motd) ]]; then + echo "motd already updated" +else + echo "updating motd" + sudo sh -c 'echo /home/pi/CubeSatSim/motd.txt >> /etc/motd' +fi + FILE=/home/pi/CubeSatSim/command_tx if [ -f "$FILE" ]; then echo "$FILE exists." @@ -280,7 +287,7 @@ if [ $changed -eq 1 ]; then echo -e "Current sim.cfg configuration file:" echo echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo -e "\nCubeSatSim configuraation sim.cfg file updated to: \n" + echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" echo echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11 echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11 > /home/pi/CubeSatSim/sim.cfg From 225ee4db52c1994148fbf69b0a60f751c30ecacf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 10:57:50 -0500 Subject: [PATCH 44/86] Update update harmonized with install --- update | 45 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 36 deletions(-) diff --git a/update b/update index c2e2ffbe..368a0ed6 100755 --- a/update +++ b/update @@ -175,33 +175,6 @@ if [ ! -d "/home/pi/PiSSTVpp" ]; then sudo raspi-config nonint do_camera 0 - - FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg - if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 1." - cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg - fi - - FILE=/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg - if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 2." - cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg - fi - -# echo "You need to reboot to complete this update. Reboot now (y/n)?" - -# read -r ANS - -# if [ "$ANS" = "y" ]; then - -# sudo reboot now - -# else - -# echo "The CubeSatSim software may not work correctly until you reboot." - -# fi - fi if [ ! -d "/home/pi/rpitx" ]; then @@ -228,7 +201,7 @@ if [ ! -d "/home/pi/WiringPi" ]; then cd - git clone https://github.com/PinkFreud/WiringPi + git clone https://github.com/alanbjohnston/WiringPi cd WiringPi ./build debian @@ -354,15 +327,15 @@ cd /home/pi/ssdv sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' FLAG=1 - cd /home/pi/pi-power-button - git pull --no-rebase - git checkout reboot-mode-change - script/install +# cd /home/pi/pi-power-button +# git pull --no-rebase +# git checkout reboot-mode-change +# script/install -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 python3-pil - sudo pip3 install -y adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 pillow +## sudo apt-get update && sudo apt-get dist-upgrade -y +# sudo apt-get update -y +# sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 python3-pil +# sudo pip3 install -y adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 pillow fi From faf6dae850ef48126da16fa4c2217afc6800c298 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 11:05:13 -0500 Subject: [PATCH 45/86] Update install add check for Bullseye --- install | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install b/install index 4351b8e1..b11493ce 100755 --- a/install +++ b/install @@ -2,6 +2,23 @@ echo -e "\ninstallation script for CubeSatSim v2.1\n" +if [[ $(grep 'bullseye' /etc/os-release) ]]; then + echo "Bullseye detected, installation continuing." +else + echo "Your Pi OS version is not Bullseye." + echo "The software installation will likely not work." + echo "See the README.md for how to install using Bullseye." + echo + + echo "Are you sure you want to continue the installation (y/n)?" + + read -r ANS + + if [ "$ANS" = "n" ]; then + exit 1 + fi +fi + FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." From 7d4ef284e88d0664f235daccb8d37f78e3132366 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 16:09:41 -0500 Subject: [PATCH 46/86] Update install change to libusb-1.0-0 --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b11493ce..c2c29cee 100755 --- a/install +++ b/install @@ -80,7 +80,7 @@ sudo dpkg -i debian-template/wiringpi-2.61-1.deb cd #changed to python3-smbus -sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff5 python3-pil python3-serial libusb-1.0 +sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff5 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev sudo pip3 install --upgrade setuptools From 91c43a6d46168842a57718ddfefa0a032f657b71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 16:11:08 -0500 Subject: [PATCH 47/86] Update install fix motd --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index c2c29cee..09e9aa9e 100755 --- a/install +++ b/install @@ -31,7 +31,7 @@ if [[ $(grep 'cubesatsim' /etc/motd) ]]; then echo "motd already updated" else echo "updating motd" - sudo sh -c 'echo /home/pi/CubeSatSim/motd.txt >> /etc/motd' + sudo sh -c 'cat /home/pi/CubeSatSim/motd.txt >> /etc/motd' fi FILE=/home/pi/CubeSatSim/command_tx From 9c460690bf6a502e278c8c411579a5e97bb292d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 16:12:40 -0500 Subject: [PATCH 48/86] Update install fix PiSSTVpp install --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 09e9aa9e..e31d0925 100755 --- a/install +++ b/install @@ -148,6 +148,8 @@ git clone https://github.com/csete/fcdctl.git cd fcdctl make fcdpp +cd + git clone https://github.com/alanbjohnston/PiSSTVpp.git cd PiSSTVpp From e68be96072bf166f9df34478be1ae0ac0bb80198 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 16:17:07 -0500 Subject: [PATCH 49/86] Update install fix unzip -o --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index e31d0925..42362044 100755 --- a/install +++ b/install @@ -136,7 +136,7 @@ mkdir /home/pi/fctelem mkdir /home/pi/fctelem/public_html cd fctelem wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip -unzip fctelem.zip +unzip -o fctelem.zip cd echo "Installing fcdctl to set FUNcubeDongle Pro gain" From bce85c99f4688d48e185645cd2ed2bae3feed19d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 22:22:49 -0500 Subject: [PATCH 50/86] Update dtmf_aprs_cc.py print counter --- dtmf_aprs_cc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 9a7b25c2..537fa922 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -108,7 +108,10 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - + print(" ") + print("Counter: ") + print(counter) + print(" ") if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice ## if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice GPIO.setmode(GPIO.BCM) From 254f54998d153b559e6621b36130c07ce7e40b81 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 22:28:42 -0500 Subject: [PATCH 51/86] Update dtmf_aprs_cc.py remove counter check --- dtmf_aprs_cc.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 537fa922..e051c73a 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -108,12 +108,9 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - print(" ") - print("Counter: ") - print(counter) - print(" ") - if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice -## if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice + +## if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice + if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(powerPin, GPIO.OUT) From d91aada7ac35c05a82a20e803e2d502221ee5505 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 22:42:02 -0500 Subject: [PATCH 52/86] Update config only send mode=o once --- config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config b/config index 87217b73..c178e2f3 100755 --- a/config +++ b/config @@ -1203,8 +1203,9 @@ elif [ "$1" = "-A" ]; then echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 5 - sudo touch /home/pi/CubeSatSim/ready - + if [ "$MODE" != "10" ]; then + sudo touch /home/pi/CubeSatSim/ready + fi echo echo "Do you want to send another APRS command packet (y/n) " read sim From b72c77f2a4e39be22eebf06ff5c9af04d0f4d3c1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 22:50:52 -0500 Subject: [PATCH 53/86] Update config add sleep 3 for -o --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index c178e2f3..b676e3fd 100755 --- a/config +++ b/config @@ -1020,6 +1020,7 @@ elif [ "$1" = "-o" ]; then # restart=1 fi fi + sleep 3 fi elif [ "$1" = "-H" ]; then From b224892f9f311e8fdd679e32780b253805050e36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 16 Jan 2026 22:56:07 -0500 Subject: [PATCH 54/86] Update dtmf_aprs_cc.py only counter for -o --- dtmf_aprs_cc.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index e051c73a..72fcc7f1 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -30,7 +30,7 @@ if __name__ == "__main__": system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True - counter = (counter + 1) % 2 + counter = 1 if ((line.find("DTMF>APDW15:t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' @@ -39,7 +39,7 @@ if __name__ == "__main__": system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - counter = (counter + 1) % 2 + counter = 1 if ((line.find("DTMF>APDW15:t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' @@ -48,7 +48,7 @@ if __name__ == "__main__": system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - counter = (counter + 1) % 2 + counter = 1 if ((line.find("DTMF>APDW15:t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' @@ -57,7 +57,7 @@ if __name__ == "__main__": system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - counter = (counter + 1) % 2 + counter = 1 if ((line.find("DTMF>APDW15:t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' @@ -66,7 +66,7 @@ if __name__ == "__main__": system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - counter = (counter + 1) % 2 + counter = 1 if ((line.find("DTMF>APDW15:t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' @@ -85,7 +85,7 @@ if __name__ == "__main__": system("echo '\nFUNcube Mode!!\n'") mode = 'j' change_mode = True - counter = (counter + 1) % 2 + counter = 1 if ((line.find("DTMF>APDW15:t7#")) > 0): system("echo '\nFUNcube Mode!!\n'") mode = 'j' @@ -94,7 +94,7 @@ if __name__ == "__main__": system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - counter = (counter + 1) % 2 + counter = 1 if ((line.find("DTMF>APDW15:t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' @@ -109,8 +109,8 @@ if __name__ == "__main__": mode = 'o' change_mode = True -## if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice - if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice + if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice +# if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(powerPin, GPIO.OUT) From 2a7f87fe59bb0742d466ff5013f989e8e8a168d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 10:29:11 -0500 Subject: [PATCH 55/86] Update dtmf_aprs_cc.py move counter code to -o --- dtmf_aprs_cc.py | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 72fcc7f1..7257b217 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -30,7 +30,6 @@ if __name__ == "__main__": system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True - counter = 1 if ((line.find("DTMF>APDW15:t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' @@ -39,7 +38,6 @@ if __name__ == "__main__": system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - counter = 1 if ((line.find("DTMF>APDW15:t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' @@ -48,7 +46,6 @@ if __name__ == "__main__": system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - counter = 1 if ((line.find("DTMF>APDW15:t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' @@ -57,7 +54,6 @@ if __name__ == "__main__": system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - counter = 1 if ((line.find("DTMF>APDW15:t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' @@ -66,17 +62,14 @@ if __name__ == "__main__": system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - counter = 1 if ((line.find("DTMF>APDW15:t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - if ((line.find("MODE=e")) > 0): system("echo '\nRepeater Mode!!\n'") mode = 'e' change_mode = True - counter = (counter + 1) % 2 if ((line.find("DTMF>APDW15:t6#")) > 0): system("echo '\nRepeater Mode!!\n'") mode = 'e' @@ -85,7 +78,6 @@ if __name__ == "__main__": system("echo '\nFUNcube Mode!!\n'") mode = 'j' change_mode = True - counter = 1 if ((line.find("DTMF>APDW15:t7#")) > 0): system("echo '\nFUNcube Mode!!\n'") mode = 'j' @@ -94,23 +86,24 @@ if __name__ == "__main__": system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - counter = 1 if ((line.find("DTMF>APDW15:t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True if ((line.find("MODE=o")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - counter = (counter + 1) % 2 + counter = (counter + 1) % 2 # Direwolf prints it twice, only do once + ir (counter == 1): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + counter = 1 if ((line.find("DTMF>APDW15:t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice -# if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice +# if ((debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice + if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(powerPin, GPIO.OUT) From bd1addf235a061849c0cf9cd57e3e9294f125dac Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 10:33:44 -0500 Subject: [PATCH 56/86] Update transmit.py don't turn off green LED in x or n mode --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 10cee57d..8a95a157 100644 --- a/transmit.py +++ b/transmit.py @@ -421,7 +421,7 @@ if __name__ == "__main__": if (mode == 'a'): print("AFSK") else: - GPIO.output(powerPin, 0) +# GPIO.output(powerPin, 0) print("Transmit APRS Commands") # while True: # sleep(0.1) From 23e1ace454fd782b8a2204b2ba34e3285e98823d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 10:34:49 -0500 Subject: [PATCH 57/86] Update dtmf_aprs_cc.py typo --- dtmf_aprs_cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 7257b217..cfa58788 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -92,7 +92,7 @@ if __name__ == "__main__": change_mode = True if ((line.find("MODE=o")) > 0): counter = (counter + 1) % 2 # Direwolf prints it twice, only do once - ir (counter == 1): + if (counter == 1): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True From adeee8e9c6dbb3bb328dc26e4c06e4acdb41a3bd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 11:24:53 -0500 Subject: [PATCH 58/86] Update config add full path for dire wolf tmp --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index b676e3fd..3ed6116e 100755 --- a/config +++ b/config @@ -12,7 +12,7 @@ function transmit_command { echo mode=1 - cat direwolf/direwolf-transmit-dtmf.conf > direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> direwolf-tmp.conf + cat /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf.conf > /home/pi/CubeSatSim/direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> /home/pi/CubeSatSim/direwolf-tmp.conf # echo "Stopping command and control" # sudo systemctl stop command @@ -20,7 +20,7 @@ function transmit_command { echo "Transmit DTMF start" gpio write 28 0 # ptt gpio write 2 1 # tx LED - timeout 3 direwolf -c direwolf-tmp.conf -t 0l + timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf-tmp.conf -t 0l gpio write 2 0 # tx LED gpio write 28 1 #ptt echo "Transmit stop" From 376e6fa60927109eaf5b91a61a24fab5fb76b3a0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 11:45:46 -0500 Subject: [PATCH 59/86] Update config add TX and RX frequencies --- config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config b/config index 3ed6116e..b9febf56 100755 --- a/config +++ b/config @@ -134,6 +134,12 @@ if [ "$1" = "" ]; then fi echo + echo -n "TX Frequency is: " + echo -n ${7} + echo -n " MHz, RX Frequency is: " + echo -n ${8} + echo " MHz" + if [ "$9" = "yes" ] || [ "$9" = "y" ]; then echo "Balloon mode is ON" else From b9576e100f3e7fbe71b91298a5cc4d2ddff8cf87 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 12:04:55 -0500 Subject: [PATCH 60/86] Update config don't display dire wolf dtmf transmit --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index b9febf56..d8a4396d 100755 --- a/config +++ b/config @@ -17,13 +17,13 @@ function transmit_command { # echo "Stopping command and control" # sudo systemctl stop command - echo "Transmit DTMF start" +# echo "Transmit start" gpio write 28 0 # ptt gpio write 2 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf-tmp.conf -t 0l + timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf-tmp.conf -t 0l > /dev/null 2>&1 gpio write 2 0 # tx LED gpio write 28 1 #ptt - echo "Transmit stop" +# echo "Transmit stop" # echo "Resuming command and control" # sudo systemctl start command From 6a6689f0bc73024bf579f64c41b02e4016d23357 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 15:24:14 -0500 Subject: [PATCH 61/86] Update config turn off C2C when transmit commands --- config | 73 +++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/config b/config index d8a4396d..62b9c380 100755 --- a/config +++ b/config @@ -11,8 +11,41 @@ function transmit_command { echo "Sending DTMF tones to change to mode "$1 echo + case $1 in + + a) + number=1 + ;; + f) + number=2 + ;; + b) + number=3 + ;; + s) + number=4 + ;; + m) + number=5 + ;; + e) + number=6 + ;; + j) + number=7 + ;; + o) + number=11 + ;; + *) + number=0 + ;; + esac + + echo $number + mode=1 - cat /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf.conf > /home/pi/CubeSatSim/direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$1' #" delay=0' >> /home/pi/CubeSatSim/direwolf-tmp.conf + cat /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf.conf > /home/pi/CubeSatSim/direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$number' #" delay=0' >> /home/pi/CubeSatSim/direwolf-tmp.conf # echo "Stopping command and control" # sudo systemctl stop command @@ -30,11 +63,11 @@ function transmit_command { else - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE="$2 + STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE="$1 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 "$2" " + echo -n "Sending APRS packet to change mode to "$1" " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 @@ -226,7 +259,7 @@ elif [ "$1" = "-a" ]; then if [ "$1" == "n" ]; then - transmit_command "1" "a" + transmit_command "a" else @@ -244,7 +277,7 @@ elif [ "$1" = "-m" ]; then if [ "$1" == "n" ]; then - transmit_command "5" "m" + transmit_command "m" else @@ -262,7 +295,7 @@ elif [ "$1" = "-f" ]; then if [ "$1" == "n" ]; then - transmit_command "2" "f" + transmit_command "f" else @@ -279,7 +312,7 @@ elif [ "$1" = "-b" ]; then if [ "$1" == "n" ]; then - transmit_command "3" "b" + transmit_command "b" else @@ -296,7 +329,7 @@ elif [ "$1" = "-s" ]; then if [ "$1" == "n" ]; then - transmit_command "4" "s" + transmit_command "s" else @@ -987,7 +1020,7 @@ elif [ "$1" = "-o" ]; then if [ "$1" == "n" ]; then - transmit_command "10" "o" + transmit_command "o" else echo @@ -1098,7 +1131,7 @@ elif [ "$1" = "-e" ]; then if [ "$1" == "n" ]; then - transmit_command "6" "e" + transmit_command "e" else @@ -1132,10 +1165,12 @@ elif [ "$1" = "-n" ]; then sudo echo "b" > /home/pi/CubeSatSim/.mode restart=1 fi + sudo systemctl restart command else echo "Switching to Transmit Commands mode" check_restart sudo echo "n" > /home/pi/CubeSatSim/.mode + sudo systemctl stop command fi elif [ "$1" = "-A" ]; then @@ -1151,17 +1186,18 @@ elif [ "$1" = "-A" ]; then sudo systemctl stop cubesatsim sudo systemctl stop transmit + sudo systemctl stop command # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 sudo python3 -u /home/pi/CubeSatSim/transmit.py x > /dev/null 2>&1 & # Force APRS mode fi - sim="y" + MODE="0" - while [ "$sim" = "y" ] + while [ "$MODE" != "99" ] do - 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" + 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 99=Exit this mode" read MODE case $MODE in @@ -1213,13 +1249,14 @@ elif [ "$1" = "-A" ]; then if [ "$MODE" != "10" ]; then sudo touch /home/pi/CubeSatSim/ready fi - echo - echo "Do you want to send another APRS command packet (y/n) " - read sim - echo +# echo +# echo "Do you want to send another APRS command packet (y/n) " +# read sim +# echo done sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 # sudo systemctl restart cubesatsim + sudo systemctl restart command if [ "$1" != "n" ]; then @@ -1296,7 +1333,7 @@ elif [ "$1" = "-j" ]; then if [ "$1" == "n" ]; then - transmit_command "7" "j" + transmit_command "j" else From 7967cb6020b19db4195c367283e67e91b5eedde8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 15:29:52 -0500 Subject: [PATCH 62/86] Update config Can't turn on C2C in mode n --- config | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/config b/config index 62b9c380..de0c19ef 100755 --- a/config +++ b/config @@ -612,7 +612,7 @@ elif [ "$1" = "-T" ]; then echo if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Command and control set to OFF" + echo "Turning command and control OFF" sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1 # reboot=1 echo "restarting command and control" @@ -623,21 +623,30 @@ elif [ "$1" = "-T" ]; then fi else - echo "Radio command and control is OFF" + echo "Radio command and control is OFF" echo echo "Do you want to set command and control to ON (y/n) " read reset echo if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Command and control set to ON" - sudo touch /home/pi/CubeSatSim/command_control - echo "restarting command and control" -# reboot=1 - sudo systemctl restart command - echo "restarting transmit" - sudo systemctl restart transmit -## sudo reboot now + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" != "n" ] ; then + echo "Turning command and control ON" + sudo touch /home/pi/CubeSatSim/command_control + echo "restarting command and control" +# reboot=1 + sudo systemctl restart command + echo "restarting transmit" + sudo systemctl restart transmit +## sudo reboot now + else + echo "Can't turn on Command and control in Transmit Commands mode." + fi fi fi From 9a27f5c3991c44ebddf487e04e203d459b11f93c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 15:35:07 -0500 Subject: [PATCH 63/86] Update transmit.py stop command in mode x or n --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index 8a95a157..8b25a3fc 100644 --- a/transmit.py +++ b/transmit.py @@ -423,6 +423,7 @@ if __name__ == "__main__": else: # GPIO.output(powerPin, 0) print("Transmit APRS Commands") + system("sudo systemctl stop command") # while True: # sleep(0.1) if (mode != 'n'): From d1f35018e09cef093dad5d5a195395ec6859fa32 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 15:47:06 -0500 Subject: [PATCH 64/86] Update transmit.py don't start c2c if mode x or n --- transmit.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/transmit.py b/transmit.py index 8b25a3fc..6ed36795 100644 --- a/transmit.py +++ b/transmit.py @@ -338,6 +338,7 @@ if __name__ == "__main__": print("Can't read callsign from sim.cfg file, defaulting to AMSAT") file.close() + no_command = True try: f = open("/home/pi/CubeSatSim/command_control", "r") f.close() @@ -346,15 +347,16 @@ if __name__ == "__main__": GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected if GPIO.input(squelch) == False: print("squelch not set correctly, no command input!") - no_command = True else: - print("command and control is activated") - no_command = False -# system("/home/pi/CubeSatSim/command &") - system("sudo systemctl start command") + if (mode != 'n') and (mode !'= 'x'): + print("command and control is activated") + no_command = False + system("sudo systemctl start command") + else: + print("Command and control not activated since Transmit Commands mode") except: print("command and control not activated") - no_command = True + print(callsign) GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 From cb3aa620f4e431cdd72147b45dc8e9adeb23cf86 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 15:48:38 -0500 Subject: [PATCH 65/86] Update transmit.py fix if --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6ed36795..c41a4731 100644 --- a/transmit.py +++ b/transmit.py @@ -348,7 +348,7 @@ if __name__ == "__main__": if GPIO.input(squelch) == False: print("squelch not set correctly, no command input!") else: - if (mode != 'n') and (mode !'= 'x'): + if (mode != 'n') and (mode != 'x'): print("command and control is activated") no_command = False system("sudo systemctl start command") From e45c9e9b78f8028fa298c4d2f2698b2e4ff7a3a6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:02:04 -0500 Subject: [PATCH 66/86] Update config fix -o --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index de0c19ef..81da511b 100755 --- a/config +++ b/config @@ -35,7 +35,7 @@ function transmit_command { number=7 ;; o) - number=11 + number=10 ;; *) number=0 From a3ed4e02de84de7f151c864d95fe252b6a40e2a0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:18:36 -0500 Subject: [PATCH 67/86] Update config make -A same as -n --- config | 69 ++++++---------------------------------------------------- 1 file changed, 7 insertions(+), 62 deletions(-) diff --git a/config b/config index 81da511b..9474c7c8 100755 --- a/config +++ b/config @@ -42,9 +42,8 @@ function transmit_command { ;; esac - echo $number +# echo $number - mode=1 cat /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf.conf > /home/pi/CubeSatSim/direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$number' #" delay=0' >> /home/pi/CubeSatSim/direwolf-tmp.conf # echo "Stopping command and control" @@ -1196,79 +1195,25 @@ elif [ "$1" = "-A" ]; then sudo systemctl stop cubesatsim sudo systemctl stop transmit sudo systemctl stop command - # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 sudo python3 -u /home/pi/CubeSatSim/transmit.py x > /dev/null 2>&1 & # Force APRS mode fi MODE="0" - while [ "$MODE" != "99" ] + while [ "$MODE" != "x" ] do - 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 99=Exit this mode" + echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, o=Beacon on/off x=Exit this mode" read MODE - - case $MODE in - - 1) - echo "Mode 1 is APRS" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" - ;; - 2) - echo "Mode 2 is FSK" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f" - ;; - 3) - echo "Mode 3 is BPSK" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b" - ;; - 4) - echo "Mode 4 is SSTV" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=s" - ;; - 5) - 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=?" - ;; - esac - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - echo $STRING > /home/pi/CubeSatSim/t.txt - echo - echo -n "Sending APRS packet " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 5 - if [ "$MODE" != "10" ]; then - sudo touch /home/pi/CubeSatSim/ready - fi -# echo -# echo "Do you want to send another APRS command packet (y/n) " -# read sim -# echo + + transmit_command $MODE + done - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 -# sudo systemctl restart cubesatsim + sudo systemctl restart command if [ "$1" != "n" ]; then - reboot=1 fi From 0d4ad295811aa6a2946a4d5064d90a3a21ab3b71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:25:11 -0500 Subject: [PATCH 68/86] Update config fix -A while --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 9474c7c8..bf3bd258 100755 --- a/config +++ b/config @@ -1201,7 +1201,7 @@ elif [ "$1" = "-A" ]; then MODE="0" - while [ "$MODE" != "x" ] + while [ "$MODE" != "x" ]; do echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, o=Beacon on/off x=Exit this mode" From 2f5cafc5e6eceee65f256c602803fa1fc56795d8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:27:00 -0500 Subject: [PATCH 69/86] Update config print mode --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index bf3bd258..2ba1801a 100755 --- a/config +++ b/config @@ -1209,6 +1209,8 @@ elif [ "$1" = "-A" ]; then transmit_command $MODE + echo $MODE + done sudo systemctl restart command From 703c12c6fe316bb581902722638b0b9f2cf0297c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:27:53 -0500 Subject: [PATCH 70/86] Update config remove exit --- config | 2 -- 1 file changed, 2 deletions(-) diff --git a/config b/config index 2ba1801a..1fee82b5 100755 --- a/config +++ b/config @@ -75,8 +75,6 @@ function transmit_command { echo echo "To change the mode of this CubeSatSim use config -n" - - exit } function check_restart { From b608b8287df3c69d62fcc89f4e76006c9d9e44c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:30:08 -0500 Subject: [PATCH 71/86] Update config don't transmit x --- config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index 1fee82b5..dfc80d1d 100755 --- a/config +++ b/config @@ -1205,9 +1205,11 @@ elif [ "$1" = "-A" ]; then echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, o=Beacon on/off x=Exit this mode" read MODE - transmit_command $MODE + if [ "$MODE" != "x" ]; then + transmit_command $MODE + fi - echo $MODE + echo done From 214ec54a8d10b97bde6bc74ef14032644a52d1a3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:35:31 -0500 Subject: [PATCH 72/86] Update config use callsign --- config | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config b/config index dfc80d1d..82e35881 100755 --- a/config +++ b/config @@ -62,11 +62,16 @@ function transmit_command { else - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE="$1 + $MODE=$1 + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + STRING="$1-11>APCSS:=3901.40N\07704.39WShi hi MODE="$MODE 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 "$1" " + echo -n "Sending APRS packet to change mode to "$MODE" " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 From d85c9b3b1606140c5b10f9c85ca8b71e9c8f8b4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 17 Jan 2026 16:36:46 -0500 Subject: [PATCH 73/86] Update config fix mode --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 82e35881..48717945 100755 --- a/config +++ b/config @@ -62,7 +62,7 @@ function transmit_command { else - $MODE=$1 + MODE=$1 value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value From 925a0b1f82b1d46903cb831b54e3cf513cf247cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:06:51 -0500 Subject: [PATCH 74/86] Update config display TX frequency in -A and -n --- config | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/config b/config index 48717945..9c9ad186 100755 --- a/config +++ b/config @@ -1179,6 +1179,15 @@ elif [ "$1" = "-n" ]; then sudo systemctl restart command else echo "Switching to Transmit Commands mode" + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "TX Frequency is: " + echo -n ${7} + echo + check_restart sudo echo "n" > /home/pi/CubeSatSim/.mode sudo systemctl stop command @@ -1189,6 +1198,14 @@ elif [ "$1" = "-A" ]; then echo "Transmit APRS Commands to control another CubeSatSim" echo + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "TX Frequency is: " + echo -n ${7} + echo + value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value From 00b60712307989f4a0154321ba23cf68bffe4b80 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:07:43 -0500 Subject: [PATCH 75/86] Update config add line breaks --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 9c9ad186..b88a0302 100755 --- a/config +++ b/config @@ -1185,7 +1185,7 @@ elif [ "$1" = "-n" ]; then set -- $value echo -n "TX Frequency is: " - echo -n ${7} + echo ${7} echo check_restart @@ -1203,7 +1203,7 @@ elif [ "$1" = "-A" ]; then set -- $value echo -n "TX Frequency is: " - echo -n ${7} + echo ${7} echo value=`cat /home/pi/CubeSatSim/.mode` From d6d934d4fdc84bd3328a75bf633905c9b4d95ed6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:09:10 -0500 Subject: [PATCH 76/86] Update config add MHz to freq --- config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index b88a0302..900cc951 100755 --- a/config +++ b/config @@ -1185,7 +1185,8 @@ elif [ "$1" = "-n" ]; then set -- $value echo -n "TX Frequency is: " - echo ${7} + echo -n ${7} + echo " MHz" echo check_restart @@ -1203,7 +1204,8 @@ elif [ "$1" = "-A" ]; then set -- $value echo -n "TX Frequency is: " - echo ${7} + echo -n ${7} + echo " MHz" echo value=`cat /home/pi/CubeSatSim/.mode` From 2e55116be692589dd94429a7348c7aa6471a1107 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:10:43 -0500 Subject: [PATCH 77/86] Update config to display RX freq when turning on C2C --- config | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config b/config index 900cc951..e9b56951 100755 --- a/config +++ b/config @@ -639,6 +639,16 @@ elif [ "$1" = "-T" ]; then if [ "$1" != "n" ] ; then echo "Turning command and control ON" + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "RX Frequency is: " + echo -n ${8} + echo " MHz" + echo + sudo touch /home/pi/CubeSatSim/command_control echo "restarting command and control" # reboot=1 From db2bb85f2196a223b364e1c2dfa00cd9f3f2b367 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:12:22 -0500 Subject: [PATCH 78/86] Update config remove extra line break --- config | 1 - 1 file changed, 1 deletion(-) diff --git a/config b/config index e9b56951..d679f1a0 100755 --- a/config +++ b/config @@ -601,7 +601,6 @@ elif [ "$1" = "-C" ]; then elif [ "$1" = "-T" ]; then - echo echo "Change command and control state" echo From 6b8e1fc7c631f3a69259c3d77d2a2572a0223fd2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:21:01 -0500 Subject: [PATCH 79/86] Update config move stop command --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index d679f1a0..e5f6e362 100755 --- a/config +++ b/config @@ -1225,10 +1225,10 @@ elif [ "$1" = "-A" ]; then sudo systemctl stop cubesatsim sudo systemctl stop transmit - sudo systemctl stop command sudo python3 -u /home/pi/CubeSatSim/transmit.py x > /dev/null 2>&1 & # Force APRS mode fi + sudo systemctl stop command MODE="0" From 2d2a95baa4fe5e733b92e992f385c3ee8f50965d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:26:53 -0500 Subject: [PATCH 80/86] Update config don't restart command if in mode n --- config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config b/config index e5f6e362..4036afb4 100755 --- a/config +++ b/config @@ -1245,10 +1245,13 @@ elif [ "$1" = "-A" ]; then echo done - - sudo systemctl restart command - if [ "$1" != "n" ]; then + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" != "n" ] ; then + sudo systemctl restart command reboot=1 fi From eb0e6a7232b72ec9e360d7899d183a61d653fbfd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:51:39 -0500 Subject: [PATCH 81/86] Update config don't do -A unless in FM mode --- config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config b/config index 4036afb4..70c80215 100755 --- a/config +++ b/config @@ -1221,6 +1221,12 @@ elif [ "$1" = "-A" ]; then echo "$value" > /dev/null set -- $value + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then + echo "The CubeSatSim/config -A command can only be run in APRS, SSTV, CW, or Transmit Commands modes." + echo "Switch to one of these modes (a, s, m, or n) then re-run this command." + exit + fi + if [ "$1" != "n" ]; then sudo systemctl stop cubesatsim From 3d036d3047afa5e2b9806d152427f9f5b0b7d5f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 12:53:20 -0500 Subject: [PATCH 82/86] Update config remove extra print --- config | 1 - 1 file changed, 1 deletion(-) diff --git a/config b/config index 70c80215..0ad15af1 100755 --- a/config +++ b/config @@ -9,7 +9,6 @@ function transmit_command { echo echo "Sending DTMF tones to change to mode "$1 - echo case $1 in From e87bf30a6dda23c82753e8e1192a67fd73968384 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 13:03:25 -0500 Subject: [PATCH 83/86] Update transmit.py bypass Battery Saver in Transmit Commands --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index c41a4731..8c2dd7c4 100644 --- a/transmit.py +++ b/transmit.py @@ -352,6 +352,7 @@ if __name__ == "__main__": print("command and control is activated") no_command = False system("sudo systemctl start command") + txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated else: print("Command and control not activated since Transmit Commands mode") except: From 288ce26402b445e50962c056a6bb4822407cadfc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 13:10:17 -0500 Subject: [PATCH 84/86] Update transmit.py ignore Battery Saver in Transmit Commands mode --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 8c2dd7c4..b9cbdbfe 100644 --- a/transmit.py +++ b/transmit.py @@ -352,9 +352,9 @@ if __name__ == "__main__": print("command and control is activated") no_command = False system("sudo systemctl start command") - txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated else: - print("Command and control not activated since Transmit Commands mode") + print("Command and control not activated since Transmit Commands mode") + txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated except: print("command and control not activated") From c9cb1eb508da6ba96e050c9c09171f4444dad89c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 14:29:57 -0500 Subject: [PATCH 85/86] Update config exiting -n reboot --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 0ad15af1..ef5d451d 100755 --- a/config +++ b/config @@ -1182,7 +1182,7 @@ elif [ "$1" = "-n" ]; then else echo "Switching to BPSK mode" sudo echo "b" > /home/pi/CubeSatSim/.mode - restart=1 + reboot=1 fi sudo systemctl restart command else From 23c1a9a28d54b79e214a5af82eb5776391d7e5f4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 18 Jan 2026 15:10:23 -0500 Subject: [PATCH 86/86] Update config print TX freq in transmit command --- config | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/config b/config index ef5d451d..7073de90 100755 --- a/config +++ b/config @@ -2,15 +2,25 @@ function transmit_command { + MODE=$1 echo "CubeSatSim is in Transmit Commands mode" + echo + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "TX Frequency is: " + echo -n ${7} + echo " MHz" FILE=/home/pi/CubeSatSim/transmit_dtmf if [ -f "$FILE" ]; then echo - echo "Sending DTMF tones to change to mode "$1 + echo "Sending DTMF tones to change to mode "$MODE - case $1 in + case $MODE in a) number=1 @@ -61,11 +71,6 @@ function transmit_command { else - MODE=$1 - value=`cat /home/pi/CubeSatSim/sim.cfg` - echo "$value" > /dev/null - set -- $value - STRING="$1-11>APCSS:=3901.40N\07704.39WShi hi MODE="$MODE sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 echo $STRING > /home/pi/CubeSatSim/t.txt