From d0ff780a4df58699ba44bd9af4c3b2e80352a43c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 17:26:12 -0400 Subject: [PATCH 01/18] Update config try no reboot for PacSat modes --- config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config b/config index 324a5512..c9236f48 100755 --- a/config +++ b/config @@ -95,9 +95,10 @@ function check_restart { echo "$value" > /dev/null set -- $value - if [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - elif [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then +# if [ "$1" = "p" ] || [ "$1" = "P" ] ; then +# reboot=1 +#el + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 From e66b54ffdd26aefe11e9127835360483da6182c4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 22:40:02 -0400 Subject: [PATCH 02/18] Update config add check restart for PacSat Ground --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index c9236f48..423a5c7e 100755 --- a/config +++ b/config @@ -1834,7 +1834,8 @@ elif [ "$1" = "-I" ]; then # echo "changing CubeSatSim to Pacsat mode" - reboot=1 +# reboot=1 + check_restart sudo echo "P" > /home/pi/CubeSatSim/.mode value=`cat /home/pi/CubeSatSim/sim.cfg` From ce273a1624c3fe2fed865e812401daac6fa4abac Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 22:46:12 -0400 Subject: [PATCH 03/18] Update pacsat.sh don't quit if change mode --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 68f390c4..499db97c 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,19 +75,19 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then echo echo "Mode is not PacSat Ground Station" echo - echo "Would you like to change to PacSat Ground Station mode and reboot? (y/n)?" + echo "Would you like to change to PacSat Ground Station mode? (y/n)?" read -r ANS if [ "$ANS" = "y" ]; then /home/pi/CubeSatSim/config -I - exit +# exit else echo - echo "You can run the PacSat Ground Station after you change mode and reboot." + echo "You can run the PacSat Ground Station after you change mode." sleep 10 exit From 34a8fb8fb62ff38014a61dfeee7c74ade4931f4d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 22:59:49 -0400 Subject: [PATCH 04/18] Update pacsat.sh cp don't wget --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 499db97c..fafffdf2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -107,7 +107,8 @@ elif [ "$loopback" = "1" ] ; then cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip +# wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatGround.zip . unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip @@ -141,7 +142,8 @@ else cd sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip +# wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatGround.zip . unzip PacSatGround.zip sudo rm PacSatGround.zip From 2c91f11ec57f68c5ae0cb9d567cc4890b6c800c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:02:34 -0400 Subject: [PATCH 05/18] Update pacsat.sh dire wolf white background --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index fafffdf2..11138565 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -304,7 +304,7 @@ echo cat $DIREWOLF_CONF echo -direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & +direwolf -r 48000 -c $DIREWOLF_CONF & cd /home/pi/Desktop/PacsatGround/ From bacd17b8da4841d4602ac2e5cc8303ad121cd0a4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:03:31 -0400 Subject: [PATCH 06/18] Update pacsat.sh dire wolf don't decode APRS --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 11138565..fcdf9e81 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -304,7 +304,7 @@ echo cat $DIREWOLF_CONF echo -direwolf -r 48000 -c $DIREWOLF_CONF & +direwolf -qd -r 48000 -c $DIREWOLF_CONF & cd /home/pi/Desktop/PacsatGround/ From bebab685b8cf33889cdf779039f1904f69ac9278 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:18:02 -0400 Subject: [PATCH 07/18] Update pacsatsim.sh copy don't wget zip files --- pacsatsim.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 49213e18..cbe6d632 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -87,7 +87,8 @@ if [ ! -d "/home/pi/PacSat" ]; then mkdir /home/pi/PacSat mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip +# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip + cp /home/pi/pi_pacsat/zip/pacsat-dir.zip . unzip pacsat-dir.zip sudo rm pacsat-dir.zip @@ -96,7 +97,8 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm /home/pi/pi_pacsat/Debug/pacsat.state sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip +# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip + cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . unzip pi_pacsat.zip -d / sudo rm pi_pacsat.zip From 1b63681505c84aef97d3082a727a73f45e7559a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:20:15 -0400 Subject: [PATCH 08/18] Update config -k restart not reboot --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index 423a5c7e..b5917680 100755 --- a/config +++ b/config @@ -1874,7 +1874,8 @@ elif [ "$1" = "-k" ]; then echo sudo systemctl stop pacsatsim &>/dev/null sudo rm -r /home/pi/PacSat - reboot=1 +# reboot=1 + sudo systemctl restart pacsatsim elif [ "$1" = "-h" ]; then From e0001319e2f62aadcdcb48b78757489b0d42e537 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:24:51 -0400 Subject: [PATCH 09/18] Update pacsatsim.sh simple dire wolf output --- pacsatsim.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index cbe6d632..93a6b1b0 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -298,7 +298,8 @@ echo cat $DIREWOLF_CONF echo -direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 & +#direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 & +direwolf -qd -r 48000 -c $DIREWOLF_CONF & # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & ## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & From 9b73b2851231f6d29e9dd855522dd0eba3626553 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:31:48 -0400 Subject: [PATCH 10/18] Update pacsat.sh don't prompt to change mode y/n --- groundstation/pacsat.sh | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index fcdf9e81..85db5762 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -71,29 +71,15 @@ set -- $value MODE=$1 if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then + echo + echo "Changing to PacSat Ground Station Mode." + echo "You might reboot" + echo + sleep 5 + /home/pi/CubeSatSim/config -I +fi - echo - echo "Mode is not PacSat Ground Station" - echo - echo "Would you like to change to PacSat Ground Station mode? (y/n)?" - - read -r ANS - - if [ "$ANS" = "y" ]; then - - /home/pi/CubeSatSim/config -I -# exit - - else - - echo - echo "You can run the PacSat Ground Station after you change mode." - sleep 10 - exit - - fi - -elif [ "$loopback" = "1" ] ; then +if [ "$loopback" = "1" ] ; then # if [ ! "$MODE" = "p" ] ; then echo From 5d7eb919fc7a50433a3b61c18e14af1dc92e888b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 10:49:52 -0400 Subject: [PATCH 11/18] Update fox-startup.sh don't start FoxTelem if PacSat GS mode --- groundstation/fox-startup.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/groundstation/fox-startup.sh b/groundstation/fox-startup.sh index cf6a6282..5fc934e5 100755 --- a/groundstation/fox-startup.sh +++ b/groundstation/fox-startup.sh @@ -5,6 +5,12 @@ echo "Startup script to run FoxTelem for FIAB v4" echo +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value +echo $1 +if [ "$1" != "P" ] ; then + sudo killall -9 FoxTelem &>/dev/null FILE=/home/pi/FoxTelemetryData/.foxprofile @@ -36,4 +42,10 @@ sleep 10 fi +else + echo "Don't run FoxTelem since PacSat Ground Station mode is set" +# /home/pi/CubeSatSim/groundstation/pacsat-run.sh + +fi + #$SHELL From 55dfe8c842acb8fbfe205042d4c2522d94bb6549 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:23:17 -0400 Subject: [PATCH 12/18] Create command.sh --- groundstation/command.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 groundstation/command.sh diff --git a/groundstation/command.sh b/groundstation/command.sh new file mode 100644 index 00000000..fba837e6 --- /dev/null +++ b/groundstation/command.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# script to send APRS or DTMR commands to a CubeSatSim + +sudo killall -9 zenity &>/dev/null + +echo + +autotune=0 + +mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=400 --title="Transmit Command" --text="Choose the command to transmit" --column="Command" --column="Result" a "APRS Mode" f "FSK Mode" b "BPSK Mode" s "SSTV Mode" m "CM Mode" e "Repeater Mode" j "FUNcube Mode" o "Beacon On/Off") + +echo $mode + +if [ -z "$mode" ]; then + +echo "No choice made." + +fi + +if [ "mode" = "a" ]; then + + echo "CHange to APRS mode" + +fi + From 3796521563d9522f89e778fb4a9473cc8481a209 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:24:39 -0400 Subject: [PATCH 13/18] made executable --- groundstation/command.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/command.sh diff --git a/groundstation/command.sh b/groundstation/command.sh old mode 100644 new mode 100755 From 964d18045aac57d4d7a5b68a9469187f7467a410 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:33:45 -0400 Subject: [PATCH 14/18] Update command.sh check for mode --- groundstation/command.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index fba837e6..4e99b0bd 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -2,6 +2,18 @@ # script to send APRS or DTMR commands to a CubeSatSim +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value + +if [ "$1" != "n" ]; then + + echo "Do you want to change to Transmit Commands mode?" + + exit + +fi + sudo killall -9 zenity &>/dev/null echo @@ -18,9 +30,12 @@ echo "No choice made." fi -if [ "mode" = "a" ]; then +if [ "$mode" = "a" ]; then - echo "CHange to APRS mode" + echo "Change to APRS mode" + + /home/pi/CubeSatSim/config -a fi + From 1d842ab5e7e41cc99b3e398108880d978ba634c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:37:51 -0400 Subject: [PATCH 15/18] Update command.sh do all modes --- groundstation/command.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index 4e99b0bd..4d2985de 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -8,8 +8,8 @@ set -- $value if [ "$1" != "n" ]; then - echo "Do you want to change to Transmit Commands mode?" - + echo "You are not in Transmit Commands mode" + sleep 10 exit fi @@ -26,16 +26,16 @@ echo $mode if [ -z "$mode" ]; then -echo "No choice made." + echo "No choice made." + sleep 10 + + exit fi -if [ "$mode" = "a" ]; then +/home/pi/CubeSatSim/config -$mode +sleep 10 - echo "Change to APRS mode" - /home/pi/CubeSatSim/config -a - -fi From 562c853b4f4bd77821739bb39125e5b3b6afcec4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:42:59 -0400 Subject: [PATCH 16/18] Update command.sh don't print mode --- groundstation/command.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index 4d2985de..8859e958 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -20,9 +20,9 @@ echo autotune=0 -mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=400 --title="Transmit Command" --text="Choose the command to transmit" --column="Command" --column="Result" a "APRS Mode" f "FSK Mode" b "BPSK Mode" s "SSTV Mode" m "CM Mode" e "Repeater Mode" j "FUNcube Mode" o "Beacon On/Off") +mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=390 --title="Transmit Command" --text="Choose the command to transmit" --column="Mode" --column="Result" a "APRS Mode" f "FSK Mode" b "BPSK Mode" s "SSTV Mode" m "CM Mode" e "Repeater Mode" j "FUNcube Mode" o "Beacon On/Off") -echo $mode +# echo $mode if [ -z "$mode" ]; then From 7c07d57fa04152437ac39147a8a3a23956995f63 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:43:59 -0400 Subject: [PATCH 17/18] Update command.sh change size --- groundstation/command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index 8859e958..e471e3cb 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -20,7 +20,7 @@ echo autotune=0 -mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=390 --title="Transmit Command" --text="Choose the command to transmit" --column="Mode" --column="Result" a "APRS Mode" f "FSK Mode" b "BPSK Mode" s "SSTV Mode" m "CM Mode" e "Repeater Mode" j "FUNcube Mode" o "Beacon On/Off") +mode=$(zenity --timeout=20 --list 2>/dev/null --width=300 --height=360 --title="Transmit Command" --text="Choose the command to transmit" --column="Mode" --column="Result" a "APRS Mode" f "FSK Mode" b "BPSK Mode" s "SSTV Mode" m "CM Mode" e "Repeater Mode" j "FUNcube Mode" o "Beacon On/Off") # echo $mode From 92bd0f06cecb1b4da06b2474be44f5976ec3c9e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 12:45:55 -0400 Subject: [PATCH 18/18] Update install change pi_pacsat to mine --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 1992de40..c5e5451a 100755 --- a/install +++ b/install @@ -516,8 +516,8 @@ FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ ! -f "$FILE" ]; then cd - #git clone https://github.com/alanbjohnston/pi_pacsat.git - git clone https://github.com/ac2cz/pi_pacsat.git + git clone https://github.com/alanbjohnston/pi_pacsat.git + #git clone https://github.com/ac2cz/pi_pacsat.git cd pi_pacsat #git checkout master-debug cd Debug