From b4a1714d15f75730ed401462e72c800466182ac6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:14:28 -0500 Subject: [PATCH 001/774] Create pacsat.sh --- groundstation/pacsat.sh | 193 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 groundstation/pacsat.sh diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh new file mode 100644 index 00000000..6e710b25 --- /dev/null +++ b/groundstation/pacsat.sh @@ -0,0 +1,193 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +sudo modprobe snd-aloop + +sudo systemctl stop openwebrx + +sudo systemctl stop rtl_tcp + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +sudo killall -9 direwolf &>/dev/null + +sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 java &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +sudo killall -9 zenity &>/dev/null + +echo + +frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +if [ -z "$frequency" ]; then + +echo "No choice made. Exiting." + +sleep 3 + +exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +echo + +echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + + echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat + +sleep 5 From f42d21a74dfe4ed1314494fbb3e4e46fb29c9850 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:17:44 -0500 Subject: [PATCH 002/774] Create direwolf-pacsat.conf --- groundstation/direwolf/direwolf-pacsat.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 groundstation/direwolf/direwolf-pacsat.conf diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf new file mode 100644 index 00000000..9fe8960b --- /dev/null +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -0,0 +1,3 @@ +CALLSIGN AMSAT +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +PTT GPIO 20 From 27b4ffe54b4027cac0b17cee54dc3311f3e2e660 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:22:36 -0500 Subject: [PATCH 003/774] changed permission of pacsat script --- groundstation/pacsat.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/pacsat.sh diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh old mode 100644 new mode 100755 From 234c9d747dca1bbf2857a1381abe18bb857ca838 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:27:59 -0500 Subject: [PATCH 004/774] added --- pacsatsim.sh | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100755 pacsatsim.sh diff --git a/pacsatsim.sh b/pacsatsim.sh new file mode 100755 index 00000000..6e710b25 --- /dev/null +++ b/pacsatsim.sh @@ -0,0 +1,193 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +sudo modprobe snd-aloop + +sudo systemctl stop openwebrx + +sudo systemctl stop rtl_tcp + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +sudo killall -9 direwolf &>/dev/null + +sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 java &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +sudo killall -9 zenity &>/dev/null + +echo + +frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +if [ -z "$frequency" ]; then + +echo "No choice made. Exiting." + +sleep 3 + +exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +echo + +echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + + echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat + +sleep 5 From 07b96c781b59d7589a4bbb388c69d28835afd8cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:34:06 -0500 Subject: [PATCH 005/774] Update pacsatsim.sh changed for sim --- pacsatsim.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6e710b25..4483d771 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,11 +4,11 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +#sudo systemctl stop openwebrx sudo systemctl stop rtl_tcp -pkill -o chromium &>/dev/null +#pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null @@ -16,44 +16,44 @@ sudo killall -9 direwolf &>/dev/null sudo killall -9 aplay &>/dev/null -sudo killall -9 qsstv &>/dev/null +#sudo killall -9 qsstv &>/dev/null -sudo killall -9 rtl_tcp &>/dev/null +#sudo killall -9 rtl_tcp &>/dev/null -sudo killall -9 java &>/dev/null +#sudo killall -9 java &>/dev/null -sudo killall -9 CubicSDR &>/dev/null +#sudo killall -9 CubicSDR &>/dev/null -sudo killall -9 zenity &>/dev/null +#sudo killall -9 zenity &>/dev/null echo -frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") +#frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") #echo $frequency -if [ -z "$frequency" ]; then +#if [ -z "$frequency" ]; then -echo "No choice made. Exiting." +#echo "No choice made. Exiting." -sleep 3 +#sleep 3 -exit +#exit -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo +echo "Choose the number for the packet decoding option:" +echo +echo "1. APRS US 2m (144390 kHz)" +echo "2. CubeSatSim (434900 kHz)" +echo "3. APRS European 2m (144800 kHz)" +echo "4. APRS Australian 2m (145175 kHz)" +echo "5. APRS on another frequency" +echo "6. APRS on ISS (145825 kHz)" +echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +echo "8. Test Serenity CubeSat decoding with WAV file" +echo "9. Test APRS decoding with CubeSatSim WAV file" +echo -#read -r choice +read -r choice fi From a97e2f8ed8a228ac2d25d40d984648e2be0b73b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:34:49 -0500 Subject: [PATCH 006/774] Update pacsatsim.sh typo --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 4483d771..40d5f809 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -55,7 +55,7 @@ echo read -r choice -fi +#fi if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then From 45372ed484368c34022f49b79f6617e77aa3b2c6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:36:41 -0500 Subject: [PATCH 007/774] Update direwolf-pacsat.conf changed to MYCALL --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 9fe8960b..03c6a5c4 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ -CALLSIGN AMSAT +MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 PTT GPIO 20 From b6cd13087a77f0df6f8c242888c9165a3f1ad863 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:38:23 -0500 Subject: [PATCH 008/774] Update direwolf-pacsat.conf added USB Card --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 03c6a5c4..7beb9432 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Device,DEV=0 PTT GPIO 20 From 78cb684ae3f07fdded48579842396e995c75641f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:42:44 -0500 Subject: [PATCH 009/774] Create direwolf-pacsatsim.conf --- direwolf/direwolf-pacsatsim.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim.conf diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf new file mode 100644 index 00000000..c335760a --- /dev/null +++ b/direwolf/direwolf-pacsatsim.conf @@ -0,0 +1,3 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 +PTT GPIO 20 From ede7922fa7ff9dc29efb052207c0503f5191ec4d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:43:38 -0500 Subject: [PATCH 010/774] Update pacsatsim.sh commented out rtl-sdr --- pacsatsim.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 40d5f809..2ea4707b 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -175,7 +175,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & fi @@ -185,8 +185,7 @@ value=`aplay -l | grep "Loopback"` echo "$value" > /dev/null set -- $value -#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & /home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat From ae07d74c873e56b2cf0264070c728c4ad552422b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:47:18 -0500 Subject: [PATCH 011/774] Update direwolf-pacsat.conf change to loopback for now --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 7beb9432..455a31b1 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 PTT GPIO 20 From aaf292db23de9441c7e1af76dde5166a6d4b8677 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:49:42 -0500 Subject: [PATCH 012/774] Update pacsat.sh change to passat ground station --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 6e710b25..70cf51fa 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -188,6 +188,6 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat +sudo setsid java -Xmx512M -jar PacSatGround.jar sleep 5 From e8e08ef8e460fb1e9f87960ff0f6de79390e1b6a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:51:02 -0500 Subject: [PATCH 013/774] Update pacsat.sh fix path --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 70cf51fa..bfaf7235 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -188,6 +188,6 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -sudo setsid java -Xmx512M -jar PacSatGround.jar +sudo setsid java -Xmx512M -jar /home/pi/Desktop/PacSatGround_0.46m_linux/PacSatGround.jar sleep 5 From 8348d51484f3272b3908356348eb275f4ff18523 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:54:15 -0500 Subject: [PATCH 014/774] Update pacsat.sh added cd --- groundstation/pacsat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index bfaf7235..2cca3cef 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -188,6 +188,8 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -sudo setsid java -Xmx512M -jar /home/pi/Desktop/PacSatGround_0.46m_linux/PacSatGround.jar +cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +sudo setsid java -Xmx512M -jar PacSatGround.jar sleep 5 From 87f8b2e25adb4ec76b675c1305e4fe3b2a01a102 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:56:18 -0500 Subject: [PATCH 015/774] Update direwolf-pacsat.conf changed to Headphones --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 455a31b1..c335760a 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 From 2acdcc69e2e61e2e03e3d27277e45555ce740116 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:11:29 -0500 Subject: [PATCH 016/774] Update config add dtmf to -A --- config | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/config b/config index 104a17e3..cee78881 100755 --- a/config +++ b/config @@ -1300,37 +1300,42 @@ elif [ "$1" = "-A" ]; then 1) echo "Mode 1 is APRS" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" + transmit_command_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" + transmit_command_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" + transmit_command_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" + transmit_command_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" + transmit_command_cw +# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" ;; *) echo "Unknown mode" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi 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 - sudo touch /home/pi/CubeSatSim/ready +# 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 +# sudo touch /home/pi/CubeSatSim/ready echo echo "Do you want to send another APRS command packet (y/n) " From 0365075e0080524e0a37c85e717b2247e6d58a55 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:12:22 -0500 Subject: [PATCH 017/774] Update config added back in missing esac --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index cee78881..000213f8 100755 --- a/config +++ b/config @@ -1327,7 +1327,7 @@ elif [ "$1" = "-A" ]; then echo "Unknown mode" # STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?" ;; -# esac + esac # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 # echo $STRING > /home/pi/CubeSatSim/t.txt # echo From b4c6a34f9214e176b573ed21a71df136ccba4cba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:14:17 -0500 Subject: [PATCH 018/774] Update config don't force aprs mode --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 000213f8..3d6107e0 100755 --- a/config +++ b/config @@ -1285,7 +1285,7 @@ elif [ "$1" = "-A" ]; then sudo systemctl stop transmit # 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 +# sudo python3 -u /home/pi/CubeSatSim/transmit.py x > /dev/null 2>&1 & # Force APRS mode fi sim="y" From 5d6e93b9818bf2061f49f7e4710ecfe3a130af8a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:16:28 -0500 Subject: [PATCH 019/774] Update config don't do ptt here --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 3d6107e0..eea64a4e 100755 --- a/config +++ b/config @@ -9,11 +9,11 @@ function transmit_command_aprs { sudo systemctl stop command echo "Transmit DTMF start" - gpio write 28 0 # ptt +# 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 +# gpio write 28 1 #ptt echo "Transmit stop" echo "Resuming command and control" From c8468e2df52724213dda01b5eb658b5913b362de Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:17:13 -0500 Subject: [PATCH 020/774] Update direwolf-transmit-dtmf-aprs.conf add ptt --- direwolf/direwolf-transmit-dtmf-aprs.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-transmit-dtmf-aprs.conf b/direwolf/direwolf-transmit-dtmf-aprs.conf index 786102cd..37ddbe97 100644 --- a/direwolf/direwolf-transmit-dtmf-aprs.conf +++ b/direwolf/direwolf-transmit-dtmf-aprs.conf @@ -1,4 +1,5 @@ ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 +PTT GPIO 20 MYCALL AMSAT CHANNEL 0 MODEM 1200 From 828939a54e0f2ecaaefa3003e8177409f803f6ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 22:17:24 -0500 Subject: [PATCH 021/774] Update direwolf-pacsatsim.conf added channel and modem to config --- direwolf/direwolf-pacsatsim.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index c335760a..27b58eab 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,3 +1,5 @@ -MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 From 184a65da56a98147236dcac42c63d39a65db874f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 10:01:43 -0500 Subject: [PATCH 022/774] Update install add Pacsat installation --- install | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/install b/install index 046ab3c8..e32bdd1d 100755 --- a/install +++ b/install @@ -122,9 +122,30 @@ cd rpitx ./install.sh +cd + +git clone https://github.com/ac2cz/iors_common.git + +cd iors_common/Debug/ + +make all + +sudo ./install.sh cd +git clone https://github.com/ac2cz/pi_pacsat.git + +cd pi_pacsat/Debug + +make all + +mkdir /home/pi/PacSat +mkdir /home/pi/PacSat/pacsat +mkdir /home/pi/PacSat/pacsat/dir + +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + cd sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service From e5a04b3397c438516446d622100899bd0c87ce26 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 10:21:42 -0500 Subject: [PATCH 023/774] Update pacsatsim.sh added export --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2ea4707b..68ae50da 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,6 +2,8 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + sudo modprobe snd-aloop #sudo systemctl stop openwebrx From 9ae6394219c65b0c1444d3b10bc7c0a2e2583fa5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 13:41:50 -0500 Subject: [PATCH 024/774] Update install dire wolf invert branch --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index e32bdd1d..2001b3a3 100755 --- a/install +++ b/install @@ -82,6 +82,8 @@ git clone https://github.com/alanbjohnston/direwolf.git cd direwolf +git checkout invert + make -j sudo make install From a7f1928c7c69480cc5b9a1089a4210ada1799808 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 13:48:00 -0500 Subject: [PATCH 025/774] Update pacsatsim.sh turn off cubesat and transmit --- pacsatsim.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 68ae50da..62f78088 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,6 +4,10 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +sudo systemctl stop cubesatsim + +sudo systemctl stop transmit + sudo modprobe snd-aloop #sudo systemctl stop openwebrx From 26a816212fa2cc1c438143234b736cdaf7a8d0ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 14:12:43 -0500 Subject: [PATCH 026/774] Update direwolf-pacsatsim.conf changed to USB card --- direwolf/direwolf-pacsatsim.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 27b58eab..62d1be3d 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From 47b1d3b6a2de772bf429686ec52513efa1ed3a3b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:01:41 -0500 Subject: [PATCH 027/774] Update install add passat.config creation --- install | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install b/install index 2001b3a3..688155ac 100755 --- a/install +++ b/install @@ -150,6 +150,18 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LI cd +cd PacSat + +echo "bit_rate=9600" > pacsat.config +echo "bbs_callsign=XY2ZZ-12" >> pacsat.config +echo "broadcast_callsign=XY2ZZ-11" >> pacsat.config +echo "digi_callsign=XY2ZZ-1" >> pacsat.config +echo "max_frames_in_tx_buffer=5" >> pacsat.config +echo "pb_open=1" >> pacsat.config +echo "uplink_open=1" >> pacsat.config + +cd + sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service sudo systemctl enable cubesatsim From 8029ce4c55f83448fce8fcee444c7743251534cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:02:10 -0500 Subject: [PATCH 028/774] Update direwolf-pacsat.conf added KISS port --- groundstation/direwolf/direwolf-pacsat.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index c335760a..fd4983eb 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,4 @@ MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 +KISSPORT 8100 From 58177965b926838b845457acab9277db133a1fc4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:03:57 -0500 Subject: [PATCH 029/774] Update pacsat.sh add /home/pi/PacSat to script --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 2cca3cef..f063c3eb 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -190,6 +190,6 @@ rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t r cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar +sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSat" & sleep 5 From 379bc2c232668fdf8960a2fe87a12761db409218 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:11:17 -0500 Subject: [PATCH 030/774] Create direwolf-fm-pacsat.config --- groundstation/direwolf/direwolf-fm-pacsat.config | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat.config diff --git a/groundstation/direwolf/direwolf-fm-pacsat.config b/groundstation/direwolf/direwolf-fm-pacsat.config new file mode 100644 index 00000000..770b5422 --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat.config @@ -0,0 +1,4 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=1 plughw:CARD=Headphones,DEV=0 +PTT GPIO 20 +KISSPORT 8100 From 7dc04505f5661d06a1b6b4113678c81af25ee718 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:17:04 -0500 Subject: [PATCH 031/774] Update pacsat.sh check for USB sound card --- groundstation/pacsat.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f063c3eb..07de1642 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -173,23 +173,33 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] else - echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" -fi + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & -sleep 5 + else + + echo -e "Direwolf using RTL-SDR on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & -value=`aplay -l | grep "Loopback"` -echo "$value" > /dev/null -set -- $value + sleep 5 + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + + fi cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSat" & sleep 5 + +fi From 3d01785a0096c49a2189e8ebd3948887fff820bf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:18:53 -0500 Subject: [PATCH 032/774] Rename direwolf-fm-pacsat.config to direwolf-fm-pacsat.conf --- .../{direwolf-fm-pacsat.config => direwolf-fm-pacsat.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename groundstation/direwolf/{direwolf-fm-pacsat.config => direwolf-fm-pacsat.conf} (100%) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.config b/groundstation/direwolf/direwolf-fm-pacsat.conf similarity index 100% rename from groundstation/direwolf/direwolf-fm-pacsat.config rename to groundstation/direwolf/direwolf-fm-pacsat.conf From c10894e28d5e4abe5fddd24adec62a4988d7f029 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:20:36 -0500 Subject: [PATCH 033/774] Update direwolf-fm-pacsat.conf dev 0 --- groundstation/direwolf/direwolf-fm-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf index 770b5422..dab844ae 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat.conf @@ -1,4 +1,4 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=1 plughw:CARD=Headphones,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 From 5a284b9938fdf89860a62950a9dbfc6806dc40c4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:51:00 -0500 Subject: [PATCH 034/774] Create PacSatSim.dat --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46m/PacSatSim.dat diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat new file mode 100644 index 00000000..d526f51d --- /dev/null +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -0,0 +1,15 @@ +Pacsat Telemetry Decoder Properties +#Sat Nov 26 18:12:20 EST 2016 +numberOfLookupTables=0 +measurementsFileName=measurements.csv +model=1 +layout0.filename=PACSATSIM_rttelemetry.csv +layout0.name=TLMI_LAYOUT +passMeasurementsFileName=passmeasurements.csv +name=Pacsat +description=PacSatSim +numberOfLayouts=1 +satId=3 +catalogNumber=0 +conversionCoefficients=pacsat-coef.csv +layoutsUseBits=True From a19b591fc8e9e74897b511407097cdba965fa004 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:53:13 -0500 Subject: [PATCH 035/774] Create PacSatSim.properties --- .../PacSatGround_0.46m/PacSatSim.properties | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46m/PacSatSim.properties diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.properties b/spacecraft/PacSatGround_0.46m/PacSatSim.properties new file mode 100644 index 00000000..d18ebe5c --- /dev/null +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.properties @@ -0,0 +1,20 @@ +#PacSat Ground Station Properties +#Sun Feb 17 18:25:06 EST 2019 +sequence_num=3 +name=PacSatSim +digiCallsign=W3ZM-1 +description=PacSatSim +broadcastCallsign=W3ZM-11 +DIR_AGE=10 +bbsCallsign=W3ZM-12 +telemLayoutFile=PacSatSim.dat +telem_server=tlm.amsatfox.org +web_site_url=http://CubeSatSim.org +show_system_files_on_dir_tab=false +show_user_files=true +supports_file_upload=true +norad_id=30776 +psf_header_check_sums=false +commandsFile=pacsat.commands +is_command_station=true +secret_key=ScKQLp2ZMvCaCTK5jAmOmKmA0JiSyJ6Y15+Yfg\=\= From ffe5f107ad7ad4891d32a52d633a1a45aa50938a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:53:41 -0500 Subject: [PATCH 036/774] Update PacSatSim.dat --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat index d526f51d..92ae8f93 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -3,10 +3,10 @@ Pacsat Telemetry Decoder Properties numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PACSATSIM_rttelemetry.csv +layout0.filename=PACSAT_rttelemetry.csv layout0.name=TLMI_LAYOUT passMeasurementsFileName=passmeasurements.csv -name=Pacsat +name=PacSatSim description=PacSatSim numberOfLayouts=1 satId=3 From 21e723d18c03191125d6340569b21c56804b628e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:39:54 -0500 Subject: [PATCH 037/774] Update config add -G change to Pacsat --- config | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config b/config index eea64a4e..086b3874 100755 --- a/config +++ b/config @@ -1409,6 +1409,15 @@ elif [ "$1" = "-g" ]; then fi +elif [ "$1" = "-G" ]; then + + echo "Changing to Pacsat mode" + echo + sudo systemctl stop cubesatsim + sudo systemctl stop transmit + + /home/pi/CubeSatSim/pacsat.sh + elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -1445,6 +1454,7 @@ elif [ "$1" = "-h" ]; then echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings" + echo " -G Change to Pacsat mode" echo exit From 84b8b81f2acc4764152f591e0564aa91b55cf1ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:46:29 -0500 Subject: [PATCH 038/774] Update install download passat ground station --- install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install b/install index 688155ac..c29ba505 100755 --- a/install +++ b/install @@ -162,6 +162,16 @@ echo "uplink_open=1" >> pacsat.config cd +cd /tmp + +wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz + +unzip PacSatGround_0.46m_linux.tar.gz -d /home/pi/Desktop + +rm PacSatGround_0.46m_linux.tar.gz + +cd + sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service sudo systemctl enable cubesatsim From d4d0fb542c87fb604bd290a9abe76cce6eeb07c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:48:41 -0500 Subject: [PATCH 039/774] Update pacsatsim.sh add -qd to dire wolf --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 62f78088..5d3713b5 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -175,13 +175,13 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & fi From fd7dd67663a705f3cb7ef423c773f69d6216283d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:53:02 -0500 Subject: [PATCH 040/774] Update pacsat.sh dire wolf -qd and PacSatGround --- groundstation/pacsat.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 07de1642..4695519e 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,9 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null @@ -169,7 +169,7 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & else @@ -177,13 +177,13 @@ else echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & else echo -e "Direwolf using RTL-SDR on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & sleep 5 @@ -198,7 +198,7 @@ else cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSat" & +sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & sleep 5 From 22e20ab6bbfdef5a8373dfe0514b2a15ea4bfd2d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:54:08 -0500 Subject: [PATCH 041/774] Update install PacSatGround --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index c29ba505..edea60f8 100755 --- a/install +++ b/install @@ -170,6 +170,8 @@ unzip PacSatGround_0.46m_linux.tar.gz -d /home/pi/Desktop rm PacSatGround_0.46m_linux.tar.gz +mkdir /home/pi/PacSatGround + cd sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service From b97e08cab31b7a61f138c8cf698e1c3cbc28ae0c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:59:37 -0500 Subject: [PATCH 042/774] Update install set callsign in pacsat.config --- install | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install b/install index edea60f8..51509ee5 100755 --- a/install +++ b/install @@ -152,10 +152,14 @@ cd cd PacSat +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=XY2ZZ-12" >> pacsat.config -echo "broadcast_callsign=XY2ZZ-11" >> pacsat.config -echo "digi_callsign=XY2ZZ-1" >> pacsat.config +echo "bbs_callsign=$1" >> pacsat.config +echo "broadcast_callsign=$1-11" >> pacsat.config +echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" >> pacsat.config echo "uplink_open=1" >> pacsat.config From b81492ba32f299742218b83200246ae6ed9e0c42 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 23:05:58 -0500 Subject: [PATCH 043/774] Update config change callsign in pacsat config --- config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config b/config index 086b3874..89727f2c 100755 --- a/config +++ b/config @@ -525,14 +525,16 @@ elif [ "$1" = "-c" ]; then echo "$value" > /dev/null set -- $value + callsign="$1" + echo "Current value of CALLSIGN is" - echo $1 + echo $oldcallsign echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} echo "Enter callsign in all capitals: " - read callsign + read $oldcallsign if [ -z $callsign ] ; then @@ -545,6 +547,8 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config fi if [ "$norestart" = "1" ]; then From 81cc1c7348d420e83a07b77be9a3e851fc139f7d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 08:36:26 -0500 Subject: [PATCH 044/774] Update pacsat.sh stop CubeSatSim and transmit --- groundstation/pacsat.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 07de1642..aafc69d0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,13 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +sudo systemctl stop cubesatsim &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop transmit &>/dev/null + +sudo systemctl stop openwebrx &>/dev/null + +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null From 46dfb90bd96c2522cc3ce0bb6de848c567e6dcf8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 11:24:11 -0500 Subject: [PATCH 045/774] Update pacsatsim.sh cd to Debug, don't prompt frequency --- pacsatsim.sh | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5d3713b5..b1c20612 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -46,20 +46,22 @@ echo #exit -echo "Choose the number for the packet decoding option:" -echo -echo "1. APRS US 2m (144390 kHz)" -echo "2. CubeSatSim (434900 kHz)" -echo "3. APRS European 2m (144800 kHz)" -echo "4. APRS Australian 2m (145175 kHz)" -echo "5. APRS on another frequency" -echo "6. APRS on ISS (145825 kHz)" -echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -echo "8. Test Serenity CubeSat decoding with WAV file" -echo "9. Test APRS decoding with CubeSatSim WAV file" -echo - -read -r choice +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +choice=2 #fi @@ -193,6 +195,8 @@ set -- $value #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat +cd /home/pi/pi_pacsat/Debug + +./pi_pacsat -c pacsat.config -d /home/pi/PacSat sleep 5 From d726d004eb9a44c1e0e2cdcaa243b4d415f6f423 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 14:36:39 -0500 Subject: [PATCH 046/774] Update install config.txt changes --- install | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/install b/install index 51509ee5..69380167 100755 --- a/install +++ b/install @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\ninstallation script for CubeSatSim v2.0\n" +echo -e "\ninstallation script for CubeSatSim v2.1\n" FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then @@ -161,11 +161,18 @@ echo "bbs_callsign=$1" >> pacsat.config echo "broadcast_callsign=$1-11" >> pacsat.config echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config -echo "pb_open=1" >> pacsat.config -echo "uplink_open=1" >> pacsat.config + +echo "pb_open=1" > pacsat.state +echo "uplink_open=1" >> pacsat.state cd +sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt +sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt +sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt + +sudo raspi-config nonint do_vnc 0 + cd /tmp wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz @@ -206,11 +213,10 @@ sudo raspi-config nonint do_legacy 0 ## sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 - + #sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then From d74b8b7f862c8ad79d14451b4119812de4005a12 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 14:47:53 -0500 Subject: [PATCH 047/774] Update config don't update pacsat callsign --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 89727f2c..db0100c2 100755 --- a/config +++ b/config @@ -548,7 +548,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config +# sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config fi if [ "$norestart" = "1" ]; then From 4afd9bba1cd1bf5e74bd472dc34934fdeb272ab1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 14:53:53 -0500 Subject: [PATCH 048/774] Update config don't look at output of sed on callsign --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index db0100c2..ed62d2d3 100755 --- a/config +++ b/config @@ -548,7 +548,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg -# sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config > /dev/null 2>&1 fi if [ "$norestart" = "1" ]; then From 384086003796ef6f7885ba2cdfa17168f2a09015 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 15:05:38 -0500 Subject: [PATCH 049/774] Update config fix -c bug --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index ed62d2d3..9c2d5671 100755 --- a/config +++ b/config @@ -525,7 +525,7 @@ elif [ "$1" = "-c" ]; then echo "$value" > /dev/null set -- $value - callsign="$1" + oldcallsign="$1" echo "Current value of CALLSIGN is" echo $oldcallsign @@ -534,7 +534,7 @@ elif [ "$1" = "-c" ]; then # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} echo "Enter callsign in all capitals: " - read $oldcallsign + read $callsign if [ -z $callsign ] ; then From 1de4e6535869c996897813a04493a4bbd9d47802 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 15:07:56 -0500 Subject: [PATCH 050/774] Update config typo in -c --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 9c2d5671..e4c41243 100755 --- a/config +++ b/config @@ -534,7 +534,7 @@ elif [ "$1" = "-c" ]; then # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} echo "Enter callsign in all capitals: " - read $callsign + read callsign if [ -z $callsign ] ; then From c0c23db6b1b51febe02fe2d50762eb7e513dce36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 15:38:57 -0500 Subject: [PATCH 051/774] Update install --- install | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/install b/install index 69380167..559351ca 100755 --- a/install +++ b/install @@ -148,10 +148,6 @@ mkdir /home/pi/PacSat/pacsat/dir export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH -cd - -cd PacSat - value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value @@ -165,8 +161,6 @@ echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" > pacsat.state echo "uplink_open=1" >> pacsat.state -cd - sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt @@ -177,7 +171,7 @@ cd /tmp wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz -unzip PacSatGround_0.46m_linux.tar.gz -d /home/pi/Desktop +tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop rm PacSatGround_0.46m_linux.tar.gz From 776aba9511527bde727d48cacd293c3968976750 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 16:22:06 -0500 Subject: [PATCH 052/774] Update install add java install --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 559351ca..62160b9d 100755 --- a/install +++ b/install @@ -177,6 +177,8 @@ rm PacSatGround_0.46m_linux.tar.gz mkdir /home/pi/PacSatGround +sudo apt-get install default-jdk -y + cd sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service From ac61e44c09be5bb9ea1a1181d556f620ec9e94c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 16:35:59 -0500 Subject: [PATCH 053/774] Update install copy spacecraft files --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 62160b9d..2b4048d6 100755 --- a/install +++ b/install @@ -175,6 +175,8 @@ tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop rm PacSatGround_0.46m_linux.tar.gz +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ + mkdir /home/pi/PacSatGround sudo apt-get install default-jdk -y From a64c34c41a5f7179550a4d3543c73d71cdb0eb52 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:39:28 -0500 Subject: [PATCH 054/774] Update config Pacsat mode "p" in .mode --- config | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/config b/config index e4c41243..ea596d16 100755 --- a/config +++ b/config @@ -1416,11 +1416,22 @@ elif [ "$1" = "-g" ]; then elif [ "$1" = "-G" ]; then echo "Changing to Pacsat mode" - echo - sudo systemctl stop cubesatsim - sudo systemctl stop transmit + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value - /home/pi/CubeSatSim/pacsat.sh + echo "changing CubeSatSim to Pacsat mode" + sudo echo "p" > /home/pi/CubeSatSim/.mode + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + restart=1 + else + reboot=1 + fi + else + restart=1 + fi elif [ "$1" = "-h" ]; then From 3422b197723e075bbeaaf09ba9cb386456f2f835 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:42:56 -0500 Subject: [PATCH 055/774] Update main.c added PACSAT mode --- main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 36dfce4c..b529a619 100644 --- a/main.c +++ b/main.c @@ -233,7 +233,10 @@ int main(int argc, char * argv[]) { printf("Mode is Repeater\n"); } else if ( mode_string == 'n') { mode = TXCOMMAND; - printf("Mode is Transmit Command\n"); + printf("Mode is Transmit Command\n"); + } else if ( mode_string == 'p') { + mode = PACSAT; + printf("Mode is Pacsat\n"); } else { printf("Mode is BPSK\n"); } @@ -869,7 +872,7 @@ int main(int argc, char * argv[]) { } else if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV + } else { // SSTV or PACSAT // fprintf(stderr, "Sleeping\n"); sleep(30); } @@ -2205,7 +2208,7 @@ if (setting == ON) { pclose(command); fprintf(stderr,"Turning Safe Mode ON\n"); fprintf(stderr,"Turning Battery saver mode ON\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { command = popen("echo 'reboot due to turning ON Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); @@ -2221,7 +2224,7 @@ if (setting == ON) { FILE *command = popen("rm /home/pi/CubeSatSim/battery_saver", "r"); pclose(command); fprintf(stderr,"Turning Battery saver mode OFF\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); From e4c2f5f99701ae5e6b9eff1c84d051ab4e242550 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:43:39 -0500 Subject: [PATCH 056/774] Update main.h add PACSAT mode 6 --- main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main.h b/main.h index 6708d1af..0b794df2 100644 --- a/main.h +++ b/main.h @@ -108,6 +108,7 @@ FILE *telem_file; #define BPSK 3 #define SSTV 4 #define CW 5 +#define PACSAT 6 #define REPEATER 11 #define TXCOMMAND 12 From 739e9706a01fb57502919e2b961c2a84d71be745 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:48:21 -0500 Subject: [PATCH 057/774] Update transmit.py added Pacsat mode --- transmit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 859892f9..f04d8cd7 100644 --- a/transmit.py +++ b/transmit.py @@ -381,7 +381,7 @@ if __name__ == "__main__": # if (mode != ) and (command_tx == True): # if (command_tx == True): - if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's')) and (command_tx == True) and (skip == False): + if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p')) and (command_tx == True) and (skip == False): # battery_saver_mode GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 GPIO.setup(txLed, GPIO.OUT) @@ -415,12 +415,15 @@ if __name__ == "__main__": # if (len(sys.argv)) > 1: # print("There are arguments!") - if (mode == 'a') or (mode == 'x') or (mode == 'n'): + if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p'): # command_control_check() output(pd, 1) output(ptt, 1) if (mode == 'a'): print("AFSK") + elif (mode == 'p'): + print("Pacsat") + system('/home/pi/CubeSatSim/pacsat.sh') else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From a66ebedff922e18ed08349f8d8c0690a31760ed2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:49:46 -0500 Subject: [PATCH 058/774] Update config v2.1 --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index ea596d16..ec62cf75 100755 --- a/config +++ b/config @@ -210,7 +210,7 @@ function transmit_command_beacon { exit } -echo "CubeSatSim v2.0 configuration tool" +echo "CubeSatSim v2.1 configuration tool" echo # echo $1 # echo $2 From fe0791ec6f33860b59ca93d0b557e9a9fcf731bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:50:08 -0500 Subject: [PATCH 059/774] Update main.c v2.1 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index b529a619..f642a907 100644 --- a/main.c +++ b/main.c @@ -25,7 +25,7 @@ int main(int argc, char * argv[]) { - printf("\n\nCubeSatSim v2.0 starting...\n\n"); + printf("\n\nCubeSatSim v2.1 starting...\n\n"); wiringPiSetup(); From 7eaf1e284a79379fc79d52a8c939c6d0d122e352 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:50:30 -0500 Subject: [PATCH 060/774] Update transmit.py v2.1 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f04d8cd7..a047695b 100644 --- a/transmit.py +++ b/transmit.py @@ -136,7 +136,7 @@ def increment_mode(): print("can't write to .mode file") -print("CubeSatSim v2.0 transmit.py starting...") +print("CubeSatSim v2.1 transmit.py starting...") pd = 21 ptt = 20 From 263fd869813ad8304cc960e451f57be7b0aba036 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:54:18 -0500 Subject: [PATCH 061/774] Update transmit.py fixed pacsat call --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index a047695b..05c4b071 100644 --- a/transmit.py +++ b/transmit.py @@ -423,7 +423,7 @@ if __name__ == "__main__": print("AFSK") elif (mode == 'p'): print("Pacsat") - system('/home/pi/CubeSatSim/pacsat.sh') + system('/home/pi/CubeSatSim/pacsatsim.sh') else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From d064598d300d0902d938bea0c866d9a83444196d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:55:35 -0500 Subject: [PATCH 062/774] Update config display pacsat --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index ec62cf75..b7c4d3f6 100755 --- a/config +++ b/config @@ -257,6 +257,8 @@ if [ "$1" = "" ]; then else echo -n "APRS" fi + elif [ "$1" = "p" ]; then + echo "Mode is Pacsat" else echo fi From dabca2d79464d73fb84aa8422767e63e2793767e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:57:46 -0500 Subject: [PATCH 063/774] Update pacsatsim.sh don't stop CubeSatSim or transmit --- pacsatsim.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index b1c20612..ffe823bf 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,15 +4,17 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH -sudo systemctl stop cubesatsim +#sudo systemctl stop cubesatsim -sudo systemctl stop transmit +#sudo systemctl stop transmit + +sudo systemctl stop command &>/dev/null sudo modprobe snd-aloop #sudo systemctl stop openwebrx -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null #pkill -o chromium &>/dev/null From b729af95f16ba3bde036483888678718a99a24ff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 22:17:38 -0500 Subject: [PATCH 064/774] Update pacsat.sh stop command --- groundstation/pacsat.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 95c71877..57ebeb58 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,11 +4,12 @@ sudo modprobe snd-aloop - sudo systemctl stop cubesatsim &>/dev/null sudo systemctl stop transmit &>/dev/null +sudo systemctl stop command &>/dev/null + sudo systemctl stop openwebrx &>/dev/null sudo systemctl stop rtl_tcp &>/dev/null From 57ddc39f4e9c68a9a15cd6bc3fe96a9953007eef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 07:33:24 -0500 Subject: [PATCH 065/774] Update update to install pacsat software --- update | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/update b/update index fcef1749..f612f69e 100755 --- a/update +++ b/update @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nupdate script for CubeSatSim v2.0\n" +echo -e "\nupdate script for CubeSatSim v2.1\n" if [ "$1" = "n" ] ; then # if [ -z "$2" ] ; then @@ -33,7 +33,7 @@ sudo sed -i 's/more information/more\ninformation/g' /etc/motd sudo sed -i 's/update to/update\nto/g' /etc/motd -sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +#sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 cd /home/pi/CubeSatSim @@ -300,6 +300,81 @@ git checkout master #fi +if [ ! -d "/home/pi/pi_pacsat" ]; then + + cd + + git clone https://github.com/ac2cz/iors_common.git + + cd iors_common/Debug/ + + make all + + sudo ./install.sh + + cd + + git clone https://github.com/ac2cz/pi_pacsat.git + + cd pi_pacsat/Debug + + make all + + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + + export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo "bit_rate=9600" > pacsat.config + echo "bbs_callsign=$1" >> pacsat.config + echo "broadcast_callsign=$1-11" >> pacsat.config + echo "digi_callsign=$1-1" >> pacsat.config + echo "max_frames_in_tx_buffer=5" >> pacsat.config + + echo "pb_open=1" > pacsat.state + echo "uplink_open=1" >> pacsat.state + + sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt + sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt + sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt + + sudo raspi-config nonint do_vnc 0 + + cd /tmp + + wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz + + tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop + + rm PacSatGround_0.46m_linux.tar.gz + + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ + + mkdir /home/pi/PacSatGround + + sudo apt-get install default-jdk -y + +cd + +fi + +cd rpitx + +if [[ ! $(git status | grep 'invert') ]]; then + + echo "updating rpitx to ptt invert branch" + git pull + git checkout invert + ./update.sh + cd + +fi + changed=0 value=`cat /home/pi/CubeSatSim/sim.cfg` # echo "$value" From 55b6bb66a15710f22662faebeaaf064997c24c3d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:22:28 -0500 Subject: [PATCH 066/774] Update update fixed direwolf update --- update | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/update b/update index f612f69e..8bfed65e 100755 --- a/update +++ b/update @@ -363,14 +363,18 @@ cd fi -cd rpitx +cd direwolf if [[ ! $(git status | grep 'invert') ]]; then - echo "updating rpitx to ptt invert branch" + echo "updating direwolf to ptt invert version" + git pull git checkout invert - ./update.sh + make clean + make -j + sudo make install + make install-rpi cd fi From e90a0821490b12af2a4cc42a761d5dd7b2d2f711 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:25:32 -0500 Subject: [PATCH 067/774] Update update fixed cd --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index 8bfed65e..d1c6eefd 100755 --- a/update +++ b/update @@ -363,7 +363,7 @@ cd fi -cd direwolf +cd /home/pi/direwolf if [[ ! $(git status | grep 'invert') ]]; then From 7fa7aaff6731a608aeed6002677979c99ba330fc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:31:23 -0500 Subject: [PATCH 068/774] Update update --- update | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update b/update index d1c6eefd..16e51b01 100755 --- a/update +++ b/update @@ -365,11 +365,15 @@ fi cd /home/pi/direwolf +git status + +git status | grep 'invert' + if [[ ! $(git status | grep 'invert') ]]; then echo "updating direwolf to ptt invert version" - git pull + git pull --no-rebase git checkout invert make clean make -j From 71d11c64882071fd70da167c0362b940561d4e08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:35:39 -0500 Subject: [PATCH 069/774] Update update remove extra git --- update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update b/update index 16e51b01..4f47510e 100755 --- a/update +++ b/update @@ -365,9 +365,9 @@ fi cd /home/pi/direwolf -git status +#git status -git status | grep 'invert' +#git status | grep 'invert' if [[ ! $(git status | grep 'invert') ]]; then From cd5a39846bf76da6835c5f3c6bec0e5297e10b08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:54:44 -0500 Subject: [PATCH 070/774] Update update remove single cpu --- update | 1 + 1 file changed, 1 insertion(+) diff --git a/update b/update index 4f47510e..4dbbf79f 100755 --- a/update +++ b/update @@ -34,6 +34,7 @@ sudo sed -i 's/more information/more\ninformation/g' /etc/motd sudo sed -i 's/update to/update\nto/g' /etc/motd #sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt # remove single core cd /home/pi/CubeSatSim From 24c54e6380b776395113d5e1848c769146796738 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 11:35:10 -0500 Subject: [PATCH 071/774] Update update reboot if adding pacsat code --- update | 2 ++ 1 file changed, 2 insertions(+) diff --git a/update b/update index 4dbbf79f..6d74a557 100755 --- a/update +++ b/update @@ -302,6 +302,8 @@ git checkout master #fi if [ ! -d "/home/pi/pi_pacsat" ]; then + + FLAG=1 cd From fa89f12a2f8fa649561e83f633a4bd5c65736f5b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 13:09:34 -0500 Subject: [PATCH 072/774] Update direwolf-pacsatsim.conf set fullduplex off --- direwolf/direwolf-pacsatsim.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 62d1be3d..370e54b0 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -3,3 +3,4 @@ PTT GPIO 20 MYCALL AMSAT CHANNEL 0 MODEM 1200 +FULLDUP OFF From 9a658b02ed990bfc6752bf2ce47be1f7e798a6ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 13:10:15 -0500 Subject: [PATCH 073/774] Update direwolf-fm-pacsat.conf full duplex off --- groundstation/direwolf/direwolf-fm-pacsat.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf index dab844ae..fba77b7e 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat.conf @@ -2,3 +2,4 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 +FULLDUP OFF From 2fb339fd8b6c107c5a1a9e11d6f333470a9724fb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 13:10:32 -0500 Subject: [PATCH 074/774] Update direwolf-pacsat.conf full duplex off --- groundstation/direwolf/direwolf-pacsat.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index fd4983eb..e526e272 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -2,3 +2,4 @@ MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 +FULLDUP OFF From 7c4c344b0dcb329ec8d67b1af1baa940106f899f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:02:17 -0500 Subject: [PATCH 075/774] Update config .mode P is pacsat ground station --- config | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/config b/config index b7c4d3f6..ab80445b 100755 --- a/config +++ b/config @@ -1435,6 +1435,28 @@ elif [ "$1" = "-G" ]; then restart=1 fi +elif [ "$1" = "-H" ]; then + + echo "Changing to Pacsat Ground Station mode" + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + echo "changing CubeSatSim to Pacsat mode" + sudo echo "P" > /home/pi/CubeSatSim/.mode + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + restart=1 + else + reboot=1 + fi + else + restart=1 + fi + + + elif [ "$1" = "-h" ]; then echo "config OPTION" From 621bcb0fd068d7aed50e952a3e1cebed57e54add Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:04:13 -0500 Subject: [PATCH 076/774] Update main.c added PACSATGND --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index f642a907..f520add1 100644 --- a/main.c +++ b/main.c @@ -237,7 +237,10 @@ int main(int argc, char * argv[]) { } else if ( mode_string == 'p') { mode = PACSAT; printf("Mode is Pacsat\n"); - } else { + } else if ( mode_string == 'P') { + mode = PACSATGND; + printf("Mode is Pacsat Ground Station\n"); + } else { printf("Mode is BPSK\n"); } } @@ -872,7 +875,7 @@ int main(int argc, char * argv[]) { } else if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV or PACSAT + } else { // SSTV or PACSAT or PACSATGND // fprintf(stderr, "Sleeping\n"); sleep(30); } From ccc5c4ff9733ff974c84378734a903e567bb0030 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:04:52 -0500 Subject: [PATCH 077/774] Update main.h added PACSATGND --- main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main.h b/main.h index 0b794df2..83f993ae 100644 --- a/main.h +++ b/main.h @@ -111,6 +111,7 @@ FILE *telem_file; #define PACSAT 6 #define REPEATER 11 #define TXCOMMAND 12 +#define PACSATGND 13 int transmitStatus = -1; From 042670a2316597b94beaa93ff3fbe54ca69ee89a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:07:25 -0500 Subject: [PATCH 078/774] Update transmit.py added mode P for Pacsat Gnd Station --- transmit.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 05c4b071..87a616ad 100644 --- a/transmit.py +++ b/transmit.py @@ -415,7 +415,7 @@ if __name__ == "__main__": # if (len(sys.argv)) > 1: # print("There are arguments!") - if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p'): + if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p') or (mode == 'P': # command_control_check() output(pd, 1) output(ptt, 1) @@ -424,6 +424,10 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") system('/home/pi/CubeSatSim/pacsatsim.sh') + elif (mode == 'p'): + print("Pacsat Ground Station") + while True: + sleep(30) else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From 79bd5a787dcbd3898e8ab2d3f2332a4917b79771 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:11:02 -0500 Subject: [PATCH 079/774] Update transmit.py typo --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 87a616ad..ba826051 100644 --- a/transmit.py +++ b/transmit.py @@ -381,7 +381,7 @@ if __name__ == "__main__": # if (mode != ) and (command_tx == True): # if (command_tx == True): - if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p')) and (command_tx == True) and (skip == False): + if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False): # battery_saver_mode GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 GPIO.setup(txLed, GPIO.OUT) @@ -415,7 +415,7 @@ if __name__ == "__main__": # if (len(sys.argv)) > 1: # print("There are arguments!") - if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p') or (mode == 'P': + if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p') or (mode == 'P'): # command_control_check() output(pd, 1) output(ptt, 1) From 2e1f2024e7b4d29290f0a37e61fa7b160ab91afa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:13:57 -0500 Subject: [PATCH 080/774] Update config changed to -I --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index ab80445b..800352de 100755 --- a/config +++ b/config @@ -1435,7 +1435,7 @@ elif [ "$1" = "-G" ]; then restart=1 fi -elif [ "$1" = "-H" ]; then +elif [ "$1" = "-I" ]; then echo "Changing to Pacsat Ground Station mode" value=`cat /home/pi/CubeSatSim/.mode` @@ -1494,6 +1494,7 @@ elif [ "$1" = "-h" ]; then echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings" echo " -G Change to Pacsat mode" + echo " -I Changing to Pacsat Ground Station mode" echo exit From 2077bfe7f7238a22a2fd8d0cf8e8ddc1cbfc7b37 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:16:51 -0500 Subject: [PATCH 081/774] Update pacsat.sh run Config -I --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 57ebeb58..e2b3d1ad 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,11 @@ sudo modprobe snd-aloop -sudo systemctl stop cubesatsim &>/dev/null +#sudo systemctl stop cubesatsim &>/dev/null -sudo systemctl stop transmit &>/dev/null +#sudo systemctl stop transmit &>/dev/null + +/home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null From 8ede3a5c9ef1ab7f47b3452f090b30d6288a5be2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:26:41 -0500 Subject: [PATCH 082/774] Update transmit.py don't turn on c2c for p or P mode --- transmit.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/transmit.py b/transmit.py index ba826051..a1250e44 100644 --- a/transmit.py +++ b/transmit.py @@ -326,23 +326,24 @@ if __name__ == "__main__": print("Can't read callsign from sim.cfg file, defaulting to AMSAT") file.close() - try: - f = open("/home/pi/CubeSatSim/command_control", "r") - f.close() - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - 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!") + if (mode != 'p') and (mode != 'P'): + try: + f = open("/home/pi/CubeSatSim/command_control", "r") + f.close() + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + 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") + except: + print("command and control not activated") no_command = True - else: - print("command and control is activated") - no_command = False -# system("/home/pi/CubeSatSim/command &") - system("sudo systemctl start command") - 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 64a11849355b7898a30c3f1494f1182f787e8d0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:28:57 -0500 Subject: [PATCH 083/774] Update config add print Pacsat ground station mode --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 800352de..3764aa86 100755 --- a/config +++ b/config @@ -259,6 +259,8 @@ if [ "$1" = "" ]; then fi elif [ "$1" = "p" ]; then echo "Mode is Pacsat" + elif [ "$1" = "P" ]; then + echo "Mode is Pacsat Ground Station" else echo fi From b00a99649c900c86842b85b37a99506e435e8d27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 16:29:33 -0500 Subject: [PATCH 084/774] Update pacsat.sh --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e2b3d1ad..ee56972d 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -206,7 +206,7 @@ else cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & +sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" sleep 5 From 8433067061fdf11c809cb78f70def84b7d165174 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 16:39:48 -0500 Subject: [PATCH 085/774] Update pacsat.sh no frequency prompt --- groundstation/pacsat.sh | 188 ++++++---------------------------------- 1 file changed, 27 insertions(+), 161 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index ee56972d..8e728541 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,10 +4,6 @@ sudo modprobe snd-aloop -#sudo systemctl stop cubesatsim &>/dev/null - -#sudo systemctl stop transmit &>/dev/null - /home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null @@ -36,178 +32,48 @@ sudo killall -9 zenity &>/dev/null echo -frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") - -#echo $frequency - -if [ -z "$frequency" ]; then - -echo "No choice made. Exiting." - -sleep 3 - -exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -fi - -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 - echo - echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." - echo - -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value +echo "Receive frequency is $8 MHz" +echo "Transmit frequency is $7 MHz" +echo +echo "To change, quit and type CubeSatSim/config -F" echo +frequency="$8e6" + echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." echo -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then +if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" + + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & else - if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - - echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & - - else - - echo -e "Direwolf using RTL-SDR on $frequency Hz" - - direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + echo -e "Direwolf using RTL-SDR on $frequency Hz" + + direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + + sleep 5 + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 + rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - sleep 5 - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - - fi +fi cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -sleep 5 -fi + From 7c9b16a3a99c1f0d384ebdc59b938c8e39d80fc6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 17:42:35 -0500 Subject: [PATCH 086/774] added for JP14 audio out --- direwolf/direwolf-pacsatsim-jp14.conf | 6 ++++++ groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 5 +++++ groundstation/pacsat.sh | 2 +- pacsatsim.sh | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 direwolf/direwolf-pacsatsim-jp14.conf create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14.conf diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf new file mode 100644 index 00000000..6b28d029 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -0,0 +1,6 @@ +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO 20 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +FULLDUP OFF diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf new file mode 100644 index 00000000..b698b1ca --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -0,0 +1,5 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO 20 +KISSPORT 8100 +FULLDUP OFF diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 8e728541..f3ff484f 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -52,7 +52,7 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & else diff --git a/pacsatsim.sh b/pacsatsim.sh index ffe823bf..71d45328 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From 22917da1812f923a303d146acd262e360e67bec1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:24:02 -0500 Subject: [PATCH 087/774] Update direwolf-fm-pacsat-jp14.conf added TXDELAY --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index b698b1ca..bcf67f4a 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -3,3 +3,4 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF +TXDELAY 30 From bfa12ec67197e568930a0357c980466b26204d69 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:24:24 -0500 Subject: [PATCH 088/774] Update direwolf-pacsatsim-jp14.conf added TXDELAY --- direwolf/direwolf-pacsatsim-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 6b28d029..94862393 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,3 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF +TXDELAY 30 From 06917939ae4017da6fef7f49f4e1818b052228c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:43:53 -0500 Subject: [PATCH 089/774] Update direwolf-pacsatsim-jp14.conf TXDELAY 1 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 94862393..4a3b0e55 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 30 +TXDELAY 1 From 94c56d5a238db245a9be27774c187218d49b2f7d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:44:17 -0500 Subject: [PATCH 090/774] Update direwolf-fm-pacsat-jp14.conf TXDELAY 1 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index bcf67f4a..c480ee60 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -3,4 +3,4 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF -TXDELAY 30 +TXDELAY 1 From 390b6fecc7e5aa610ea7b180840f45604c52f036 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:52:03 -0500 Subject: [PATCH 091/774] Update direwolf-fm-pacsat-jp14.conf try 5 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index c480ee60..ac342354 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -3,4 +3,4 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF -TXDELAY 1 +TXDELAY 5 From 1492df7d1b7e8190957d32d7f1f9d263156bd8a4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:52:18 -0500 Subject: [PATCH 092/774] Update direwolf-pacsatsim-jp14.conf --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 4a3b0e55..475a8453 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 1 +TXDELAY 5 From 58da647eeac517f7c436ef26afdbff36cea3fbe7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:07:29 -0500 Subject: [PATCH 093/774] Update direwolf-pacsatsim-jp14.conf try 2400 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 475a8453..b75fc802 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -2,6 +2,6 @@ ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 -MODEM 1200 +MODEM 2400 FULLDUP OFF TXDELAY 5 From caab43c884ea44dda98058d919113b278f278b4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:08:30 -0500 Subject: [PATCH 094/774] Update direwolf-fm-pacsat-jp14.conf try 2400, added MODEM and CHANNEL --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index ac342354..a6ee92cd 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,6 +1,8 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 +PTT GPIO 20 +CHANNEL 0 +MODEM 2400 KISSPORT 8100 FULLDUP OFF TXDELAY 5 From 4e3e6421a21ea8ce89b629e2a2e2d1460549ce3f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:08:55 -0500 Subject: [PATCH 095/774] Update direwolf-fm-pacsat.conf added CHANNEL and MODEM --- groundstation/direwolf/direwolf-fm-pacsat.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf index fba77b7e..53524acb 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat.conf @@ -3,3 +3,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF +CHANNEL 0 +MODEM 1200 From 5983fe4a55c1aefc39be79bd3addb399db6736b7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:10:40 -0500 Subject: [PATCH 096/774] Update direwolf-pacsatsim-jp14.conf change to plight --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index b75fc802..9f8e1ea5 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,4 +1,4 @@ -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From b00f8d69b29c321ae02c4bb983adf4cb96cacc18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:11:03 -0500 Subject: [PATCH 097/774] Update direwolf-pacsatsim.conf change to plight --- direwolf/direwolf-pacsatsim.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 370e54b0..87f09de1 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,4 +1,4 @@ -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From cebe77c634d16d8fa878cec7f19fdfbd34fe1ed4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:16:32 -0500 Subject: [PATCH 098/774] Update direwolf-pacsatsim-jp14.conf try 9600 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 9f8e1ea5..30829ad6 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -2,6 +2,6 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 -MODEM 2400 +MODEM 9600 FULLDUP OFF TXDELAY 5 From ad4a68f8384d364ce5949710b76b4975e8835b0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:16:54 -0500 Subject: [PATCH 099/774] Update direwolf-fm-pacsat-jp14.conf try 9600 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index a6ee92cd..4fd24b6f 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -2,7 +2,7 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 CHANNEL 0 -MODEM 2400 +MODEM 9600 KISSPORT 8100 FULLDUP OFF TXDELAY 5 From 60e99a36a491f5bd803b45e1850d360fd9cae15f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:25:16 -0500 Subject: [PATCH 100/774] Update direwolf-fm-pacsat-jp14.conf back to 1200 and delay 10 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 4fd24b6f..d7ed9a00 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -2,7 +2,7 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 CHANNEL 0 -MODEM 9600 +MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 5 +TXDELAY 10 From 763a84b5aeef38e9bd37c8c714585d0987a9de7c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:25:38 -0500 Subject: [PATCH 101/774] Update direwolf-pacsatsim-jp14.conf 1200 and delay 10 --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 30829ad6..10e28f6b 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -2,6 +2,6 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 -MODEM 9600 +MODEM 1200 FULLDUP OFF -TXDELAY 5 +TXDELAY 10 From a463f6fe062116f5c79f64e04e0b9f8a27fd8319 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Dec 2024 09:54:04 -0500 Subject: [PATCH 102/774] Update install added GPIO to user pi --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 2b4048d6..450f10a1 100755 --- a/install +++ b/install @@ -179,6 +179,8 @@ cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGr mkdir /home/pi/PacSatGround +sudo usermod -a -G gpio pi + sudo apt-get install default-jdk -y cd From 98e56c286fd8335d599a067146879cefe5f48194 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Dec 2024 09:54:32 -0500 Subject: [PATCH 103/774] Update update add GPIO to pi user --- update | 2 ++ 1 file changed, 2 insertions(+) diff --git a/update b/update index 6d74a557..f15dcf4c 100755 --- a/update +++ b/update @@ -359,6 +359,8 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ mkdir /home/pi/PacSatGround + + sudo usermod -a -G gpio pi sudo apt-get install default-jdk -y From 742b5bd2055b6315ca907d3b19e540e9c25a545d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Dec 2024 17:18:08 -0500 Subject: [PATCH 104/774] Update transmit.py change to USB Soundcard instead of Headphones (PWM) --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index a1250e44..b82cbf6c 100644 --- a/transmit.py +++ b/transmit.py @@ -351,8 +351,8 @@ if __name__ == "__main__": print(txLedOn) GPIO.setup(txLed, GPIO.OUT) - card = "Headphones" # default using pcm audio output of Pi Zero -# card = "Device" # using USB sound card for audio output +# card = "Headphones" # default using pcm audio output of Pi Zero + card = "Device" # using USB sound card for audio output print("Programming FM module!\n"); output(pd, 1) From 0a71470ce697d65660123d44e3ba1bd8d6a2d4b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Dec 2024 17:40:50 -0500 Subject: [PATCH 105/774] Update direwolf-pacsatsim-jp14.conf --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 10e28f6b..88d20bb6 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 10 +TXDELAY 0 From e222728e840edc6dc7d3ad57e286718d9119c124 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 17:06:29 -0500 Subject: [PATCH 106/774] Update direwolf-cc.conf add other params --- direwolf-cc.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index 8419355f..00eddffa 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -1,2 +1,7 @@ ADEVICE hw:CARD=Device,DEV=0 default DTMF +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +FULLDUP OFF +TXDELAY 0 From 4b0126a97559e93562c27e143239fed6afe20131 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 17:07:41 -0500 Subject: [PATCH 107/774] Update command add -r 48000 --- command | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command b/command index 1349f45a..50460c30 100755 --- a/command +++ b/command @@ -48,11 +48,11 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "debug mode" - direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d + direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d else - direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py + direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py fi else From c564eb494f103b6bafdcbe29188d54acfacbdb34 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 17:13:16 -0500 Subject: [PATCH 108/774] Update command add -P+ -D1 --- command | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command b/command index 50460c30..989c71f5 100755 --- a/command +++ b/command @@ -48,11 +48,11 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "debug mode" - direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d else - direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py fi else From 4e003ebe144d221bf2fba5b2474ca8723d281a5e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 22:36:39 -0500 Subject: [PATCH 109/774] Update transmit.py rx sq off if pacsat mode --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index b82cbf6c..fbf2f309 100644 --- a/transmit.py +++ b/transmit.py @@ -285,6 +285,8 @@ if __name__ == "__main__": callsign = config[0] if len(config) > 5: sq = config[5] + if (mode == 'p') or (mode == 'P'): + sq = 0 # turn off squelch for Pacsat print(sq) if len(config) > 6: txf = float(config[6]) From 39319af6e86568e4b6e7b1a731875d2cb60d1b85 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 22:38:02 -0500 Subject: [PATCH 110/774] Update direwolf-fm-pacsat-jp14.conf tx delay 0 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index d7ed9a00..7b4d87d8 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 10 +TXDELAY 0 From 53515b0839660e417e1461cd2d44de1703b85c04 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 07:46:08 -0500 Subject: [PATCH 111/774] Update transmit.py fix zero squelch for pacsat --- transmit.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/transmit.py b/transmit.py index fbf2f309..f765bcd5 100644 --- a/transmit.py +++ b/transmit.py @@ -274,7 +274,7 @@ if __name__ == "__main__": tx_value = '0' rx_value = '0' - sq = '0' + '0' tx = '434.9000' rx = '435.0000' @@ -283,11 +283,10 @@ if __name__ == "__main__": # callsign = file.readline().split(" ")[0] config = file.readline().split() callsign = config[0] - if len(config) > 5: - sq = config[5] - if (mode == 'p') or (mode == 'P'): - sq = 0 # turn off squelch for Pacsat - print(sq) + if len(config) > 5: + if (mode != 'p') and (mode != 'P'): # squelch off for Pacsat + sq = config[5] + print(f'squelch: {sq}') if len(config) > 6: txf = float(config[6]) # print(txf) From ba35790cb27c0dfd4eb8141cd6ba5019df0249dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 07:49:08 -0500 Subject: [PATCH 112/774] Update transmit.py typo --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f765bcd5..76e3c40d 100644 --- a/transmit.py +++ b/transmit.py @@ -274,7 +274,7 @@ if __name__ == "__main__": tx_value = '0' rx_value = '0' - '0' + sq = '0' tx = '434.9000' rx = '435.0000' From 41171daade779ee4edadb5c0dc5aba82bd3f00a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:12:00 -0500 Subject: [PATCH 113/774] Update direwolf-pacsatsim-jp14.conf tx delay 10 needed --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 88d20bb6..10e28f6b 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 0 +TXDELAY 10 From 3ec34c2f739d74b62a979872e529a5f5f6a3575e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:12:24 -0500 Subject: [PATCH 114/774] Update direwolf-fm-pacsat-jp14.conf txdelay 10 needed --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 7b4d87d8..d7ed9a00 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 0 +TXDELAY 10 From 87b0404c39b358e006d5e5a4669144a34d03e1ad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:18:07 -0500 Subject: [PATCH 115/774] Update direwolf-fm-pacsat-jp14.conf try delay 20 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index d7ed9a00..6c0c65b9 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 10 +TXDELAY 20 From 241031396ad51b7a4f1d751f04f0012c0b73c55d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:18:26 -0500 Subject: [PATCH 116/774] Update direwolf-pacsatsim-jp14.conf try 20 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 10e28f6b..52b5cfd6 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 10 +TXDELAY 20 From 73dafbedecd8b6e73cc3a63168670764c6004133 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:03:59 -0500 Subject: [PATCH 117/774] Update direwolf-pacsatsim-jp14.conf try delay 30 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 52b5cfd6..6a8b1a46 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 20 +TXDELAY 30 From f67036ca017e2e1fa03bc76503b8b340abd0a37a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:04:26 -0500 Subject: [PATCH 118/774] Update direwolf-fm-pacsat-jp14.conf try 30 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 6c0c65b9..9c1d1b5f 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 20 +TXDELAY 30 From 631a6912052cd4ebc005799338ac624ffe239efc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:09:25 -0500 Subject: [PATCH 119/774] Update pacsat.sh added -P+ -D3 --- groundstation/pacsat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f3ff484f..e12d15f4 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -44,21 +44,21 @@ echo frequency="$8e6" -echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." -echo +#echo if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & else echo -e "Direwolf using RTL-SDR on $frequency Hz" - direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + direwolf -P+ -D3 -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & sleep 5 From 4b1b5326e8ebc56629475b525f446ce4d7ef46e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:11:26 -0500 Subject: [PATCH 120/774] Update pacsatsim.sh added -P+ -D3 --- pacsatsim.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 71d45328..8fb23c12 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -75,7 +75,7 @@ elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then frequency=434900000 echo - echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." + echo "If your Pacsat Ground Station is transmitting packets, you will see them here" echo elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then @@ -169,9 +169,9 @@ elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then fi -echo +#echo -echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." echo @@ -179,13 +179,13 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From d37729eb711f4ec25f08158fb47b9193faece78d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:16:01 -0500 Subject: [PATCH 121/774] Update pacsatsim.sh D1 --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8fb23c12..6588240e 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From 030e194c4e6c6ec37dce6ffa2df4ffe61660d3e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:16:31 -0500 Subject: [PATCH 122/774] Update pacsat.sh D1 --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e12d15f4..6cd4ab0d 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -52,7 +52,7 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & else From 21368acaf3626ea0149b3efce48f1b9acccd62ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 16:38:39 -0500 Subject: [PATCH 123/774] Update direwolf-pacsatsim-jp14.conf added FIX_BITS --- direwolf/direwolf-pacsatsim-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 6a8b1a46..045b64d1 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -5,3 +5,4 @@ CHANNEL 0 MODEM 1200 FULLDUP OFF TXDELAY 30 +FIX_BITS 1 AX25 From 6d99ed98f5576fa1e6999e17f1cd7d17c85b132e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 16:38:58 -0500 Subject: [PATCH 124/774] Update direwolf-fm-pacsat-jp14.conf FIX_BITS --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 9c1d1b5f..f13c3ced 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -6,3 +6,4 @@ MODEM 1200 KISSPORT 8100 FULLDUP OFF TXDELAY 30 +FIX_BITS 1 AX25 From 03cc387dc0796cf5e7ef43063b824dc4738e9721 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:33:52 -0500 Subject: [PATCH 125/774] Create pacsatsim.service --- systemd/pacsatsim.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 systemd/pacsatsim.service diff --git a/systemd/pacsatsim.service b/systemd/pacsatsim.service new file mode 100644 index 00000000..e65044af --- /dev/null +++ b/systemd/pacsatsim.service @@ -0,0 +1,14 @@ +[Unit] +Description=PacsatSim + +[Service] +TimeoutStopSec=5 +ExecStart=/home/pi/CubeSatSim/pacsatsim.sh +WorkingDirectory=/home/pi/CubeSatSim +StandardOutput=inherit +StandardError=inherit +Restart=always +User=root + +[Install] +WantedBy=default.target From e4e9ef04cabf6d417a36fb90d50cbec7b4048eef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:36:32 -0500 Subject: [PATCH 126/774] Update transmit.py start pacsatsim.service --- transmit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 76e3c40d..c85d10aa 100644 --- a/transmit.py +++ b/transmit.py @@ -425,7 +425,10 @@ if __name__ == "__main__": print("AFSK") elif (mode == 'p'): print("Pacsat") - system('/home/pi/CubeSatSim/pacsatsim.sh') +# system('/home/pi/CubeSatSim/pacsatsim.sh') + system('sudo systectl start pacsatsim') + While True: + sleep(30) elif (mode == 'p'): print("Pacsat Ground Station") while True: From ec415ab928f2d0ba1dde4ddf949f896ecb8a9238 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:38:12 -0500 Subject: [PATCH 127/774] Update transmit.py lowercase --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c85d10aa..0c4137e4 100644 --- a/transmit.py +++ b/transmit.py @@ -427,7 +427,7 @@ if __name__ == "__main__": print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') system('sudo systectl start pacsatsim') - While True: + while True: sleep(30) elif (mode == 'p'): print("Pacsat Ground Station") From 7f5e890fda663f35cdda2bd1e818ffbc9dd275c4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:39:11 -0500 Subject: [PATCH 128/774] Update transmit.py typo systemctl --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 0c4137e4..0ab0c67d 100644 --- a/transmit.py +++ b/transmit.py @@ -426,7 +426,7 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') - system('sudo systectl start pacsatsim') + system('sudo systemctl start pacsatsim') while True: sleep(30) elif (mode == 'p'): From 7a94bdf6ab5fe493a265ec15c356357f03477b14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:41:40 -0500 Subject: [PATCH 129/774] Update log added -p for pacsatsim --- log | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/log b/log index 2a3ce9d7..9c69874c 100755 --- a/log +++ b/log @@ -10,6 +10,10 @@ elif [ "$1" = "-c" ]; then sudo journalctl -a -u command > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" +elif [ "$1" = "-p" ]; then + sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt + cat /home/pi/CubeSatSim/logp.txt + echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt From b5c9caf3d32bae7494ead99dcc5f47a1d151b587 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:51:08 -0500 Subject: [PATCH 130/774] Update transmit.py restart pacsatsim --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 0ab0c67d..32d970b3 100644 --- a/transmit.py +++ b/transmit.py @@ -426,7 +426,7 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') - system('sudo systemctl start pacsatsim') + system('sudo systemctl restart pacsatsim') while True: sleep(30) elif (mode == 'p'): From e85a6f52c58d847a47b6f854edd5d14eab4a5af0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Dec 2024 08:46:00 -0500 Subject: [PATCH 131/774] Update log journalctl -af for real-time log --- log | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/log b/log index 9c69874c..f5b301c5 100755 --- a/log +++ b/log @@ -2,20 +2,26 @@ echo -e "\nLog file script for CubeSatSim\n" +echo "To exit, type Control-C" + +echo + +sleep 2 + if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then - sudo journalctl -a -u transmit > /home/pi/CubeSatSim/logt.txt - cat /home/pi/CubeSatSim/logt.txt - echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" + sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt +# cat /home/pi/CubeSatSim/logt.txt +# echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then - sudo journalctl -a -u command > /home/pi/CubeSatSim/logc.txt + sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt - echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" +# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then - sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt + sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt - echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" +# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else - sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt - cat /home/pi/CubeSatSim/log.txt - echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt +# cat /home/pi/CubeSatSim/log.txt +# echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" fi From 6265b59dc4e0c39193f6895691fcb0de56750f96 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Dec 2024 16:17:31 -0500 Subject: [PATCH 132/774] Update direwolf-fm-pacsat-jp14.conf comment out TXDELAY and FIX_BITS --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index f13c3ced..9bff5e66 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,5 +5,5 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 30 -FIX_BITS 1 AX25 +#TXDELAY 30 +#FIX_BITS 1 AX25 From 8e086e02e8d79cb537a84ef1b2866567f7871995 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Dec 2024 22:38:06 -0500 Subject: [PATCH 133/774] Update direwolf-pacsatsim-jp14.conf remove TXDELAY and FIX_BITS --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 045b64d1..fecf24f1 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 30 -FIX_BITS 1 AX25 +#TXDELAY 30 +#FIX_BITS 1 AX25 From 8c66982e2298ba9165d0b07434e843dde0c34fd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 10 Dec 2024 16:08:00 -0500 Subject: [PATCH 134/774] Update install add pacsatsim.service --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 450f10a1..b2c06ecc 100755 --- a/install +++ b/install @@ -197,6 +197,8 @@ sudo cp ~/CubeSatSim/systemd/command.service /etc/systemd/system/command.service sudo systemctl enable command +sudo cp ~/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo cp /boot/config.txt /boot/config.txt.0 sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 From f7631d9ab91271eeaf105ab38a602bfa023f3358 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:31:52 -0500 Subject: [PATCH 135/774] Update direwolf-pacsatsim-jp14.conf turn off PTT no tx --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index fecf24f1..cd88c58e 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 +#PTT GPIO 20 MYCALL AMSAT CHANNEL 0 MODEM 1200 From 263093feba5a87247e4359a304b50827608da10c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:32:19 -0500 Subject: [PATCH 136/774] Update direwolf-fm-pacsat-jp14.conf no PTT no tx --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 9bff5e66..2903fc24 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,6 +1,6 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 +#PTT GPIO 20 CHANNEL 0 MODEM 1200 KISSPORT 8100 From ff0dc0079a2a53c2cc5983c41d231a89883d4441 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:55:47 -0500 Subject: [PATCH 137/774] Update direwolf-pacsatsim-jp14.conf txdelay and fix bits --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index cd88c58e..59009a53 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 +TXDELAY 30 +FIX_BITS 1 AX25 From 735245e14821b1b5110e387242dde7a2babb9967 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:56:12 -0500 Subject: [PATCH 138/774] Update direwolf-fm-pacsat-jp14.conf txdelay and fix bits --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 2903fc24..2419285d 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,5 +5,5 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 +TXDELAY 30 +FIX_BITS 1 AX25 From 3a5d23767a5e2f48ec0c59ea58beb7255e3afdec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 20:39:19 -0500 Subject: [PATCH 139/774] Update direwolf-pacsatsim-jp14.conf remove ax25 fix bits --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 59009a53..51ab8c9f 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 FULLDUP OFF TXDELAY 30 -FIX_BITS 1 AX25 +#FIX_BITS 1 AX25 From ba05da8f37613abe408c956a1b29e3dc744b07e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 20:39:42 -0500 Subject: [PATCH 140/774] Update direwolf-fm-pacsat-jp14.conf remove ax25 fix bits --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 2419285d..ad591599 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -6,4 +6,4 @@ MODEM 1200 KISSPORT 8100 FULLDUP OFF TXDELAY 30 -FIX_BITS 1 AX25 +#FIX_BITS 1 AX25 From ab446d1b714581518dea8c251ea66e4c213a0570 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 20:41:24 -0500 Subject: [PATCH 141/774] Update install added missing -12 --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b2c06ecc..ecb3f1d8 100755 --- a/install +++ b/install @@ -153,7 +153,7 @@ echo "$value" > /dev/null set -- $value echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=$1" >> pacsat.config +echo "bbs_callsign=$1-12" >> pacsat.config echo "broadcast_callsign=$1-11" >> pacsat.config echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config From 5fcc3e11001d3d8285e03b0c9971e21ab1606493 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 04:53:46 -0500 Subject: [PATCH 142/774] Create direwolf-pacsat-loopback.conf with Loopback --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 groundstation/direwolf/direwolf-pacsat-loopback.conf diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf new file mode 100644 index 00000000..74a7fb1e --- /dev/null +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -0,0 +1,9 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 +#PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 From 9c179c55234f8131969ced77f7336317621bd8f4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 04:58:42 -0500 Subject: [PATCH 143/774] Update direwolf-pacsatsim-jp14.conf change to Loopback 1 0 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 51ab8c9f..f30407cc 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 #PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From 08420193dadc08ec428b901f5df9b07fc7d16cc4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 04:59:26 -0500 Subject: [PATCH 144/774] Update direwolf-fm-pacsat-jp14.conf change to Loopback 0 1 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index ad591599..c815b866 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 CHANNEL 0 MODEM 1200 From 00354d02df42b715be335484e0b971753631b8cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 05:01:35 -0500 Subject: [PATCH 145/774] Update pacsat.sh restart pacsatsim in ground station --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 6cd4ab0d..d2197312 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -32,6 +32,8 @@ sudo killall -9 zenity &>/dev/null echo +sudo systemctl restart pacsatsim + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value From 862c0812997e1710aea62f20cd67fa63a3de60a4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 05:09:08 -0500 Subject: [PATCH 146/774] Update direwolf-fm-pacsat-jp14.conf add KISSPORT 8001 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index c815b866..6e4fc073 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -7,3 +7,4 @@ KISSPORT 8100 FULLDUP OFF TXDELAY 30 #FIX_BITS 1 AX25 +KISSPORT 8001 From c8b73f9f90ed16caffcd5e2d85f4c7a39f6eede3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 05:17:41 -0500 Subject: [PATCH 147/774] Update direwolf-pacsatsim-jp14.conf TXDELAY 75 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index f30407cc..803920ff 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 30 +TXDELAY 75 #FIX_BITS 1 AX25 From 49bf55484c0e2010eb7bef7644a83f8210ec8b28 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:00:24 -0500 Subject: [PATCH 148/774] Update pacsat.sh stop CubeSatSim, transmit, command --- groundstation/pacsat.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d2197312..3846ea26 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,6 +4,12 @@ sudo modprobe snd-aloop +sudo systemctl stop cubesatsim + +sudo systemctl stop transmit + +sudo systemctl stop command + /home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null From d4d6b37829c05901dfd72dbcefa104ee96429ac8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:02:31 -0500 Subject: [PATCH 149/774] Update install my fork of pi_pacsat --- install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install b/install index ecb3f1d8..b335178c 100755 --- a/install +++ b/install @@ -138,7 +138,11 @@ cd git clone https://github.com/ac2cz/pi_pacsat.git -cd pi_pacsat/Debug +cd pi_pacsat + +git checkout master-debug + +cd Debug make all From 7092c7aa67ab883e105f9ef1f50c2bfb4a527fb0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:42:12 -0500 Subject: [PATCH 150/774] Update install changed pi_pacsat to my repo --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b335178c..3a4297a4 100755 --- a/install +++ b/install @@ -136,7 +136,7 @@ sudo ./install.sh cd -git clone https://github.com/ac2cz/pi_pacsat.git +git clone https://github.com/alanbjohnston/pi_pacsat.git cd pi_pacsat From aa0e48aca2f74196dc17c8fe4878d33f550b43ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:52:29 -0500 Subject: [PATCH 151/774] Update pacsat.sh don't set CubeSatSim mode --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 3846ea26..b68dbec9 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -10,7 +10,7 @@ sudo systemctl stop transmit sudo systemctl stop command -/home/pi/CubeSatSim/config -I +#/home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null From 002c3dbd6b6c603d3dadd7d09931b3aa5f622b46 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 11:04:01 -0500 Subject: [PATCH 152/774] Update install fix pacsat install --- install | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install b/install index 3a4297a4..87881db0 100755 --- a/install +++ b/install @@ -152,18 +152,20 @@ mkdir /home/pi/PacSat/pacsat/dir export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=$1-12" >> pacsat.config -echo "broadcast_callsign=$1-11" >> pacsat.config -echo "digi_callsign=$1-1" >> pacsat.config +echo "bbs_callsign=W3ZM-12" >> pacsat.config +echo "broadcast_callsign=W3ZM-11" >> pacsat.config +echo "digi_callsign=W3ZM-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" > pacsat.state echo "uplink_open=1" >> pacsat.state +echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt From 41d47740a3fe28c27184f8ef5cbbc5828341e2d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 12:54:22 -0500 Subject: [PATCH 153/774] Create pacsat.desktop --- groundstation/pacsat.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/pacsat.desktop diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop new file mode 100644 index 00000000..539c0e1d --- /dev/null +++ b/groundstation/pacsat.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Pacsat +GenericName=Pacsat Loopback +Comment=Pacsat +Exec=/home/pi/CubeSatSim/groundstation/pacsat.sh +Icon=/home/pi/Icons/pacsat.png +Terminal=true +Type=Application +Categories=HamRadio; +Keywords=APRS; From 9ca2860de8a214e1e743b1127af7044cc58a5513 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 12:55:29 -0500 Subject: [PATCH 154/774] Create pacsatlog.desktop --- groundstation/pacsatlog.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/pacsatlog.desktop diff --git a/groundstation/pacsatlog.desktop b/groundstation/pacsatlog.desktop new file mode 100644 index 00000000..b3032884 --- /dev/null +++ b/groundstation/pacsatlog.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Pacsat Log +GenericName=Pacsat Loopback +Comment=Pacsat +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/log -p" +Icon=/home/pi/Icons/pacsat.png +Terminal=true +Type=Application +Categories=HamRadio; +Keywords=APRS; From e574937c7aac87611d2529c53702889c3ad71db0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 13:36:56 -0500 Subject: [PATCH 155/774] Update pacsat.sh remove frequency comments --- groundstation/pacsat.sh | 43 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b68dbec9..b0b1e952 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -40,44 +40,27 @@ echo sudo systemctl restart pacsatsim -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -echo "Receive frequency is $8 MHz" -echo "Transmit frequency is $7 MHz" -echo -echo "To change, quit and type CubeSatSim/config -F" -echo +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value + +#echo "Receive frequency is $8 MHz" +#echo "Transmit frequency is $7 MHz" +#echo +#echo "To change, quit and type CubeSatSim/config -F" +#echo -frequency="$8e6" +#frequency="$8e6" #echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." #echo -if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & - -else - - echo -e "Direwolf using RTL-SDR on $frequency Hz" - - direwolf -P+ -D3 -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & - - sleep 5 - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & +echo +echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." +echo -fi cd /home/pi/Desktop/PacSatGround_0.46m_linux/ From 9f7d7e8334d43d3a7b20675b6e74695036e37b52 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jan 2025 09:43:40 -0500 Subject: [PATCH 156/774] Update transmit.py repeater mode CARD --- transmit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index 32d970b3..baa1419d 100644 --- a/transmit.py +++ b/transmit.py @@ -802,7 +802,7 @@ if __name__ == "__main__": ## system("arecord -D plughw:CARD=Device,DEV=0 -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 " + tx + "e3 &") system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") sleep(1) - system("sudo arecord -D plughw:1 -r48000 -fS16_LE -c1 | nc localhost 8011 &") + system("sudo arecord -D plughw:CARD -r48000 -fS16_LE -c1 | nc localhost 8011 &") GPIO.output(powerPin, 1) sleep(0.5) GPIO.output(powerPin, 0) @@ -810,9 +810,9 @@ if __name__ == "__main__": sleep(1) print("No carrier detected, stopping repeater") output(txLed, txLedOff) - system("sudo killall -9 arecord") - system("sudo killall -9 nc") - system("sudo killall -9 rpitx") + system("sudo killall -9 arecord > /dev/null 2>&1") + system("sudo killall -9 nc > /dev/null 2>&1") + system("sudo killall -9 rpitx > /dev/null 2>&1") else: print("FSK") From 087eab06256fba579360b3ae1a1a4af10535c861 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jan 2025 09:47:36 -0500 Subject: [PATCH 157/774] Update transmit.py fixed CARD=Device --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index baa1419d..7d47f19a 100644 --- a/transmit.py +++ b/transmit.py @@ -802,7 +802,7 @@ if __name__ == "__main__": ## system("arecord -D plughw:CARD=Device,DEV=0 -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 " + tx + "e3 &") system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") sleep(1) - system("sudo arecord -D plughw:CARD -r48000 -fS16_LE -c1 | nc localhost 8011 &") + system("sudo arecord -D plughw:CARD=Device,DEV=0 -r48000 -fS16_LE -c1 | nc localhost 8011 &") GPIO.output(powerPin, 1) sleep(0.5) GPIO.output(powerPin, 0) From 976ac018166a9be5048dffce1f2a74c73e5f33b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 07:11:49 -0500 Subject: [PATCH 158/774] Update install switch pi_pacsat back to ac2cz --- install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install b/install index 87881db0..eed5aef2 100755 --- a/install +++ b/install @@ -136,11 +136,12 @@ sudo ./install.sh cd -git clone https://github.com/alanbjohnston/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 +#git checkout master-debug cd Debug From 54bcd77317cfd20287c7005872bdfb80dcf68248 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 10:59:07 -0500 Subject: [PATCH 159/774] Update sstv_decode_prompt.sh remove hw:0.0 on play --- groundstation/sstv_decode_prompt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 76eb611f..5e3b5e2d 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -128,7 +128,9 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 + +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 sleep 5 From d2cf9213369d173592fd1b48b88b6a6a85000ee0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 11:03:37 -0500 Subject: [PATCH 160/774] Update sstv_decode_prompt.sh remove tee --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 5e3b5e2d..da80f1d4 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -130,7 +130,7 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 4c7f4d5e172645792c6b264d6ebc25415898e0bc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:14:03 -0500 Subject: [PATCH 161/774] Update fox-profile.desktop --- groundstation/fox-profile.desktop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/fox-profile.desktop b/groundstation/fox-profile.desktop index c03f40d4..8b7aaabe 100644 --- a/groundstation/fox-profile.desktop +++ b/groundstation/fox-profile.desktop @@ -2,8 +2,8 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-profile.sh Name=Change FoxTelem Profile -Comment=FIAB-v3 -Icon=/home/pi/Downloads/foxtelem.png +Comment=FIAB-v4 +Icon=/home/pi/Icons/foxtelem.png Path=/home/pi Terminal=true Categories=HamRadio From 3a4373ea1432279a1eb7ecd8e1075b847f72badd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:15:37 -0500 Subject: [PATCH 162/774] Update gpredict.desktop --- groundstation/gpredict.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/gpredict.desktop b/groundstation/gpredict.desktop index 20a6ab49..69d11ecb 100644 --- a/groundstation/gpredict.desktop +++ b/groundstation/gpredict.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/usr/bin/gpredict Name=Gpredict Comment=ISS and Satellite Tracking for ARISS Radio Pi -Icon=/home/pi/Downloads/gpredict.png +Icon=/home/pi/Icons/gpredict.png Path=/home/pi Terminal=false Categories=HamRadio From 6d0a9fa82d218759caa64cf3bef25edbf77299ae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:17:02 -0500 Subject: [PATCH 163/774] Update rtl-tcp.desktop --- groundstation/rtl-tcp.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.desktop b/groundstation/rtl-tcp.desktop index 117acb9c..7ae3c038 100644 --- a/groundstation/rtl-tcp.desktop +++ b/groundstation/rtl-tcp.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/rtl-tcp.sh Name=RTL-TCP Comment=RTL-TCP for SDR# -Icon=/home/pi/Downloads/SDRSharp.png +Icon=/home/pi/Icons/SDRSharp.png Path=/home/pi Terminal=true Categories=HamRadio From 5dc9c1b18d83802c280747ca431a4ec5b94eed3a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:18:35 -0500 Subject: [PATCH 164/774] Update set location.desktop --- groundstation/set location.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/set location.desktop b/groundstation/set location.desktop index e2b80016..9adc6f66 100644 --- a/groundstation/set location.desktop +++ b/groundstation/set location.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/loc.sh Name=Set My Location Comment=Set Location for Gpredict -Icon=/home/pi/Downloads/gpredict.png +Icon=/home/pi/Icons/gpredict.png Path=/home/pi Terminal=true Categories=HamRadio From 5d2f5ada8d4e08c61edbd7c745ba71136ec97d3a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:20:40 -0500 Subject: [PATCH 165/774] Create SDRpp.desktop --- groundstation/SDRpp.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/SDRpp.desktop diff --git a/groundstation/SDRpp.desktop b/groundstation/SDRpp.desktop new file mode 100644 index 00000000..f4f4ba38 --- /dev/null +++ b/groundstation/SDRpp.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Exec=/home/pi/CubeSatSim/groundstation/sdrpp.sh +Name=SDRpp +Comment=SDRpp +Icon=/home/pi/Icons/sdrpp.png +Path=/home/pi +Terminal=true +Categories=HamRadio +Keywords=Ham Radio;SDR From cbe338671ae6233250610ee24c965594738fdbd3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:24:47 -0500 Subject: [PATCH 166/774] Update cubicsdr.desktop --- groundstation/cubicsdr.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/cubicsdr.desktop b/groundstation/cubicsdr.desktop index 1599f5df..2cf19759 100644 --- a/groundstation/cubicsdr.desktop +++ b/groundstation/cubicsdr.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/cubicsdr.sh Name=SDR FM Broadcast Comment=CubicSDR FM Broadcast -Icon=/home/pi/Downloads/cubicsdr.png +Icon=/home/pi/Icons/cubicsdr.png Path=/home/pi Terminal=true Categories=HamRadio From 1190ebca96629ec22b9b53d64a690080568d069c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:32:27 -0500 Subject: [PATCH 167/774] Update aprs.sh --- groundstation/aprs.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/aprs.sh b/groundstation/aprs.sh index 2e1c6873..dd88ba5d 100755 --- a/groundstation/aprs.sh +++ b/groundstation/aprs.sh @@ -3,12 +3,14 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null From 2ceeb9c62571b616d05bab9eb9059dc70dd84f97 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:34:18 -0500 Subject: [PATCH 168/774] Update fox.sh --- groundstation/fox.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/fox.sh b/groundstation/fox.sh index 3c1daf1a..233644ef 100755 --- a/groundstation/fox.sh +++ b/groundstation/fox.sh @@ -5,12 +5,14 @@ echo "Script to run FoxTelem for ARISS Radio Pi" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 rtl_fm &>/dev/null From 324731eef74382126920512a14e6688abbe551c8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:35:27 -0500 Subject: [PATCH 169/774] Update sstv_decode_prompt.sh --- groundstation/sstv_decode_prompt.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index da80f1d4..6b6e5dbc 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -4,10 +4,12 @@ echo "Script to decode SSTV using QSSTV with rtl_fm" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null sudo modprobe snd-aloop +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 qsstv &>/dev/null sudo killall -9 rtl_fm &>/dev/null @@ -16,7 +18,7 @@ sudo killall -9 aplay &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null From 42857a18cf894859e138b16dd93696395ce37e33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:36:58 -0500 Subject: [PATCH 170/774] Update sdr.sh --- groundstation/sdr.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 0783d9ca..1ad01092 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -24,6 +24,8 @@ echo "Note: you need to be on the Wifi network: $ssid" echo +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 java &>/dev/null sudo killall -9 rtl_fm &>/dev/null @@ -42,13 +44,13 @@ sudo killall -9 direwolf &>/dev/null sudo killall -9 zenity &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null -sudo systemctl restart openwebrx +sudo systemctl restart openwebrx &>/dev/null sleep 10 -setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://127.0.0.1:8073 &>/dev/null & +setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://localhost:8073 &>/dev/null & sleep 10 From 3b85b6e6b52f62a8f6cc249771e925296264b305 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:37:55 -0500 Subject: [PATCH 171/774] Update rtl-tcp.sh --- groundstation/rtl-tcp.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index c8af8906..bcf8e154 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -23,13 +23,15 @@ echo "Note: you need to be on the Wifi network: $ssid" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null sleep 2 pkill -o chromium &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null + +sudo killall -9 sdrpp &>/dev/null sudo killall -9 java &>/dev/null From 6f81e7d9075c22e9854a12fe4df1461ea192caeb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:39:07 -0500 Subject: [PATCH 172/774] Update cubicsdr.sh --- groundstation/cubicsdr.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/cubicsdr.sh b/groundstation/cubicsdr.sh index 3f4b6b62..f9c3146c 100755 --- a/groundstation/cubicsdr.sh +++ b/groundstation/cubicsdr.sh @@ -9,14 +9,16 @@ echo "Note: Select Generic RTL2832 device then click Start to begin" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null sudo killall -9 java &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null From 30a48e2dd2f23c4e893df65dd90eb7dd19ef79d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:55:32 -0500 Subject: [PATCH 173/774] Update aprs.sh remove tee --- groundstation/aprs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/aprs.sh b/groundstation/aprs.sh index dd88ba5d..10917a3c 100755 --- a/groundstation/aprs.sh +++ b/groundstation/aprs.sh @@ -80,7 +80,7 @@ echo -e "Auto decoding APRS packets on $frequency Hz" #sudo rtl_fm -f 144.39M -s 22050 -g 48 - | multimon-ng -a AFSK1200 -A -t raw - -direwolf -r 48000 -t 0 & +direwolf -c direwolf.conf -r 48000 -t 0 & sleep 5 @@ -89,6 +89,7 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 28ab2a86885214337f1a413f361f0c0fb040cdd6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:56:05 -0500 Subject: [PATCH 174/774] Update direwolf.conf changed speaker to default --- groundstation/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf.conf b/groundstation/direwolf.conf index ce8b6823..d70427b9 100644 --- a/groundstation/direwolf.conf +++ b/groundstation/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 default From 061845cdfe4d0e1e6cb8412b86078eeb49d364d8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:57:44 -0500 Subject: [PATCH 175/774] Update aprs.sh full path for direwolf conf --- groundstation/aprs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/aprs.sh b/groundstation/aprs.sh index 10917a3c..427c36cb 100755 --- a/groundstation/aprs.sh +++ b/groundstation/aprs.sh @@ -80,7 +80,7 @@ echo -e "Auto decoding APRS packets on $frequency Hz" #sudo rtl_fm -f 144.39M -s 22050 -g 48 - | multimon-ng -a AFSK1200 -A -t raw - -direwolf -c direwolf.conf -r 48000 -t 0 & +direwolf -c /home/pi/CubeSatSim/groundstation/direwolf.conf -r 48000 -t 0 & sleep 5 From 0e590a838ef743f7f0459605bc04120f40614ae0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 03:11:05 -0500 Subject: [PATCH 176/774] Update bookmarks.json --- groundstation/bookmarks.json | 191 ++++++++++------------------------- 1 file changed, 55 insertions(+), 136 deletions(-) diff --git a/groundstation/bookmarks.json b/groundstation/bookmarks.json index f8bae496..09f1be52 100644 --- a/groundstation/bookmarks.json +++ b/groundstation/bookmarks.json @@ -1,137 +1,56 @@ [ - { - "name": "ISS APRS", - "frequency": 145825000, - "modulation": "nfm" - }, - { - "name": "ISS SSTV/Voice", - "frequency": 145800000, - "modulation": "nfm" - }, - { - "name": "ARISS Repeater Downlink", - "frequency": 437800000, - "modulation": "nfm" - }, - { - "name": "AO-27", - "frequency": 436795000, - "modulation": "nfm" - }, - { - "name": "AO-73", - "frequency": 145815000, - "modulation": "usb" - }, - { - "name": "Fox-1B AO-91", - "frequency": 145960000, - "modulation": "nfm" - }, - { - "name": "Fox-1D AO-92", - "frequency": 145880000, - "modulation": "nfm" - }, - { - "name": "HuskySat-1 HO-107", - "frequency": 435800000, - "modulation": "usb" - }, - { - "name": "Fox-1E", - "frequency": 435750000, - "modulation": "usb" - }, - { - "name": "MAX VALIER", - "frequency": 145860000, - "modulation": "usb" - }, - { - "name": "NOAA WX Radio 1", - "frequency": 162400000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 2", - "frequency": 162425000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 3", - "frequency": 162450000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 4", - "frequency": 162475000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 5", - "frequency": 162500000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 6", - "frequency": 162525000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 7", - "frequency": 162550000, - "modulation": "nfm" - }, - { - "name": "CAS-4A", - "frequency": 145855000, - "modulation": "usb" - }, - { - "name": "CAS-4B", - "frequency": 145910000, - "modulation": "usb" - }, - { - "name": "XW-2A", - "frequency": 145660000, - "modulation": "usb" - }, - { - "name": "XW-2B", - "frequency": 145725000, - "modulation": "usb" - }, - { - "name": "XW-2C", - "frequency": 145790000, - "modulation": "usb" - }, - { - "name": "XW-2F", - "frequency": 145975000, - "modulation": "usb" - }, - { - "name": "NOAA-19", - "frequency": 137100000, - "modulation": "nfm" - }, - { - "name": "NOAA-18", - "frequency": 137912500, - "modulation": "nfm" - }, - { - "name": "NOAA-15", - "frequency": 137620000, - "modulation": "nfm" - }, - { - "name": "CubeSatSim", - "frequency": 434900000, - "modulation": "packet" - } -] + { + "name": "NOAA WX Radio 1", + "frequency": 162400000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 2", + "frequency": 162425000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 3", + "frequency": 162450000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 4", + "frequency": 162475000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 5", + "frequency": 162500000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 6", + "frequency": 162525000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 7", + "frequency": 162550000, + "modulation": "nfm" + }, + { + "name": "CubeSatSim", + "frequency": 434900000, + "modulation": "packet" + }, + { + "name": "ISS SSTV/Voice", + "frequency": 145800000, + "modulation": "nfm" + }, + { + "name": "ISS APRS", + "frequency": 145825000, + "modulation": "packet" + }, + { + "name": "ISS Voice Repeater", + "frequency": 437800000, + "modulation": "nfm" + } From 2cd5718e43dd73441c94dc27db7666a9e61a0bff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 03:19:22 -0500 Subject: [PATCH 177/774] Create settings.json --- groundstation/settings.json | 808 ++++++++++++++++++++++++++++++++++++ 1 file changed, 808 insertions(+) create mode 100644 groundstation/settings.json diff --git a/groundstation/settings.json b/groundstation/settings.json new file mode 100644 index 00000000..69033009 --- /dev/null +++ b/groundstation/settings.json @@ -0,0 +1,808 @@ +{ + "version": 8, + "sdrs": { + "rtlsdr": { + "name": "RTL-SDR", + "type": "rtl_sdr", + "profiles": { + "70cm": { + "name": "70cm Ham Band 435 MHz (CubeSatSim)", + "center_freq": 435000000, + "rf_gain": 10.0, + "samp_rate": 2400000, + "start_freq": 434900000, + "start_mod": "nfm", + "tuning_step": 1000, + "direct_sampling": 0 + }, + "2m": { + "name": "WX Band 161 MHz", + "center_freq": 162400000, + "rf_gain": 29, + "samp_rate": 2048000, + "start_freq": 157000000, + "start_mod": "nfm" + }, + "e59a4765-4139-4ab8-89c5-d8ac3343ba70": { + "name": "2m Ham Band 146 MHz (ISS)", + "center_freq": 145000000, + "samp_rate": 2400000, + "start_freq": 145000000, + "start_mod": "nfm", + "rf_gain": 42.0, + "direct_sampling": 0 + }, + "faf80b0b-1a96-4a9b-96fa-ce40b109c7e0": { + "name": "70cm Ham Band 438 MHz (ISS)", + "rf_gain": 29.0, + "center_freq": 438000000, + "samp_rate": 2400000, + "start_freq": 437800000, + "start_mod": "nfm" + }, + "a4fd4a5d-d2d0-4949-87e2-bda83cd83a37": { + "name": "FM Band 95 MHz", + "rf_gain": 29.0, + "center_freq": 95000000, + "samp_rate": 2400000, + "start_freq": 94000000, + "start_mod": "wfm" + }, + "ce2bca29-78cb-45d8-ab46-8dea3135981c": { + "name": "10m Ham Band 28 MHz", + "rf_gain": 29.0, + "center_freq": 28000000, + "samp_rate": 2400000, + "start_freq": 28000000, + "start_mod": "usb", + "direct_sampling": 0 + }, + "d6cdbf2d-74e4-4cac-aaa8-e793103a8e89": { + "name": "6m Ham Band 51 MHz", + "rf_gain": 29.0, + "center_freq": 51000000, + "samp_rate": 2400000, + "start_freq": 51000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "e2aba387-1d3b-4ca8-b280-e119282b8812": { + "name": "90 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 90000000, + "samp_rate": 2400000, + "start_freq": 90000000, + "start_mod": "wfm" + }, + "f700b99d-3c51-4524-b151-a0809b868ecc": { + "name": "92 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 92000000, + "samp_rate": 2400000, + "start_freq": 92000000, + "start_mod": "wfm" + }, + "dc6af94f-d607-4fee-a522-7f375f66a62c": { + "name": "94 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 94000000, + "samp_rate": 2400000, + "start_freq": 94000000, + "start_mod": "wfm" + }, + "6887e85a-a4dc-4245-810f-99801fc5e824": { + "name": "96 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 96000000, + "samp_rate": 2400000, + "start_freq": 96000000, + "start_mod": "wfm" + }, + "a2182ed6-70a8-4377-b233-ac6f8ccc91d7": { + "name": "98 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 96000000, + "samp_rate": 2400000, + "start_freq": 96000000, + "start_mod": "wfm" + }, + "57e38353-fb86-4935-899b-e365228b8ae5": { + "name": "100 MHz FM Band", + "center_freq": 100000000, + "samp_rate": 2400000, + "start_freq": 100000000, + "start_mod": "wfm" + }, + "5e9ec6dd-905d-4781-bd13-9cb702f58e84": { + "name": "102 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 102000000, + "samp_rate": 2400000, + "start_freq": 102000000, + "start_mod": "wfm" + }, + "ef2c703c-2e22-4e87-82b5-581420d704bd": { + "name": "104 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 104000000, + "samp_rate": 2400000, + "start_freq": 104000000, + "start_mod": "wfm" + }, + "34cc3ddf-8018-4288-acb9-29e6940bc37e": { + "name": "106 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 106000000, + "samp_rate": 2400000, + "start_freq": 106000000, + "start_mod": "wfm" + }, + "b4693683-ccf5-474d-a2d9-9a47b0a18ee2": { + "name": "108 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 108000000, + "samp_rate": 2400000, + "start_freq": 108000000, + "start_mod": "wfm" + }, + "34224d77-7b61-467c-b78f-18c7f3af1a0c": { + "name": "110 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 110000000, + "samp_rate": 2400000, + "start_freq": 110000000, + "start_mod": "wfm" + }, + "8dd82d97-73db-4fa7-ac41-263c3026ea1d": { + "name": "112 MHz", + "rf_gain": 29.0, + "center_freq": 112000000, + "samp_rate": 2400000, + "start_freq": 112000000, + "start_mod": "nfm" + }, + "79304b30-f10d-469e-9617-50a19bfdb435": { + "name": "114 MHz", + "rf_gain": 29.0, + "center_freq": 114000000, + "samp_rate": 2400000, + "start_freq": 114000000, + "start_mod": "nfm" + }, + "c00bf096-27b8-4262-832c-df1a308d7eb9": { + "name": "116 MHz", + "rf_gain": 29.0, + "center_freq": 116000000, + "samp_rate": 2400000, + "start_freq": 116000000, + "start_mod": "nfm" + }, + "669d25a6-6c15-4131-a330-3c33dd2147f0": { + "name": "118 Mhz Air Band", + "rf_gain": 29.0, + "center_freq": 118000000, + "samp_rate": 2400000, + "start_freq": 118000000, + "start_mod": "am" + }, + "948248fa-43d9-4e7d-bf86-afaadd391779": { + "name": "120 MHz Air Band", + "rf_gain": 29.0, + "center_freq": 120000000, + "samp_rate": 2400000, + "start_freq": 120000000, + "start_mod": "am" + }, + "b634273b-8fc8-4e87-b5c4-e6226d4be0ac": { + "name": "122 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 122000000, + "samp_rate": 2400000, + "start_freq": 121000000, + "start_mod": "nfm" + }, + "c55289a2-8286-4a3d-a505-37ba2867571a": { + "name": "124 Mhz Air Band", + "rf_gain": 42.0, + "center_freq": 124000000, + "samp_rate": 2400000, + "start_freq": 124000000, + "start_mod": "am" + }, + "4fe488b7-f369-43ba-bb49-91e1a185be7a": { + "name": "126 MHz Air Band", + "rf_gain": 29.0, + "center_freq": 126000000, + "samp_rate": 2400000, + "start_freq": 126000000, + "start_mod": "am" + }, + "e79639a2-1384-4e92-8e46-f6e5670ec9fd": { + "name": "128 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 128000000, + "samp_rate": 2400000, + "start_freq": 128000000, + "start_mod": "am" + }, + "319f3fb2-b98a-4620-85a7-a99d5a722bd5": { + "name": "130 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 130000000, + "samp_rate": 2400000, + "start_freq": 130000000, + "start_mod": "am" + }, + "63c5c2ce-07de-496c-81f6-b188a7adbf39": { + "name": "132 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 132000000, + "samp_rate": 2400000, + "start_freq": 132000000, + "start_mod": "am" + }, + "386bdc7b-eb10-4e05-972a-69d730a23cd8": { + "name": "134 MHz Air Band", + "rf_gain": 29.0, + "center_freq": 134000000, + "samp_rate": 2400000, + "start_freq": 134000000, + "start_mod": "am" + }, + "ae8ea8b1-23de-45ef-b8c4-3b83a188e65d": { + "name": "136 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 136000000, + "samp_rate": 2400000, + "start_freq": 136000000, + "start_mod": "am" + }, + "c0b1a28c-5e07-400a-a5f3-07c62db27587": { + "name": "138 MHz NOAA Weather Satellite Band", + "rf_gain": 42.0, + "center_freq": 138000000, + "samp_rate": 2400000, + "start_freq": 138000000, + "start_mod": "nfm" + }, + "20f7ce56-fd85-4b3e-8fac-94cbe9ba0e1d": { + "name": "140 MHz ", + "rf_gain": 42.0, + "center_freq": 140000000, + "samp_rate": 2400000, + "start_freq": 140000000, + "start_mod": "nfm" + }, + "882079f8-5697-428a-ae9d-bcc091269c7f": { + "name": "142 MHz ", + "rf_gain": 42.0, + "center_freq": 142000000, + "samp_rate": 2400000, + "start_freq": 142000000, + "start_mod": "nfm" + }, + "da1b3f12-2eba-40e9-8c62-33493adf74b3": { + "name": "144 MHz 2m Ham Band", + "rf_gain": 42.0, + "center_freq": 144000000, + "samp_rate": 2400000, + "start_freq": 144000000, + "start_mod": "nfm" + }, + "8d9cf1e1-44c5-41c4-bcea-7b1c69446e62": { + "name": "146 MHz 2m Ham Band", + "rf_gain": 42.0, + "center_freq": 146000000, + "samp_rate": 2400000, + "start_freq": 146000000, + "start_mod": "nfm" + }, + "eec8aa0d-3485-43d2-baa4-82f7d9e14df6": { + "name": "148 MHz 2m Ham Band", + "rf_gain": 42.0, + "center_freq": 148000000, + "samp_rate": 2400000, + "start_freq": 148000000, + "start_mod": "nfm" + }, + "bf66a908-1988-4aec-b998-06e2bc7d0a84": { + "name": "150 MHz", + "rf_gain": 42.0, + "center_freq": 150000000, + "samp_rate": 2400000, + "start_freq": 150000000, + "start_mod": "nfm" + }, + "0389f270-b919-4aae-a313-f73697059f70": { + "name": "152 MHz", + "rf_gain": 42.0, + "center_freq": 152000000, + "samp_rate": 2400000, + "start_freq": 152000000, + "start_mod": "nfm" + }, + "6ef9d955-76aa-46c0-8463-2c23def5e37b": { + "name": "154 MHz", + "rf_gain": 42.0, + "center_freq": 154000000, + "samp_rate": 2400000, + "start_freq": 154000000, + "start_mod": "nfm" + }, + "5d0a64c7-3bce-408e-94d9-c8315bef7540": { + "name": "156 MHz", + "rf_gain": 42.0, + "center_freq": 156000000, + "samp_rate": 2400000, + "start_freq": 156000000, + "start_mod": "nfm" + }, + "5b869cae-ffa7-4554-96af-7acd497bbaf3": { + "name": "158 MHz", + "rf_gain": 42.0, + "center_freq": 158000000, + "samp_rate": 2400000, + "start_freq": 158000000, + "start_mod": "nfm" + }, + "0de7c5d4-14fc-4655-9a81-2bcebb2f4147": { + "name": "160 MHz", + "rf_gain": 42.0, + "center_freq": 160000000, + "samp_rate": 2400000, + "start_freq": 160000000, + "start_mod": "nfm" + }, + "8ca54821-8b80-4938-a35c-9fe25e2320d1": { + "name": "162 MHz", + "rf_gain": 42.0, + "center_freq": 162000000, + "samp_rate": 2400000, + "start_freq": 162000000, + "start_mod": "nfm" + }, + "f74d262d-9e98-4030-86b2-45676121ff1e": { + "name": "164 MHz", + "rf_gain": 42.0, + "center_freq": 164000000, + "samp_rate": 2400000, + "start_freq": 164000000, + "start_mod": "nfm" + }, + "bfc9c686-6c06-4de2-b1d5-c8f012131042": { + "name": "168 MHz", + "rf_gain": 42.0, + "center_freq": 168000000, + "samp_rate": 2400000, + "start_freq": 167000000, + "start_mod": "nfm" + }, + "5468e597-d529-42fe-9fcf-0ff4fa9e2d06": { + "name": "170 MHz", + "rf_gain": 42.0, + "center_freq": 170000000, + "samp_rate": 2400000, + "start_freq": 170000000, + "start_mod": "nfm" + }, + "e124cc6e-7177-4d5f-ae5b-2ec6a6fa2956": { + "name": "172 MHz", + "rf_gain": 42.0, + "center_freq": 172000000, + "samp_rate": 2400000, + "start_freq": 172000000, + "start_mod": "nfm" + }, + "1ce0f3ed-4763-4f00-916a-4f72d29ba410": { + "name": "174 MHz ", + "rf_gain": 42.0, + "center_freq": 174000000, + "samp_rate": 2400000, + "start_freq": 174000000, + "start_mod": "nfm" + }, + "639b1496-a2b9-4a42-ad28-3cda89fbe2fb": { + "name": "420 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 420000000, + "samp_rate": 2400000, + "start_freq": 420000000, + "start_mod": "nfm" + }, + "bbc9b57e-ea86-43ef-be65-cb2337615ae5": { + "name": "422 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 422000000, + "samp_rate": 2400000, + "start_freq": 422000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "3aed286d-7d13-4338-8621-d1c0dfdf3ac6": { + "name": "424 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 424000000, + "samp_rate": 2400000, + "start_freq": 424000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "9ae664b4-48f3-410a-8995-edc60127d746": { + "name": "426 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 426000000, + "samp_rate": 2400000, + "start_freq": 426000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "24d2467b-6740-42b5-8d3f-8f389fc0860b": { + "name": "428 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 428000000, + "samp_rate": 2400000, + "start_freq": 428000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "debbc3ab-081d-41e7-80fe-7d564838154e": { + "name": "430 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 430000000, + "samp_rate": 2400000, + "start_freq": 430000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "649233e0-fc85-415d-b88e-94750f49ca4b": { + "name": "432 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 432000000, + "samp_rate": 2400000, + "start_freq": 432000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "bed3b482-fd3b-45ee-b924-200aa4223ace": { + "name": "434 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 434000000, + "samp_rate": 2400000, + "start_freq": 434000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "58dfac9e-6030-4bb3-ba28-465285baa25e": { + "name": "436 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 436000000, + "samp_rate": 2400000, + "start_freq": 436000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "4c293b84-cd43-495f-95a5-1fcabfe4e4c7": { + "name": "438 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 438000000, + "samp_rate": 2400000, + "start_freq": 438000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "0e763161-a0e8-411a-abe6-c1af13045f27": { + "name": "440 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 440000000, + "samp_rate": 2400000, + "start_freq": 440000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "6dda77d3-e859-41b7-9b0b-22c2dee47472": { + "name": "442 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 442000000, + "samp_rate": 2400000, + "start_freq": 442000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "285813ef-aa6d-433f-a316-074f47e02073": { + "name": "444 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 444000000, + "samp_rate": 2400000, + "start_freq": 444000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "e0842b63-6857-4554-874b-fad99e4db03a": { + "name": "446 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 446000000, + "samp_rate": 2400000, + "start_freq": 446000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "c7b21c80-cfef-42e8-a6fe-c5eea4556c7e": { + "name": "448 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 448000000, + "samp_rate": 2400000, + "start_freq": 448000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "d98b4d4a-8247-4a99-9fc7-89780e5e1fef": { + "name": "450 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 450000000, + "samp_rate": 2400000, + "start_freq": 450000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "a09a546f-c56f-41b5-ae34-c5511afbcef5": { + "name": "460 MHz", + "rf_gain": 42.0, + "center_freq": 460000000, + "samp_rate": 2400000, + "start_freq": 460000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "232b2ae6-88dd-4e58-b489-37f310e5e204": { + "name": "462 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 462000000, + "samp_rate": 2400000, + "start_freq": 462000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "41db9b38-87d7-40a0-9f90-1f0c77c054d9": { + "name": "464 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 464000000, + "samp_rate": 2400000, + "start_freq": 464000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "e9bb7781-eb9b-4314-b399-2d96c52716f0": { + "name": "466 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 466000000, + "samp_rate": 2400000, + "start_freq": 466000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "5d9e07e8-eb42-4832-82c9-016f05d89027": { + "name": "468 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 468000000, + "samp_rate": 2400000, + "start_freq": 468000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "20m": { + "name": "20m", + "center_freq": 14150000, + "samp_rate": 384000, + "start_freq": 14070000, + "start_mod": "usb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "30m": { + "name": "30m", + "center_freq": 10125000, + "samp_rate": 192000, + "start_freq": 10142000, + "start_mod": "usb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "40m": { + "name": "40m", + "center_freq": 7100000, + "samp_rate": 256000, + "start_freq": 7070000, + "start_mod": "lsb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "80m": { + "name": "80m", + "center_freq": 3650000, + "samp_rate": 384000, + "start_freq": 3570000, + "start_mod": "lsb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "49m": { + "name": "49m Broadcast", + "center_freq": 6050000, + "samp_rate": 384000, + "start_freq": 6070000, + "start_mod": "am", + "tuning_step": "1000", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "c1982ce1-7504-455e-908c-dc097fa031a8": { + "name": "1090 MHz ADS-B Band", + "rf_gain": 42.0, + "center_freq": 1090000000, + "samp_rate": 2400000, + "start_freq": 1090000000, + "start_mod": "adsb", + "tuning_step": 1, + "direct_sampling": 0 + }, + "cb7f2f8e-e317-4a5e-9504-826dd3781791": { + "name": "978 MHz ADS-B Band", + "rf_gain": 42.0, + "center_freq": 978000000, + "samp_rate": 2400000, + "start_freq": 978000000, + "start_mod": "adsb", + "tuning_step": 1 + } + } + }, + "airspy": { + "name": "Airspy HF+", + "type": "airspyhf", + "rf_gain": "auto", + "profiles": { + "20m": { + "name": "20m", + "center_freq": 14150000, + "samp_rate": 384000, + "start_freq": 14070000, + "start_mod": "usb", + "tuning_step": "500" + }, + "30m": { + "name": "30m", + "center_freq": 10125000, + "samp_rate": 192000, + "start_freq": 10142000, + "start_mod": "usb", + "tuning_step": "500" + }, + "40m": { + "name": "40m", + "center_freq": 7100000, + "samp_rate": 256000, + "start_freq": 7070000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "80m": { + "name": "80m", + "center_freq": 3650000, + "samp_rate": 384000, + "start_freq": 3570000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "49m": { + "name": "49m Broadcast", + "center_freq": 6050000, + "samp_rate": 384000, + "start_freq": 6070000, + "start_mod": "am", + "tuning_step": "1000" + } + } + }, + "sdrplay": { + "name": "SDRPlay device", + "type": "sdrplay", + "antenna": "Antenna A", + "rf_gain": "auto", + "profiles": { + "20m": { + "name": "20m", + "center_freq": 14150000, + "samp_rate": 500000, + "start_freq": 14070000, + "start_mod": "usb", + "tuning_step": "500" + }, + "30m": { + "name": "30m", + "center_freq": 10125000, + "samp_rate": 250000, + "start_freq": 10142000, + "start_mod": "usb", + "tuning_step": "500" + }, + "40m": { + "name": "40m", + "center_freq": 7100000, + "samp_rate": 500000, + "start_freq": 7070000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "80m": { + "name": "80m", + "center_freq": 3650000, + "samp_rate": 500000, + "start_freq": 3570000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "49m": { + "name": "49m Broadcast", + "center_freq": 6000000, + "samp_rate": 500000, + "start_freq": 6070000, + "start_mod": "am", + "tuning_step": "1000" + } + } + } + }, + "receiver_name": "ARISS Radio Pi", + "receiver_location": "Budapest, Hungary", + "receiver_asl": 200, + "receiver_admin": "example@example.com", + "receiver_gps": { + "lat": 39.95233, + "lon": -75.16379 + }, + "photo_title": "Panorama of Budapest from Sch\u00f6nherz Zolt\u00e1n Dormitory", + "photo_desc": "", + "max_clients": 20, + "keep_files": 20, + "session_timeout": 0, + "usage_policy_url": "policy", + "allow_chat": true, + "allow_audio_recording": true, + "allow_center_freq_changes": false, + "magic_key": "memagic", + "receiver_keys": [], + "waterfall_scheme": "GoogleTurboWaterfall", + "fft_fps": 9, + "fft_size": 4096, + "fft_voverlap_factor": 0.3, + "waterfall_levels": { + "min": -88.0, + "max": -20.0 + }, + "waterfall_auto_levels": { + "min": 3.0, + "max": 10.0 + }, + "waterfall_auto_level_default_mode": false, + "waterfall_auto_min_range": 50, + "audio_compression": "adpcm", + "fft_compression": "adpcm", + "tuning_precision": 2, + "eibi_bookmarks_range": 0, + "repeater_range": 0, + "map_type": "google", + "google_maps_api_key": "", + "openweathermap_api_key": "", + "map_position_retention_time": 7200, + "map_ignore_indirect_reports": false, + "map_prefer_recent_reports": true, + "callsign_url": "https://www.qrzcq.com/call/{}", + "vessel_url": "https://www.vesselfinder.com/vessels/details/{}", + "flight_url": "https://flightaware.com/live/flight/{}", + "modes_url": "https://flightaware.com/live/modes/{}/redirect" +} + From be3af7add803873995882d436051f0d6810a5d39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 04:01:51 -0500 Subject: [PATCH 178/774] Update bookmarks.json --- groundstation/bookmarks.json | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/bookmarks.json b/groundstation/bookmarks.json index 09f1be52..b3c55a2c 100644 --- a/groundstation/bookmarks.json +++ b/groundstation/bookmarks.json @@ -54,3 +54,4 @@ "frequency": 437800000, "modulation": "nfm" } +] From 0185e522fb0ca2ce634b4b33ea7c829a707b4662 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 04:19:01 -0500 Subject: [PATCH 179/774] Update loc.sh add venv --- groundstation/loc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/loc.sh b/groundstation/loc.sh index 5a1b6881..06096323 100755 --- a/groundstation/loc.sh +++ b/groundstation/loc.sh @@ -5,7 +5,7 @@ sudo killall -9 java &>/dev/null sudo killall -9 gpredict &>/dev/null -python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py +/home/pi/venv/bin/python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py #/usr/bin/gpredict From 8925b52b6aa0a7735c0f1bfaf89cafe645f93c93 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 04:58:55 -0500 Subject: [PATCH 180/774] Update sdr.sh get rid of Restore pages popup --- groundstation/sdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 1ad01092..8dfd5e64 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -50,7 +50,7 @@ sudo systemctl restart openwebrx &>/dev/null sleep 10 -setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://localhost:8073 &>/dev/null & +setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 &>/dev/null & sleep 10 From ca2a06d119860982af6f2e3659aaca22d2475e9b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 06:59:49 -0500 Subject: [PATCH 181/774] Update sstv_decode_prompt.sh changed play device --- groundstation/sstv_decode_prompt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 6b6e5dbc..1a065791 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -132,7 +132,8 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 46a2dfd578ea2e5a8790c737c47ce7acf83a0135 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 10:32:38 -0500 Subject: [PATCH 182/774] Update packet.sh remove tee --- groundstation/packet.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 87620bdc..28a9e2de 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -187,5 +187,6 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 6826e558b34e08e88863ea50a061330352882b76 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 10:33:04 -0500 Subject: [PATCH 183/774] Update direwolf.conf change speaker to default --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index ce8b6823..d70427b9 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 default From 869107baf273982335de9874f743496bd904b8f1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 10:37:20 -0500 Subject: [PATCH 184/774] Update direwolf.conf change speaker to loopback --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index d70427b9..701d80b4 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 default +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 From 17437ecc58c49c5e88b774eb39b5cc9fea155120 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 13:42:52 -0500 Subject: [PATCH 185/774] Update packet.sh changed subchannel --- groundstation/packet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 28a9e2de..87ff253b 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -186,7 +186,7 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From b3ef984e542de0dc971e7e9f2a15e2556334d7b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:01:32 -0500 Subject: [PATCH 186/774] Update aprs.desktop --- groundstation/aprs.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/aprs.desktop b/groundstation/aprs.desktop index b9ee2512..5f360f7b 100644 --- a/groundstation/aprs.desktop +++ b/groundstation/aprs.desktop @@ -2,7 +2,7 @@ Name=APRS Decode using Direwolf GenericName=Decodes APRS using rtl_fm and Direwolf Comment=APRS signals -Exec=/home/pi/CubeSatSim/groundstation/aprs.sh +Exec=/home/pi/CubeSatSim/groundstation/packet.sh Icon=/home/pi/Icons/aprs.png Terminal=true Type=Application From 8ccc7040bcb9b858122dac21fb820efcbe574524 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:03:49 -0500 Subject: [PATCH 187/774] Update sstv_decode_prompt.sh --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 1a065791..9845c3bf 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -133,7 +133,7 @@ set -- $value #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 961c80d8ecda8482300a66f5b53fc54d8f82cf9d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:13:20 -0500 Subject: [PATCH 188/774] Update sstv_decode_prompt.sh added also stop/start --- groundstation/sstv_decode_prompt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 9845c3bf..3c343732 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -30,6 +30,9 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + #echo "s" >> .mode frequency=$(zenity --list 2>/dev/null --width=410 --height=220 --title="SSTV Decoding using QSSTV" --text="Choose the frequency for SSTV decoding:" --column="kHz" --column="Use" 145800 "ISS" 434900 "CubeSatSim" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file") From 9b5fb214283407e0aa2702499d4cc73342576bc0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:16:15 -0500 Subject: [PATCH 189/774] Update sstv_decode_prompt.sh --- groundstation/sstv_decode_prompt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 3c343732..ab8c9f1f 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -135,8 +135,8 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 84e5a7c2d695f6b279db42e3c7e779d202194eb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:18:58 -0500 Subject: [PATCH 190/774] Update packet.sh added alsa stop/start --- groundstation/packet.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 87ff253b..3f68fe6e 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -26,6 +26,9 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + echo frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") From 757430adfc93416fd8fa7672f3601f59edd25ee0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 03:32:19 -0500 Subject: [PATCH 191/774] Update webSDR.desktop --- groundstation/webSDR.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/webSDR.desktop b/groundstation/webSDR.desktop index 277bbae2..f660c2ea 100644 --- a/groundstation/webSDR.desktop +++ b/groundstation/webSDR.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/sdr.sh Name=Web SDR Comment=openwebrx for Web SDR -Icon=/home/pi/Downloads/openwebrx.png +Icon=/home/pi/Iconss/openwebrx.png Path=/home/pi Terminal=true Categories=HamRadio From 389870d5b723ce97ff9b54f3484af2ff500bb1b8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 03:34:00 -0500 Subject: [PATCH 192/774] Update chromium.desktop changed to myurl --- groundstation/autostart/chromium.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/autostart/chromium.desktop b/groundstation/autostart/chromium.desktop index fc57834e..5fd6bef0 100644 --- a/groundstation/autostart/chromium.desktop +++ b/groundstation/autostart/chromium.desktop @@ -2,4 +2,4 @@ [Desktop Entry] Type=Application Name=Chromium with WebSDR -Exec=chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://127.0.0.1:8073 +Exec=chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 From 9c5dc8bd2f608d4933c84344798d76d09b9336df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 07:53:17 -0500 Subject: [PATCH 193/774] Update and rename rtl_tcp.service to rtltcp.service from niclashoyer/rtltcp --- groundstation/rtl_tcp.service | 14 -------------- groundstation/rtltcp.service | 10 ++++++++++ 2 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 groundstation/rtl_tcp.service create mode 100644 groundstation/rtltcp.service diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service deleted file mode 100644 index 403425a3..00000000 --- a/groundstation/rtl_tcp.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=RTL-TCP - -[Service] -TimeoutStopSec = 5 -ExecStart=/bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I)' -WorkingDirectory=/home/pi -StandardOutput=inherit -StandardError=inherit -Restart=always -User=root - -[Install] -WantedBy=default.target diff --git a/groundstation/rtltcp.service b/groundstation/rtltcp.service new file mode 100644 index 00000000..f9d2405f --- /dev/null +++ b/groundstation/rtltcp.service @@ -0,0 +1,10 @@ +[Unit] +Description=RTL TCP Service +After=network.target +Requires=rtltcp.socket + +[Service] +Type=notify +User=pi +ExecStart=/usr/local/bin/rtltcp +TimeoutStopSec=5 From a259419e2d5112cfad4b4146ec46d09247968bd8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 07:54:57 -0500 Subject: [PATCH 194/774] Create rtltcp.socket from niclashoyer/rtltcp --- groundstation/rtltcp.socket | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 groundstation/rtltcp.socket diff --git a/groundstation/rtltcp.socket b/groundstation/rtltcp.socket new file mode 100644 index 00000000..d8a67a14 --- /dev/null +++ b/groundstation/rtltcp.socket @@ -0,0 +1,9 @@ +[Unit] +Description=RTL TCP Socket +PartOf=rtltcp.service + +[Socket] +ListenStream=[::]:1234 + +[Install] +WantedBy=sockets.target From 03be3471e06a531e8de423e3105854bc160e347f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:15:57 -0500 Subject: [PATCH 195/774] Update and rename rtltcp.service to rtl_tcp.service revert --- groundstation/rtl_tcp.service | 14 ++++++++++++++ groundstation/rtltcp.service | 10 ---------- 2 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 groundstation/rtl_tcp.service delete mode 100644 groundstation/rtltcp.service diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service new file mode 100644 index 00000000..403425a3 --- /dev/null +++ b/groundstation/rtl_tcp.service @@ -0,0 +1,14 @@ +[Unit] +Description=RTL-TCP + +[Service] +TimeoutStopSec = 5 +ExecStart=/bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I)' +WorkingDirectory=/home/pi +StandardOutput=inherit +StandardError=inherit +Restart=always +User=root + +[Install] +WantedBy=default.target diff --git a/groundstation/rtltcp.service b/groundstation/rtltcp.service deleted file mode 100644 index f9d2405f..00000000 --- a/groundstation/rtltcp.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=RTL TCP Service -After=network.target -Requires=rtltcp.socket - -[Service] -Type=notify -User=pi -ExecStart=/usr/local/bin/rtltcp -TimeoutStopSec=5 From 3aeed04e4144360a94ac74d28f95a09606a7490f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:17:46 -0500 Subject: [PATCH 196/774] Update rtl_tcp.service removed path --- groundstation/rtl_tcp.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service index 403425a3..e2c3b3b7 100644 --- a/groundstation/rtl_tcp.service +++ b/groundstation/rtl_tcp.service @@ -3,7 +3,7 @@ Description=RTL-TCP [Service] TimeoutStopSec = 5 -ExecStart=/bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I)' +ExecStart=/bin/sh -c 'rtl_tcp -a $(hostname -I)' WorkingDirectory=/home/pi StandardOutput=inherit StandardError=inherit From b43aa9da609786a2b5f3b6cd8f0d914483ea885a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:33:39 -0500 Subject: [PATCH 197/774] add sdrpp script --- groundstation/sdrpp.sh | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 groundstation/sdrpp.sh diff --git a/groundstation/sdrpp.sh b/groundstation/sdrpp.sh new file mode 100755 index 00000000..73f520e7 --- /dev/null +++ b/groundstation/sdrpp.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# script to run sdrpp + +echo "Script to run SDRpp for ARISS Radio Pi" + +echo + +sudo systemctl stop openwebrx + +sudo killall -9 java &>/dev/null + +sudo killall -9 sdrpp &>/dev/null + +sudo systemctl stop rtl_tcp + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +sudo killall -9 direwolf &>/dev/null + +sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +#sudo kill `ps -aux | grep cubicsdr-packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +#sudo kill `ps -aux | grep packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +#sudo kill `ps -aux | grep sstv_decode_prompt| grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +sudo killall -9 zenity &>/dev/null + +sleep 5 + +setsid sdrpp + +sleep 10 + +#$SHELL From 15ebacf05b528ef293d534041af28573067acc15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:40:47 -0500 Subject: [PATCH 198/774] Update rtl-tcp.sh use systemd --- groundstation/rtl-tcp.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index bcf8e154..47853aaf 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -50,7 +50,8 @@ sudo killall -9 aplay &>/dev/null sudo killall -9 zenity &>/dev/null -sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' +#sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' +sudo systemctl start rtl_tcp &>/dev/null sleep 5 From a991cf979de7009f40142220f2937ad4b47286d4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:41:48 -0500 Subject: [PATCH 199/774] Update rtl_tcp.service changed to IP address not host name --- groundstation/rtl_tcp.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service index e2c3b3b7..ff899e9b 100644 --- a/groundstation/rtl_tcp.service +++ b/groundstation/rtl_tcp.service @@ -3,7 +3,7 @@ Description=RTL-TCP [Service] TimeoutStopSec = 5 -ExecStart=/bin/sh -c 'rtl_tcp -a $(hostname -I)' +ExecStart=/bin/sh -c 'rtl_tcp -a $(hostname -I|cut -f1 -d " ")' WorkingDirectory=/home/pi StandardOutput=inherit StandardError=inherit From f224a0ede08f5e878715632f498bd56e8ed33ee7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:44:07 -0500 Subject: [PATCH 200/774] Update rtl-tcp.sh add journalctl messages --- groundstation/rtl-tcp.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 47853aaf..4a18c89f 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -49,10 +49,11 @@ sudo killall -9 aplay &>/dev/null sudo killall -9 zenity &>/dev/null - #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null +sudo journalctl -af -u rtl_tcp + sleep 5 #$SHELL From 84d090747cbab6f223d1b0c5922fb07b0f60be71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:54:18 -0500 Subject: [PATCH 201/774] Update rtl-tcp.sh add while to close window --- groundstation/rtl-tcp.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 4a18c89f..0378909a 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -52,8 +52,9 @@ sudo killall -9 zenity &>/dev/null #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null -sudo journalctl -af -u rtl_tcp - -sleep 5 +while [[ sudo systemctl status rtl_tcp | grep "Active: active (running)" ]] +do + sleep 5 +done #$SHELL From 0df2108bda38e847a7ca1aabdbd15eca883b4518 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:56:44 -0500 Subject: [PATCH 202/774] Update rtl-tcp.sh fixed typo --- groundstation/rtl-tcp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 0378909a..185d8b6a 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -52,7 +52,7 @@ sudo killall -9 zenity &>/dev/null #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null -while [[ sudo systemctl status rtl_tcp | grep "Active: active (running)" ]] +while [[ $(sudo systemctl status rtl_tcp | grep "Active: active (running)") ]] do sleep 5 done From 4de35d79776cb895866472fa00c9052c1ed23c91 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:58:14 -0500 Subject: [PATCH 203/774] Update rtl-tcp.sh add back in journalctl log --- groundstation/rtl-tcp.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 185d8b6a..caf5ff2c 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -52,6 +52,8 @@ sudo killall -9 zenity &>/dev/null #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null +sudo journalctl -af -u rtl_tcp & + while [[ $(sudo systemctl status rtl_tcp | grep "Active: active (running)") ]] do sleep 5 From 861fe223d8069cd16f1fe1f03c89bd2566c30a30 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 09:01:02 -0500 Subject: [PATCH 204/774] Update rtl-tcp.sh add sleep at end --- groundstation/rtl-tcp.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index caf5ff2c..e16c6e9a 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -59,4 +59,6 @@ do sleep 5 done +sleep 5 + #$SHELL From 100560015959ba3edf62acd842265cda40940477 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:00:17 -0500 Subject: [PATCH 205/774] Update fox-profile.sh --- groundstation/fox-profile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-profile.sh b/groundstation/fox-profile.sh index d51e7ccb..1610e293 100755 --- a/groundstation/fox-profile.sh +++ b/groundstation/fox-profile.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to change FoxTelem default profile -echo "Script to change your default FoxTelem profile for FIAB v3" +echo "Script to change your default FoxTelem profile for FIAB v4" echo From c0653b5b1d03c7e6baf6cad88c818ac6d994dd1d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:00:47 -0500 Subject: [PATCH 206/774] Update fox-startup.sh --- groundstation/fox-startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-startup.sh b/groundstation/fox-startup.sh index cb035116..cf6a6282 100755 --- a/groundstation/fox-startup.sh +++ b/groundstation/fox-startup.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to run FoxTelem -echo "Startup script to run FoxTelem for FIAB v3" +echo "Startup script to run FoxTelem for FIAB v4" echo From d8c40c6b57cb02a29e8f9f0f820cf033e93bfc60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:01:13 -0500 Subject: [PATCH 207/774] Update fox-run.sh --- groundstation/fox-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-run.sh b/groundstation/fox-run.sh index c680b47a..d8fe4fe5 100755 --- a/groundstation/fox-run.sh +++ b/groundstation/fox-run.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to run FoxTelem -echo "Startup script to run FoxTelem for FIAB v3" +echo "Startup script to run FoxTelem for FIAB v4" echo From 5f09c5a73ca33a714599fcf5b56cff4f567d64d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:01:44 -0500 Subject: [PATCH 208/774] Update fox-download.desktop --- groundstation/fox-download.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-download.desktop b/groundstation/fox-download.desktop index d58827d0..4e4bcf40 100644 --- a/groundstation/fox-download.desktop +++ b/groundstation/fox-download.desktop @@ -2,7 +2,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-download.sh Name=FoxTelem Download -Comment=FIAB-v3 +Comment=FIAB-v4 Icon=/home/pi/Icons/FoxTelemDownload.png Path=/home/pi Terminal=true From 577d0f93edc99d753a6970d5430ceea07e1461cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:02:19 -0500 Subject: [PATCH 209/774] Update foxtelem.desktop --- groundstation/foxtelem.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/foxtelem.desktop b/groundstation/foxtelem.desktop index 9dc42ab9..87fe00a1 100644 --- a/groundstation/foxtelem.desktop +++ b/groundstation/foxtelem.desktop @@ -2,7 +2,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-run.sh Name=FoxTelem -Comment=FIAB-v3 +Comment=FIAB-v4 Icon=/home/pi/Downloads/foxtelem.png Path=/home/pi Terminal=true From b3eeaaa8687061f7bae94f0ed3f9ec145cd113a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:10:36 -0500 Subject: [PATCH 210/774] Update loc.sh activate venv --- groundstation/loc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/loc.sh b/groundstation/loc.sh index 06096323..8aa8cd9f 100755 --- a/groundstation/loc.sh +++ b/groundstation/loc.sh @@ -5,7 +5,10 @@ sudo killall -9 java &>/dev/null sudo killall -9 gpredict &>/dev/null -/home/pi/venv/bin/python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py +source /home/pi/venv/bin/activate + + +python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py #/usr/bin/gpredict From 7db82fff14ddd1ef35c66a1c06321662cec7d3a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:33:21 -0500 Subject: [PATCH 211/774] Update fox-run.sh add venv activate --- groundstation/fox-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/fox-run.sh b/groundstation/fox-run.sh index d8fe4fe5..aa21578b 100755 --- a/groundstation/fox-run.sh +++ b/groundstation/fox-run.sh @@ -5,6 +5,8 @@ echo "Startup script to run FoxTelem for FIAB v4" echo +source /home/pi/venv/bin/activate + sudo killall -9 FoxTelem &>/dev/null sudo killall -9 zenity &>/dev/null From a8692efe42719658ecc7df9ebeedb0ca2af92eb8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:40:03 -0500 Subject: [PATCH 212/774] Update fox-run.sh removed fox --- groundstation/fox-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-run.sh b/groundstation/fox-run.sh index aa21578b..3f1ec4c5 100755 --- a/groundstation/fox-run.sh +++ b/groundstation/fox-run.sh @@ -14,7 +14,7 @@ sudo killall -9 zenity &>/dev/null FILE=/home/pi/FoxTelemetryData/.foxprofile if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose your default FoxTelem profile:" --list 2>/dev/null --width=410 --height=120 --title="Set FoxTelem Profile" --column="Profile" --column="Receive and decode telemetry from" Fox-in-a-Box "AMSAT Fox satellites" "CubeSatSim" "AMSAT CubeSat Simulator") + profile=$(zenity --text="Choose your default FoxTelem profile:" --list 2>/dev/null --width=410 --height=120 --title="Set FoxTelem Profile" --column="Profile" --column="Receive and decode telemetry from" Fox-in-a-Box "AMSAT Satellites" "CubeSatSim" "AMSAT CubeSat Simulator") echo $profile From ca6b036ea897b3cb2d0a49604ab2f54bbf8c4952 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:40:46 -0500 Subject: [PATCH 213/774] Update sstv_decode_prompt.sh mode 4 --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index ab8c9f1f..fbc55895 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -70,7 +70,7 @@ elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ]; then frequency=434900000 echo "Frequency is" $frequency echo -echo "If your CubeSatSim is transmitting in SSTV mode (mode 5) you should get images." +echo "If your CubeSatSim is transmitting in SSTV mode (mode 4) you should get images." echo "Note: if you see and hear an SSTV signal but don't get any images, the CubeSatSim signal might have a frequency offset. Try rebooting the CubeSatSim to fix." elif [ "$choice" = "3" ] || [ "$frequency" = "Other" ]; then From 69c2f9457ad283e6d147378c106a3471e8cad6c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 06:18:07 -0500 Subject: [PATCH 214/774] Update packet.sh add kill sdrpp --- groundstation/packet.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 3f68fe6e..4b65bdef 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -12,6 +12,8 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 direwolf &>/dev/null sudo killall -9 aplay &>/dev/null From 993848e641c7b85eb8db4bbc94f8caf2b508a7fa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 06:20:01 -0500 Subject: [PATCH 215/774] Update packet.sh dire wolf with colors --- groundstation/packet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 4b65bdef..f669afda 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -180,7 +180,7 @@ else echo -e "Auto decoding APRS packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -t 0 & + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf & # -t 0 & fi From 65b69f64fdbf74c3697487eb5527d39dd6f408ba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:21:29 -0500 Subject: [PATCH 216/774] Update pacsat.sh add missing direwolf --- groundstation/pacsat.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b0b1e952..d70aa07f 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -56,6 +56,7 @@ sudo systemctl restart pacsatsim #echo +direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From 81be0e9b3c70ea24809d346eb1bca2c7c8623dc3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:40:34 -0500 Subject: [PATCH 217/774] Update direwolf-pacsat-loopback.conf to 0 1 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 74a7fb1e..c815b866 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 CHANNEL 0 MODEM 1200 From c26743c59f3844d74d4c1cbfb1989ee012bf9c10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:45:39 -0500 Subject: [PATCH 218/774] Update direwolf-pacsat-loopback.conf 0 0 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index c815b866..74a7fb1e 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 #PTT GPIO 20 CHANNEL 0 MODEM 1200 From 0556866021d4cf2055e181713279e35303a044a7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:46:17 -0500 Subject: [PATCH 219/774] Update direwolf-pacsatsim-jp14.conf 1 1 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 803920ff..64c7bfe5 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From ec1e6fafabe11df51b5ea1e817ce2b103563be71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:57:13 -0500 Subject: [PATCH 220/774] Update pacsatsim.sh don't kill direwolf --- pacsatsim.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6588240e..94a07850 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -14,15 +14,15 @@ sudo modprobe snd-aloop #sudo systemctl stop openwebrx -sudo systemctl stop rtl_tcp &>/dev/null +#sudo systemctl stop rtl_tcp &>/dev/null #pkill -o chromium &>/dev/null -sudo killall -9 rtl_fm &>/dev/null +#sudo killall -9 rtl_fm &>/dev/null -sudo killall -9 direwolf &>/dev/null +#sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#udo killall -9 aplay &>/dev/null #sudo killall -9 qsstv &>/dev/null From d37400dd318b909df295d29ec2a543fdcff50d1b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:35:06 -0500 Subject: [PATCH 221/774] Update pacsatsim.sh direwolf loopback --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 94a07850..2bc9bcc6 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From ed93dbc59aaeb006135744f08a97305a38e1cb4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:35:57 -0500 Subject: [PATCH 222/774] Create direwolf-pacsatsim-loopback.conf --- direwolf/direwolf-pacsatsim-loopback.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim-loopback.conf diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf new file mode 100644 index 00000000..64c7bfe5 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -0,0 +1,8 @@ +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 +#PTT GPIO 20 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +FULLDUP OFF +TXDELAY 75 +#FIX_BITS 1 AX25 From 8007aa4530cd0d6021862502f3e198b0dd522699 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:39:00 -0500 Subject: [PATCH 223/774] Update pacsatsim.sh comment on direwolf --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2bc9bcc6..33c1a8cd 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & +# direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From 47a6a89fb9e8b2833d27422ea09d112d1939dd48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:40:23 -0500 Subject: [PATCH 224/774] Update pacsat.sh comment out direwolf --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d70aa07f..5564d8cd 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -56,7 +56,7 @@ sudo systemctl restart pacsatsim #echo -direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +#direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From fa11e21422739745096d432287656030db20c1e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:43:37 -0500 Subject: [PATCH 225/774] Update pacsat.sh remove direwolf killall --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5564d8cd..01fa7515 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -22,7 +22,7 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null -sudo killall -9 direwolf &>/dev/null +#sudo killall -9 direwolf &>/dev/null sudo killall -9 aplay &>/dev/null From 2219931cec652b11ba3ac3522d8618cb569545e8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 03:35:16 -0500 Subject: [PATCH 226/774] adding reset_pacsat --- groundstation/reset_pacsat.sh | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 groundstation/reset_pacsat.sh diff --git a/groundstation/reset_pacsat.sh b/groundstation/reset_pacsat.sh new file mode 100755 index 00000000..34e153a3 --- /dev/null +++ b/groundstation/reset_pacsat.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# script to clear Pacsat Ground Station and Pacsatsim state + +echo "Clearing all Pacsat Ground Station and Pacsatsim state" + +echo + +sudo systemctl stop pacsatsim + +#sudo killall -9 direwolf &>/dev/null + +sudo killall -9 java &>/dev/null + +cd + +cd pi_pacsat + +cd Debug + +sudo rm -r /home/pi/PacSat + +mkdir /home/pi/PacSat +mkdir /home/pi/PacSat/pacsat +mkdir /home/pi/PacSat/pacsat/dir + +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value + +echo "bit_rate=9600" > pacsat.config +echo "bbs_callsign=AMSAT-12" >> pacsat.config +echo "broadcast_callsign=AMSAT-11" >> pacsat.config +echo "digi_callsign=AMSAT-1" >> pacsat.config +echo "max_frames_in_tx_buffer=5" >> pacsat.config + +sudo rm pacsat_last_command_time.dat +sudo rm pacsat_upload_table.dat +sudo rm pacsat.state + +echo "pb_open=1" > pacsat.state +echo "uplink_open=1" >> pacsat.state +echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state + +touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + +sudo rm -r /home/pi/PacSatGround + +mkdir /home/pi/PacSatGround + +echo + +echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + From 8a8c09814ada6c466ab9e7f9df725a04484f8f19 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 03:38:45 -0500 Subject: [PATCH 227/774] Update pacsatsim.sh direwolf back in --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 33c1a8cd..2bc9bcc6 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" -# direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From f6053fc6ba53862bf141fa8280923e1e0a60e5af Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 03:39:15 -0500 Subject: [PATCH 228/774] Update pacsat.sh run direwolf back in --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 01fa7515..46293689 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -56,7 +56,7 @@ sudo systemctl restart pacsatsim #echo -#direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From 0bc9b97a720f627e9c9eee7419a402c9c1999e08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 04:14:45 -0500 Subject: [PATCH 229/774] Update pacsat.sh add 30 second delay --- groundstation/pacsat.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 46293689..0e916410 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -40,6 +40,11 @@ echo sudo systemctl restart pacsatsim + +echo "Waiting 30 seconds for Pacsatsim to start" + +sleep 30 + #value=`cat /home/pi/CubeSatSim/sim.cfg` #echo "$value" > /dev/null #set -- $value From d22bbc222d328ffede96bf909c71d81c7eb98c68 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 06:07:20 -0500 Subject: [PATCH 230/774] Update pacsat.sh change to 10 second delay --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 0e916410..56be5a59 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -41,9 +41,9 @@ echo sudo systemctl restart pacsatsim -echo "Waiting 30 seconds for Pacsatsim to start" +echo "Waiting 10 seconds for Pacsatsim to start" -sleep 30 +sleep 10 #value=`cat /home/pi/CubeSatSim/sim.cfg` #echo "$value" > /dev/null From 4b3e527419986a34db28357ea952a6c021fe0254 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 06:32:23 -0500 Subject: [PATCH 231/774] Update direwolf-pacsat-loopback.conf set AGW port --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 74a7fb1e..6058c722 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -4,6 +4,7 @@ ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 CHANNEL 0 MODEM 1200 KISSPORT 8100 +AGWPORT 8002 FULLDUP OFF TXDELAY 30 #FIX_BITS 1 AX25 From 1c67dbdbb36cfaac6131b59f5386cff1843a850e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 06:57:37 -0500 Subject: [PATCH 232/774] Update install changed from W3ZM to AMSAT --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index eed5aef2..216dd74f 100755 --- a/install +++ b/install @@ -158,9 +158,9 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LI #set -- $value echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=W3ZM-12" >> pacsat.config -echo "broadcast_callsign=W3ZM-11" >> pacsat.config -echo "digi_callsign=W3ZM-1" >> pacsat.config +echo "bbs_callsign=AMSAT-12" >> pacsat.config +echo "broadcast_callsign=AMSAT-11" >> pacsat.config +echo "digi_callsign=AMSAT-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" > pacsat.state From a2797e17b9942cc9a2981a0f4eba2221c55a1066 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 07:17:30 -0500 Subject: [PATCH 233/774] Update pacsatsim.sh try -du --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2bc9bcc6..e7ca6ba8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + direwolf -P+ -D1 -qd -du -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From d660f6451583be55ba3acbc6105a6005ce85c253 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 07:21:27 -0500 Subject: [PATCH 234/774] Update pacsatsim.sh try -dp --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index e7ca6ba8..5f2e717e 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -du -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From 0d954f7f3d5998bbd5658130908dfc5cd580ab00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 07:24:38 -0500 Subject: [PATCH 235/774] Update pacsat.sh add direwolf -dp for packet dump --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 56be5a59..f187e1ca 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -61,7 +61,7 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From 3cce953b8c9c6b3c3ed856218bafb9be86f8c857 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 09:58:56 -0500 Subject: [PATCH 236/774] Update direwolf-pacsatsim-loopback.conf upload better with txdelay 15 --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 64c7bfe5..3fc85671 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 75 +TXDELAY 15 #FIX_BITS 1 AX25 From d8c8cfe3fa5197570cc6f513b21495f25bb0fefe Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:54:09 -0500 Subject: [PATCH 237/774] Update cubicsdr.sh add also stop/start --- groundstation/cubicsdr.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/groundstation/cubicsdr.sh b/groundstation/cubicsdr.sh index f9c3146c..2bfb65dc 100755 --- a/groundstation/cubicsdr.sh +++ b/groundstation/cubicsdr.sh @@ -23,7 +23,7 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -39,9 +39,10 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null -zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & - +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start +zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & sleep 5 From 29acb25334f94f8f09d2fffdcdd03e796acc34af Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:55:42 -0500 Subject: [PATCH 238/774] Update fox.sh add alsa stop/start --- groundstation/fox.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/fox.sh b/groundstation/fox.sh index 233644ef..36e241e0 100755 --- a/groundstation/fox.sh +++ b/groundstation/fox.sh @@ -23,12 +23,15 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + sleep 5 #/home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData-CubeSatSim From e676205c3cab60490bc7b6915d934e3fe69da0f2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:57:51 -0500 Subject: [PATCH 239/774] Update pacsat.sh add alsa stop/start --- groundstation/pacsat.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f187e1ca..056ff0ca 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,7 +24,7 @@ sudo killall -9 rtl_fm &>/dev/null #sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -40,6 +40,9 @@ echo sudo systemctl restart pacsatsim +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + echo "Waiting 10 seconds for Pacsatsim to start" From 15986706d87d9c328063400b56bae3bf7c2c32c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:58:35 -0500 Subject: [PATCH 240/774] Update rtl-tcp.sh add alsa stop/start --- groundstation/rtl-tcp.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index e16c6e9a..d5d541b1 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -45,10 +45,13 @@ sudo killall -9 qsstv &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null From d25bbf7dc08e6cd79ff9a2e6fc8390c519ddf827 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:59:20 -0500 Subject: [PATCH 241/774] Update sdr.sh add alsa stop/start --- groundstation/sdr.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 8dfd5e64..66983556 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -38,7 +38,7 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 qsstv &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 direwolf &>/dev/null @@ -46,6 +46,9 @@ sudo killall -9 zenity &>/dev/null sudo systemctl stop rtl_tcp &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + sudo systemctl restart openwebrx &>/dev/null sleep 10 From 3ef21390e3e16ff629aae7b9b6fba5fc48e22b4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:59:55 -0500 Subject: [PATCH 242/774] Update sdrpp.sh add alsa stop/start --- groundstation/sdrpp.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/sdrpp.sh b/groundstation/sdrpp.sh index 73f520e7..08736032 100755 --- a/groundstation/sdrpp.sh +++ b/groundstation/sdrpp.sh @@ -19,7 +19,7 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -35,6 +35,9 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + sleep 5 setsid sdrpp From aeec194e8d91ab376b86e076d2a2e0244c1a7de8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:14:20 -0500 Subject: [PATCH 243/774] Update loc-add-foxtelem.py added Pacsat location setting --- groundstation/loc-add-foxtelem.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/groundstation/loc-add-foxtelem.py b/groundstation/loc-add-foxtelem.py index 64c47bbd..1f4279cc 100644 --- a/groundstation/loc-add-foxtelem.py +++ b/groundstation/loc-add-foxtelem.py @@ -118,6 +118,16 @@ if (latitude != 0) and (longitude != 0): system(longSedStr) print("\nKLAtracker configuration updated with your latitude and longitude") + + latSedStr = 'sed -i "s/latitude=.*/latitude=' + str(latitude) + '/g" /home/pi/PacSatGround/PacSatGround.properties' + #print (latSedStr) + system(latSedStr) + + longSedStr = 'sed -i "s/longitude=.*/longitude=' + str(longitude) + '/g" /home/pi/PacSatGround/PacSatGround.properties' + #print (longSedStr) + system(longSedStr) + + print("\nPacsat configuration updated with your latitude and longitude") receiver_gpsSedStr = 'sudo sed -i "s/ ' + dquote + 'lat' + dquote + ': .*/ ' + dquote + 'lat' + dquote + ': ' + str(latitude) + ',/g" /var/lib/openwebrx/settings.json' #print (receiver_gpsSedStr) From 00fff29dc664577348bc6386327a547cc8fc6308 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:20:30 -0500 Subject: [PATCH 244/774] Update config change callsign in Pacsat Ground Station --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 3764aa86..a38e55a9 100755 --- a/config +++ b/config @@ -553,6 +553,8 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config > /dev/null 2>&1 + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties' + sudo sed -i "s/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties' fi if [ "$norestart" = "1" ]; then From 2c25bbf453768a9dd7ae6325b8c86ff962098398 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:27:32 -0500 Subject: [PATCH 245/774] Update config remove dev null --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index a38e55a9..4e2e3406 100755 --- a/config +++ b/config @@ -552,7 +552,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config > /dev/null 2>&1 + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties' sudo sed -i "s/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties' fi From 0fb005db3b894c19dcc864cec5c29bd1f3f551ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:36:30 -0500 Subject: [PATCH 246/774] Update config sed typos --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 4e2e3406..936ddad0 100755 --- a/config +++ b/config @@ -553,8 +553,8 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties' - sudo sed -i "s/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties' + sudo sed -i 's/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then From 1a7e2f8fdd5ac68abf60917543c73ad4b73cf4b0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:38:56 -0500 Subject: [PATCH 247/774] Update pacsat.sh add back kill direwolf --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 056ff0ca..0ab6acb9 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -22,7 +22,7 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null -#sudo killall -9 direwolf &>/dev/null +sudo killall -9 direwolf &>/dev/null #sudo killall -9 aplay &>/dev/null From d814dc1788e04a28878f0afdaf789cd8c3afa92f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:52:01 -0500 Subject: [PATCH 248/774] Update config stop pacsatsim and java for callsign change --- config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config b/config index 936ddad0..59e752a8 100755 --- a/config +++ b/config @@ -552,6 +552,9 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + sudo systemctl stop pacsatsim + sudo killall -9 java &>/dev/null + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i 's/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties From 38121edbbb20bec20947a52b397bb51d252301db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:57:03 -0500 Subject: [PATCH 249/774] Update config fix sed --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 59e752a8..1929eee1 100755 --- a/config +++ b/config @@ -555,9 +555,9 @@ elif [ "$1" = "-c" ]; then sudo systemctl stop pacsatsim sudo killall -9 java &>/dev/null - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i 's/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then From b3d34ca70fc2171c4fd7e3ade5f7645b7982fd50 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:00:40 -0500 Subject: [PATCH 250/774] Update pacsat.sh added pacsatsim stop at the end --- groundstation/pacsat.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 0ab6acb9..dcc80fd3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,5 +75,9 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +sudo systemctl stop pacsatsim + +sleep 10 + From e99b9d0bb0998346b03f6a81c6c43ebf869c12b6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:03:49 -0500 Subject: [PATCH 251/774] Update pacsat.sh --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index dcc80fd3..df4d9edf 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -79,5 +79,7 @@ sudo systemctl stop pacsatsim sleep 10 +echo "Stopping Pacsatsim" + From 53dfb22cceb422e4ac2324c926a1acb7071593dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:08:10 -0500 Subject: [PATCH 252/774] Update pacsat.sh added >/dev/null 2>&1 --- groundstation/pacsat.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index df4d9edf..e2f2913c 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,19 +4,19 @@ sudo modprobe snd-aloop -sudo systemctl stop cubesatsim +sudo systemctl stop cubesatsim >/dev/null 2>&1 -sudo systemctl stop transmit +sudo systemctl stop transmit >/dev/null 2>&1 -sudo systemctl stop command +sudo systemctl stop command >/dev/null 2>&1 #/home/pi/CubeSatSim/config -I -sudo systemctl stop command &>/dev/null +sudo systemctl stop command >/dev/null 2>&1 -sudo systemctl stop openwebrx &>/dev/null +sudo systemctl stop openwebrx >/dev/null 2>&1 -sudo systemctl stop rtl_tcp &>/dev/null +sudo systemctl stop rtl_tcp >/dev/null 2>&1 pkill -o chromium &>/dev/null @@ -75,7 +75,7 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -sudo systemctl stop pacsatsim +sudo systemctl stop pacsatsim sleep 10 From c14d2189ebee014d16d7d46595068a23fba16282 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:29:33 -0500 Subject: [PATCH 253/774] Update pacsat.sh add #$SHELL --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e2f2913c..acf59fc2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -81,5 +81,7 @@ sleep 10 echo "Stopping Pacsatsim" +$SHELL + From 8be415e59b946a89a8a73d9de8c04217439811ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:33:28 -0500 Subject: [PATCH 254/774] Update pacsat.sh remove stop pacsatsim at end --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index acf59fc2..e846f248 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,11 +75,13 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -sudo systemctl stop pacsatsim +cd + +#sudo systemctl stop pacsatsim sleep 10 -echo "Stopping Pacsatsim" +#echo "Stopping Pacsatsim" $SHELL From 978eb8b4ebfa05c1208978410c359cdf537fcd15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:40:04 -0500 Subject: [PATCH 255/774] Update pacsat.sh launch direwolf in separate window --- groundstation/pacsat.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e846f248..acc304cd 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,10 +64,11 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" echo -echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." +echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" echo From cfa1f66324bea05bf6e5707942b7e94da72bd687 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:41:17 -0500 Subject: [PATCH 256/774] Update pacsat.sh remove SHELL at end --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index acc304cd..b8deafc7 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -84,7 +84,7 @@ sleep 10 #echo "Stopping Pacsatsim" -$SHELL +#$SHELL From ff3230b0c311740fffef86fc5dfac60dd3518451 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:46:24 -0500 Subject: [PATCH 257/774] Update pacsat.sh back to SHELL --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b8deafc7..2c4e8aa5 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,8 +64,8 @@ sleep 10 #echo -#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" @@ -84,7 +84,7 @@ sleep 10 #echo "Stopping Pacsatsim" -#$SHELL +$SHELL From 87d2ec4b9cb6f53110bcc3367551a192fd7b802e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:47:45 -0500 Subject: [PATCH 258/774] Update pacsat.sh remove & --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 2c4e8aa5..c7a09c84 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,7 +64,7 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" echo From c04e9e7263d2806aee4f2b949f7d2b97b283bed6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:49:23 -0500 Subject: [PATCH 259/774] Update pacsat.sh change order of pacsat and direwolf --- groundstation/pacsat.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index c7a09c84..644306fa 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,18 +64,24 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" echo - cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" + + + + +#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" + cd #sudo systemctl stop pacsatsim From 1b20bff48a6bca6475a80348f43fc1a8d6b6e3ff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:50:25 -0500 Subject: [PATCH 260/774] Update pacsat.sh add kill sdrpp --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 644306fa..d601d114 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,6 +24,8 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null +sudo killall -9 sdrpp &>/dev/null + #sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null From 75e12ce363a14807ecdf1c5aec5436825d8a7f0f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:54:39 -0500 Subject: [PATCH 261/774] Update pacsat.sh back to separate wndow --- groundstation/pacsat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d601d114..895b3a46 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -74,11 +74,11 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - +#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ @@ -92,7 +92,7 @@ sleep 10 #echo "Stopping Pacsatsim" -$SHELL +#$SHELL From 26774c7db3280d05f8a256afaa1058c5da8f4c2a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:57:39 -0500 Subject: [PATCH 262/774] Update sdrpp.sh add & --- groundstation/sdrpp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sdrpp.sh b/groundstation/sdrpp.sh index 08736032..2dd97fd1 100755 --- a/groundstation/sdrpp.sh +++ b/groundstation/sdrpp.sh @@ -40,7 +40,7 @@ sudo /etc/init.d/alsa-utils start sleep 5 -setsid sdrpp +setsid sdrpp & sleep 10 From e41fd1e58c6aaa5e2fb1408f0f60ced9acfcf4c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 09:00:55 -0500 Subject: [PATCH 263/774] Update sstv_decode_prompt.sh add & --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index fbc55895..7ae8cd9b 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -135,7 +135,7 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & #rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 46a20c7840f61ae8e2e6d11756ad88c9c3a64d1d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 09:04:17 -0500 Subject: [PATCH 264/774] Update sstv_decode_prompt.sh remove & --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 7ae8cd9b..fbc55895 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -135,7 +135,7 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From d49477f0ec72d644733c819001da16d4e5e868ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 09:10:38 -0500 Subject: [PATCH 265/774] Update pacsat.desktop make window large --- groundstation/pacsat.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop index 539c0e1d..d1be6bbf 100644 --- a/groundstation/pacsat.desktop +++ b/groundstation/pacsat.desktop @@ -2,7 +2,7 @@ Name=Pacsat GenericName=Pacsat Loopback Comment=Pacsat -Exec=/home/pi/CubeSatSim/groundstation/pacsat.sh +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/packet.sh" Icon=/home/pi/Icons/pacsat.png Terminal=true Type=Application From e24b1a46c6a3024ba69689fee875dbe4e0246cb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jan 2025 21:58:58 -0500 Subject: [PATCH 266/774] Update pacsat.desktop --- groundstation/pacsat.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop index d1be6bbf..7fef68f8 100644 --- a/groundstation/pacsat.desktop +++ b/groundstation/pacsat.desktop @@ -2,7 +2,7 @@ Name=Pacsat GenericName=Pacsat Loopback Comment=Pacsat -Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/packet.sh" +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat.sh" Icon=/home/pi/Icons/pacsat.png Terminal=true Type=Application From 95dd40dbead88f4186810f5c5d58350d48c778df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jan 2025 22:21:15 -0500 Subject: [PATCH 267/774] Update aprs.desktop --- groundstation/aprs.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/aprs.desktop b/groundstation/aprs.desktop index 5f360f7b..a7d0062a 100644 --- a/groundstation/aprs.desktop +++ b/groundstation/aprs.desktop @@ -2,7 +2,7 @@ Name=APRS Decode using Direwolf GenericName=Decodes APRS using rtl_fm and Direwolf Comment=APRS signals -Exec=/home/pi/CubeSatSim/groundstation/packet.sh +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/packet.sh" Icon=/home/pi/Icons/aprs.png Terminal=true Type=Application From 1eadb145b9e47ef09a2b3b9694e309355d02ef09 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jan 2025 22:23:21 -0500 Subject: [PATCH 268/774] Update direwolf.conf --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index 701d80b4..3b372144 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 From b7b91a97dab9f970ea196ba09b30884bde1a97ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 16:28:53 -0500 Subject: [PATCH 269/774] Update webSDR.desktop typo --- groundstation/webSDR.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/webSDR.desktop b/groundstation/webSDR.desktop index f660c2ea..387dfd95 100644 --- a/groundstation/webSDR.desktop +++ b/groundstation/webSDR.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/sdr.sh Name=Web SDR Comment=openwebrx for Web SDR -Icon=/home/pi/Iconss/openwebrx.png +Icon=/home/pi/Icons/openwebrx.png Path=/home/pi Terminal=true Categories=HamRadio From 948252c22e01e6403fb4f8e5c0989de0c5f340c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 16:36:03 -0500 Subject: [PATCH 270/774] Update foxtelem.desktop --- groundstation/foxtelem.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/foxtelem.desktop b/groundstation/foxtelem.desktop index 87fe00a1..c01913be 100644 --- a/groundstation/foxtelem.desktop +++ b/groundstation/foxtelem.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-run.sh Name=FoxTelem Comment=FIAB-v4 -Icon=/home/pi/Downloads/foxtelem.png +Icon=/home/pi/Icons/foxtelem.png Path=/home/pi Terminal=true Categories=HamRadio From 04107c25616cdc5a33cca3fe74c289411689be70 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 19:50:21 -0500 Subject: [PATCH 271/774] Update pacsat.sh remove sudo --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 895b3a46..5a7c54e7 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -72,7 +72,7 @@ echo cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" From f311960426af201be083b402de4308401061ac3a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 22:27:31 -0500 Subject: [PATCH 272/774] Update pacsat.sh add & to pacsat --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5a7c54e7..0b27f7c0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -72,7 +72,7 @@ echo cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" From 0ca435040e8be342cd9151b25595cb9e5a3bc920 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 22:31:29 -0500 Subject: [PATCH 273/774] Update PacSatSim.properties changed to AMSAT callsign --- spacecraft/PacSatGround_0.46m/PacSatSim.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.properties b/spacecraft/PacSatGround_0.46m/PacSatSim.properties index d18ebe5c..e4ccad24 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.properties +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.properties @@ -2,11 +2,11 @@ #Sun Feb 17 18:25:06 EST 2019 sequence_num=3 name=PacSatSim -digiCallsign=W3ZM-1 +digiCallsign=AMSAT-1 description=PacSatSim -broadcastCallsign=W3ZM-11 +broadcastCallsign=AMSAT-11 DIR_AGE=10 -bbsCallsign=W3ZM-12 +bbsCallsign=AMSAT-12 telemLayoutFile=PacSatSim.dat telem_server=tlm.amsatfox.org web_site_url=http://CubeSatSim.org From b010b4389390d2031634c17c977f0a59c0aaed35 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 12 Jan 2025 09:05:38 -0500 Subject: [PATCH 274/774] Update CubeSatSim_rttelemetry.csv --- .../FoxTelem_1.13e/CubeSatSim_rttelemetry.csv | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv b/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv index e69de29b..9dc17ff6 100644 --- a/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv +++ b/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv @@ -0,0 +1,48 @@ +47,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,RT,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,RT,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,RT,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +3,RT,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,RT,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,RT,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,RT,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current +7,RT,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,STEM Payload Sensor BME280 Temperature +8,RT,PANEL_PLUS_X_V,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,INA219 +X Panel Voltage +9,RT,PANEL_MINUS_X_V,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,INA219 -X Panel Voltage +10,RT,PANEL_PLUS_Y_V,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,INA219 +Y Panel Voltage +11,RT,PANEL_MINUS_Y_V,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,INA219 -Y Panel Voltage +12,RT,PANEL_PLUS_Z_V,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,INA219 +Z Panel Voltage +13,RT,PANEL_MINUS_Z_V,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,INA219 -Z Panel Voltage +14,RT,PANEL_PLUS_X_I,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X Panel Current +15,RT,PANEL_MINUS_X_I,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X Panel Current +16,RT,PANEL_PLUS_Y_I,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y Panel Current +17,RT,PANEL_MINUS_Y_I,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y Panel Current +18,RT,PANEL_PLUS_Z_I,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z Panel Current +19,RT,PANEL_MINUS_Z_I,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z Panel Current +20,RT,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +21,RT,SPIN,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,RT,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,STEM Payload Sensor BME280 Pressure +23,RT,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,STEM Payload Sensor BME280 Altitude +24,RT,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,RT,RSSI,12,dBm,cubesatsim_rssi|INT,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,RT,IHUTemperature,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal Temperature of Pi IHU +27,RT,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular Veolcity around X Axis +28,RT,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular Veolcity around Y Axis +29,RT,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular Veolcity around Z Axis +30,RT,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,STEM Payload Sensor BME280 Humidity +31,RT,BATT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,RT,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,RT,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,RT,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status,STEM Payload Board Status +35,RT,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,RT,SimulatedTelemetry,1,-,STATUS_ON_OFF,Computer Software,3,4,0,Simulated Telemetry, Simulated Telemetry Indicator +37,RT,PayloadStatus1,1,-,17,NONE,0,0,0,Exp 3,STEM Payload status 1 failure indicator +38,RT,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,RT,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,RT,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,RT,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator +42,RT,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,RT,RXAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +44,RT,TXAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +45,RT,C2CStatus,2,-,COMMAND_STATUS,Computer Software,3,5,0,Command Control, Command & Control Status +46,RT,Pad,56,-,0,NONE,0,0,0,NONE,NONE From 5feee9a4c233ae1fc9c3dfdbba618c64758b1120 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 18 Jan 2025 10:04:09 -0500 Subject: [PATCH 275/774] Update packet.sh --- groundstation/packet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index f669afda..24c04f0b 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -191,7 +191,7 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From dcc6eb488aabf127eab50bf00b1f5927f0a03143 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Feb 2025 03:39:18 -0500 Subject: [PATCH 276/774] Update direwolf-pacsatsim-loopback.conf add -12 to callsign --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 3fc85671..581d30cb 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,6 +1,6 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 -MYCALL AMSAT +MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 FULLDUP OFF From b42985527a1a4ce84998c1a2488c5df591e4b0d2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 08:40:32 -0500 Subject: [PATCH 277/774] Update pacsat.sh don't restart pacsatsim --- groundstation/pacsat.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 0b27f7c0..aed65770 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -40,15 +40,15 @@ sudo killall -9 zenity &>/dev/null echo -sudo systemctl restart pacsatsim +#sudo systemctl restart pacsatsim -sudo /etc/init.d/alsa-utils stop -sudo /etc/init.d/alsa-utils start +#sudo /etc/init.d/alsa-utils stop +#sudo /etc/init.d/alsa-utils start -echo "Waiting 10 seconds for Pacsatsim to start" +#echo "Waiting 10 seconds for Pacsatsim to start" -sleep 10 +#sleep 10 #value=`cat /home/pi/CubeSatSim/sim.cfg` #echo "$value" > /dev/null From 586e22b1baac5a32855561b8d50705ec453efbec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 08:55:15 -0500 Subject: [PATCH 278/774] Update pacsat.sh don't kill direwolf --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index aed65770..59551eb3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -22,7 +22,7 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null -sudo killall -9 direwolf &>/dev/null +#sudo killall -9 direwolf &>/dev/null sudo killall -9 sdrpp &>/dev/null From c45674512e4088eeb4c92a58eb6d338c01e419a9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:07:06 -0500 Subject: [PATCH 279/774] separate direwolf windows --- groundstation/pacsat-d.sh | 98 ++++++++++++++++++ pacsatsim-d.sh | 204 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 302 insertions(+) create mode 100755 groundstation/pacsat-d.sh create mode 100755 pacsatsim-d.sh diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh new file mode 100755 index 00000000..59551eb3 --- /dev/null +++ b/groundstation/pacsat-d.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +sudo modprobe snd-aloop + +sudo systemctl stop cubesatsim >/dev/null 2>&1 + +sudo systemctl stop transmit >/dev/null 2>&1 + +sudo systemctl stop command >/dev/null 2>&1 + +#/home/pi/CubeSatSim/config -I + +sudo systemctl stop command >/dev/null 2>&1 + +sudo systemctl stop openwebrx >/dev/null 2>&1 + +sudo systemctl stop rtl_tcp >/dev/null 2>&1 + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 direwolf &>/dev/null + +sudo killall -9 sdrpp &>/dev/null + +#sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 java &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +sudo killall -9 zenity &>/dev/null + +echo + +#sudo systemctl restart pacsatsim + +#sudo /etc/init.d/alsa-utils stop +#sudo /etc/init.d/alsa-utils start + + +#echo "Waiting 10 seconds for Pacsatsim to start" + +#sleep 10 + +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value + +#echo "Receive frequency is $8 MHz" +#echo "Transmit frequency is $7 MHz" +#echo +#echo "To change, quit and type CubeSatSim/config -F" +#echo + +#frequency="$8e6" + +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +#echo + +echo +echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" +echo + +cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & + +#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" + + +echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." + +#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" + +cd + +#sudo systemctl stop pacsatsim + +sleep 10 + +#echo "Stopping Pacsatsim" + +#$SHELL + + + diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh new file mode 100755 index 00000000..5f2e717e --- /dev/null +++ b/pacsatsim-d.sh @@ -0,0 +1,204 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + +#sudo systemctl stop cubesatsim + +#sudo systemctl stop transmit + +sudo systemctl stop command &>/dev/null + +sudo modprobe snd-aloop + +#sudo systemctl stop openwebrx + +#sudo systemctl stop rtl_tcp &>/dev/null + +#pkill -o chromium &>/dev/null + +#sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 direwolf &>/dev/null + +#udo killall -9 aplay &>/dev/null + +#sudo killall -9 qsstv &>/dev/null + +#sudo killall -9 rtl_tcp &>/dev/null + +#sudo killall -9 java &>/dev/null + +#sudo killall -9 CubicSDR &>/dev/null + +#sudo killall -9 zenity &>/dev/null + +echo + +#frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +#if [ -z "$frequency" ]; then + +#echo "No choice made. Exiting." + +#sleep 3 + +#exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +choice=2 + +#fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your Pacsat Ground Station is transmitting packets, you will see them here" + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +#echo + +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + + echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +cd /home/pi/pi_pacsat/Debug + +./pi_pacsat -c pacsat.config -d /home/pi/PacSat + +sleep 5 From cb6d5ea73a7e4db93bebdd95a3236d6267e1f0c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:08:52 -0500 Subject: [PATCH 280/774] Update pacsat-d.sh just run direwolf --- groundstation/pacsat-d.sh | 92 --------------------------------------- 1 file changed, 92 deletions(-) diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh index 59551eb3..8c58dd73 100755 --- a/groundstation/pacsat-d.sh +++ b/groundstation/pacsat-d.sh @@ -1,98 +1,6 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat - -sudo modprobe snd-aloop - -sudo systemctl stop cubesatsim >/dev/null 2>&1 - -sudo systemctl stop transmit >/dev/null 2>&1 - -sudo systemctl stop command >/dev/null 2>&1 - -#/home/pi/CubeSatSim/config -I - -sudo systemctl stop command >/dev/null 2>&1 - -sudo systemctl stop openwebrx >/dev/null 2>&1 - -sudo systemctl stop rtl_tcp >/dev/null 2>&1 - -pkill -o chromium &>/dev/null - -sudo killall -9 rtl_fm &>/dev/null - -#sudo killall -9 direwolf &>/dev/null - -sudo killall -9 sdrpp &>/dev/null - -#sudo killall -9 aplay &>/dev/null - -sudo killall -9 qsstv &>/dev/null - -sudo killall -9 rtl_tcp &>/dev/null - -sudo killall -9 java &>/dev/null - -sudo killall -9 CubicSDR &>/dev/null - -sudo killall -9 zenity &>/dev/null - -echo - -#sudo systemctl restart pacsatsim - -#sudo /etc/init.d/alsa-utils stop -#sudo /etc/init.d/alsa-utils start - - -#echo "Waiting 10 seconds for Pacsatsim to start" - -#sleep 10 - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -#echo "Receive frequency is $8 MHz" -#echo "Transmit frequency is $7 MHz" -#echo -#echo "To change, quit and type CubeSatSim/config -F" -#echo - -#frequency="$8e6" - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -#echo - -echo -echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" -echo - -cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & - -#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" -echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." - -#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" - -cd - -#sudo systemctl stop pacsatsim - -sleep 10 - -#echo "Stopping Pacsatsim" - -#$SHELL - - From cef6daf1d7a8baf9490f7233fa59b0e62efe4706 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:10:13 -0500 Subject: [PATCH 281/774] Update pacsatsim-d.sh just run direwolf --- pacsatsim-d.sh | 201 +------------------------------------------------ 1 file changed, 1 insertion(+), 200 deletions(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index 5f2e717e..7480af0c 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -1,204 +1,5 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat - -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - -#sudo systemctl stop cubesatsim - -#sudo systemctl stop transmit - -sudo systemctl stop command &>/dev/null - sudo modprobe snd-aloop -#sudo systemctl stop openwebrx - -#sudo systemctl stop rtl_tcp &>/dev/null - -#pkill -o chromium &>/dev/null - -#sudo killall -9 rtl_fm &>/dev/null - -#sudo killall -9 direwolf &>/dev/null - -#udo killall -9 aplay &>/dev/null - -#sudo killall -9 qsstv &>/dev/null - -#sudo killall -9 rtl_tcp &>/dev/null - -#sudo killall -9 java &>/dev/null - -#sudo killall -9 CubicSDR &>/dev/null - -#sudo killall -9 zenity &>/dev/null - -echo - -#frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") - -#echo $frequency - -#if [ -z "$frequency" ]; then - -#echo "No choice made. Exiting." - -#sleep 3 - -#exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -choice=2 - -#fi - -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 - echo - echo "If your Pacsat Ground Station is transmitting packets, you will see them here" - echo - -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi - -#echo - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -echo - -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & - -else - - echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - -fi - -sleep 5 - -value=`aplay -l | grep "Loopback"` -echo "$value" > /dev/null -set -- $value - -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - -cd /home/pi/pi_pacsat/Debug - -./pi_pacsat -c pacsat.config -d /home/pi/PacSat - -sleep 5 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 From 7c2cfc9b8ba9568897601decc36d60addbaf69f5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:13:24 -0500 Subject: [PATCH 282/774] Update pacsat.sh don't start direwolf --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 59551eb3..57f98fd9 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,10 +75,10 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" -echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." +#echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ From 034ffeec911cb0338155e873a06474bb237775e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:14:23 -0500 Subject: [PATCH 283/774] Update pacsatsim.sh don't start direwolf --- pacsatsim.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5f2e717e..a1998cb0 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -183,10 +183,10 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] else - echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & +# echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + echo fi sleep 5 From 25da37ea525dd04f834d0ef27a6fd53b81501615 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:19:15 -0500 Subject: [PATCH 284/774] Update direwolf-pacsatsim-loopback.conf change full duplex on --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 581d30cb..d1bcf78d 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -3,6 +3,6 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP OFF +FULLDUP ON TXDELAY 15 #FIX_BITS 1 AX25 From 76d8323dc0638eb6c94aa81e63ad75cfff389bf8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 12:31:32 -0500 Subject: [PATCH 285/774] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ec10273..bdac8141 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ There are several hardware versions and software branches to go with them - see See the Wiki Software Install page for more details: https://github.com/alanbjohnston/CubeSatSim/wiki/2.-Software-Install. The software runs on any Raspberry Pi including the Raspberry Pi 4B, 3B, 3B+, Pi Zero, Pi Zero W, or Pi Zero 2 W. -There are two ways to get the CubeSatSim software for your Pi. +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. From 259419573f949dc3eb5b6e1e18fbcc4d39a46637 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:04:23 -0500 Subject: [PATCH 286/774] test script to launch 4 windows --- pacsat-test.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 pacsat-test.sh diff --git a/pacsat-test.sh b/pacsat-test.sh new file mode 100755 index 00000000..8c58dd73 --- /dev/null +++ b/pacsat-test.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" + + + From 509fa014c50c1462b58ff5ac46b27bbd3c5b229a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:07:43 -0500 Subject: [PATCH 287/774] Update pacsat-test.sh add 4 windows --- pacsat-test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pacsat-test.sh b/pacsat-test.sh index 8c58dd73..1943056f 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -1,6 +1,17 @@ #!/bin/bash +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" + +sleep 1 + +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim.sh" + +sleep 1 + /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +sleep 1 + +/usr/bin/x-terminal-emulator --geometry=120x40 -e /home/pi/CubeSatSim/groundstation/pacsat.sh" From ff7846985878b5c556599033e45a2c541b916d48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:09:15 -0500 Subject: [PATCH 288/774] Update pacsat-test.sh add bash --- pacsat-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsat-test.sh b/pacsat-test.sh index 1943056f..0957c4a0 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -1,10 +1,10 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim-d.sh" sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim.sh" sleep 1 @@ -12,6 +12,6 @@ sleep 1 sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e /home/pi/CubeSatSim/groundstation/pacsat.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/groundstation/pacsat.sh" From 95eb85e88df4d54ef3c96e88770a2a5cb9ca6690 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:11:40 -0500 Subject: [PATCH 289/774] Update pacsat.sh removed & --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 57f98fd9..4daff914 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -72,7 +72,7 @@ echo cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" From 1d6d13814958b9525809e13e79f41ac2d1e05ee2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 15:44:41 -0500 Subject: [PATCH 290/774] Update direwolf-pacsatsim-jp14.conf making the same as loopback but with Device --- direwolf/direwolf-pacsatsim-jp14.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 64c7bfe5..36891485 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,8 +1,8 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 #PTT GPIO 20 -MYCALL AMSAT +MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP OFF -TXDELAY 75 +FULLDUP ON +TXDELAY 15 #FIX_BITS 1 AX25 From e735f7487fe9c2a78907248fb15a146062f04cc9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 15:47:00 -0500 Subject: [PATCH 291/774] Update direwolf-fm-pacsat-jp14.conf making same as loopback but with Device --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 6e4fc073..df741a62 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,10 +1,10 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 #PTT GPIO 20 CHANNEL 0 MODEM 1200 KISSPORT 8100 +AGWPORT 8002 FULLDUP OFF TXDELAY 30 #FIX_BITS 1 AX25 -KISSPORT 8001 From b0ed82ded4b2b5e5033cd3d6018d206303680f89 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:05:12 -0500 Subject: [PATCH 292/774] adding direwolf jp14 script --- groundstation/pacsat-dj.sh | 6 ++++++ pacsatsim-dj.sh | 5 +++++ 2 files changed, 11 insertions(+) create mode 100755 groundstation/pacsat-dj.sh create mode 100755 pacsatsim-dj.sh diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh new file mode 100755 index 00000000..b4fec439 --- /dev/null +++ b/groundstation/pacsat-dj.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-jp14.conf -t 0" + + + diff --git a/pacsatsim-dj.sh b/pacsatsim-dj.sh new file mode 100755 index 00000000..3999eb8d --- /dev/null +++ b/pacsatsim-dj.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 From 4ae4f08851a65768696c923ab63ec412c2980f2c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:19:30 -0500 Subject: [PATCH 293/774] Update pacsat-dj.sh add fm --- groundstation/pacsat-dj.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh index b4fec439..c7b4ea04 100755 --- a/groundstation/pacsat-dj.sh +++ b/groundstation/pacsat-dj.sh @@ -1,6 +1,6 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-jp14.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-jp14.conf -t 0" From 105d1312ddf6b08dee0241b041ce90d20ec14480 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:19:54 -0500 Subject: [PATCH 294/774] Update pacsat-test.sh add fm --- pacsat-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsat-test.sh b/pacsat-test.sh index 0957c4a0..71d0b036 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -8,7 +8,7 @@ sleep 1 sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-loopback.conf -t 0" sleep 1 From 06fd0e6955643a95fe7e2cc7b9a7f5ee955e173d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:21:21 -0500 Subject: [PATCH 295/774] Update pacsat-test.sh add fm --- pacsat-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsat-test.sh b/pacsat-test.sh index 71d0b036..dd43979c 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -8,7 +8,7 @@ sleep 1 sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-loopback.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-loopback.conf -t 0" sleep 1 From c0ebd632c6558952b6a959ce24d0b503ba83a902 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:21:59 -0500 Subject: [PATCH 296/774] Update pacsat-dj.sh add fm --- groundstation/pacsat-dj.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh index c7b4ea04..7a49576e 100755 --- a/groundstation/pacsat-dj.sh +++ b/groundstation/pacsat-dj.sh @@ -1,6 +1,6 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-jp14.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0" From 1e9fb2e6d612ac571de97a3cd1c405528265dd22 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 10:50:43 -0400 Subject: [PATCH 297/774] update to use USB device --- .../direwolf/direwolf-fm-pacsat-jp14-device.conf | 10 ++++++++++ pacsatsim-djf.sh | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf create mode 100755 pacsatsim-djf.sh diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf new file mode 100644 index 00000000..df741a62 --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf @@ -0,0 +1,10 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh new file mode 100755 index 00000000..1d0c3036 --- /dev/null +++ b/pacsatsim-djf.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 From 065e8be4d8bab44a808d092075f654382872bbf7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 10:59:49 -0400 Subject: [PATCH 298/774] from pacsatsim half duplex --- direwolf/direwolf-pacsatsim-jp14-half.conf | 9 +++++++++ .../direwolf/direwolf-fm-pacsat-jp14-ptt.conf | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim-jp14-half.conf create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-half.conf b/direwolf/direwolf-pacsatsim-jp14-half.conf new file mode 100644 index 00000000..d6a05876 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-jp14-half.conf @@ -0,0 +1,9 @@ +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#PTT GPIO 20 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +#FULLDUP ON +FULLDUP OFF +TXDELAY 15 +#FIX_BITS 1 AX25 diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf new file mode 100644 index 00000000..279b7e0e --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf @@ -0,0 +1,10 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 From 227c88a893cd7635070f06e6dc9a678d8142c508 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 11:10:36 -0400 Subject: [PATCH 299/774] Update pacsatsim-djf.sh change to half duplex --- pacsatsim-djf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh index 1d0c3036..fdd358bb 100755 --- a/pacsatsim-djf.sh +++ b/pacsatsim-djf.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-half.conf -t 0 From b3df13961419b2be641a841d5b55a138ae91ae69 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 11:12:08 -0400 Subject: [PATCH 300/774] Update pacsatsim-djf.sh revert --- pacsatsim-djf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh index fdd358bb..1d0c3036 100755 --- a/pacsatsim-djf.sh +++ b/pacsatsim-djf.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-half.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 From dd3346792d9758436856e37472190002d13e3e8c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 11:12:39 -0400 Subject: [PATCH 301/774] Update pacsatsim-dj.sh changed pacsatsim to half duplex --- pacsatsim-dj.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-dj.sh b/pacsatsim-dj.sh index 3999eb8d..888124e6 100755 --- a/pacsatsim-dj.sh +++ b/pacsatsim-dj.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 From 4210c9ad4ab9de6a35fd4065b09f3d474518a387 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:37:15 -0400 Subject: [PATCH 302/774] Create direwolf-pacsatsim-jp14-loop.conf --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim-jp14-loop.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf new file mode 100644 index 00000000..6b1b9b34 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-jp14-loop.conf @@ -0,0 +1,8 @@ +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 +#PTT GPIO 20 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +FULLDUP ON +TXDELAY 15 +#FIX_BITS 1 AX25 From 0089231f42c352e272b27298ea8bb46076234ef4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:40:06 -0400 Subject: [PATCH 303/774] Update pacsatsim-d.sh fm and loopback --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index 7480af0c..33ea4ad5 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loopback.conf -t 0 From 03fe5a278fe2e1fcf749dffe4d1a105f62b46050 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:42:15 -0400 Subject: [PATCH 304/774] Update pacsatsim-d.sh change to loop --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index 33ea4ad5..bc3bd322 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loopback.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loop.conf -t 0 From c52a6f3e0ca968513aabd1efcca3de4ba0fdeb44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:44:03 -0400 Subject: [PATCH 305/774] Update pacsatsim-d.sh fix filename --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index bc3bd322..f7c3e84e 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loop.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-loop.conf -t 0 From 4fcb86904f2d19e881b677b3c0f7d8cf465dd0cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:56:46 -0400 Subject: [PATCH 306/774] Create direwolf-fm-pacsat-jp14-loop.conf --- .../direwolf/direwolf-fm-pacsat-jp14-loop.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf new file mode 100644 index 00000000..cac3fffe --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf @@ -0,0 +1,10 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 +#PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 From 1265d27020cc437a4f7669cd4a6c16174ddd0eb7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:59:17 -0400 Subject: [PATCH 307/774] Update pacsat-d.sh update with j14-loop --- groundstation/pacsat-d.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh index 8c58dd73..e1569ce7 100755 --- a/groundstation/pacsat-d.sh +++ b/groundstation/pacsat-d.sh @@ -1,6 +1,6 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - +sudo modprobe snd-aloop +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf -t 0 From 489e2eab1ec9eba8461de369034c443b6219f1a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Nov 2025 22:53:28 -0400 Subject: [PATCH 308/774] Update pacsat.sh added rpitx transmit and direwolf --- groundstation/pacsat.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 4daff914..38799d49 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -67,18 +67,26 @@ echo #echo echo -echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" +echo "The Pacsat Ground Station are running on this Pi using FM receiver and rpitx transmitter" echo -cd /home/pi/Desktop/PacSatGround_0.46m_linux/ +#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & +#setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-d.sh" + +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 435045 & + +echo "Don't close the direwolf window or the Pacsatsim will stop running." + +cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & -#echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ From 53a05e66e9fcaf15477c304c6a1ac87204501193 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Nov 2025 23:01:01 -0400 Subject: [PATCH 309/774] Update pacsatsim.sh add pacsatsim-d.sh and rpitx --- pacsatsim.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index a1998cb0..d0bf0fc8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -186,6 +186,13 @@ else # echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" + + 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 & + + echo "Don't close the direwolf window or the Pacsatsim will stop running." + echo fi From 94041dac3e149b4cd59e5163d81582ee9d107931 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Nov 2025 08:46:23 -0500 Subject: [PATCH 310/774] fix pacsatsim direwolf configs --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 2 +- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf index 6b1b9b34..b2a5fb9e 100644 --- a/direwolf/direwolf-pacsatsim-jp14-loop.conf +++ b/direwolf/direwolf-pacsatsim-jp14-loop.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO 20 +PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 36891485..da583428 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 +PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index d1bcf78d..e96bd980 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 -#PTT GPIO 20 +PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From dc697a83068547f0c02fe6b81b39787ca93e923a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Nov 2025 08:47:54 -0500 Subject: [PATCH 311/774] add fm scripts --- pacsatsim-df.sh | 5 ++ pacsatsim-f.sh | 211 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100755 pacsatsim-df.sh create mode 100755 pacsatsim-f.sh diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh new file mode 100755 index 00000000..3999eb8d --- /dev/null +++ b/pacsatsim-df.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 diff --git a/pacsatsim-f.sh b/pacsatsim-f.sh new file mode 100755 index 00000000..2a8bb965 --- /dev/null +++ b/pacsatsim-f.sh @@ -0,0 +1,211 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + +#sudo systemctl stop cubesatsim + +#sudo systemctl stop transmit + +sudo systemctl stop command &>/dev/null + +sudo modprobe snd-aloop + +#sudo systemctl stop openwebrx + +#sudo systemctl stop rtl_tcp &>/dev/null + +#pkill -o chromium &>/dev/null + +#sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 direwolf &>/dev/null + +#udo killall -9 aplay &>/dev/null + +#sudo killall -9 qsstv &>/dev/null + +#sudo killall -9 rtl_tcp &>/dev/null + +#sudo killall -9 java &>/dev/null + +#sudo killall -9 CubicSDR &>/dev/null + +#sudo killall -9 zenity &>/dev/null + +echo + +#frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +#if [ -z "$frequency" ]; then + +#echo "No choice made. Exiting." + +#sleep 3 + +#exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +choice=2 + +#fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your Pacsat Ground Station is transmitting packets, you will see them here" + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +#echo + +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + +# echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + +### 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 & + + echo "Don't close the direwolf window or the Pacsatsim will stop running." + + echo +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +cd /home/pi/pi_pacsat/Debug + +./pi_pacsat -c pacsat.config -d /home/pi/PacSat + +sleep 5 From 3f2c43fb3e89eb646964bd24786a74ab2be37b32 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Nov 2025 13:18:23 -0500 Subject: [PATCH 312/774] Update transmit.py fixed pacsatsim and pacsat modes --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 7d47f19a..c9e1450d 100644 --- a/transmit.py +++ b/transmit.py @@ -426,10 +426,10 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') - system('sudo systemctl restart pacsatsim') +# system('sudo systemctl restart pacsatsim') while True: sleep(30) - elif (mode == 'p'): + elif (mode == 'P'): print("Pacsat Ground Station") while True: sleep(30) From 6129d0c237af02d98b3cd48076904b4de7b30373 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 14:57:03 -0500 Subject: [PATCH 313/774] gs edits to make working --- .../direwolf/direwolf-fm-pacsat-jp14.conf | 17 +++++++++++++---- groundstation/pacsat-df.sh | 10 ++++++++++ groundstation/pacsat.sh | 9 +++++---- 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100755 groundstation/pacsat-df.sh diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index df741a62..1b9d9a15 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,10 +1,19 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO -20 CHANNEL 0 MODEM 1200 KISSPORT 8100 AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 +#FULLDUP OFF +#TXDELAY 30 #FIX_BITS 1 AX25 + +#DWAIT 0 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 150 +#TXTAIL 10 +FULLDUP OFF diff --git a/groundstation/pacsat-df.sh b/groundstation/pacsat-df.sh new file mode 100755 index 00000000..2c0af411 --- /dev/null +++ b/groundstation/pacsat-df.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +#gpio -g mode 20 out + +#gpio -g write 20 1 + +direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 + diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 38799d49..4e65f2d5 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,9 @@ sudo modprobe snd-aloop -sudo systemctl stop cubesatsim >/dev/null 2>&1 +#sudo systemctl stop cubesatsim >/dev/null 2>&1 -sudo systemctl stop transmit >/dev/null 2>&1 +#sudo systemctl stop transmit >/dev/null 2>&1 sudo systemctl stop command >/dev/null 2>&1 @@ -77,9 +77,10 @@ echo #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-d.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" -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 435045 & +# 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 435045 & +##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 435045 & echo "Don't close the direwolf window or the Pacsatsim will stop running." From c43ca730b058f22009a3efb6c10754b936bc5864 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 15:01:00 -0500 Subject: [PATCH 314/774] changes to pi_pacsat to work over fm --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 11 +++++++++-- direwolf/direwolf-pacsatsim-jp14.conf | 17 ++++++++++++++--- pacsatsim.sh | 5 +++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf index b2a5fb9e..bd04ddbc 100644 --- a/direwolf/direwolf-pacsatsim-jp14-loop.conf +++ b/direwolf/direwolf-pacsatsim-jp14-loop.conf @@ -1,8 +1,15 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -PTT GPIO -20 +#PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP ON +#FULLDUP ON TXDELAY 15 #FIX_BITS 1 AX25 +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +TXTAIL 10 +FULLDUP OFF diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index da583428..8b42f6c7 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,8 +1,19 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:2,0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP ON -TXDELAY 15 +##FULLDUP ON +##TXDELAY 15 #FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 100 +#TXTAIL 10 +TXTAIL 1 +FULLDUP OFF diff --git a/pacsatsim.sh b/pacsatsim.sh index d0bf0fc8..5a044360 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -187,9 +187,10 @@ else # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" - 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 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 & echo "Don't close the direwolf window or the Pacsatsim will stop running." From 303ed89d4a69ad1c75f7779341c9071cc2aa59fb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 16:30:00 -0500 Subject: [PATCH 315/774] Update update change iors to alanbjohnston --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index f15dcf4c..e2220d82 100755 --- a/update +++ b/update @@ -307,7 +307,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/ac2cz/iors_common.git + git clone https://github.com/alanbjohnston/iors_common.git cd iors_common/Debug/ From 6e4e41478d32e4f504dc9ad62ea65ac834719466 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 16:40:51 -0500 Subject: [PATCH 316/774] Update install change ions and add peripheral --- install | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install b/install index 216dd74f..b2169009 100755 --- a/install +++ b/install @@ -126,7 +126,7 @@ cd rpitx cd -git clone https://github.com/ac2cz/iors_common.git +git clone https://github.com/alanbjohnston/iors_common.git cd iors_common/Debug/ @@ -250,10 +250,17 @@ sudo raspi-config nonint do_legacy 0 fi if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then - echo "dtoverlay=dwc2 aalready in /boot/config.txt" + + if [[ $(grep 'dtoverlay=dwc2,dr_mode=peripheral' /boot/config.txt) ]]; then + echo "dtoverlay=dwc2,dr_mode=peripheral aalready in /boot/config.txt" + else + sudo sed -i 's/dtoverlay=dwc2/dtoverlay=dwc2,dr_mode=peripheral/g' /boot/config.txt + echo " adding dr_mode=peripheral to /boot/config.txt" + fi + else - echo "adding dtoverlay=dwc2 to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + echo "adding dtoverlay=dwc2,dr_mode=peripheral to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2,dr_mode=peripheral" >> /boot/config.txt' fi if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then From 1b962d320f2d7b84f0f3c316ab424806fcc9f22c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 16:58:35 -0500 Subject: [PATCH 317/774] Update install change pacsat from m to n --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b2169009..2a1396dd 100755 --- a/install +++ b/install @@ -176,7 +176,7 @@ sudo raspi-config nonint do_vnc 0 cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz +wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46n_linux.tar.gz tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop From a6dc350ddde7aba3a521d8f9fdd0214fc9ca1d37 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:02:33 -0500 Subject: [PATCH 318/774] Update update update pacsatground to 46n --- update | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update b/update index e2220d82..9c5180ae 100755 --- a/update +++ b/update @@ -350,13 +350,13 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd /tmp - wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz - tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop + tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop - rm PacSatGround_0.46m_linux.tar.gz + rm PacSatGround_0.46n_linux.tar.gz - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ mkdir /home/pi/PacSatGround From 4051bc0d691e4a41e044fdbfdf3ebb2d14bd1ff8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:03:24 -0500 Subject: [PATCH 319/774] Update install change pacsat ground to 46n --- install | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install b/install index 2a1396dd..b3ecfe98 100755 --- a/install +++ b/install @@ -176,14 +176,14 @@ sudo raspi-config nonint do_vnc 0 cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46n_linux.tar.gz +wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz -tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop +tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop -rm PacSatGround_0.46m_linux.tar.gz - -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ +rm PacSatGround_0.46n_linux.tar.gz +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ + mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi From 2accb21066b67ac667eab1a0c118f58a1fed8bcd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:10:51 -0500 Subject: [PATCH 320/774] Update install fix pacsat install --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index b3ecfe98..40c70f12 100755 --- a/install +++ b/install @@ -180,9 +180,9 @@ wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop -rm PacSatGround_0.46n_linux.tar.gz +rm PacsatGround_unix_0_46n.tar.gz -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 90920a243793092ccde246a78717a6819e696e23 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:11:33 -0500 Subject: [PATCH 321/774] Update update fix pacsat gs install --- update | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update b/update index 9c5180ae..c6435169 100755 --- a/update +++ b/update @@ -354,10 +354,10 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop - rm PacSatGround_0.46n_linux.tar.gz - - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ + rm PacsatGround_unix_0_46n.tar.gz + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ + mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi From 7f0814211da62deaf31a473252ddcf3d1a400eed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:12:46 -0500 Subject: [PATCH 322/774] Update pacsat.sh change for version 46n --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 4e65f2d5..633e6612 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -84,7 +84,7 @@ echo echo "Don't close the direwolf window or the Pacsatsim will stop running." -cd /home/pi/Desktop/PacSatGround_0.46m_linux/ +cd /home/pi/Desktop/PacSatGround/ setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & From 36533e538b14d98cc8225f888b6ff78381b2b441 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:14:55 -0500 Subject: [PATCH 323/774] Update pacsat.sh fix dir name --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 633e6612..6a00522a 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -84,7 +84,7 @@ echo echo "Don't close the direwolf window or the Pacsatsim will stop running." -cd /home/pi/Desktop/PacSatGround/ +cd /home/pi/Desktop/PacsatGround/ setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & From 2eb2fac9814d18f8640812479399030279bfc66b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:31:04 -0500 Subject: [PATCH 324/774] Update transmit.py change from card to headphones --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index c9e1450d..d0301441 100644 --- a/transmit.py +++ b/transmit.py @@ -352,8 +352,8 @@ if __name__ == "__main__": print(txLedOn) GPIO.setup(txLed, GPIO.OUT) -# card = "Headphones" # default using pcm audio output of Pi Zero - card = "Device" # using USB sound card for audio output + card = "Headphones" # default using pcm audio output of Pi Zero +# card = "Device" # using USB sound card for audio output print("Programming FM module!\n"); output(pd, 1) From fb0776dda8e5dd0410fb15e42e6cf8776b30afe9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:38:25 -0500 Subject: [PATCH 325/774] Update update add cmake and direwolf v1.8 --- update | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/update b/update index c6435169..306e71ac 100755 --- a/update +++ b/update @@ -23,7 +23,7 @@ if [ "$1" = "u" ]; then fi -sudo apt-get install -y python3-smbus +sudo apt-get install -y python3-smbus cmake sudo sed -i 's/update.sh/update /g' /etc/motd @@ -374,16 +374,18 @@ cd /home/pi/direwolf #git status | grep 'invert' -if [[ ! $(git status | grep 'invert') ]]; then +if [[ ! $(git status | grep 'master-sync-invert') ]]; then - echo "updating direwolf to ptt invert version" + echo "updating direwolf to master-sync-invert version" git pull --no-rebase - git checkout invert - make clean - make -j + git checkout master-sync-invert + mkdir build + cd build + cmake .. + make -j4 sudo make install - make install-rpi + make install-conf cd fi From 427b53bee7663af50e4b82f0743417bae6123846 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:51:35 -0500 Subject: [PATCH 326/774] Create direwolf-pacsat-pwm.conf for pwm audio out --- direwolf/direwolf-pacsat-pwm.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 direwolf/direwolf-pacsat-pwm.conf diff --git a/direwolf/direwolf-pacsat-pwm.conf b/direwolf/direwolf-pacsat-pwm.conf new file mode 100644 index 00000000..839bd4a4 --- /dev/null +++ b/direwolf/direwolf-pacsat-pwm.conf @@ -0,0 +1,18 @@ +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +PTT GPIO -20 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +##FULLDUP ON +##TXDELAY 15 +#FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 100 +#TXTAIL 10 +TXTAIL 1 +FULLDUP OFF From 67fde490cfbfa41682789db282d506bf8dc7d33d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:53:59 -0500 Subject: [PATCH 327/774] Update pacsatsim-df.sh add pwm variable --- pacsatsim-df.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh index 3999eb8d..5abc76d1 100755 --- a/pacsatsim-df.sh +++ b/pacsatsim-df.sh @@ -1,5 +1,15 @@ #!/bin/bash +pwm=1 + sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 +if [ "$pwm" = "1" ] ; then + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 + +else + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 + +fi From bf572cc9bccba0cee2e5d46ccb8c249506b95349 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:55:25 -0500 Subject: [PATCH 328/774] Update pacsat-df.sh add pwm variable --- groundstation/pacsat-df.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat-df.sh b/groundstation/pacsat-df.sh index 2c0af411..99ffc988 100755 --- a/groundstation/pacsat-df.sh +++ b/groundstation/pacsat-df.sh @@ -1,10 +1,21 @@ #!/bin/bash +pwm=1 + sudo modprobe snd-aloop #gpio -g mode 20 out #gpio -g write 20 1 -direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 +#direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 + +if [ "$pwm" = "1" ] ; then + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 + +else + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 + +fi From 7d1aeae4708b9da46ac3a248452d5f62516642ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:57:09 -0500 Subject: [PATCH 329/774] Create direwolf-fm-pacsat-pwm.conf add PWM --- .../direwolf/direwolf-fm-pacsat-pwm.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-pwm.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf new file mode 100644 index 00000000..ce5b6db6 --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -0,0 +1,19 @@ +MYCALL AMSAT +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +PTT GPIO -20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +#FULLDUP OFF +#TXDELAY 30 +#FIX_BITS 1 AX25 + +#DWAIT 0 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 150 +#TXTAIL 10 +FULLDUP OFF From 7f9d85add375cd8b5b3b65b6b06bab46d5a6b168 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 22:21:54 -0500 Subject: [PATCH 330/774] Update update pi_pacsat to my repo --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index 306e71ac..86f72c22 100755 --- a/update +++ b/update @@ -317,7 +317,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/ac2cz/pi_pacsat.git + git clone https://github.com/alanbjohnston/pi_pacsat.git cd pi_pacsat/Debug From c04e411b6416076c98f6e1df951025025537eb69 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 22:29:44 -0500 Subject: [PATCH 331/774] Rename direwolf-pacsat-pwm.conf to direwolf-pacsatsim-pwm.conf --- .../{direwolf-pacsat-pwm.conf => direwolf-pacsatsim-pwm.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename direwolf/{direwolf-pacsat-pwm.conf => direwolf-pacsatsim-pwm.conf} (100%) diff --git a/direwolf/direwolf-pacsat-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf similarity index 100% rename from direwolf/direwolf-pacsat-pwm.conf rename to direwolf/direwolf-pacsatsim-pwm.conf From a21b17e9010e6291371a2f6165f07a72765c175e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 22:39:49 -0500 Subject: [PATCH 332/774] Update direwolf-pacsatsim-jp14.conf change to card names --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 8b42f6c7..976f2d03 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -ADEVICE plughw:2,0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#ADEVICE plughw:2,0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 4efcc75f0a39bd7f4e1877aba9d586729343b9c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 09:52:23 -0500 Subject: [PATCH 333/774] Update update to g0kla_common, pacsat version o --- update | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/update b/update index 86f72c22..bc2d029a 100755 --- a/update +++ b/update @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nupdate script for CubeSatSim v2.1\n" +echo -e "\nupdate script for CubeSatSim v2.2\n" if [ "$1" = "n" ] ; then # if [ -z "$2" ] ; then @@ -307,9 +307,9 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/alanbjohnston/iors_common.git + git clone https://github.com/alanbjohnston/g0kla_common.git - cd iors_common/Debug/ + cd g0kla_common/Debug/ make all @@ -327,7 +327,9 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir - export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + + export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null @@ -350,13 +352,13 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd /tmp - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz - tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop + tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop - rm PacsatGround_unix_0_46n.tar.gz + rm PacsatGround_unix_0_46o.tar.gz - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 777146d05380aea290929d5238da2686847f7b8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:11:47 -0500 Subject: [PATCH 334/774] Update update check for PacSat Ground and check for Desktop --- update | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/update b/update index bc2d029a..c8c35716 100755 --- a/update +++ b/update @@ -349,22 +349,38 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt sudo raspi-config nonint do_vnc 0 + +fi + +if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then + + echo "Installing PacSat Ground Station!" + + if [ ! -d "/home/pi/Desktop" ]; then + + echo + echo "You won't be able to run the PacSat Ground Station as this Pi OS does not seem to have the Desktop GUI installed." + echo + + else - cd /tmp - - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz - - tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop - - rm PacsatGround_unix_0_46o.tar.gz + cd /tmp + + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz + + tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop + + rm PacsatGround_unix_0_46o.tar.gz + + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + + mkdir /home/pi/PacSatGround - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + sudo usermod -a -G gpio pi - mkdir /home/pi/PacSatGround + sudo apt-get install default-jdk -y - sudo usermod -a -G gpio pi - - sudo apt-get install default-jdk -y + fi cd From 6a421e79514039f29e17e230dcde79d3925732e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:18:10 -0500 Subject: [PATCH 335/774] Update update fix copy of PacSat spacecraft files --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index c8c35716..cc452af9 100755 --- a/update +++ b/update @@ -372,7 +372,7 @@ if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then rm PacsatGround_unix_0_46o.tar.gz - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 554c0b12e69713217f0e049f9d9ee115b816de2c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:28:29 -0500 Subject: [PATCH 336/774] update library path --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5a044360..eb122c82 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,7 +2,9 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + +export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH #sudo systemctl stop cubesatsim From b6c77b2c2901289271160af4f75a115229a5e33b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:32:01 -0500 Subject: [PATCH 337/774] Update update change pi_pacsat to latest ac2cz --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index cc452af9..88918ed9 100755 --- a/update +++ b/update @@ -317,7 +317,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/alanbjohnston/pi_pacsat.git + git clone https://github.com/ac2cz/pi_pacsat.git cd pi_pacsat/Debug From fcf760d6f2daf9ec5c29e137f48d95b9eb890739 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:44:25 -0500 Subject: [PATCH 338/774] Update pacsatsim.sh run dire wolf in same window --- pacsatsim.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index eb122c82..76e37d1c 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -189,12 +189,14 @@ else # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + # /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + + /home/pi/CubeSatSim/pacsatsim-df.sh & # 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 & - echo "Don't close the direwolf window or the Pacsatsim will stop running." +## echo "Don't close the direwolf window or the Pacsatsim will stop running." echo fi From ec674a80c0efbbb2daca49dae0df0e55fe165986 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 14:20:38 -0500 Subject: [PATCH 339/774] Update update change BBS callsign to -12 --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index 88918ed9..a9188a67 100755 --- a/update +++ b/update @@ -336,7 +336,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then set -- $value echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=$1" >> pacsat.config + echo "bbs_callsign=$1-12" >> pacsat.config echo "broadcast_callsign=$1-11" >> pacsat.config echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config From b5c2b1cc04b7dc336a804fcee55c05ab19e0ff36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 16:57:33 -0500 Subject: [PATCH 340/774] Update direwolf-fm-pacsat-jp14.conf change to plughw and txdelay 1000 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 1b9d9a15..eb0bf0a2 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO -20 CHANNEL 0 MODEM 1200 @@ -13,7 +13,7 @@ AGWPORT 8002 DWAIT 20 SLOTTIME 300 PERSIST 63 -#TXDELAY 1000 -TXDELAY 150 +TXDELAY 1000 +#TXDELAY 150 #TXTAIL 10 FULLDUP OFF From d202c27855d675bc453c3d25dea309c186e74dc4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 16:59:35 -0500 Subject: [PATCH 341/774] Update direwolf-fm-pacsat-pwm.conf change to plughw and txdelay 1000 --- groundstation/direwolf/direwolf-fm-pacsat-pwm.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf index ce5b6db6..b8a4929c 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 CHANNEL 0 MODEM 1200 @@ -13,7 +13,7 @@ AGWPORT 8002 DWAIT 20 SLOTTIME 300 PERSIST 63 -#TXDELAY 1000 -TXDELAY 150 +TXDELAY 1000 +#TXDELAY 150 #TXTAIL 10 FULLDUP OFF From bb0d8a3a6fc6e1d6a0e8586e2a0067801031a377 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 17:04:24 -0500 Subject: [PATCH 342/774] Update direwolf-pacsatsim-jp14.conf txdelay 1000 txtail 10 --- direwolf/direwolf-pacsatsim-jp14.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 976f2d03..cb0a1ce8 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -12,8 +12,8 @@ MODEM 1200 DWAIT 0 SLOTTIME 10 PERSIST 63 -#TXDELAY 1000 -TXDELAY 100 -#TXTAIL 10 -TXTAIL 1 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 FULLDUP OFF From aafd9419e109b72dac1c19e5687104aa21567bf2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 17:05:00 -0500 Subject: [PATCH 343/774] Update direwolf-pacsatsim-pwm.conf txdelay 1000 txtail 10 --- direwolf/direwolf-pacsatsim-pwm.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 839bd4a4..c0890790 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -11,8 +11,8 @@ MODEM 1200 DWAIT 0 SLOTTIME 10 PERSIST 63 -#TXDELAY 1000 -TXDELAY 100 -#TXTAIL 10 -TXTAIL 1 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 FULLDUP OFF From 927b3ea288ea3c8e24a38832b47971043c18e882 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 11:54:46 -0500 Subject: [PATCH 344/774] Update direwolf-pacsatsim-pwm.conf add transmit LED --- direwolf/direwolf-pacsatsim-pwm.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index c0890790..d0649d2f 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,5 +1,6 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 +PTT GPIO 27 #Transmit LED MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 80dd6054aac275408efe098d5306c1e68b79855b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 11:55:02 -0500 Subject: [PATCH 345/774] Update direwolf-fm-pacsat-pwm.conf add transmit LED --- groundstation/direwolf/direwolf-fm-pacsat-pwm.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf index b8a4929c..7e2a6ffa 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -1,6 +1,7 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 +PTT GPIO 27 #Transmit LED CHANNEL 0 MODEM 1200 KISSPORT 8100 From 51a6f6b3d2ce5abd72caebf3c4aaf64ed1e368b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 11:57:13 -0500 Subject: [PATCH 346/774] Update direwolf-fm-pacsat-pwm.conf put transmit LED ptt on same line --- groundstation/direwolf/direwolf-fm-pacsat-pwm.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf index 7e2a6ffa..c1d5f5f9 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -1,7 +1,6 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO -20 -PTT GPIO 27 #Transmit LED +PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 KISSPORT 8100 From 28dc67fd50495d9f20341322b0c6d0a2d735a407 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:30:06 -0500 Subject: [PATCH 347/774] Create PacSatSim.dat --- spacecraft/acSatGround_0.46o/PacSatSim.dat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spacecraft/acSatGround_0.46o/PacSatSim.dat diff --git a/spacecraft/acSatGround_0.46o/PacSatSim.dat b/spacecraft/acSatGround_0.46o/PacSatSim.dat new file mode 100644 index 00000000..92ae8f93 --- /dev/null +++ b/spacecraft/acSatGround_0.46o/PacSatSim.dat @@ -0,0 +1,15 @@ +Pacsat Telemetry Decoder Properties +#Sat Nov 26 18:12:20 EST 2016 +numberOfLookupTables=0 +measurementsFileName=measurements.csv +model=1 +layout0.filename=PACSAT_rttelemetry.csv +layout0.name=TLMI_LAYOUT +passMeasurementsFileName=passmeasurements.csv +name=PacSatSim +description=PacSatSim +numberOfLayouts=1 +satId=3 +catalogNumber=0 +conversionCoefficients=pacsat-coef.csv +layoutsUseBits=True From aa3c303990b6d6019ec860845049c8ddc35865e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:31:27 -0500 Subject: [PATCH 348/774] Delete spacecraft/acSatGround_0.46o directory --- spacecraft/acSatGround_0.46o/PacSatSim.dat | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 spacecraft/acSatGround_0.46o/PacSatSim.dat diff --git a/spacecraft/acSatGround_0.46o/PacSatSim.dat b/spacecraft/acSatGround_0.46o/PacSatSim.dat deleted file mode 100644 index 92ae8f93..00000000 --- a/spacecraft/acSatGround_0.46o/PacSatSim.dat +++ /dev/null @@ -1,15 +0,0 @@ -Pacsat Telemetry Decoder Properties -#Sat Nov 26 18:12:20 EST 2016 -numberOfLookupTables=0 -measurementsFileName=measurements.csv -model=1 -layout0.filename=PACSAT_rttelemetry.csv -layout0.name=TLMI_LAYOUT -passMeasurementsFileName=passmeasurements.csv -name=PacSatSim -description=PacSatSim -numberOfLayouts=1 -satId=3 -catalogNumber=0 -conversionCoefficients=pacsat-coef.csv -layoutsUseBits=True From 71c285371b66d5b04b8ba9a4908eef05c1058b45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:32:15 -0500 Subject: [PATCH 349/774] Create PacSatSim.dat --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim.dat diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat new file mode 100644 index 00000000..92ae8f93 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -0,0 +1,15 @@ +Pacsat Telemetry Decoder Properties +#Sat Nov 26 18:12:20 EST 2016 +numberOfLookupTables=0 +measurementsFileName=measurements.csv +model=1 +layout0.filename=PACSAT_rttelemetry.csv +layout0.name=TLMI_LAYOUT +passMeasurementsFileName=passmeasurements.csv +name=PacSatSim +description=PacSatSim +numberOfLayouts=1 +satId=3 +catalogNumber=0 +conversionCoefficients=pacsat-coef.csv +layoutsUseBits=True From 84d823a5bdfb54554d58763525ef534b201956e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:32:59 -0500 Subject: [PATCH 350/774] Create PacSatSim.properties --- .../PacSatGround_0.46o/PacSatSim.properties | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim.properties diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.properties b/spacecraft/PacSatGround_0.46o/PacSatSim.properties new file mode 100644 index 00000000..e4ccad24 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.properties @@ -0,0 +1,20 @@ +#PacSat Ground Station Properties +#Sun Feb 17 18:25:06 EST 2019 +sequence_num=3 +name=PacSatSim +digiCallsign=AMSAT-1 +description=PacSatSim +broadcastCallsign=AMSAT-11 +DIR_AGE=10 +bbsCallsign=AMSAT-12 +telemLayoutFile=PacSatSim.dat +telem_server=tlm.amsatfox.org +web_site_url=http://CubeSatSim.org +show_system_files_on_dir_tab=false +show_user_files=true +supports_file_upload=true +norad_id=30776 +psf_header_check_sums=false +commandsFile=pacsat.commands +is_command_station=true +secret_key=ScKQLp2ZMvCaCTK5jAmOmKmA0JiSyJ6Y15+Yfg\=\= From 89e8991aad6e4647f3b5bb070e826b6511fd2769 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:36:00 -0500 Subject: [PATCH 351/774] Update PacSatSim.properties add command file --- spacecraft/PacSatGround_0.46o/PacSatSim.properties | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.properties b/spacecraft/PacSatGround_0.46o/PacSatSim.properties index e4ccad24..f719eb84 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.properties +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.properties @@ -1,5 +1,5 @@ #PacSat Ground Station Properties -#Sun Feb 17 18:25:06 EST 2019 +#Fri Feb 6 18:25:06 EST 2026 sequence_num=3 name=PacSatSim digiCallsign=AMSAT-1 @@ -17,4 +17,6 @@ norad_id=30776 psf_header_check_sums=false commandsFile=pacsat.commands is_command_station=true -secret_key=ScKQLp2ZMvCaCTK5jAmOmKmA0JiSyJ6Y15+Yfg\=\= +secret_key=Not-required +commandsFile=PacSatSim.commands +echo_to_stdout=true From 103a98c3e5d88882de1f366f79116c4fa69e4d60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 22:38:30 -0500 Subject: [PATCH 352/774] Create PacSatSim.commands --- .../PacSatGround_0.46o/PacSatSim.commands | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim.commands diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.commands b/spacecraft/PacSatGround_0.46o/PacSatSim.commands new file mode 100644 index 00000000..4e7a8073 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.commands @@ -0,0 +1,37 @@ +# This is a list of commands that can be sent to the spacecraft +# args are 16 bit except the special code 99099099 which is replaced with the unix time, or when special code MSB32BIT is used to combine two fields +LIST, namespaces, None, Operations, Telem, File System +LIST, IMAGE FOLDER, sstv_queue 1, sstv_queue 2, sstv_queue 3, sstv_queue 4, sstv_queue 5, sstv_queue 6, sstv_queue 7, sstv_queue 8, sstv_queue 9 +LIST, FOLDER, bin, lib, config, PACSAT dir, upload queue, wod queue, log queue, text queue, sensor wod queue, data1, data2, data3, data4, data5, data6, data7, data8, data9 +LIST, ENABLE, false, true +LIST, ROLL AT STARTUP, false, true +LIST, OVERWRITE, false, true +LIST, FSK, false, true +LIST, REMOVE ORPHAN FILES, false, true +LIST, STATE, stop, start +LIST, UPLINK MODE, Off, All stations, Command Stations Only +LIST, FILENAME, use id for file name, user file name +LIST, SHUTDOWN, reboot, shutdown +LIST, RESET, reboot +LIST, RATE, 1200, 9600 +LIST, FEC, Off, On +LIST, FULL DUPLEX, false, true +LIST, LOG NAME, Log, WOD +LIST, LOG LEVEL, None, Error, Warnings, Info +# Name, Name space, cmd, arg0, arg1, arg2, arg3, argName0, argName1, argName2, argName3, confirm, use reset/uptime, description +# +# PACSAT +# +Pacsat Broadcast,3,1,0,0,0,0,State,Period(sec),Timeout(sec),NONE,false,false,Enable or disable the Pacsat Broadcast module. The directory entries and individual files will be broadcast based on commands from ground stations. +File Uploads,3,2,0,0,0,0,Uplink Mode,Period(sec),Timeout(sec),NONE,false,false,Enable or disable File Uploads. Limit file uploads to command stations that authenticate with a secret key. +Install File,3,3,0,0,0,0,FileId,MSB32BIT,Folder,NONE,false,false,Copy a file from the PACSAT Directory to a folder and name it with a 4 byte hex name that matches the id or the user filename. +Execute File,3,13,0,0,0,0,FileId,MSB32BIT,Arg1,Arg2,true,false,Execute a file on the ARISS-PI. The file must already be installed in the bin folder +Delete File,3,4,0,0,0,0,FileId,MSB32BIT,Folder,NONE,true,false,Delete a file on the ARISS-PI. Typically this leaves the original copy in the PACSAT dir. To delete the original copy specify the PACSAT Dir folder +Delete Folder Contents,3,5,0,0,0,0,Folder,Remove Orphan Files,NONE,NONE,true,false,Remove all files from the folder. The original files will remain in the PACSAT Directory unless deleted seperately. Orphan files are files in a folder without a corresponding Pacsat Dir file. NB: Deleting the entire Pacsat Dir is a desperate measure perhaps only useful in testing! +Default File Expiry Period,3,6,0,0,0,0,Period(days),NONE,NONE,NONE,false,false,Set the default expiry period for files without a specific expiry time. The new value will be applied to all files. +File Expiry Period,3,7,0,0,0,0,FileId,MSB32BIT,Date,MSB32BIT,false,false,Set the expiry date for a specific file`. +Directory Maintenence Period,3,8,0,0,0,0,Period(s),NONE,NONE,NONE,false,false,Period between checks to each node in the directory for file expiry. +Uplink queue maintenance Period,3,9,0,0,0,0,Period(s),NONE,NONE,NONE,false,false,Period to check the entire uplink queue for expired files. +Int File Que Check Period,3,10,0,0,0,0,Period(s),NONE,NONE,NONE,false,false,Period to check the ingestion queues for newly generated internal files. +Max File Size,3,11,0,0,0,0,Size(kb),NONE,NONE,NONE,false,false,Maximum size for an uploaded file +Max Upload File Age,3,12,0,0,0,0,Age(days),NONE,NONE,NONE,false,false,Partially uploaded files not modified for more than this period will be removed from the upload queue. From d3f8697120116ba513f27809b152d3e2e551e5ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:20:41 -0500 Subject: [PATCH 353/774] Add renamed BPSK telem files from FoxTelem --- .../PacSatSim_Type1_HEALTH.frame | 13 ++++ .../PacSatSim_Type2_MINMAX.frame | 13 ++++ .../PacSatSim_conversion_curves.csv | 13 ++++ .../PacSatSim_maxtelemetry.csv | 62 +++++++++++++++++++ .../PacSatSim_mintelemetry.csv | 62 +++++++++++++++++++ .../PacSatSim_rttelemetry.csv | 62 +++++++++++++++++++ .../PacSatSim_wodtelemetry.csv | 62 +++++++++++++++++++ 7 files changed, 287 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame new file mode 100644 index 00000000..050ff88a --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame @@ -0,0 +1,13 @@ +number_of_payloads=6 +payload0.name=rttelemetry +payload0.length=78 +payload1.name=rttelemetry +payload1.length=78 +payload2.name=rttelemetry +payload2.length=78 +payload3.name=rttelemetry +payload3.length=78 +payload4.name=rttelemetry +payload4.length=78 +payload5.name=wodtelemetry +payload5.length=78 diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame new file mode 100644 index 00000000..a69be045 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame @@ -0,0 +1,13 @@ +number_of_payloads=6 +payload0.name=rttelemetry +payload0.length=78 +payload1.name=rttelemetry +payload1.length=78 +payload2.name=rttelemetry +payload2.length=78 +payload3.name=maxtelemetry +payload3.length=78 +payload4.name=mintelemetry +payload4.length=78 +payload5.name=wodtelemetry +payload5.length=78 diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv new file mode 100644 index 00000000..30f05985 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv @@ -0,0 +1,13 @@ +CurveName,a,bx,cx^2,dx^3,ex^4,fx^5,Description +cubesatsim_voltage,0,0.01,0,0,0,0,Converts voltages read from the INA219 sensors +cubesatsim_current,-2048,1,0,0,0,0,Converts positive and negative currents read from the INA219 sensors +cubesatsim_temperature,0,0.1,0,0,0,0,Converts temperature of Pi +cubesatsim_rotation,-2048,1,0,0,0,0,Converts positive and negative dps rotation +cubesatsim_acceleration,-20.48,0.01,0,0,0,0,Converts positive and negative g acceleration +cubesatsim_altitude,0,0.1,0,0,0,0,Converts altitude +cubesatsim_pressure,0,1,0,0,0,0,Converts pressure +cubesatsim_sensor1,0,1,0,0,0,0,Conversion of Sensor 1 +cubesatsim_sensor2,-2048,1,0,0,0,0,Conversion of Sensor 2 +cubesatsim_sensor3,-20.48,0.01,0,0,0,0,Conversion of Sensor 3 +cubesatsim_rpm,-204.8,0.1,0,0,0,0,Conversion of calculated RPM +cubesatsim_rssi,-2048,1,0,0,0,0,Conversion of Received Signal Strength diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv new file mode 100644 index 00000000..9bf2f291 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage +3,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current +7,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +8,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage +9,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage +12,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage +14,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current +15,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current +16,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current +17,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current +18,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current +19,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current +20,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage +21,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication +26,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity +31,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current +32,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +35,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +37,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +38,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator +42,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received +43,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status +44,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status +45,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status +46,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +48,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +49,MAX,rf6,12,-,0,NONE,0,0,0,None,None +50,MAX,rf7,12,-,0,NONE,0,0,0,None,None +51,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +53,MAX,pad,4,-,34,NONE,0,0,0,None,Unused +54,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +55,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler +56,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +57,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +58,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +59,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +60,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv new file mode 100644 index 00000000..adf24a04 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,MIN,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,MIN,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,MIN,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage +3,MIN,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,MIN,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,MIN,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,MIN,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current +7,MIN,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +8,MIN,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage +9,MIN,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,MIN,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,MIN,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage +12,MIN,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,MIN,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage +14,MIN,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current +15,MIN,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current +16,MIN,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current +17,MIN,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current +18,MIN,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current +19,MIN,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current +20,MIN,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage +21,MIN,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,MIN,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,MIN,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,MIN,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,MIN,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication +26,MIN,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,MIN,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,MIN,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,MIN,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,MIN,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity +31,MIN,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current +32,MIN,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,MIN,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,MIN,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +35,MIN,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,MIN,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +37,MIN,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +38,MIN,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,MIN,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,MIN,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,MIN,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator +42,MIN,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received +43,MIN,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status +44,MIN,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status +45,MIN,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status +46,MIN,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,MIN,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +48,MIN,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +49,MIN,rf6,12,-,0,NONE,0,0,0,None,None +50,MIN,rf7,12,-,0,NONE,0,0,0,None,None +51,MIN,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,MIN,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +53,MIN,pad,4,-,34,NONE,0,0,0,None,Unused +54,MIN,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +55,MIN,pad1,1,-,0,NONE,0,0,0,NONE,Filler +56,MIN,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +57,MIN,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +58,MIN,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +59,MIN,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +60,MIN,pad2,27,-,0,NONE,0,0,0,NONE,Filler diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv new file mode 100644 index 00000000..f9301dbe --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,realTime,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current +7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +8,realTime,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +9,realTime,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,realTime,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,realTime,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +12,realTime,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,realTime,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current +15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current +18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +20,realTime,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,realTime,rssi,12,dBm,cubesatsim_rssi|INT,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,realTime,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,realTime,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,BME280 Humidity +31,realTime,BAT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,realTime,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +35,realTime,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,realTime,SimulatedTelemetry,1,-,STATUS_ON_OFF,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +37,realTime,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +38,realTime,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,realTime,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,realTime,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,realTime,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator +42,realTime,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +45,realTime,C2CStatus,2,-,COMMAND_STATUS,Computer Software,3,5,0,Command Control, Command & Control Status +46,realTime,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,realTime,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +48,realTime,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +49,realTime,rf6,12,-,0,NONE,0,0,0,None,None +50,realTime,rf7,12,-,0,NONE,0,0,0,None,None +51,realTime,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,realTime,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +53,realTime,pad,4,-,34,NONE,0,0,0,None,Unused +54,realTime,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +55,realTime,pad1,1,-,0,NONE,0,0,0,NONE,Filler +56,realTime,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +57,realTime,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv new file mode 100644 index 00000000..d1b53340 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,WOD,BATT_A_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Cell A,Battery A voltage (0-2.5V scale) +1,WOD,BATT_B_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,2,3,Cell A+B,Battery A+B voltage (0-3.3V scale) +2,WOD,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Cell A+B+C Voltage,Battery A+B+C voltage (0-5.0V scale) +3,WOD,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,Acceleration around X Axis +4,WOD,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,Acceleration around Y Axis +5,WOD,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,Acceleration around Z Axis +6,WOD,battCurr,12,mA,cubesatsim_current,Battery,4,2,4,Current,Total Battery DC current +7,WOD,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,Temperature,STEM Payload Sensor Temperature +8,WOD,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,+X solar Panel voltage +9,WOD,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,+Y solar Panel voltage +10,WOD,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,+Z solar Panel voltage +11,WOD,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,-X solar Panel voltage +12,WOD,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,-Y solar Panel voltage +13,WOD,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,-Z solar Panel voltage +14,WOD,posXi,12,mA,cubesatsim_current,+X Panel,7,2,4,Current,+X solar Panel current +15,WOD,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,4,Current,+Y solar Panel current +16,WOD,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,4,Current,+Z solar Panel current +17,WOD,negXi,12,mA,cubesatsim_current,-X Panel,10,2,4,Current,-X solar Panel current +18,WOD,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,4,Current,-Y solar Panel current +19,WOD,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,4,Current,-Z solar Panel current +20,WOD,PSUVoltage,12,V,cubesatsim_voltage|FLOAT2,PSU,5,1,3,Voltage,Power Supply Voltage +21,WOD,spin,12,rpm,12,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,WOD,Pressure,12,bar,cubesatsim_pressure,Experiments,6,3,3,Pressure,STEM Payload Sensor Pressure +23,WOD,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,Altitude,STEM Payload Sensor Altitude +24,WOD,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,WOD,rssi,12,dBm,14,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,WOD,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,Temperature,Internal Temperature of IHU +27,WOD,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,Angular Veolcity around X Axis +28,WOD,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,Angular Veolcity around Y Axis +29,WOD,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,Angular Veolcity around Z Axis +30,WOD,Sensor1,12,raw,cubesatsim_sensor1|INT,Experiments,6,5,3,Sensor 1,STEM Payload Extra Sensor 1 +31,WOD,PSUCurrent,12,mA,cubesatsim_current,PSU,5,2,3,Current,Power Supply DC Current +32,WOD,Sensor2,12,signed raw,cubesatsim_sensor2|INT,Experiments,6,6,3,Sensor 2,STEM Payload Extra Sensor 2 +33,WOD,Sensor3,12,signed scaled,cubesatsim_sensor3|FLOAT2,Experiments,6,7,3,Sensor 3,STEM Payload Extra Sensor 3 +34,WOD,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload Board Failure Indicator +35,WOD,Nominal Mode,1,-,17,Computer Software,3,2,0,Nominal Mode, Nominal Mode (Not Safe Mode) +36,WOD,PayloadStatus1,1,-,17,NONE,6,7,0,Exp 2,STEM Payload status 1 failure indicator +37,WOD,PayloadStatus2,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 2 failure indicator +38,WOD,I2CBus0Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,WOD,I2CBus1Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 1,I2C bus 1 failure indicator +40,WOD,I2CBus3Failure,1,-,17,Computer Hardware,2,4,0,I2C Bus 3,I2C bus 3 failure indicator +41,WOD,CameraFailure,1,-,17,Computer Hardware,2,5,0,Camera,Camera failure indicator +42,WOD,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,WOD,RxAntDeploy,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +44,WOD,TxAntDeploy,2,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +45,WOD,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +46,WOD,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +47,WOD,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +48,WOD,rf6,12,-,0,NONE,0,0,0,None,None +49,WOD,rf7,12,-,0,NONE,0,0,0,None,None +50,WOD,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +51,WOD,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +52,WOD,pad,4,-,34,NONE,0,0,0,None,Unused +53,WOD,WODTimeStampReset,16,-,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected +54,WOD,pad1,17,-,0,NONE,0,0,0,NONE,Filler +55,WOD,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +56,WOD,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +57,WOD,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +58,WOD,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +59,WOD,WODTimeStampUpTime,25,s,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected +60,WOD,pad2,3,-,0,NONE,0,0,0,NONE,Filler From 54cb74d30bcab55634041f664f15ee7a51f56a62 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:26:19 -0500 Subject: [PATCH 354/774] Update PacSatSim.dat change to PacSatSim_ filenames --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat index 92ae8f93..f7e30e65 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -3,7 +3,7 @@ Pacsat Telemetry Decoder Properties numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PACSAT_rttelemetry.csv +layout0.filename=PacSatSim_rttelemetry.csv layout0.name=TLMI_LAYOUT passMeasurementsFileName=passmeasurements.csv name=PacSatSim @@ -11,5 +11,5 @@ description=PacSatSim numberOfLayouts=1 satId=3 catalogNumber=0 -conversionCoefficients=pacsat-coef.csv +conversionCoefficients=PacSatSim_conversion_curves.csv layoutsUseBits=True From 98d1f69a3c09260ffaee67e3e0016532e73ff573 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:32:17 -0500 Subject: [PATCH 355/774] Update PacSatSim.dat updated for PacSatSim_ file names --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat index 92ae8f93..8db7d5ae 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -1,15 +1,18 @@ -Pacsat Telemetry Decoder Properties -#Sat Nov 26 18:12:20 EST 2016 +#Pacsat Telemetry Decoder Properties +#Fri Feb 6 18:12:20 EST 2026 numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PACSAT_rttelemetry.csv -layout0.name=TLMI_LAYOUT +layoutsUseToCallsignAsType=true +numberOfLayouts=2 +layout0.filename=PacSatSim_rttelemetry.csv +layout0.name=TLMP1 +layout1.filename=PacSatSim_rttelemetry.csv +layout1.name=WOD passMeasurementsFileName=passmeasurements.csv -name=PacSatSim -description=PacSatSim -numberOfLayouts=1 +name=ISS +description=PacSatSim satId=3 catalogNumber=0 -conversionCoefficients=pacsat-coef.csv +conversionCoefficients=PacSatSim_conversion_curves.csv layoutsUseBits=True From f9a59597a5b92e1002224610bcfbf3e9ddbf75ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:33:23 -0500 Subject: [PATCH 356/774] Update PacSatSim.dat revert --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat index f7e30e65..92ae8f93 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -3,7 +3,7 @@ Pacsat Telemetry Decoder Properties numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PacSatSim_rttelemetry.csv +layout0.filename=PACSAT_rttelemetry.csv layout0.name=TLMI_LAYOUT passMeasurementsFileName=passmeasurements.csv name=PacSatSim @@ -11,5 +11,5 @@ description=PacSatSim numberOfLayouts=1 satId=3 catalogNumber=0 -conversionCoefficients=PacSatSim_conversion_curves.csv +conversionCoefficients=pacsat-coef.csv layoutsUseBits=True From 6ae0a0dbbd61ae5048946d152dafa4f0a568a7aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 08:42:50 -0500 Subject: [PATCH 357/774] Update PacSatSim_rttelemetry.csv remove FLOAT2 and INT --- .../PacSatSim_rttelemetry.csv | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index f9301dbe..cca6a65f 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,34 +1,34 @@ 61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,realTime,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage -3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +2,realTime,BATT_V,12,V,cubesatsim_voltage,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis 6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current 7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,realTime,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage -9,realTime,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,realTime,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,realTime,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage -12,realTime,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,realTime,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +8,realTime,posXv,12,V,cubesatsim_voltage,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +9,realTime,posYv,12,V,cubesatsim_voltage,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,realTime,posZv,12,V,cubesatsim_voltage,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,realTime,negXv,12,V,cubesatsim_voltage,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +12,realTime,negYv,12,V,cubesatsim_voltage,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,realTime,negZv,12,V,cubesatsim_voltage,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage 14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current 15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current 16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current 17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current 18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current 19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current -20,realTime,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +20,realTime,BATT2_V,12,V,cubesatsim_voltage,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells 22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,realTime,rssi,12,dBm,cubesatsim_rssi|INT,Radio,1,1,3,RSSI,Received Signal Strength Indication +25,realTime,rssi,12,dBm,cubesatsim_rssi,Radio,1,1,3,RSSI,Received Signal Strength Indication 26,realTime,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis 30,realTime,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,BME280 Humidity 31,realTime,BAT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 32,realTime,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature @@ -60,3 +60,4 @@ 58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 048c8a8a92e2960291db67db895d26e7ed66f075 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 08:47:32 -0500 Subject: [PATCH 358/774] Create PacSatSim-coef.csv --- .../PacSatGround_0.46o/PacSatSim-coef.csv | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv new file mode 100644 index 00000000..c76d5b42 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -0,0 +1,32 @@ +0,-,NONE,0,1,0,0,0,0,None,0,4096,None +1,-,Boolean,0,1,0,0,0,0,Boolean,0,1,A Boolean value that prints TRUE or FALSE +2,-,Counts,0,1,0,0,0,0,Counts,0,4096,An integer count value +3,-,Date,0,1,0,0,0,0,Date,0,4096,A Unix epoch date time integer +4,-,TXPower,0,1,0,0,0,0,None,0,4096,None +5,-,IHUSpeed,0,0.1,0,0,0,0,None,0,4096,None +6,-,RSSI_1,0,-1,0,0,0,0,Counts,0,4096,Signed 8 bit +7,-,Mode,0,0,0,0,0,0,Enum,0,4096,SAFE:CREW:TELEM:X BAND RPT:APRS:SSTV:FS +8,-,Battery,0,0.001,0,0,0,0,None,0,4096,Battery Voltage +9,-,IHUTemp,0,0.1,0,0,0,0,None,0,4096,None +10,-,Mode,0,1,0,0,0,0,None,0,4096,The spacecraft Mode +11,-,FS_BYTES_PER_BLK,0,128,0,0,0,0,Counts,0,4096,The number of bytes per block in RED FS +12,-,FS_FILE_NUMBER,-4,1,0,0,0,0,Counts,0,4096,The number of files in the FS excluding core OS folders +13,-,SHTC3Temp,-45,0.002670288,0,0,0,0,None,0,4096,SHTC3 Temperature sensor +14,-,SHTC3Humidity,0,0.001525879,0,0,0,0,None,0,4096,SHTC3 Humidity sensor +15,-,LPS22Pressure,0,0.000244141,0,0,0,0,None,0,4096,LPS22 Pressure sensor +16,-,LPS22Temp,0,0.01,0,0,0,0,None,0,4096,LPS22 Temperature of sensor +17,-,IMUTemp,0,0.00390625,0,0,0,0,None,0,4096,Temperature of IMU = raw/256 +18,-,Acc,0,6.10E-05,0,0,0,0,Sint16,0,4096,Accelerometer is 2g full scale +19,-,Gyro,0,0.000976563,0,0,0,0,Sint16,0,4096,Gyro scale for 32dps +20,-,Mag,0,0.149975574,0,0,0,0,Sint16,0,4096,Mag is 4912 full scale +21,-,AntMode,0,0,0,0,0,0,Enum,0,4096,MANUAL:AUTO:ORBIT +22,-,ResetReason,0,0,0,0,0,0,Enum,0,4096,NONE:SHUTDOWN:REBOOT:RADIO:TNC:TNC LISTEN:RUN TWICE:RADIO REBOOT:TNC PS REBOOT:TNC REBOOT:SOFT:THERMAL +23,-,LogLevel,0,0,0,0,0,0,Enum,0,4096,NONE:ERROR:WARN:INFO +24,-,O2FromVolts,86.434,-0.0354,0,0,0,0,None,0,4096,O2 Conc from raw voltage as a percentage +25,-,SensorState,0,0,0,0,0,0,Enum,0,4096,OFF:ON:ERR +26,-,SPARE2,0,0,0,0,0,0,Counts,0,4096,SPARE +27,-,O2Conc,0,0.01,0,0,0,0,Sint16,0,4096,O2 concentration as percentage +28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW +NOTES:,,,,,,,,,,,, +Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment +Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 2fe1fc6e7e96ad27e89895c1591be8c6ba489713 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 11:49:02 -0500 Subject: [PATCH 359/774] Update PacSatSim-coef.csv add divide by 100 field --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index c76d5b42..cea11ef8 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -27,6 +27,7 @@ 26,-,SPARE2,0,0,0,0,0,0,Counts,0,4096,SPARE 27,-,O2Conc,0,0.01,0,0,0,0,Sint16,0,4096,O2 concentration as percentage 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW +29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 1fbee01b9dfa0ff0fec4ca015eab257e963b6d92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 11:50:28 -0500 Subject: [PATCH 360/774] Update PacSatSim.dat change to PacSatSim-coef.csv --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat index 8db7d5ae..1e5abfff 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -14,5 +14,5 @@ name=ISS description=PacSatSim satId=3 catalogNumber=0 -conversionCoefficients=PacSatSim_conversion_curves.csv +conversionCoefficients=PacSatSim-coef.csv layoutsUseBits=True From 21ab4e1f1877a841e7dfa9718db05c1195c7171e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 11:56:14 -0500 Subject: [PATCH 361/774] Update PacSatSim_rttelemetry.csv changed voltage to 29 --- .../PacSatSim_rttelemetry.csv | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index cca6a65f..39187d50 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,25 +1,25 @@ 61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,realTime,BATT_V,12,V,cubesatsim_voltage,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +2,realTime,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage 3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis 4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis 5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis 6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current 7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,realTime,posXv,12,V,cubesatsim_voltage,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage -9,realTime,posYv,12,V,cubesatsim_voltage,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,realTime,posZv,12,V,cubesatsim_voltage,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,realTime,negXv,12,V,cubesatsim_voltage,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage -12,realTime,negYv,12,V,cubesatsim_voltage,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,realTime,negZv,12,V,cubesatsim_voltage,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +8,realTime,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +9,realTime,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,realTime,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,realTime,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +12,realTime,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,realTime,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage 14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current 15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current 16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current 17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current 18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current 19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current -20,realTime,BATT2_V,12,V,cubesatsim_voltage,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +20,realTime,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells 22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude @@ -61,3 +61,4 @@ 59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 36feace03a32b125a7b4a78f4388d54dedc7ae8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:09:03 -0500 Subject: [PATCH 362/774] Update PacSatSim_rttelemetry.csv replace rest of cubesatsim_ conversations --- .../PacSatSim_rttelemetry.csv | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 39187d50..251badf4 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -2,36 +2,36 @@ 0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 2,realTime,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage -3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current -7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +3,realTime,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,realTime,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,realTime,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,realTime,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current +7,realTime,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature 8,realTime,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage 9,realTime,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage 10,realTime,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage 11,realTime,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage 12,realTime,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage 13,realTime,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current -15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current -16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current -17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current -18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current -19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +14,realTime,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current +15,realTime,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +16,realTime,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +17,realTime,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current +18,realTime,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +19,realTime,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current 20,realTime,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage -21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +21,realTime,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,realTime,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,realTime,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,realTime,rssi,12,dBm,cubesatsim_rssi,Radio,1,1,3,RSSI,Received Signal Strength Indication -26,realTime,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,realTime,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,BME280 Humidity -31,realTime,BAT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current -32,realTime,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +25,realTime,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,realTime,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,realTime,SatelliteXAxisAngularVelocity,12,dps,31,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,realTime,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,realTime,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,realTime,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity +31,realTime,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,realTime,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature 33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 35,realTime,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) @@ -62,3 +62,4 @@ 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 4863d08f8486315a9f4acbfbd7a73daa7e43e7a8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:09:18 -0500 Subject: [PATCH 363/774] Update PacSatSim-coef.csv add rest of conversions --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index cea11ef8..854d2b56 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -28,6 +28,9 @@ 27,-,O2Conc,0,0.01,0,0,0,0,Sint16,0,4096,O2 concentration as percentage 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW 29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 +30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset +31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset +32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 437d65a4243a76d1bbacc2c7b9301b73cee9851d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:18:39 -0500 Subject: [PATCH 364/774] Update PacSatSim-coef.csv add Status enum 33 --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 854d2b56..0c6fd915 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -31,6 +31,7 @@ 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset +33,-,Status,0,0,0,0,0,0,Enum,0,4096,ON:OFF NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From db20b27839e5195761d7d1ae3b128c22d61750cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:19:21 -0500 Subject: [PATCH 365/774] Update PacSatSim_rttelemetry.csv add Status 33 --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 251badf4..a8d345d9 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -34,8 +34,8 @@ 32,realTime,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature 33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,realTime,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,realTime,SimulatedTelemetry,1,-,STATUS_ON_OFF,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +35,realTime,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,realTime,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator 37,realTime,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator 38,realTime,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator 39,realTime,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator @@ -63,3 +63,4 @@ + From a4f2c665c59bb46e0d9e77dd114b4c8bf61d496f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:24:09 -0500 Subject: [PATCH 366/774] Update PacSatSim_rttelemetry.csv add rest of enums --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index a8d345d9..e37be32a 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -44,7 +44,7 @@ 42,realTime,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received 43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status 44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status -45,realTime,C2CStatus,2,-,COMMAND_STATUS,Computer Software,3,5,0,Command Control, Command & Control Status +45,realTime,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status 46,realTime,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted 47,realTime,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V 48,realTime,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected @@ -64,3 +64,4 @@ + From 3d26d214526f812f0d89cb1d6a1cc3b6c4a61d12 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:24:17 -0500 Subject: [PATCH 367/774] Update PacSatSim-coef.csv add rest of enums --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 0c6fd915..46902f05 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -32,6 +32,7 @@ 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,ON:OFF +34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 5a7f1d9c0fcaa4f59e8a4a2187742a2633818a09 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:34:37 -0500 Subject: [PATCH 368/774] Update PacSatSim_rttelemetry.csv remove 42 and 43 --- .../PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index e37be32a..62f4b01f 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -45,13 +45,13 @@ 43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status 44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status 45,realTime,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status -46,realTime,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,realTime,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -48,realTime,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +46,realTime,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,realTime,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V +48,realTime,ICR2dot5VProt,12,V,0,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected 49,realTime,rf6,12,-,0,NONE,0,0,0,None,None 50,realTime,rf7,12,-,0,NONE,0,0,0,None,None -51,realTime,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,realTime,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +51,realTime,MuxTest,12,V,0,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,realTime,LtVGACtl,12,V,0,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) 53,realTime,pad,4,-,34,NONE,0,0,0,None,Unused 54,realTime,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance 55,realTime,pad1,1,-,0,NONE,0,0,0,NONE,Filler @@ -65,3 +65,4 @@ + From 7358da25e7631281c519856e553be0fef233272f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:40:42 -0500 Subject: [PATCH 369/774] Update PacSatSim.properties --- spacecraft/PacSatGround_0.46o/PacSatSim.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.properties b/spacecraft/PacSatGround_0.46o/PacSatSim.properties index f719eb84..8ff5be50 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.properties +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.properties @@ -15,7 +15,6 @@ show_user_files=true supports_file_upload=true norad_id=30776 psf_header_check_sums=false -commandsFile=pacsat.commands is_command_station=true secret_key=Not-required commandsFile=PacSatSim.commands From f526b10e7b63d4e752d3db599d2a82ededc77dea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:34:29 -0500 Subject: [PATCH 370/774] Create txLED.py --- txLED.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 txLED.py diff --git a/txLED.py b/txLED.py new file mode 100644 index 00000000..af9b6d51 --- /dev/null +++ b/txLED.py @@ -0,0 +1,25 @@ +import RPi.GPIO as GPIO +import subprocess +import time +import os +from time import sleep + +txPin = 27 +pttPin = 20 + +GPIO.setmode(GPIO.BCM) +GPIO.setwarnings(False) +GPIO.setup(txPin, GPIO.OUT) +GPIO.output(txPin, 0) +print("0") +GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) + +while (True): + sleep(0.1) + GPIO.wait_for_edge(pttPin, GPIO.FALLING) + GPIO.output(txPin, 1) + sleep(0.1) + print("1") + GPIO.wait_for_edge(pttPin, GPIO.RISING) + GPIO.output(txPin, 0) + print("0") From c341d5a3b46ae92207e6d538dd54555bd25da879 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:44:34 -0500 Subject: [PATCH 371/774] Update transmit.py add txLed control by PTT --- transmit.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/transmit.py b/transmit.py index d0301441..8a535fa7 100644 --- a/transmit.py +++ b/transmit.py @@ -423,16 +423,28 @@ if __name__ == "__main__": output(ptt, 1) if (mode == 'a'): print("AFSK") - elif (mode == 'p'): - print("Pacsat") -# system('/home/pi/CubeSatSim/pacsatsim.sh') -# system('sudo systemctl restart pacsatsim') - while True: - sleep(30) - elif (mode == 'P'): - print("Pacsat Ground Station") - while True: - sleep(30) + elif (mode == 'p') or (mode == 'P'): + if (mode == 'P'): + print("Pacsat Ground Station") + else: + print("Pacsat") +# txPin = 27 + pttPin = 20 + + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(txLed, GPIO.OUT) + GPIO.output(txLed, 0) + + GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) + + while (True): + sleep(0.1) + GPIO.wait_for_edge(pttPin, GPIO.FALLING) + GPIO.output(txLed, 1) + sleep(0.1) + GPIO.wait_for_edge(pttPin, GPIO.RISING) + GPIO.output(txLed, 1) else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From 61cec95c9733572abefe38bbb5f48bd56197e9a6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:54:29 -0500 Subject: [PATCH 372/774] Update transmit.py change pttPin from 1 to 0 --- transmit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 8a535fa7..6fe0bae4 100644 --- a/transmit.py +++ b/transmit.py @@ -435,6 +435,7 @@ if __name__ == "__main__": GPIO.setwarnings(False) GPIO.setup(txLed, GPIO.OUT) GPIO.output(txLed, 0) + print("0") GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) @@ -442,9 +443,11 @@ if __name__ == "__main__": sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.FALLING) GPIO.output(txLed, 1) + print("1") sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.RISING) - GPIO.output(txLed, 1) + GPIO.output(txLed, 0) + print("0") else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From 398fc71782eaf62fcbaab5bdbef3c3ec4ade53ec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:57:04 -0500 Subject: [PATCH 373/774] Update transmit.py remove pttPin set --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6fe0bae4..60036a26 100644 --- a/transmit.py +++ b/transmit.py @@ -437,7 +437,7 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") - GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) +# GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) while (True): sleep(0.1) From 7ae10fdbc5ea956bad80a69e7d58b84892660a91 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:17:41 -0500 Subject: [PATCH 374/774] Update transmit.service change to user pi --- systemd/transmit.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/transmit.service b/systemd/transmit.service index ab6dd815..0b77ff50 100644 --- a/systemd/transmit.service +++ b/systemd/transmit.service @@ -8,7 +8,7 @@ WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit Restart=always -User=root +User=pi [Install] WantedBy=default.target From 5c29fffe057d5a145494730c6c19e0b559050f1e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:19:47 -0500 Subject: [PATCH 375/774] Update transmit.py remove pull-up on pttPin --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 60036a26..13d2bc1a 100644 --- a/transmit.py +++ b/transmit.py @@ -437,8 +437,8 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") -# GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) - + GPIO.setup(pttPin, GPIO.IN) + while (True): sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.FALLING) From 6f65d5efa57f9c9a0e7cfb129ea8333f8b5ce02d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 22:29:47 -0500 Subject: [PATCH 376/774] Update direwolf-pacsatsim-pwm.conf remove txled ptt --- direwolf/direwolf-pacsatsim-pwm.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index d0649d2f..c0890790 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,6 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 -PTT GPIO 27 #Transmit LED MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 6532c062840569ccdb33481f42aa0856c9deafc9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 22:46:08 -0500 Subject: [PATCH 377/774] Update pacsat.sh add pi user to gpio --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 6a00522a..5151e803 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -77,6 +77,8 @@ echo #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +sudo usermod -a -G gpio pi + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" # 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 435045 & From e1b916e4dea9b93608938be4931055e22b9cbac2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:14:00 -0500 Subject: [PATCH 378/774] Update pacsatsim.service change user to pi --- systemd/pacsatsim.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/pacsatsim.service b/systemd/pacsatsim.service index e65044af..d5163bd6 100644 --- a/systemd/pacsatsim.service +++ b/systemd/pacsatsim.service @@ -8,7 +8,7 @@ WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit Restart=always -User=root +User=pi [Install] WantedBy=default.target From 9302ac01b9619bab5ef5d8e1026567cef606bfd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:15:54 -0500 Subject: [PATCH 379/774] Update update add pacsatsim.service installation --- update | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/update b/update index a9188a67..3ae8add9 100755 --- a/update +++ b/update @@ -105,6 +105,22 @@ else FLAG=1 fi +FILE=/etc/systemd/system/pacsatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then + echo "changed command.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + FLAG=1 + else + echo "no change to pacsatsim.service." + fi +else + echo "creating pacsatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo systemctl enable pacsatsim + FLAG=1 +fi + FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg if [ ! -f "$FILE" ]; then echo "Copying SSTV image 1." From 65cd80f7f2608c802a3a7a26e7421bdb94aa90d8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:19:16 -0500 Subject: [PATCH 380/774] Update transmit.py start and stop pacsatsim.service --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 13d2bc1a..e1c6aa77 100644 --- a/transmit.py +++ b/transmit.py @@ -245,6 +245,7 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) + system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") @@ -428,6 +429,7 @@ if __name__ == "__main__": print("Pacsat Ground Station") else: print("Pacsat") + system("sudo systemctl restart pacsatsim") # txPin = 27 pttPin = 20 From 24d4b6c743492e44bcec91e68029595552a1362b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:24:38 -0500 Subject: [PATCH 381/774] Update config add pacsat text --- config | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config b/config index 1929eee1..7759faed 100755 --- a/config +++ b/config @@ -1424,12 +1424,12 @@ elif [ "$1" = "-g" ]; then elif [ "$1" = "-G" ]; then - echo "Changing to Pacsat mode" + echo "Changing to PacSatSim mode" value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value - echo "changing CubeSatSim to Pacsat mode" +# echo "changing CubeSatSim to Pacsat mode" sudo echo "p" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver @@ -1444,12 +1444,14 @@ elif [ "$1" = "-G" ]; then elif [ "$1" = "-I" ]; then - echo "Changing to Pacsat Ground Station mode" - value=`cat /home/pi/CubeSatSim/.mode` + echo "Changing to PacSat Ground Station mode" + echo + echo "Run the Pacsat Ground Station in the Desktop" + value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value - echo "changing CubeSatSim to Pacsat mode" +# echo "changing CubeSatSim to Pacsat mode" sudo echo "P" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver @@ -1462,8 +1464,6 @@ elif [ "$1" = "-I" ]; then restart=1 fi - - elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -1500,8 +1500,8 @@ elif [ "$1" = "-h" ]; then echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings" - echo " -G Change to Pacsat mode" - echo " -I Changing to Pacsat Ground Station mode" + echo " -G Change to PacSatSim mode" + echo " -I Changing to PacSat Ground Station mode" echo exit From 99a280a6061d565e58324c4d6c96c4e5e810ff7f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Feb 2026 22:57:33 -0500 Subject: [PATCH 382/774] Update main.h change PACSAT to 8 --- main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.h b/main.h index 83f993ae..068d45d6 100644 --- a/main.h +++ b/main.h @@ -108,7 +108,7 @@ FILE *telem_file; #define BPSK 3 #define SSTV 4 #define CW 5 -#define PACSAT 6 +#define PACSAT 8 #define REPEATER 11 #define TXCOMMAND 12 #define PACSATGND 13 From 9518ba870ed4548fcaf00285b0578312a9a300c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 25 Feb 2026 16:04:55 -0500 Subject: [PATCH 383/774] Update GPIO output and setup for PTT pin 20 Refactor GPIO handling to use RPi.GPIO library for pin 20. --- transmit.py | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/transmit.py b/transmit.py index 0ba37e65..66973178 100644 --- a/transmit.py +++ b/transmit.py @@ -1,7 +1,7 @@ #!/usr/bin/env python -#import RPi.GPIO as GPIO -#from RPi.GPIO import output +import RPi.GPIO as GPIO +from RPi.GPIO import output #import subprocess import time from time import sleep @@ -15,9 +15,12 @@ import random import subprocess def output(pin, value): - command = "gpio -g write " + str(pin) + " " + str(value) - system(command) - print(command) + if (pin != 20): + command = "gpio -g write " + str(pin) + " " + str(value) + system(command) + print(command) + else: # ptt pin + GPIO.output(pin, value) def input(pin): # command = "gpio -g read " + str(pin) @@ -37,9 +40,17 @@ def input(pin): def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": - command = "gpio -g mode " + str(pin) + " " + config - system(command) - print(command) + if (pin != 20): + command = "gpio -g mode " + str(pin) + " " + config + system(command) + print(command) + else: # ptt pin + GPIO.setwarnings(False) + GPIO.setmode(GPIO.BCM) + if config == "out: + GPIO.setup(27, GPIO.OUT) + else: + GPIO.setup(27, GPIO.IN) else: print(f"Unknown GPIO setup configuration: {config}") From e14ec3569f179354936368e471dce808a232e7e6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 26 Feb 2026 11:06:05 -0500 Subject: [PATCH 384/774] Refactor telemetry CSV format and remove empty lines Removed unused lines and adjusted telemetry data format. --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 62f4b01f..cf5b8ff9 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -60,9 +60,3 @@ 58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler - - - - - - From 50d07574682d32187c9c4a11e8fae952654217ac Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 09:52:00 -0500 Subject: [PATCH 386/774] Implement telemetry binary file saving for PACSAT mode Added PACSAT mode handling to save telemetry data to a binary file. --- main.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index f520add1..25ae2ed0 100644 --- a/main.c +++ b/main.c @@ -873,9 +873,9 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV or PACSAT or PACSATGND + } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); sleep(30); } @@ -1562,7 +1562,22 @@ void get_tlm_fox() { encodeA(b, 63 + head_offset, 0x00); encodeA(b, 62 + head_offset, 0x01); encodeB(b, 74 + head_offset, 0xfff); - } + } + + if (mode == PACSAT) + { + telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); + if (telem_binary != NULL) { + int bytes_written = fwrite(b, 78, 1, telem_binary); + printf("Writing %d bytes to tlm.bin\n", bytes_written); + fclose(telem_binary); + } + else + printf("Error opening tlm.bin\n"); + } + else + + { short int data10[headerLen + rsFrames * (rsFrameLen + parityLen)]; short int data8[headerLen + rsFrames * (rsFrameLen + parityLen)]; @@ -1873,7 +1888,8 @@ void get_tlm_fox() { firstTime = 0; // else if (frames_sent > 0) //5) // firstTime = 0; - + + } return; } From d098731eca97ffeab210948a5b5dd0fd02a45257 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 09:52:35 -0500 Subject: [PATCH 387/774] Declare telem_binary variable at the point of use --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 25ae2ed0..6804af68 100644 --- a/main.c +++ b/main.c @@ -1566,7 +1566,7 @@ void get_tlm_fox() { if (mode == PACSAT) { - telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); + FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { int bytes_written = fwrite(b, 78, 1, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written); From a9c574d4ede56e7514d413043a38342ce644e012 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 10:11:13 -0500 Subject: [PATCH 388/774] Fix extra brackets in main.c Removed extra brackets that were unnecessary in the code. --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 6804af68..8d1b7615 100644 --- a/main.c +++ b/main.c @@ -1576,7 +1576,7 @@ void get_tlm_fox() { printf("Error opening tlm.bin\n"); } else - + { // extra bracket for some reason? { short int data10[headerLen + rsFrames * (rsFrameLen + parityLen)]; short int data8[headerLen + rsFrames * (rsFrameLen + parityLen)]; @@ -1890,6 +1890,7 @@ void get_tlm_fox() { // firstTime = 0; } + } // extra bracket for some reason? return; } From feab25f51c4cbbfaaa5fad494489b6e872c26e06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 10:12:51 -0500 Subject: [PATCH 389/774] Fix fwrite call to use sizeof(char) for byte count --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 8d1b7615..3ff0e941 100644 --- a/main.c +++ b/main.c @@ -1568,7 +1568,7 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { - int bytes_written = fwrite(b, 78, 1, telem_binary); + int bytes_written = fwrite(b, sizeof(char), 78, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written); fclose(telem_binary); } From e82b0fb7b5016c25221c90f1783ecb5e973117a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 10:39:20 -0500 Subject: [PATCH 390/774] Fix byte count for writing to tlm.bin to 70 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 3ff0e941..f1d491ac 100644 --- a/main.c +++ b/main.c @@ -1568,7 +1568,7 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { - int bytes_written = fwrite(b, sizeof(char), 78, telem_binary); + int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written); fclose(telem_binary); } From 195f8fac1a89969fca243deab970086cb257299b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:31:15 -0500 Subject: [PATCH 391/774] Add timestamp field to telemetry CSV Added a timestamp field to the telemetry data. --- .../PacSatSim_maxtelemetry.csv | 126 +++++++++--------- 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv index 9bf2f291..7713c778 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv @@ -1,62 +1,64 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -1,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage -3,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current -7,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage -9,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage -12,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current -15,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current -16,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current -17,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current -18,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current -19,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current -20,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage -21,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -24,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication -26,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity -31,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current -32,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature -33,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -34,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -37,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -38,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -40,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -41,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator -42,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received -43,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status -44,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status -45,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status -46,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -48,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -49,MAX,rf6,12,-,0,NONE,0,0,0,None,None -50,MAX,rf7,12,-,0,NONE,0,0,0,None,None -51,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -53,MAX,pad,4,-,34,NONE,0,0,0,None,Unused -54,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -55,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler -56,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -57,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -58,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -59,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -60,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler +62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds +1,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +3,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage +4,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +5,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +6,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +7,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current +8,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +9,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage +10,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage +11,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage +12,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage +13,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage +14,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage +15,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current +16,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current +17,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current +18,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current +19,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current +20,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current +21,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage +22,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +23,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +24,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +25,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +26,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication +27,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +28,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +29,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +30,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +31,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity +32,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current +33,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature +34,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +35,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +36,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +37,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +38,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +39,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +40,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +41,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +42,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator +43,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received +44,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status +45,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status +46,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status +47,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +48,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +49,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +50,MAX,rf6,12,-,0,NONE,0,0,0,None,None +51,MAX,rf7,12,-,0,NONE,0,0,0,None,None +52,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +53,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +54,MAX,pad,4,-,34,NONE,0,0,0,None,Unused +55,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +56,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler +57,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +58,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +59,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +60,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +61,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 903c4e1e1a269eef59e0999215199d1575d99a27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:38:13 -0500 Subject: [PATCH 392/774] Modify telemetry CSV to add timestamp and update data types Updated telemetry data format to include timestamp and change data types from integer to float for various sensors. --- .../PacSatSim_rttelemetry.csv | 125 +++++++++--------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index cf5b8ff9..818c8360 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,62 +1,63 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,realTime,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage -3,realTime,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,realTime,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,realTime,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,realTime,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current -7,realTime,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,realTime,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage -9,realTime,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,realTime,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,realTime,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage -12,realTime,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,realTime,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,realTime,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current -15,realTime,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current -16,realTime,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current -17,realTime,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current -18,realTime,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current -19,realTime,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current -20,realTime,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage -21,realTime,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,realTime,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,realTime,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,realTime,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication -26,realTime,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,realTime,SatelliteXAxisAngularVelocity,12,dps,31,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,realTime,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,realTime,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,realTime,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity -31,realTime,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current -32,realTime,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,realTime,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,realTime,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -37,realTime,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -38,realTime,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,realTime,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -40,realTime,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -41,realTime,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator -42,realTime,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received -43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status -44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status -45,realTime,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status -46,realTime,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,realTime,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V -48,realTime,ICR2dot5VProt,12,V,0,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -49,realTime,rf6,12,-,0,NONE,0,0,0,None,None -50,realTime,rf7,12,-,0,NONE,0,0,0,None,None -51,realTime,MuxTest,12,V,0,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,realTime,LtVGACtl,12,V,0,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -53,realTime,pad,4,-,34,NONE,0,0,0,None,Unused -54,realTime,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -55,realTime,pad1,1,-,0,NONE,0,0,0,NONE,Filler -56,realTime,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -57,realTime,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler +62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds +1,float,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,float,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +3,float,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +4,float,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +5,float,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +6,float,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +7,float,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current +8,float,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +9,float,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +10,float,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +11,float,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +12,float,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +13,float,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +14,float,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +15,float,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current +16,float,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +17,float,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +18,float,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current +19,float,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +20,float,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +23,float,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +24,float,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication +27,float,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +28,float,SatelliteXAxisAngularVelocity,12,dps,31,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +29,float,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +30,float,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity +32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +34,float,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +35,float,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +38,float,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +39,float,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +40,float,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +41,float,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +42,float,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator +43,float,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +44,float,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +45,float,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +46,float,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status +47,float,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted +48,float,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V +49,float,ICR2dot5VProt,12,V,0,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +50,float,rf6,12,-,0,NONE,0,0,0,None,None +51,float,rf7,12,-,0,NONE,0,0,0,None,None +52,float,MuxTest,12,V,0,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +53,float,LtVGACtl,12,V,0,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +54,float,pad,4,-,34,NONE,0,0,0,None,Unused +55,float,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +56,float,pad1,1,-,0,NONE,0,0,0,NONE,Filler +57,float,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +58,float,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler From 1e484a3beb6d227d1ced3f7fa17cbb736ce5438f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:47:05 -0500 Subject: [PATCH 393/774] Add timestamp at start of tlm --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index f1d491ac..2e83cf63 100644 --- a/main.c +++ b/main.c @@ -1568,8 +1568,10 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { + time_t now = time(0); + fwrite(b, sizeof(how), 1, &now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); - printf("Writing %d bytes to tlm.bin\n", bytes_written); + printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); } else From e686d1bf17787a84152501fc8b73ff12e116ac19 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:47:45 -0500 Subject: [PATCH 394/774] Fix fwrite size argument for time variable --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 2e83cf63..aab0a37a 100644 --- a/main.c +++ b/main.c @@ -1569,7 +1569,7 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { time_t now = time(0); - fwrite(b, sizeof(how), 1, &now); + fwrite(b, sizeof(now), 1, &now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 19bed2ab7368a7dd65119379abbd129d7e70f2f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:48:42 -0500 Subject: [PATCH 395/774] Update main.c with correct time --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index aab0a37a..216b192e 100644 --- a/main.c +++ b/main.c @@ -1569,7 +1569,7 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { time_t now = time(0); - fwrite(b, sizeof(now), 1, &now); + fwrite(b, sizeof(now), 1, now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 5d2b573377c130b2a276cd5e0aa5647a284725ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:51:13 -0500 Subject: [PATCH 396/774] Update main.c fix timestamp --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 216b192e..b6e8c452 100644 --- a/main.c +++ b/main.c @@ -1568,8 +1568,8 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { - time_t now = time(0); - fwrite(b, sizeof(now), 1, now); + unsigned int now = (unsigned int)time(0); + fwrite(b, sizeof(now), 1, &now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 67d4b97fde3034ec95f29596c9c38bbe63cb3c68 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:53:19 -0500 Subject: [PATCH 397/774] Update main.c fix timestamp write --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index b6e8c452..df40ddf3 100644 --- a/main.c +++ b/main.c @@ -1569,7 +1569,7 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { unsigned int now = (unsigned int)time(0); - fwrite(b, sizeof(now), 1, &now); + fwrite(&now, sizeof(now), 1, telem_binary); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 83ebcba750a1dde9c5ff3546808fd8060d191b38 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:06:04 -0500 Subject: [PATCH 398/774] print battery voltage for debugging --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index df40ddf3..e9f076ba 100644 --- a/main.c +++ b/main.c @@ -1342,6 +1342,7 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); encodeA(b, 3 + head_offset, batt_c_v); + printf("batt_c_v: %d \n", batt_c_v); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel From b6f3537debc4641a52af3dba50763d73b46d2a92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:12:01 -0500 Subject: [PATCH 399/774] Update main.c print b --- main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.c b/main.c index e9f076ba..69f40426 100644 --- a/main.c +++ b/main.c @@ -1569,6 +1569,14 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { + + int count; + printf("b is: \n"); + for (count = 0; count < 70; count++) { + printf("%02X", b[count]); + } + printf("\n"); + unsigned int now = (unsigned int)time(0); fwrite(&now, sizeof(now), 1, telem_binary); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); From 3f6dcead9befce80220eb856ba8205836cf5d047 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:18:35 -0500 Subject: [PATCH 400/774] Update main.c with index print --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 69f40426..5af47262 100644 --- a/main.c +++ b/main.c @@ -1342,7 +1342,7 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); encodeA(b, 3 + head_offset, batt_c_v); - printf("batt_c_v: %d \n", batt_c_v); + printf("batt_c_v: %d 3+head_offset: %d\n", batt_c_v, 3+head_offset); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel From 7ce0510324fe9949826a99b35b8da9ed7b31aca7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:29:59 -0500 Subject: [PATCH 401/774] Update main.c print first 5 bytes of b --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index 5af47262..af617292 100644 --- a/main.c +++ b/main.c @@ -1341,7 +1341,9 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); + printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); encodeA(b, 3 + head_offset, batt_c_v); + printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); printf("batt_c_v: %d 3+head_offset: %d\n", batt_c_v, 3+head_offset); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel From 3aee1d6a32287e1d23bd6ec996076718e114b94f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:35:39 -0500 Subject: [PATCH 402/774] Fix b declaration bug --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index af617292..27481725 100644 --- a/main.c +++ b/main.c @@ -1175,6 +1175,8 @@ void get_tlm_fox() { smaller = (int) (S_RATE / (2 * freq_Hz)); + if (mode == PACSAT) + dataLen = 78; short int b[dataLen]; short int b_max[dataLen]; short int b_min[dataLen]; @@ -1542,7 +1544,7 @@ void get_tlm_fox() { encodeA(b, 51 + head_offset, status); encodeB(b, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); - if (mode == BPSK) { + if ((mode == BPSK) || (mode == PACSAT)) { encodeA(b_max, 51 + head_offset, status); encodeA(b_min, 51 + head_offset, status); encodeB(b_max, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); From 536e03dd0e4d6ce538b2dd88759bb7433a20968f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:51:21 -0500 Subject: [PATCH 403/774] Update main.c print bytes of b[] --- main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 27481725..edd0ae0e 100644 --- a/main.c +++ b/main.c @@ -1574,16 +1574,18 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { + int bytes_written = 4; + unsigned int now = (unsigned int)time(0); + fwrite(&now, sizeof(now), 1, telem_binary); + int count; printf("b is: \n"); for (count = 0; count < 70; count++) { - printf("%02X", b[count]); + fwrite((char)b[count], 1, 1, telem_binary); + printf("%02X ", b[count]); + bytes_written++; } printf("\n"); - - unsigned int now = (unsigned int)time(0); - fwrite(&now, sizeof(now), 1, telem_binary); - int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); } From a6beb17b670109d09b455a60813fc9719ab955e0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:53:15 -0500 Subject: [PATCH 404/774] Update main.c change to bytes --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index edd0ae0e..5707acae 100644 --- a/main.c +++ b/main.c @@ -1579,10 +1579,12 @@ void get_tlm_fox() { fwrite(&now, sizeof(now), 1, telem_binary); int count; + char byte; printf("b is: \n"); for (count = 0; count < 70; count++) { - fwrite((char)b[count], 1, 1, telem_binary); - printf("%02X ", b[count]); + byte = b[count]; + fwrite(&byte, 1, 1, telem_binary); + printf("%02X ", byte); bytes_written++; } printf("\n"); From 2b82a75a8553aa0a79426a162dc1d4900fc57c00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 14:43:58 -0500 Subject: [PATCH 405/774] Update PacSatSim_rttelemetry.csv --- .../PacSatSim_rttelemetry.csv | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 818c8360..6c4c6485 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,7 +1,7 @@ 62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds -1,float,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -2,float,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +1,int,Sensor 2,12,1,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,int,Sensor 3,12,1,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 3,float,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage 4,float,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis 5,float,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis @@ -14,15 +14,15 @@ 12,float,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage 13,float,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage 14,float,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage -15,float,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current -16,float,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current -17,float,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current -18,float,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current -19,float,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current -20,float,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +15,int,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current +16,int,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +17,int,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +18,int,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current +19,int,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +20,int,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current 21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -23,float,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,int,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 24,float,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count 26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication @@ -33,18 +33,18 @@ 31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity 32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,float,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -35,float,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +34,int,Sensor 1,1,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +35,float,STEMPayloadStatus,1,-,35,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) 37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -38,float,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -39,float,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -40,float,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -41,float,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -42,float,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator -43,float,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received -44,float,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status -45,float,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +38,float,PayloadStatus1,1,-,35,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +39,float,I2CBus0Failure,1,-,35,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +40,float,I2CBus1Failure,1,-,35,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +41,float,I2CBus3Failure,1,-,35,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +42,float,CameraFailure,1,-,35,Computer Hardware,2,4,0,Camera,Camera failure indicator +43,int,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +44,float,RxAntenna,1,-,36,Radio,1,3,0,RX Antenna,Receive antenna status +45,float,TxAntenna,1,-,36,Radio,1,2,0,TX Antenna,Transmit antenna status 46,float,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status 47,float,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted 48,float,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V @@ -61,3 +61,4 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From e9d485cf5111eb3d0aec5047029df6a8c5c57f50 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 14:44:09 -0500 Subject: [PATCH 406/774] Update PacSatSim-coef.csv --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 46902f05..a683c5cc 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -31,8 +31,10 @@ 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset -33,-,Status,0,0,0,0,0,0,Enum,0,4096,ON:OFF +33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:OFF 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS +35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,FAIL:OK +36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 836b45a86794828016a7db97e2f61d6f018552b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 14:49:11 -0500 Subject: [PATCH 407/774] Update PacSatSim_rttelemetry.csv remove blank lines at end --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 6c4c6485..84e00afd 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -61,4 +61,3 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From 501769acea9ba0630a5d4238b6cfd8321d39447a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 15:04:30 -0500 Subject: [PATCH 408/774] Update PacSatSim-coef.csv fix On/Off --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index a683c5cc..16ffe513 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -31,7 +31,7 @@ 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset -33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:OFF +33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,FAIL:OK 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED From 03a06b453dd50101a2ead16edd67fe7a40cfc9a6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 15:08:49 -0500 Subject: [PATCH 409/774] Update PacSatSim_rttelemetry.csv fix commands count --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 84e00afd..73c94314 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -42,7 +42,7 @@ 40,float,I2CBus1Failure,1,-,35,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator 41,float,I2CBus3Failure,1,-,35,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator 42,float,CameraFailure,1,-,35,Computer Hardware,2,4,0,Camera,Camera failure indicator -43,int,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,int,GroundCommands,4,-,2,Computer Software,3,3,0,Ground Commands,Number of ground commands received 44,float,RxAntenna,1,-,36,Radio,1,3,0,RX Antenna,Receive antenna status 45,float,TxAntenna,1,-,36,Radio,1,2,0,TX Antenna,Transmit antenna status 46,float,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status @@ -61,3 +61,4 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 18f67be38d80ea6ec1fa868927de225716050e71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 15:10:15 -0500 Subject: [PATCH 410/774] Update PacSatSim_rttelemetry.csv remove extra blank lines at end --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 73c94314..df8217cb 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -61,4 +61,3 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From ab26f6f34384a45505d0abbc40cfa50f9d95ea95 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:04:35 -0500 Subject: [PATCH 412/774] cleanup --- main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index 5707acae..395d67db 100644 --- a/main.c +++ b/main.c @@ -1343,10 +1343,7 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); - printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); encodeA(b, 3 + head_offset, batt_c_v); - printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); - printf("batt_c_v: %d 3+head_offset: %d\n", batt_c_v, 3+head_offset); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel @@ -1898,11 +1895,6 @@ void get_tlm_fox() { //transmitStatus = -1; } } - if (!transmit) { - fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); - fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); - } - if (socket_open == 1) firstTime = 0; // else if (frames_sent > 0) //5) @@ -1910,6 +1902,12 @@ void get_tlm_fox() { } } // extra bracket for some reason? + + if (!transmit) { + fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); + fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); + } + return; } From 9bb0dbac56135556156d01b2867ef50ccd8ce8ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:14:37 -0500 Subject: [PATCH 413/774] Update log with -h and r option for realtime --- log | 74 ++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/log b/log index f5b301c5..55f3c9c1 100755 --- a/log +++ b/log @@ -2,26 +2,64 @@ echo -e "\nLog file script for CubeSatSim\n" -echo "To exit, type Control-C" +if [ "$1" = "-h" ] ; then + echo "Displays systemd logs for the chose process. The choices are:" + echo " -d cubesatsim (also no choice gives you this)" + echo " -t transmit " + echo " -c command and control" + echo "Default is the log is dumpted to the screen and written to a file." + echo "If an additional r is included, the log is realtime, and exits with a Control-C" + echo + exit +fi + +REALTIME=0 +if [ "$2" = "r" ] ; then + REALTIME=1 +fi -echo +if [ "$REALTIME" = "1" ] ; then -sleep 2 + echo "To exit, type Control-C" + echo + sleep 2 + + if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then + sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt + # cat /home/pi/CubeSatSim/logt.txt + # echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" + elif [ "$1" = "-c" ]; then + sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt + cat /home/pi/CubeSatSim/logc.txt + # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" + elif [ "$1" = "-p" ]; then + sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt + cat /home/pi/CubeSatSim/logp.txt + # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" + else + sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt + # cat /home/pi/CubeSatSim/log.txt + # echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + fi -if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then - sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt -# cat /home/pi/CubeSatSim/logt.txt -# echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" -elif [ "$1" = "-c" ]; then - sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt - cat /home/pi/CubeSatSim/logc.txt -# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" -elif [ "$1" = "-p" ]; then - sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt - cat /home/pi/CubeSatSim/logp.txt -# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else - sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt -# cat /home/pi/CubeSatSim/log.txt -# echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + + if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then + sudo journalctl -u transmit > /home/pi/CubeSatSim/logt.txt + cat /home/pi/CubeSatSim/logt.txt + echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" + elif [ "$1" = "-c" ]; then + sudo journalctl -u command > /home/pi/CubeSatSim/logc.txt + cat /home/pi/CubeSatSim/logc.txt + echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" + elif [ "$1" = "-p" ]; then + sudo journalctl -u pacsatsim > /home/pi/CubeSatSim/logp.txt + cat /home/pi/CubeSatSim/logp.txt + echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" + else + sudo journalctl -u cubesatsim > /home/pi/CubeSatSim/log.txt + cat /home/pi/CubeSatSim/log.txt + echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + fi + fi From ef4627cd76a2dcc58c03c100d0daa48a8df1b59b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:16:49 -0500 Subject: [PATCH 414/774] Update log add back -a --- log | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/log b/log index 55f3c9c1..a516a3c0 100755 --- a/log +++ b/log @@ -5,8 +5,9 @@ echo -e "\nLog file script for CubeSatSim\n" if [ "$1" = "-h" ] ; then echo "Displays systemd logs for the chose process. The choices are:" echo " -d cubesatsim (also no choice gives you this)" - echo " -t transmit " + echo " -t transmit" echo " -c command and control" + echo " -p pacsat" echo "Default is the log is dumpted to the screen and written to a file." echo "If an additional r is included, the log is realtime, and exits with a Control-C" echo @@ -45,19 +46,19 @@ if [ "$REALTIME" = "1" ] ; then else if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then - sudo journalctl -u transmit > /home/pi/CubeSatSim/logt.txt + sudo journalctl -a -u transmit > /home/pi/CubeSatSim/logt.txt cat /home/pi/CubeSatSim/logt.txt echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then - sudo journalctl -u command > /home/pi/CubeSatSim/logc.txt + sudo journalctl -a -u command > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then - sudo journalctl -u pacsatsim > /home/pi/CubeSatSim/logp.txt + sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else - sudo journalctl -u cubesatsim > /home/pi/CubeSatSim/log.txt + sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" fi From d20b8e625f009c370ca36b44b72779e26053152c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:26:21 -0500 Subject: [PATCH 415/774] Update main.c reset firstTime --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 395d67db..9eb4fe5d 100644 --- a/main.c +++ b/main.c @@ -1907,6 +1907,9 @@ void get_tlm_fox() { fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } + + if (firstTime && (mode == PACSAT)) + firstTime = 0; return; } From 377f9090d6b3e779c57a706db370a7a817898849 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:32:46 -0500 Subject: [PATCH 416/774] Update main.c print for first time off --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 9eb4fe5d..b848460b 100644 --- a/main.c +++ b/main.c @@ -1909,8 +1909,10 @@ void get_tlm_fox() { } if (firstTime && (mode == PACSAT)) - firstTime = 0; - + { + firstTime = OFF; + fprintf(stderr, "No longer first time\n"); + } return; } From da78c071f19ee39a12902c4a9170ba07f05bd3ba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:34:10 -0500 Subject: [PATCH 417/774] Update main.c add fflush --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index b848460b..8d67227e 100644 --- a/main.c +++ b/main.c @@ -1912,6 +1912,7 @@ void get_tlm_fox() { { firstTime = OFF; fprintf(stderr, "No longer first time\n"); + fflush(stdout); } return; } From 8e8a4b3dee1f881e26af3289c805dd99f2fedfb2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:37:57 -0500 Subject: [PATCH 419/774] Update main.c comment out first time --- main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 8d67227e..a38404fe 100644 --- a/main.c +++ b/main.c @@ -1908,12 +1908,12 @@ void get_tlm_fox() { fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } - if (firstTime && (mode == PACSAT)) - { - firstTime = OFF; - fprintf(stderr, "No longer first time\n"); - fflush(stdout); - } +// if (firstTime && (mode == PACSAT)) +// { +// firstTime = OFF; +// fprintf(stderr, "No longer first time\n"); +// fflush(stdout); +// } return; } From 368883dcd97dc456f2523c7e404b0252aca7fed9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:41:32 -0500 Subject: [PATCH 420/774] Update main.c move sampleTime set --- main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index a38404fe..e0395330 100644 --- a/main.c +++ b/main.c @@ -1883,8 +1883,7 @@ void get_tlm_fox() { printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); } } - sampleTime = (unsigned int) millis(); // resetting time for sleeping - fflush(stdout); + // if (firstTime == 1) // max -= 1; } @@ -1908,12 +1907,16 @@ void get_tlm_fox() { fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } -// if (firstTime && (mode == PACSAT)) -// { -// firstTime = OFF; -// fprintf(stderr, "No longer first time\n"); -// fflush(stdout); -// } + if (firstTime && (mode == PACSAT)) + { + firstTime = OFF; + fprintf(stderr, "No longer first time\n"); + fflush(stdout); + } + + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); + return; } From 8d9fb6b481b2731a3840588648276b705385acdb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:43:51 -0500 Subject: [PATCH 421/774] Update main.c revert last change --- main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/main.c b/main.c index e0395330..a38404fe 100644 --- a/main.c +++ b/main.c @@ -1883,7 +1883,8 @@ void get_tlm_fox() { printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); } } - + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); // if (firstTime == 1) // max -= 1; } @@ -1907,16 +1908,12 @@ void get_tlm_fox() { fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } - if (firstTime && (mode == PACSAT)) - { - firstTime = OFF; - fprintf(stderr, "No longer first time\n"); - fflush(stdout); - } - - sampleTime = (unsigned int) millis(); // resetting time for sleeping - fflush(stdout); - +// if (firstTime && (mode == PACSAT)) +// { +// firstTime = OFF; +// fprintf(stderr, "No longer first time\n"); +// fflush(stdout); +// } return; } From 2c7bfa025a53ab229ec02d3cf3e207f1f3b9c644 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:46:09 -0500 Subject: [PATCH 422/774] Update main.c try turning firstTime off a different place --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index a38404fe..42ea344c 100644 --- a/main.c +++ b/main.c @@ -1230,9 +1230,12 @@ void get_tlm_fox() { fflush(stdout); sampleTime = (unsigned int) millis(); - } else + } else + { printf("first time - no sleep\n"); - + firstTime = OFF; + } + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); loopTime = millis(); From 8b8ddc567b8bd499ff411f83759f07e2abbcad8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:47:59 -0500 Subject: [PATCH 423/774] Update main.c move sampleTime --- main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.c b/main.c index 42ea344c..07af1578 100644 --- a/main.c +++ b/main.c @@ -1228,13 +1228,12 @@ void get_tlm_fox() { /**/ printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, (unsigned int)frameTime - 750 + pi_zero_2_offset); fflush(stdout); - - sampleTime = (unsigned int) millis(); } else { printf("first time - no sleep\n"); firstTime = OFF; } + sampleTime = (unsigned int) millis(); printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); From 3a805cbfe0fdabcd98c1ccc34975807ef17ecd71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:49:37 -0500 Subject: [PATCH 424/774] Update main.c again revert --- main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 07af1578..a38404fe 100644 --- a/main.c +++ b/main.c @@ -1228,13 +1228,11 @@ void get_tlm_fox() { /**/ printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, (unsigned int)frameTime - 750 + pi_zero_2_offset); fflush(stdout); - } else - { + + sampleTime = (unsigned int) millis(); + } else printf("first time - no sleep\n"); - firstTime = OFF; - } - sampleTime = (unsigned int) millis(); - + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); loopTime = millis(); From d05019609d05268f23a14809b455112f9d7de424 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:53:14 -0500 Subject: [PATCH 425/774] Update main.c write b to dataLen --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index a38404fe..f9c42d01 100644 --- a/main.c +++ b/main.c @@ -1578,7 +1578,7 @@ void get_tlm_fox() { int count; char byte; printf("b is: \n"); - for (count = 0; count < 70; count++) { + for (count = 0; count < dataLen; count++) { byte = b[count]; fwrite(&byte, 1, 1, telem_binary); printf("%02X ", byte); From 5d32e76ca90de74dc5b30f8200d90c38d7a8b710 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:10:02 -0500 Subject: [PATCH 426/774] Update pacsatsim.sh with pacsat_telem --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 76e37d1c..8e89588d 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -201,6 +201,8 @@ else echo fi +sudo /home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & + sleep 5 value=`aplay -l | grep "Loopback"` From 1721b465288d6eca23d017a4c91f869d56d3f751 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:32:14 -0500 Subject: [PATCH 427/774] Update install add pacsat_telem install --- install | 87 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/install b/install index 40c70f12..1d4c8926 100755 --- a/install +++ b/install @@ -124,49 +124,54 @@ cd rpitx ./install.sh -cd - -git clone https://github.com/alanbjohnston/iors_common.git - -cd iors_common/Debug/ - -make all - -sudo ./install.sh - -cd - -#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 - -make all - -mkdir /home/pi/PacSat -mkdir /home/pi/PacSat/pacsat -mkdir /home/pi/PacSat/pacsat/dir -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=AMSAT-12" >> pacsat.config -echo "broadcast_callsign=AMSAT-11" >> pacsat.config -echo "digi_callsign=AMSAT-1" >> pacsat.config -echo "max_frames_in_tx_buffer=5" >> pacsat.config +FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled +if [ -f "$FILE" ]; then + cd + git clone https://github.com/alanbjohnston/iors_common.git + cd iors_common/Debug/ + make all + sudo ./install.sh + + cd + #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 + make all + + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + + export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + + #value=`cat /home/pi/CubeSatSim/sim.cfg` + #echo "$value" > /dev/null + #set -- $value + + echo "bit_rate=9600" > pacsat.config + echo "bbs_callsign=AMSAT-12" >> pacsat.config + echo "broadcast_callsign=AMSAT-11" >> pacsat.config + echo "digi_callsign=AMSAT-1" >> pacsat.config + echo "max_frames_in_tx_buffer=5" >> pacsat.config + + echo "pb_open=1" > pacsat.state + echo "uplink_open=1" >> pacsat.state + echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state + echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state +fi -echo "pb_open=1" > pacsat.state -echo "uplink_open=1" >> pacsat.state -echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state -echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state +FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled +if [ -f "$FILE" ]; then + cd + git clone https://github.com/alanbjohnston/pacsat_telem.git + cd pacsat_telem + git checkout master-fox + cd Debug + make all +fi sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt From c52a8854199aaff03320f72f3eb822414ae4234f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:37:12 -0500 Subject: [PATCH 428/774] Update PacSatSim_rttelemetry.csv fixed sensor 1 size --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index df8217cb..f6e7f4c4 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -33,7 +33,7 @@ 31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity 32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,int,Sensor 1,1,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,int,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 35,float,STEMPayloadStatus,1,-,35,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) 37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator @@ -61,3 +61,4 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 3d2836c3acfbca162d490393fd2ade2893e6b7c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:49:39 -0500 Subject: [PATCH 429/774] Update main.c turn firstTime off with sleepTime set --- main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index f9c42d01..9b67d612 100644 --- a/main.c +++ b/main.c @@ -461,7 +461,8 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); - } else if (mode == BPSK) { +// } else if (mode == BPSK) { + } else { bitRate = 1200; rsFrames = 3; payloads = 6; @@ -873,7 +874,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (AT)) {// FSK or BPSK get_tlm_fox(); } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); @@ -1175,8 +1176,8 @@ void get_tlm_fox() { smaller = (int) (S_RATE / (2 * freq_Hz)); - if (mode == PACSAT) - dataLen = 78; +// if (mode == PACSAT) +// dataLen = 78; short int b[dataLen]; short int b_max[dataLen]; short int b_min[dataLen]; @@ -1231,7 +1232,10 @@ void get_tlm_fox() { sampleTime = (unsigned int) millis(); } else + { printf("first time - no sleep\n"); + firstTime = OFF; + } printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); From dc9cdb2034d2d33de9c5e1653479af19fa84e816 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:51:46 -0500 Subject: [PATCH 430/774] Update main.c fix missing mode == PACSAT --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 9b67d612..2ce98d40 100644 --- a/main.c +++ b/main.c @@ -874,7 +874,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (AT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACAT)) {// FSK or BPSK get_tlm_fox(); } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); From 74cdc3609a383d24e9fb95d7ce1bfd9cf9cee100 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:52:20 -0500 Subject: [PATCH 431/774] Update main.c PACAT typo --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 2ce98d40..42e07e43 100644 --- a/main.c +++ b/main.c @@ -874,7 +874,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (mode == PACAT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK get_tlm_fox(); } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); From f68ac4909508aece6c8a8285f8498660ff6921d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 20:23:12 -0500 Subject: [PATCH 432/774] Update main.c start and stop pacsatsim.service --- main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 42e07e43..174a3bbb 100644 --- a/main.c +++ b/main.c @@ -236,7 +236,7 @@ int main(int argc, char * argv[]) { printf("Mode is Transmit Command\n"); } else if ( mode_string == 'p') { mode = PACSAT; - printf("Mode is Pacsat\n"); + printf("Mode is Pacsat\n"); } else if ( mode_string == 'P') { mode = PACSATGND; printf("Mode is Pacsat Ground Station\n"); @@ -246,6 +246,15 @@ int main(int argc, char * argv[]) { } } + if ( mode == PACSAT) { + FILE * pacsat_file = popen("sudo systemctl start cubesatsim", "r"); + pclose(pacsat_file); + } + else { + FILE * pacsat_file = popen("sudo systemctl stop cubesatsim", "r"); + pclose(pacsat_file); + } + // Open telemetry file with STEM Payload Data telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); if (telem_file == NULL) From 18ebea9d555765ada81226c8ae6876db2fd03c33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 20:30:30 -0500 Subject: [PATCH 433/774] Update main.c change to start/stop pacsatsim --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 174a3bbb..6634b079 100644 --- a/main.c +++ b/main.c @@ -247,11 +247,11 @@ int main(int argc, char * argv[]) { } if ( mode == PACSAT) { - FILE * pacsat_file = popen("sudo systemctl start cubesatsim", "r"); + FILE * pacsat_file = popen("sudo systemctl start pacsatsim", "r"); pclose(pacsat_file); } else { - FILE * pacsat_file = popen("sudo systemctl stop cubesatsim", "r"); + FILE * pacsat_file = popen("sudo systemctl stop pacsatsim", "r"); pclose(pacsat_file); } From 62fbf30df797265f7dd937ab49476ac7d652019d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 21:02:15 -0500 Subject: [PATCH 434/774] Update main.c print simulated telemetry mode --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 6634b079..f390000a 100644 --- a/main.c +++ b/main.c @@ -698,6 +698,7 @@ int main(int argc, char * argv[]) { } if (sim_mode) { // simulated telemetry + printf("Simulated telemetry mode\n"); double time = ((long int)millis() - time_start) / 1000.0; From e1b25b9aad53f10744d365ebeb20e77f15189f48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 21:05:24 -0500 Subject: [PATCH 435/774] Update main.c print simulated currents --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index f390000a..e09eb4b5 100644 --- a/main.c +++ b/main.c @@ -747,7 +747,7 @@ int main(int argc, char * argv[]) { current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; - // printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); + printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); batt -= (batt > 3.5) ? current[map[BAT]] / 30000 : current[map[BAT]] / 3000; if (batt < 3.0) { From 50c51e8993db6e730405a3eb49fe32004f1d1a8b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 21:11:15 -0500 Subject: [PATCH 436/774] Update main.c fix simulated current --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index e09eb4b5..3561af56 100644 --- a/main.c +++ b/main.c @@ -745,7 +745,8 @@ int main(int argc, char * argv[]) { // float charging = current[map[PLUS_X]] + current[map[MINUS_X]] + current[map[PLUS_Y]] + current[map[MINUS_Y]] + current[map[PLUS_Z]] + current[map[MINUS_Z]]; float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0)); - current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; +// current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; + current[map[BAT]] = rnd_float(320, 510) - charging; printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); From 54f2e5eb373152caf955754719a56324a37eb438 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 07:52:29 -0500 Subject: [PATCH 437/774] Update PacSatSim_rttelemetry.csv from pacsat-v2.2-tlm2 --- .../PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index f6e7f4c4..ca11e389 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,12 +1,12 @@ 62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds -1,int,Sensor 2,12,1,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -2,int,Sensor 3,12,1,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +1,int,Sensor 2,12,integer,2,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,int,Sensor 3,12,integer,2,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 3,float,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage 4,float,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis 5,float,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis 6,float,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -7,float,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current +7,int,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current 8,float,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature 9,float,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage 10,float,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage @@ -31,9 +31,9 @@ 29,float,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis 30,float,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis 31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity -32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,int,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,int,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,int,Sensor 1,12,integer,2,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 35,float,STEMPayloadStatus,1,-,35,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) 37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator @@ -61,4 +61,3 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From 3c7dc63dcdc1846252242b9ce00cd5564348cf1f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 07:59:26 -0500 Subject: [PATCH 438/774] Update main.c don't print BPSK config in PACSAT mode --- main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 3561af56..edb162d7 100644 --- a/main.c +++ b/main.c @@ -493,8 +493,11 @@ int main(int argc, char * argv[]) { frameTime = ((float)((float)bufLen / (samples * frameCnt * bitRate))) * 1000; // frame time in ms - printf("\n BPSK Mode, bufLen: %d, %d bits per frame, %d bits per second, %d ms per frame %d ms sample period\n", - bufLen, bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); + if (mode == BPSK) + printf("\n BPSK Mode, bufLen: %d, %d bits per frame, %d bits per second, %d ms per frame %d ms sample period\n", + bufLen, bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); + else + printf("\n dataLen: %d \n", dataLen); sin_samples = S_RATE/freq_Hz; // printf("Sin map: "); @@ -510,7 +513,7 @@ int main(int argc, char * argv[]) { memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); - if (((mode == FSK) || (mode == BPSK))) // && !sim_mode) + if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored firstTime = 1; From 1cf2d7db43c24b8e647f2932ba61a187e31de252 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:02:04 -0500 Subject: [PATCH 439/774] Update PacSatSim-coef.csv swap FAIL and OK --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 16ffe513..48187077 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -33,7 +33,7 @@ 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS -35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,FAIL:OK +35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment From e1580b2962725b23de6431f302ac0032ea81ca81 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:22:41 -0500 Subject: [PATCH 440/774] Update install --- install | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/install b/install index 1d4c8926..d0f1ff2c 100755 --- a/install +++ b/install @@ -134,9 +134,9 @@ if [ -f "$FILE" ]; then sudo ./install.sh cd - #git clone https://github.com/alanbjohnston/pi_pacsat.git - git clone https://github.com/ac2cz/pi_pacsat.git - cd pi_pacsat + #git clone https://github.com/alanbjohnston/pi_.git + git clone https://github.com/ac2cz/pi_.git + cd pi_ #git checkout master-debug cd Debug make all @@ -166,6 +166,7 @@ fi FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled if [ -f "$FILE" ]; then cd + sudo apt-get install -y libbsd-dev git clone https://github.com/alanbjohnston/pacsat_telem.git cd pacsat_telem git checkout master-fox @@ -181,13 +182,13 @@ sudo raspi-config nonint do_vnc 0 cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz +wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz -tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop +tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop -rm PacsatGround_unix_0_46n.tar.gz +rm PacsatGround_unix_0_46o.tar.gz -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 72dca9aa1a3b94016ae552273824785e935a8cef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:24:26 -0500 Subject: [PATCH 441/774] Update install fix pi_pacsat directory --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index d0f1ff2c..76d31542 100755 --- a/install +++ b/install @@ -134,9 +134,9 @@ if [ -f "$FILE" ]; then sudo ./install.sh cd - #git clone https://github.com/alanbjohnston/pi_.git - git clone https://github.com/ac2cz/pi_.git - cd pi_ + #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 make all From 7204051fb6fb68065c073652651165483790dad0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:25:19 -0500 Subject: [PATCH 442/774] Update pacsatsim.sh start/stop also --- pacsatsim.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8e89588d..68164d9e 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,6 +2,9 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + # export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH From 643eaac19ecaa7a81250d23e0a620df0a12f6997 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:32:47 -0500 Subject: [PATCH 443/774] Update main.c change to restart pacsatsim --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index edb162d7..678ebb8a 100644 --- a/main.c +++ b/main.c @@ -247,7 +247,7 @@ int main(int argc, char * argv[]) { } if ( mode == PACSAT) { - FILE * pacsat_file = popen("sudo systemctl start pacsatsim", "r"); + FILE * pacsat_file = popen("sudo systemctl restart pacsatsim", "r"); pclose(pacsat_file); } else { From 558765f560056ca4c39900949eec76eda2fff4aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:33:32 -0500 Subject: [PATCH 444/774] Update main.c missing ) --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 678ebb8a..e0fda7e1 100644 --- a/main.c +++ b/main.c @@ -513,7 +513,7 @@ int main(int argc, char * argv[]) { memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); - if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) // && !sim_mode) + if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored firstTime = 1; From 91ba8d3a10e3c9f799ed28f4d0fb4c8ac4c961ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:53:12 -0500 Subject: [PATCH 445/774] Create asound.conf --- asound.conf | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 asound.conf diff --git a/asound.conf b/asound.conf new file mode 100644 index 00000000..cf3cc9a0 --- /dev/null +++ b/asound.conf @@ -0,0 +1,46 @@ +pcm.!default { + type asym + playback.pcm "softvol" + capture.pcm "shared_mic" +} + +ctl.!default { + type hw + card "Device" +} + +# Playback with software volume and mixing +pcm.softvol { + type softvol + slave.pcm "shared_speaker" + control { + name "Master" + card "Device" + } +} + +pcm.shared_speaker { + type dmix + ipc_key 1024 + slave { + pcm "hw:CARD=Device,DEV=0" + rate 48000 + period_time 0 + period_size 1024 + buffer_size 4096 + } +} + +# Recording with input mixing +pcm.shared_mic { + type dsnoop + ipc_key 2048 + slave { + pcm "hw:CARD=Device,DEV=0" +# channels 1 + rate 48000 + period_time 0 + period_size 1024 + buffer_size 4096 + } +} From 3577400f7998f7b29c4cd7dfaf8c40e3abb04667 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:54:13 -0500 Subject: [PATCH 446/774] Update install add asound.conf --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 76d31542..459b7abc 100755 --- a/install +++ b/install @@ -124,6 +124,7 @@ cd rpitx ./install.sh +sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ -f "$FILE" ]; then From 4738ca2550268ce303619150a6157dd234700195 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:11:28 -0500 Subject: [PATCH 447/774] Update transmit.py don't do anything with pacsatsim.service --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index e1c6aa77..602dd3cd 100644 --- a/transmit.py +++ b/transmit.py @@ -245,7 +245,7 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) - system("sudo systemctl stop pacsatsim") +# system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") @@ -429,7 +429,7 @@ if __name__ == "__main__": print("Pacsat Ground Station") else: print("Pacsat") - system("sudo systemctl restart pacsatsim") +# system("sudo systemctl restart pacsatsim") # txPin = 27 pttPin = 20 From 6599bf9cd601dad7cdc6c54861e1cb9dd8471105 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:17:55 -0500 Subject: [PATCH 448/774] Update direwolf-pacsatsim-pwm.conf with shared_mic --- direwolf/direwolf-pacsatsim-pwm.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index c0890790..58667777 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,4 +1,5 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 6e063ee664d567303d2824179b723431fd29745a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:18:53 -0500 Subject: [PATCH 449/774] Update direwolf-pacsatsim-jp14.conf with shared_mic --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index cb0a1ce8..58667777 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#ADEVICE plughw:2,0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 414bb00be1f6b798654b6c79c39431fd1ec74443 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:20:07 -0500 Subject: [PATCH 450/774] Update direwolf-pacsatsim-jp14.conf fix Device --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 58667777..750c0fee 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE shared_mic plughw:CARD=Device,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 98d006ddeb61e915249fbf0ede15a92d8b7e8540 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:23:09 -0500 Subject: [PATCH 451/774] Update config always reboot for Pacsat mode changes --- config | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/config b/config index 7759faed..5f793cee 100755 --- a/config +++ b/config @@ -1430,17 +1430,19 @@ elif [ "$1" = "-G" ]; then set -- $value # echo "changing CubeSatSim to Pacsat mode" - sudo echo "p" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - else - restart=1 - fi + + reboot=1 +# sudo echo "p" > /home/pi/CubeSatSim/.mode +# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then +# FILE=/home/pi/CubeSatSim/battery_saver +# if [ -f "$FILE" ]; then +# restart=1 +# else +# reboot=1 +# fi +# else +# restart=1 +# fi elif [ "$1" = "-I" ]; then @@ -1452,17 +1454,19 @@ elif [ "$1" = "-I" ]; then set -- $value # echo "changing CubeSatSim to Pacsat mode" - sudo echo "P" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - else - restart=1 - fi + + reboot=1 +# sudo echo "P" > /home/pi/CubeSatSim/.mode +# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then +# FILE=/home/pi/CubeSatSim/battery_saver +# if [ -f "$FILE" ]; then +# restart=1 +# else +# reboot=1 +# fi +# else +# restart=1 +# fi elif [ "$1" = "-h" ]; then From 891f46ae724e7b3948cfa0b9f38dc809fd985ba8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:33:27 -0500 Subject: [PATCH 452/774] Update config add back Pacsat .mode changes --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 5f793cee..b9c1ba2f 100755 --- a/config +++ b/config @@ -1432,7 +1432,7 @@ elif [ "$1" = "-G" ]; then # echo "changing CubeSatSim to Pacsat mode" reboot=1 -# sudo echo "p" > /home/pi/CubeSatSim/.mode + sudo echo "p" > /home/pi/CubeSatSim/.mode # if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then # FILE=/home/pi/CubeSatSim/battery_saver # if [ -f "$FILE" ]; then @@ -1456,7 +1456,7 @@ elif [ "$1" = "-I" ]; then # echo "changing CubeSatSim to Pacsat mode" reboot=1 -# sudo echo "P" > /home/pi/CubeSatSim/.mode + sudo echo "P" > /home/pi/CubeSatSim/.mode # if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then # FILE=/home/pi/CubeSatSim/battery_saver # if [ -f "$FILE" ]; then From 11045fce4a70fa65b7d6ad7a76221bcb38b12e2e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:18:19 -0500 Subject: [PATCH 453/774] Update direwolf-cc.conf with shared_mic and change ports --- direwolf-cc.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index 00eddffa..2a3b5ef9 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -1,7 +1,10 @@ -ADEVICE hw:CARD=Device,DEV=0 default +#ADEVICE hw:CARD=Device,DEV=0 default +ADEVICE shared_mic hw:CARD=Loopback,DEV=1 DTMF MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF TXDELAY 0 +AGWPORT 8200 +KISSPORT 8201 From 66d2dc3471d55005d3af332bd8eb0ea78e98a7d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:21:14 -0500 Subject: [PATCH 454/774] Update dtmf_aprs_cc.py try around stdin read for UTF-8 issue --- dtmf_aprs_cc.py | 346 ++++++++++++++++++++++++------------------------ 1 file changed, 174 insertions(+), 172 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index befe58c7..fd8bac6f 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -17,183 +17,185 @@ if __name__ == "__main__": # print("There are arguments!") if ('d' == sys.argv[1]): debug_mode = True - - for line in sys.stdin: -# if (debug_mode): - print(line, end =" ") - logging.warning(line) - -# if '^c' == line.rstrip(): -# break - - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t5#")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True -# Currently, C2C does not support Repeater mode e - if ((line.find("MODE=o")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - counter = (counter + 1) % 2 - 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 - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(txLed, GPIO.OUT) - if (mode == 'f'): - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'b'): - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 's'): - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'm'): - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - elif (mode == 'a'): + try: + for line in sys.stdin: + # if (debug_mode): + print(line, end =" ") + logging.warning(line) + + # if '^c' == line.rstrip(): + # break + + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t5#")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + # Currently, C2C does not support Repeater mode e + if ((line.find("MODE=o")) > 0): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + counter = (counter + 1) % 2 + 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 + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(powerPin, GPIO.OUT) + GPIO.setup(txLed, GPIO.OUT) + + if (mode == 'f'): + GPIO.output(powerPin, 0) # blink two times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) - system("sudo systemctl stop rpitx") -# system("sudo systemctl stop cubesatsim") + elif (mode == 'b'): + GPIO.output(powerPin, 0) # blink three times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + elif (mode == 's'): + GPIO.output(powerPin, 0) # blink four times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - - - change_mode = False + elif (mode == 'm'): + GPIO.output(powerPin, 0) # blink five times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1); + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + elif (mode == 'a'): + mode = 'a' + GPIO.output(powerPin, 0) # blink one time + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + + GPIO.output(txLed, 0) + GPIO.output(powerPin, 0) + system("sudo systemctl stop rpitx") + # system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + change_mode = False + except: + print("Error reading line (probably due to UTF-8 issue)") print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") From a619e554a84bbfe751a47d02d3b7a55c0c4fb973 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:23:13 -0500 Subject: [PATCH 455/774] Update dtmf_aprs_cc.py ad while to keep trying --- dtmf_aprs_cc.py | 351 ++++++++++++++++++++++++------------------------ 1 file changed, 176 insertions(+), 175 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index fd8bac6f..4b8ba472 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -18,184 +18,185 @@ if __name__ == "__main__": if ('d' == sys.argv[1]): debug_mode = True - try: - for line in sys.stdin: - # if (debug_mode): - print(line, end =" ") - logging.warning(line) - - # if '^c' == line.rstrip(): - # break - - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t5#")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - # Currently, C2C does not support Repeater mode e - if ((line.find("MODE=o")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - counter = (counter + 1) % 2 - 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 - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(txLed, GPIO.OUT) - - if (mode == 'f'): - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'b'): - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 's'): - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'm'): - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - elif (mode == 'a'): + while True: + try: + for line in sys.stdin: + # if (debug_mode): + print(line, end =" ") + logging.warning(line) + + # if '^c' == line.rstrip(): + # break + + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t5#")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + # Currently, C2C does not support Repeater mode e + if ((line.find("MODE=o")) > 0): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + counter = (counter + 1) % 2 + 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 + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(powerPin, GPIO.OUT) + GPIO.setup(txLed, GPIO.OUT) + + if (mode == 'f'): + GPIO.output(powerPin, 0) # blink two times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) - system("sudo systemctl stop rpitx") - # system("sudo systemctl stop cubesatsim") + elif (mode == 'b'): + GPIO.output(powerPin, 0) # blink three times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + elif (mode == 's'): + GPIO.output(powerPin, 0) # blink four times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - - - change_mode = False - except: - print("Error reading line (probably due to UTF-8 issue)") + elif (mode == 'm'): + GPIO.output(powerPin, 0) # blink five times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1); + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + elif (mode == 'a'): + mode = 'a' + GPIO.output(powerPin, 0) # blink one time + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + + GPIO.output(txLed, 0) + GPIO.output(powerPin, 0) + system("sudo systemctl stop rpitx") + # system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + + change_mode = False + except: + print("Error reading line (probably due to UTF-8 issue)") print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") From 7e1b7e90cc450530eea8e696f2b9152fd8794017 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:27:08 -0500 Subject: [PATCH 456/774] Update dtmf_aprs_cc.py remove DTMF>APDW15 --- dtmf_aprs_cc.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 4b8ba472..094c5188 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -33,7 +33,7 @@ if __name__ == "__main__": mode = 'a' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t1#")) > 0): + if ((line.find(":t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True @@ -42,7 +42,7 @@ if __name__ == "__main__": mode = 'f' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t2#")) > 0): + if ((line.find(":t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True @@ -51,7 +51,7 @@ if __name__ == "__main__": mode = 'b' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t3#")) > 0): + if ((line.find(":t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True @@ -60,7 +60,7 @@ if __name__ == "__main__": mode = 's' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t4#")) > 0): + if ((line.find(":t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True @@ -69,7 +69,7 @@ if __name__ == "__main__": mode = 'm' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t5#")) > 0): + if ((line.find(":t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True @@ -78,7 +78,7 @@ if __name__ == "__main__": mode = 'n' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t11#")) > 0): + if ((line.find(":t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True @@ -88,7 +88,7 @@ if __name__ == "__main__": mode = 'o' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t10#")) > 0): + if ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True From 8f09364a670585ac381c0335cf7dbb3aaee25182 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:34:05 -0500 Subject: [PATCH 457/774] Update command add loopback --- command | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command b/command index 989c71f5..dccd9382 100755 --- a/command +++ b/command @@ -2,6 +2,8 @@ echo -e "\nCommand and Control script for CubeSatSim v2.0\n" +sudo modprobe snd-aloop + FILE=/home/pi/CubeSatSim/command_control if [ -f "$FILE" ]; then echo "Radio command and control is ON" From 5ec12e9d59e2c8d1ca03abb177ed015f46e833c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:41:09 -0500 Subject: [PATCH 458/774] Update pacsatsim.sh don't stop command and control --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 68164d9e..2e5802d1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -13,7 +13,7 @@ export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH #sudo systemctl stop transmit -sudo systemctl stop command &>/dev/null +#sudo systemctl stop command &>/dev/null sudo modprobe snd-aloop From 384349e67807b8109e989be486c8ea3f05c0b963 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:50:17 -0500 Subject: [PATCH 459/774] Update dtmf_aprs_cc.py add PACSAT mode -g --- dtmf_aprs_cc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 094c5188..d9eba04a 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -73,6 +73,15 @@ if __name__ == "__main__": system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True + if ((line.find("MODE=G")) > 0): + system("echo '\nPacSatSim Mode!!\n'") + mode = 'G' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find(":t8#")) > 0): + system("echo '\nPacSatSim Mode!!\n'") + mode = 'G' + change_mode = True if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' From 86763119d6684ef6a326fd882eda4bae5b9ecddc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:58:44 -0500 Subject: [PATCH 460/774] Update dtmf_aprs_cc.py change from G to p for Pacsat mode --- 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 d9eba04a..818ab478 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -75,12 +75,12 @@ if __name__ == "__main__": change_mode = True if ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' + mode = 'p' change_mode = True counter = (counter + 1) % 2 if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' + mode = 'p' change_mode = True if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") From 474e3f618b2be9180add01a9e0cce347a27b079c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:08:48 -0500 Subject: [PATCH 461/774] Update config change -a, -f, -b to reboot for pacsat --- config | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/config b/config index b9c1ba2f..4552d516 100755 --- a/config +++ b/config @@ -369,7 +369,7 @@ elif [ "$1" = "-a" ]; then else echo "changing CubeSatSim to AFSK mode" - sudo echo "a" > /home/pi/CubeSatSim/.mode + sudo echo "a" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then @@ -377,6 +377,8 @@ elif [ "$1" = "-a" ]; then else reboot=1 fi + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 else restart=1 fi @@ -422,7 +424,10 @@ elif [ "$1" = "-f" ]; then echo "changing CubeSatSim to FSK mode" sudo echo "f" > /home/pi/CubeSatSim/.mode - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 fi elif [ "$1" = "-b" ]; then @@ -439,7 +444,10 @@ elif [ "$1" = "-b" ]; then echo "changing CubeSatSim to BPSK mode" sudo echo "b" > /home/pi/CubeSatSim/.mode - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 fi elif [ "$1" = "-s" ]; then From ca03c998717d41475eb2bd88c4bbe136b1564467 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:10:23 -0500 Subject: [PATCH 462/774] Update config fix fi --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 4552d516..4f479d21 100755 --- a/config +++ b/config @@ -428,6 +428,7 @@ elif [ "$1" = "-f" ]; then reboot=1 else restart=1 + fi fi elif [ "$1" = "-b" ]; then @@ -448,6 +449,7 @@ elif [ "$1" = "-b" ]; then reboot=1 else restart=1 + fi fi elif [ "$1" = "-s" ]; then From de19e5bc0c3da50449f3a445e5d459b4e915277c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:22:52 -0500 Subject: [PATCH 463/774] Update config with rest of modes for pacsat reboot --- config | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config b/config index 4f479d21..a9c9e7fc 100755 --- a/config +++ b/config @@ -405,6 +405,8 @@ elif [ "$1" = "-m" ]; then else reboot=1 fi + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 else restart=1 fi @@ -474,6 +476,8 @@ elif [ "$1" = "-s" ]; then else reboot=1 fi + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 else restart=1 fi @@ -1272,7 +1276,11 @@ elif [ "$1" = "-e" ]; then echo "changing CubeSatSim to Repeater mode" sudo echo "e" > /home/pi/CubeSatSim/.mode - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 + fi elif [ "$1" = "-n" ]; then From ea3a4f07e3a8fd6fd73521831227f68d1cccd421 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:26:43 -0500 Subject: [PATCH 464/774] Update dtmf_aprs_cc.py change to "G" --- 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 818ab478..d9eba04a 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -75,12 +75,12 @@ if __name__ == "__main__": change_mode = True if ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'p' + mode = 'G' change_mode = True counter = (counter + 1) % 2 if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'p' + mode = 'G' change_mode = True if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") From 4442bd61f37b8117c590ac8a856d252d89f79ff1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 14:51:17 -0500 Subject: [PATCH 465/774] Update config clear pacsatsim logs too --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index a9c9e7fc..6207cafa 100755 --- a/config +++ b/config @@ -739,6 +739,7 @@ elif [ "$1" = "-C" ]; then sudo systemctl stop cubesatsim sudo systemctl stop transmit sudo systemctl stop command + sudo systemctl stop pacsatsim sudo mv -f /home/pi/CubeSatSim/telem.txt /home/pi/CubeSatSim/telem.txt.bk From fb7e87529d0cc95ad007fdee42e5dbb1e0f27116 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 16:42:56 -0500 Subject: [PATCH 466/774] Create pacsat-run.sh --- groundstation/pacsat-run.sh | 147 ++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 groundstation/pacsat-run.sh diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh new file mode 100644 index 00000000..1bbe7dcb --- /dev/null +++ b/groundstation/pacsat-run.sh @@ -0,0 +1,147 @@ +#!/bin/bash +# script to run FoxTelem + +echo "Startup script to run the PacSat Ground Station for FIAB v4" + +echo + +source /home/pi/venv/bin/activate + +sudo killall -9 java &>/dev/null + +sudo killall -9 zenity &>/dev/null + +FILE=/home/pi/.pacsatprofile +if [ ! -f "$FILE" ]; then + + profile=$(zenity --text="Choose your default Pacsat profile:" --list 2>/dev/null --width=410 --height=120 --title="Set FoxTelem Profile" --column="Profile" --column="Receive and decode telemetry from" "PacSat" "AMSAT Satellites" "CubeSatSim" "AMSAT CubeSat Simulator" "Loopback" "Locally Simulated PacSat") + + echo $profile + + if [ -z "$profile" ]; then + + echo "No choice made. Exiting." + + sleep 3 + + exit + + #echo "You need to choose your default FoxTelem profile." + #echo + #echo "The choices are:" + #echo + #echo "1. Fox-in-a-Box. Use this profile if you want to receive and decode telemetry from the AMSAT Fox satellites. If you enter a callsign and a grid square, you can upload to the AMSAT telemetry server." + #echo + #echo "2. CubeSatSim Ground Station. Use this profile if you want to receive and decode telemetry from an AMSAT CubeSatSim or CubeSatSim Lite." + #echo + #echo "Which profile do you choose? Enter 1 or 2" + + #read -r ANS + + fi + + if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then + + echo "You have chosen the PacSat profile." + echo "p" > /home/pi/.pacsatprofile + echo + + sudo killall -9 java &>/dev/null + + sudo killall -9 gpredict &>/dev/null + + FILE=/home/pi/FoxTelemetryData/FoxTelem.properties.0 + if [ ! -f "$FILE" ]; then + cp /home/pi/FoxTelemetryData/FoxTelem.properties /home/pi/FoxTelemetryData/FoxTelem.properties.0 + fi + + python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py + + if [ $? -eq 1 ]; then + + echo "Enter your Groundstation Name. If you upload telemetry data to the AMSAT servers, this name will be displayed on the FoxTelem leader board at https://amsat.org/tlm" + read name + + if [ -n "$name" ]; then + sudo sed -i "s/callsign=.*/callsign=$name/g" /home/pi/FoxTelemetryData/FoxTelem.properties + fi + + echo + + sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/foxTelemCalcsDoppler=false/foxTelemCalcsDoppler=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/foxTelemCalcsPosition=false/foxTelemCalcsPosition=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/whenAboveHorizon=false/whenAboveHorizon=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/retuneCenterFrequency=false/retuneCenterFrequency=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/stationDetails=.*/stationDetails=FoxInABox/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + # sudo sed -i "s/soundCard=NONE/soundCard=RTL SDR/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube + sudo sed -i "s/soundCard=NONE/soundCard=Direct Audio Device\: FUNcube Dongle V2.0, USB Audi/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube + + + + # echo "Enter your Maidenhead grid square. It is two letters followed by two numbers followed by two letters with no spaces. If you don't know your gridsquare, you can look it up here https://dxcluster.ha8tks.hu/hamgeocoding/" + # read grid + # sudo sed -i "s/maidenhead=XX00xx/maidenhead=$grid/g" /home/pi/Documents/FITB/FoxTelem.properties + # echo + + fi + + elif [ "$ANS" = "2" ] || [ "$profile" = "CubeSatSim" ] ; then + + echo "You have chosen the CubeSatSim PacSat Ground Station profile." + echo "c" > /home/pi/.pacsatprofile + + cp /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties.0 + + sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then + + echo "You have chosen the Loopback Simulated PacSat Ground Station profile." + echo "l" > /home/pi/.pacsatprofile + + else + + echo "Please enter only 1 or 2 or 3" + + fi + +fi + +value=`cat /home/pi/FoxTelemetryData/.foxprofile` +echo "$value" > /dev/null +set -- $value + +sudo killall -9 java &>/dev/null + +if [ "$1" = "c" ]; then + echo "CubeSatSim Ground Station profile is set!" + echo + /home/pi/CubeSatSim/groundstation/pacsat.sh +elif [ "$1" = "l" ]; then + echo "Loopback Ground Station profile is set!" + echo + /home/pi/CubeSatSim/groundstation/pacsat.sh l +else + echo "AMSAT profile is set!" + echo +# /home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData + cd /home/pi/Desktop/PacsatGround/ + + setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & + +fi + +sleep 10 + +#$SHELL From 6418c63a9d3a43d3d11b0a47894f40c0ed6287a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:02:53 -0500 Subject: [PATCH 467/774] make pacsat scripts executable --- groundstation/pacsat-config.sh | 134 +++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 groundstation/pacsat-config.sh diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh new file mode 100644 index 00000000..e0723d41 --- /dev/null +++ b/groundstation/pacsat-config.sh @@ -0,0 +1,134 @@ +#!/bin/bash +# script to run FoxTelem + +echo "Startup script to configure the PacSat Ground Station for FIAB v4" + +echo + +source /home/pi/venv/bin/activate + +sudo killall -9 java &>/dev/null + +sudo killall -9 zenity &>/dev/null + +FILE=/home/pi/.pacsatprofile +if [ ! -f "$FILE" ]; then + + profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") + + echo $profile + + if [ -z "$profile" ]; then + + echo "No choice made. Exiting." + + sleep 3 + + exit + + fi + + if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then + + echo "You have chosen the PacSat profile." + echo + + sudo killall -9 java &>/dev/null + + sudo killall -9 gpredict &>/dev/null + + FILE=/home/pi/FoxTelemetryData/FoxTelem.properties.0 + if [ ! -f "$FILE" ]; then + cp /home/pi/FoxTelemetryData/FoxTelem.properties /home/pi/FoxTelemetryData/FoxTelem.properties.0 + fi + + python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py + + if [ $? -eq 1 ]; then + + echo "Enter your Groundstation Name. If you upload telemetry data to the AMSAT servers, this name will be displayed on the FoxTelem leader board at https://amsat.org/tlm" + read name + + if [ -n "$name" ]; then + sudo sed -i "s/callsign=.*/callsign=$name/g" /home/pi/FoxTelemetryData/FoxTelem.properties + fi + + echo + + sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/foxTelemCalcsDoppler=false/foxTelemCalcsDoppler=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/foxTelemCalcsPosition=false/foxTelemCalcsPosition=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/whenAboveHorizon=false/whenAboveHorizon=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/retuneCenterFrequency=false/retuneCenterFrequency=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + sudo sed -i "s/stationDetails=.*/stationDetails=FoxInABox/g" /home/pi/FoxTelemetryData/FoxTelem.properties + + # sudo sed -i "s/soundCard=NONE/soundCard=RTL SDR/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube + sudo sed -i "s/soundCard=NONE/soundCard=Direct Audio Device\: FUNcube Dongle V2.0, USB Audi/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube + + + + # echo "Enter your Maidenhead grid square. It is two letters followed by two numbers followed by two letters with no spaces. If you don't know your gridsquare, you can look it up here https://dxcluster.ha8tks.hu/hamgeocoding/" + # read grid + # sudo sed -i "s/maidenhead=XX00xx/maidenhead=$grid/g" /home/pi/Documents/FITB/FoxTelem.properties + # echo + + fi + + elif [ "$ANS" = "2" ] || [ "$profile" = "CubeSatSim" ] ; then + + echo "You have chosen the CubeSatSim PacSat Ground Station profile." + echo "c" > /home/pi/.pacsatprofile + + cp /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties.0 + + sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then + + echo "You have chosen the Loopback Simulated PacSat Ground Station profile." + echo "l" > /home/pi/.pacsatprofile + + else + + echo "Please enter only 1 or 2 or 3" + + fi + +fi + +value=`cat /home/pi/FoxTelemetryData/.foxprofile` +echo "$value" > /dev/null +set -- $value + +sudo killall -9 java &>/dev/null + +if [ "$1" = "c" ]; then + echo "CubeSatSim Ground Station profile is set!" + echo + /home/pi/CubeSatSim/groundstation/pacsat.sh +elif [ "$1" = "l" ]; then + echo "Loopback Ground Station profile is set!" + echo + /home/pi/CubeSatSim/groundstation/pacsat.sh l +else + echo "AMSAT profile is set!" + echo +# /home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData + cd /home/pi/Desktop/PacsatGround/ + + setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & + +fi + +sleep 10 + +#$SHELL From 83083636639e76e82cc39f98a4dcb942a6d85ed8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:05:49 -0500 Subject: [PATCH 468/774] make pacsat config executable --- groundstation/pacsat-config.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/pacsat-config.sh diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh old mode 100644 new mode 100755 From 985c817fa76dae4487e9b919c11e575da5439afd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:12:19 -0500 Subject: [PATCH 469/774] Update pacsat-config.sh change options --- groundstation/pacsat-config.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index e0723d41..2e7b6ea5 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -11,10 +11,10 @@ sudo killall -9 java &>/dev/null sudo killall -9 zenity &>/dev/null -FILE=/home/pi/.pacsatprofile -if [ ! -f "$FILE" ]; then +#FILE=/home/pi/.pacsatprofile +#if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") + profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") echo $profile @@ -103,11 +103,11 @@ if [ ! -f "$FILE" ]; then fi -fi +#fi -value=`cat /home/pi/FoxTelemetryData/.foxprofile` -echo "$value" > /dev/null -set -- $value +#value=`cat /home/pi/FoxTelemetryData/.foxprofile` +#echo "$value" > /dev/null +#set -- $value sudo killall -9 java &>/dev/null From 794034151047e812eddb5582aa7bf9d154606df2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:14:52 -0500 Subject: [PATCH 470/774] Update pacsat-config.sh fix popup menu --- groundstation/pacsat-config.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 2e7b6ea5..2963e4c6 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -14,8 +14,7 @@ sudo killall -9 zenity &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") - + profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") echo $profile if [ -z "$profile" ]; then From 7a7fb343201368fa98847d2729f47e3bbc5cc7f6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:07:26 -0500 Subject: [PATCH 471/774] Update pacsat-run.sh 3 options --- groundstation/pacsat-run.sh | 113 +++++++----------------------------- 1 file changed, 20 insertions(+), 93 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 1bbe7dcb..f41f44f7 100644 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -11,21 +11,21 @@ sudo killall -9 java &>/dev/null sudo killall -9 zenity &>/dev/null -FILE=/home/pi/.pacsatprofile -if [ ! -f "$FILE" ]; then +#FILE=/home/pi/.pacsatprofile +#if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose your default Pacsat profile:" --list 2>/dev/null --width=410 --height=120 --title="Set FoxTelem Profile" --column="Profile" --column="Receive and decode telemetry from" "PacSat" "AMSAT Satellites" "CubeSatSim" "AMSAT CubeSat Simulator" "Loopback" "Locally Simulated PacSat") + profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Loopback" "Run a Locally Simulated PacSat") echo $profile if [ -z "$profile" ]; then - echo "No choice made. Exiting." - - sleep 3 - - exit - + echo "No choice made. Exiting." + + sleep 3 + + exit + #echo "You need to choose your default FoxTelem profile." #echo #echo "The choices are:" @@ -42,73 +42,25 @@ if [ ! -f "$FILE" ]; then if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then - echo "You have chosen the PacSat profile." - echo "p" > /home/pi/.pacsatprofile - echo - - sudo killall -9 java &>/dev/null + echo "You have chosen to run the PacSat Ground Station" + # echo "p" > /home/pi/.pacsatprofile + echo + + /home/pi/CubeSatSim/groundstation/pacsat.sh - sudo killall -9 gpredict &>/dev/null - - FILE=/home/pi/FoxTelemetryData/FoxTelem.properties.0 - if [ ! -f "$FILE" ]; then - cp /home/pi/FoxTelemetryData/FoxTelem.properties /home/pi/FoxTelemetryData/FoxTelem.properties.0 - fi - - python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py - - if [ $? -eq 1 ]; then - - echo "Enter your Groundstation Name. If you upload telemetry data to the AMSAT servers, this name will be displayed on the FoxTelem leader board at https://amsat.org/tlm" - read name - if [ -n "$name" ]; then - sudo sed -i "s/callsign=.*/callsign=$name/g" /home/pi/FoxTelemetryData/FoxTelem.properties - fi + elif [ "$ANS" = "2" ] || [ "$profile" = "Configure" ] ; then + echo "You have chosen to configure the PacSat Ground Station" echo - sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties - - sudo sed -i "s/foxTelemCalcsDoppler=false/foxTelemCalcsDoppler=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties - - sudo sed -i "s/foxTelemCalcsPosition=false/foxTelemCalcsPosition=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties - - sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties - - sudo sed -i "s/whenAboveHorizon=false/whenAboveHorizon=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties - - sudo sed -i "s/retuneCenterFrequency=false/retuneCenterFrequency=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + /home/pi/CubeSatSim/groundstation/pacsat-config.sh - sudo sed -i "s/stationDetails=.*/stationDetails=FoxInABox/g" /home/pi/FoxTelemetryData/FoxTelem.properties + elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then - # sudo sed -i "s/soundCard=NONE/soundCard=RTL SDR/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube - sudo sed -i "s/soundCard=NONE/soundCard=Direct Audio Device\: FUNcube Dongle V2.0, USB Audi/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube + echo "You have chosen the Loopback Simulated PacSat Ground Station" - - - # echo "Enter your Maidenhead grid square. It is two letters followed by two numbers followed by two letters with no spaces. If you don't know your gridsquare, you can look it up here https://dxcluster.ha8tks.hu/hamgeocoding/" - # read grid - # sudo sed -i "s/maidenhead=XX00xx/maidenhead=$grid/g" /home/pi/Documents/FITB/FoxTelem.properties - # echo - - fi - - elif [ "$ANS" = "2" ] || [ "$profile" = "CubeSatSim" ] ; then - - echo "You have chosen the CubeSatSim PacSat Ground Station profile." - echo "c" > /home/pi/.pacsatprofile - - cp /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties.0 - - sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then - - echo "You have chosen the Loopback Simulated PacSat Ground Station profile." - echo "l" > /home/pi/.pacsatprofile + /home/pi/CubeSatSim/groundstation/pacsat.sh l else @@ -116,31 +68,6 @@ if [ ! -f "$FILE" ]; then fi -fi - -value=`cat /home/pi/FoxTelemetryData/.foxprofile` -echo "$value" > /dev/null -set -- $value - -sudo killall -9 java &>/dev/null - -if [ "$1" = "c" ]; then - echo "CubeSatSim Ground Station profile is set!" - echo - /home/pi/CubeSatSim/groundstation/pacsat.sh -elif [ "$1" = "l" ]; then - echo "Loopback Ground Station profile is set!" - echo - /home/pi/CubeSatSim/groundstation/pacsat.sh l -else - echo "AMSAT profile is set!" - echo -# /home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData - cd /home/pi/Desktop/PacsatGround/ - - setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & - -fi sleep 10 From b0df38ee0a3e4cc89b1e1a5d22d2294639e5b7b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:21:08 -0500 Subject: [PATCH 472/774] Update pacsat-config.sh prompt 1-5 configure options --- groundstation/pacsat-config.sh | 142 ++++++++++++--------------------- 1 file changed, 51 insertions(+), 91 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 2963e4c6..97382b39 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -1,132 +1,92 @@ #!/bin/bash # script to run FoxTelem -echo "Startup script to configure the PacSat Ground Station for FIAB v4" +echo "Script to configure the PacSat Ground Station for FIAB v4" echo -source /home/pi/venv/bin/activate +#source /home/pi/venv/bin/activate sudo killall -9 java &>/dev/null sudo killall -9 zenity &>/dev/null +sudo killall -9 direwolf &>/dev/null + #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") - echo $profile +# profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") +# echo $profile + + echo "Here are the PacSat Ground Station configuration choices:" + echo + echo "1. Set PacSat Ground Station Callsign" + echo + echo "2. Set PacSat Satellite Callsign" + echo + echo "3. Set Frequencies" + echo + echo "4. Reset PacSat Ground Station" + echo + echo "5. Reset PacSat Satellite" + echo + echo "Which do you choose? Enter 1 - 5" + + read -r ANS - if [ -z "$profile" ]; then + if [ -z "$ANS" ]; then - echo "No choice made. Exiting." - - sleep 3 - - exit + echo "No choice made. Exiting." + + sleep 3 + + exit fi - if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then - - echo "You have chosen the PacSat profile." - echo - - sudo killall -9 java &>/dev/null - - sudo killall -9 gpredict &>/dev/null - - FILE=/home/pi/FoxTelemetryData/FoxTelem.properties.0 - if [ ! -f "$FILE" ]; then - cp /home/pi/FoxTelemetryData/FoxTelem.properties /home/pi/FoxTelemetryData/FoxTelem.properties.0 - fi - - python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py - - if [ $? -eq 1 ]; then - - echo "Enter your Groundstation Name. If you upload telemetry data to the AMSAT servers, this name will be displayed on the FoxTelem leader board at https://amsat.org/tlm" - read name - - if [ -n "$name" ]; then - sudo sed -i "s/callsign=.*/callsign=$name/g" /home/pi/FoxTelemetryData/FoxTelem.properties - fi - - echo + if [ "$ANS" = "1" ] ; then - sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + echo "You have chosen to set the PacSat Ground Station Callsign" + echo - sudo sed -i "s/foxTelemCalcsDoppler=false/foxTelemCalcsDoppler=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + elif [ "$ANS" = "2" ] ; then - sudo sed -i "s/foxTelemCalcsPosition=false/foxTelemCalcsPosition=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + echo "You have chosen to set the CubeSatSim PacSat Satellite callsign" + echo - sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + /home/pi/CubeSatSim/config -c n - sudo sed -i "s/whenAboveHorizon=false/whenAboveHorizon=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + elif [ "$ANS" = "3" ] ; then - sudo sed -i "s/retuneCenterFrequency=false/retuneCenterFrequency=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + echo "You have chosen to set the Frequency of the PacSat Ground Station" + echo - sudo sed -i "s/stationDetails=.*/stationDetails=FoxInABox/g" /home/pi/FoxTelemetryData/FoxTelem.properties + /home/pi/CubeSatSim/config -F n - # sudo sed -i "s/soundCard=NONE/soundCard=RTL SDR/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube - sudo sed -i "s/soundCard=NONE/soundCard=Direct Audio Device\: FUNcube Dongle V2.0, USB Audi/g" /home/pi/FoxTelemetryData/FoxTelem.properties # change to FunCube + elif [ "$ANS" = "4" ] ; then + echo "You have chosen to reset the PacSat Ground Station" + echo + echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" + echo + /home/pi/CubeSatSim/groundstation/pacsat-reset.sh - # echo "Enter your Maidenhead grid square. It is two letters followed by two numbers followed by two letters with no spaces. If you don't know your gridsquare, you can look it up here https://dxcluster.ha8tks.hu/hamgeocoding/" - # read grid - # sudo sed -i "s/maidenhead=XX00xx/maidenhead=$grid/g" /home/pi/Documents/FITB/FoxTelem.properties - # echo - fi + elif [ "$ANS" = "5" ] ; then - elif [ "$ANS" = "2" ] || [ "$profile" = "CubeSatSim" ] ; then + echo "You have chosen to reset the PacSat Satellite" + echo - echo "You have chosen the CubeSatSim PacSat Ground Station profile." - echo "c" > /home/pi/.pacsatprofile - - cp /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties.0 - - sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then - - echo "You have chosen the Loopback Simulated PacSat Ground Station profile." - echo "l" > /home/pi/.pacsatprofile - + /home/pi/CubeSatSim/config -X n + else - echo "Please enter only 1 or 2 or 3" + echo "Please enter only 1 to 5" fi -#fi - -#value=`cat /home/pi/FoxTelemetryData/.foxprofile` -#echo "$value" > /dev/null -#set -- $value - -sudo killall -9 java &>/dev/null - -if [ "$1" = "c" ]; then - echo "CubeSatSim Ground Station profile is set!" - echo - /home/pi/CubeSatSim/groundstation/pacsat.sh -elif [ "$1" = "l" ]; then - echo "Loopback Ground Station profile is set!" - echo - /home/pi/CubeSatSim/groundstation/pacsat.sh l -else - echo "AMSAT profile is set!" - echo -# /home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData - cd /home/pi/Desktop/PacsatGround/ - - setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & - -fi sleep 10 From aac360630533a269c83ddb9aaa5ad5dac3ceb9cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:36:39 -0500 Subject: [PATCH 473/774] Update pacsat-config.sh add config commands --- groundstation/pacsat-config.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 97382b39..c4570ffc 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -50,6 +50,8 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the PacSat Ground Station Callsign" echo + /home/pi/CubeSatSim/config -J n + elif [ "$ANS" = "2" ] ; then echo "You have chosen to set the CubeSatSim PacSat Satellite callsign" @@ -71,7 +73,8 @@ sudo killall -9 direwolf &>/dev/null echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" echo - /home/pi/CubeSatSim/groundstation/pacsat-reset.sh +# /home/pi/CubeSatSim/groundstation/pacsat-reset.sh + /home/pi/CubeSatSim/config -K n elif [ "$ANS" = "5" ] ; then @@ -79,7 +82,7 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to reset the PacSat Satellite" echo - /home/pi/CubeSatSim/config -X n + /home/pi/CubeSatSim/config -k n else From bb6b966ad9b4ea968dff8a7e7adf7ea021903fc0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:48:35 -0500 Subject: [PATCH 474/774] Update pacsatsim.sh add default configuration if not present --- pacsatsim.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2e5802d1..8b395c34 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -1,6 +1,36 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat +# script to run PacsatSim + +if [ ! -d "/home/pi/PacSat" ]; then + + echo "Setting up PacSatSim default configuration" + echo + + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + + cd /home/pi/pi_pacsat/Debug + + sudo rm pacsat_last_command_time.dat + sudo rm pacsat_upload_table.dat + sudo rm pacsat.state + + echo "bit_rate=9600" > pacsat.config + echo "bbs_callsign=AMSAT-12" >> pacsat.config + echo "broadcast_callsign=AMSAT-11" >> pacsat.config + echo "digi_callsign=AMSAT-1" >> pacsat.config + echo "max_frames_in_tx_buffer=5" >> pacsat.config + + echo "pb_open=1" > pacsat.state + echo "uplink_open=1" >> pacsat.state + echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state + echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state + + touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + +fi sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start From 661ba1d115d20192f9f4cf763ed6edeedad49da5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:57:15 -0500 Subject: [PATCH 475/774] Update pacsat.sh create PacSatGround dir if not present --- groundstation/pacsat.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5151e803..c072d488 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -1,6 +1,17 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station + +if [ ! -d "/home/pi/PacSatGround" ]; then + + mkdir /home/pi/PacSatGround + + echo + echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + + sleep 10 + +fi sudo modprobe snd-aloop From 43fdf9936c36dec8d1c1baa7bddb355af27a3f4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:58:21 -0500 Subject: [PATCH 476/774] add new configs --- config | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/config b/config index 6207cafa..29725c32 100755 --- a/config +++ b/config @@ -1487,6 +1487,27 @@ elif [ "$1" = "-I" ]; then # restart=1 # fi +elif [ "$1" = "-J" ]; then + + echo "Changing the PacSat Ground Station callsign" + echo + echo "Run the Pacsat Ground Station in the Desktop" + +elif [ "$1" = "-k" ]; then + + echo "Reset PacSat Ground Station configuration" + echo + sudo killall -9 java &>/dev/null + sudo rm -r /home/pi/PacSatGround + +elif [ "$1" = "-K" ]; then + + echo "Reset PacSatSim configuration" + echo + sudo systemctl stop pacsatsim + sudo rm -r /home/pi/PacSat + reboot=1 + elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -1501,13 +1522,16 @@ elif [ "$1" = "-h" ]; then echo " -s Change to SSTV mode" echo " -n Change to Transmit Commands mode" echo " -e Change to Repeater mode" + echo " -j Change to FUNcube mode" + echo " -G Change to PacSatSim mode" + echo " -I Change to PacSat Ground Station mode" echo " -i Restart CubeSatsim software" echo " -c Change the CALLSIGN in the configuration file sim.cfg" echo " -t Change the Simulated Telemetry setting in sim.cfg" echo " -r Change the Resets Count in the configuration file sim.cfg" echo " -l Change the Latitude and Longitude in the configuration file sim.cfg" echo " -S Scan both I2C buses on the Raspberry Pi" - echo " -C Clear logs" + echo " -C Clear logs and reboot" echo " -T Change command and control state" echo " -d Change command and control Direwolf state" echo " -R Change the Commands Count in the file command_count.txt" @@ -1517,14 +1541,15 @@ elif [ "$1" = "-h" ]; then echo " -H Change the Balloon (HAB) mode" echo " -p Display payload sensor data" echo " -v Display voltage and current data" - echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for RX and TX" + echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for FM RX and TX" echo " -A Transmit APRS control packets to control another CubeSatSim" echo " -D Change Transmit Commands state APRS or DTMF" echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" - echo " -g Reset configuration back to default settings" - echo " -G Change to PacSatSim mode" - echo " -I Changing to PacSat Ground Station mode" + echo " -g Reset configuration back to default settings and shutdown" + echo " -J Set the PacSat Ground Station callsign" + echo " -k Reset the PacSatSim Configuration" + echo " -K Reset the PacSatSim Ground Station Configuration" echo exit From 461e45dea67c3421f64845dfb7b6318632bc2ca2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 11:06:17 -0500 Subject: [PATCH 477/774] Update config swap k and K --- config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config b/config index 29725c32..98c40816 100755 --- a/config +++ b/config @@ -1489,22 +1489,25 @@ elif [ "$1" = "-I" ]; then elif [ "$1" = "-J" ]; then + echo echo "Changing the PacSat Ground Station callsign" echo echo "Run the Pacsat Ground Station in the Desktop" -elif [ "$1" = "-k" ]; then +elif [ "$1" = "-K" ]; then + echo echo "Reset PacSat Ground Station configuration" echo sudo killall -9 java &>/dev/null sudo rm -r /home/pi/PacSatGround -elif [ "$1" = "-K" ]; then +elif [ "$1" = "-k" ]; then + echo echo "Reset PacSatSim configuration" echo - sudo systemctl stop pacsatsim + sudo systemctl stop pacsatsim &>/dev/null sudo rm -r /home/pi/PacSat reboot=1 From e5eb43df5c692cb33928dc23432dc5a533836e94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 11:31:57 -0500 Subject: [PATCH 478/774] Update config add dev null to stop pacsatsim --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 98c40816..c4b9b497 100755 --- a/config +++ b/config @@ -566,7 +566,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo systemctl stop pacsatsim + sudo systemctl stop pacsatsim &>/dev/null sudo killall -9 java &>/dev/null sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config From eb23200e6794aef3fa542144b4a510df50d1788a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 11:34:35 -0500 Subject: [PATCH 479/774] Update config also change callsign if old is AMSAT --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index c4b9b497..c6b20f02 100755 --- a/config +++ b/config @@ -571,7 +571,9 @@ elif [ "$1" = "-c" ]; then sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then From eabb2bf9db495394b1361a0ec49cdc8cc54e7db3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:11:28 -0500 Subject: [PATCH 480/774] Update config fix pacsatsim callsign set when reset --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index c6b20f02..756baef0 100755 --- a/config +++ b/config @@ -570,6 +570,7 @@ elif [ "$1" = "-c" ]; then sudo killall -9 java &>/dev/null sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties From 336e0d9ed3a605974dff9e6df0c114f31f96cf30 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:40:18 -0500 Subject: [PATCH 481/774] Update pacsat-config.sh update change remote PacSat callsign --- groundstation/pacsat-config.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index c4570ffc..6445f480 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -23,7 +23,7 @@ sudo killall -9 direwolf &>/dev/null echo echo "1. Set PacSat Ground Station Callsign" echo - echo "2. Set PacSat Satellite Callsign" + echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" echo echo "3. Set Frequencies" echo @@ -54,10 +54,34 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "2" ] ; then - echo "You have chosen to set the CubeSatSim PacSat Satellite callsign" + echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo - /home/pi/CubeSatSim/config -c n + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + + echo "Current value of remote PacSat callsign is" + echo $oldcallsign + echo + + echo "Enter new callsign in all capitals: " + read callsign + + if [ -z $callsign ] ; then + + callsign="$1" + echo "Keeping value of" $oldcallsign + + else + + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + echo + echo "Changing callsign to " + echo $callsign + echo + echo "You will see the change next time you run the PacSat Ground Station" + echo + fi + elif [ "$ANS" = "3" ] ; then From 74fee1252626dffa5e7bc3cec2fa789f939caa2a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:42:22 -0500 Subject: [PATCH 482/774] Update pacsat-config.sh don't sleep at end --- groundstation/pacsat-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 6445f480..014b4f8f 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -115,6 +115,6 @@ sudo killall -9 direwolf &>/dev/null fi -sleep 10 +# sleep 10 #$SHELL From 67b6c5f6bf7079dd1d9efc2a78a9e1fe16511a94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:44:35 -0500 Subject: [PATCH 483/774] Update config remove Ground callsign set, remove remote pacsat --- config | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/config b/config index 756baef0..038eb8d5 100755 --- a/config +++ b/config @@ -573,8 +573,8 @@ elif [ "$1" = "-c" ]; then sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties - sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties +# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties +# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then @@ -1490,13 +1490,6 @@ elif [ "$1" = "-I" ]; then # restart=1 # fi -elif [ "$1" = "-J" ]; then - - echo - echo "Changing the PacSat Ground Station callsign" - echo - echo "Run the Pacsat Ground Station in the Desktop" - elif [ "$1" = "-K" ]; then echo @@ -1553,7 +1546,6 @@ elif [ "$1" = "-h" ]; then echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings and shutdown" - echo " -J Set the PacSat Ground Station callsign" echo " -k Reset the PacSatSim Configuration" echo " -K Reset the PacSatSim Ground Station Configuration" From e2dbc1de347ef413a09e0d00a99ab2dab86e5a05 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:46:02 -0500 Subject: [PATCH 484/774] Update pacsat-config.sh to fix ground station callsign config --- groundstation/pacsat-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 014b4f8f..85d02f91 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -50,7 +50,7 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the PacSat Ground Station Callsign" echo - /home/pi/CubeSatSim/config -J n + /home/pi/CubeSatSim/config -c n elif [ "$ANS" = "2" ] ; then From 69416a1770b21a1b62de81b29d84b7aa1616174f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:23:04 -0500 Subject: [PATCH 485/774] Update pacsat.sh add l parameter --- groundstation/pacsat.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index c072d488..34526a33 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -78,7 +78,7 @@ echo #echo echo -echo "The Pacsat Ground Station are running on this Pi using FM receiver and rpitx transmitter" +echo "The Pacsat Ground Station is running on this Pi using FM receiver or RTL-SDR" echo #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ @@ -90,12 +90,21 @@ echo sudo usermod -a -G gpio pi -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" +if [ ! "$1" = "l" ]; then +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" + echo "Using TXC FM transceiver" + /home/pi/CubeSatSim/groundstation/pacsat-df.sh + +else + echo "Using audio loopback" + /home/pi/CubeSatSim/groundstation/pacsat-d.sh + +fi # 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 435045 & ##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 435045 & -echo "Don't close the direwolf window or the Pacsatsim will stop running." +# echo "Don't close the direwolf window or the Pacsatsim will stop running." cd /home/pi/Desktop/PacsatGround/ From 8ff65ab10b4b751bb1648dd251aef1cdfee26f39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:28:06 -0500 Subject: [PATCH 486/774] Update pacsat.sh direwolf to background --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 34526a33..5c118cdb 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -93,11 +93,11 @@ sudo usermod -a -G gpio pi if [ ! "$1" = "l" ]; then #/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/groundstation/pacsat-df.sh + /home/pi/CubeSatSim/groundstation/pacsat-df.sh & else echo "Using audio loopback" - /home/pi/CubeSatSim/groundstation/pacsat-d.sh + /home/pi/CubeSatSim/groundstation/pacsat-d.sh & fi From 511b105c593aa3aef97535b63461f016f3d38173 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:37:27 -0500 Subject: [PATCH 487/774] Update pacsatsim-d.sh change to loopback --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index f7c3e84e..7480af0c 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-loop.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 From 6d58ac9bc324ee8f78d24ffd1555314bb9a48da3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:44:28 -0500 Subject: [PATCH 488/774] Update pacsat-run.sh for loopback run pacsatsim.sh l --- groundstation/pacsat-run.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index f41f44f7..f4242560 100644 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -59,6 +59,12 @@ sudo killall -9 zenity &>/dev/null elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then echo "You have chosen the Loopback Simulated PacSat Ground Station" + + sleep 1 + + /usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim.sh l" + + sleep 1 /home/pi/CubeSatSim/groundstation/pacsat.sh l From 8ade73385c9c8e62f554de3856421d619d24a81e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:46:54 -0500 Subject: [PATCH 489/774] Update pacsatsim.sh add l parameter for loopback --- pacsatsim.sh | 145 +++++---------------------------------------------- 1 file changed, 13 insertions(+), 132 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8b395c34..c80132d2 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -71,152 +71,22 @@ sudo modprobe snd-aloop echo -#frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") -#echo $frequency - -#if [ -z "$frequency" ]; then - -#echo "No choice made. Exiting." - -#sleep 3 - -#exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -choice=2 +#choice=2 #fi -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 +# frequency=434900000 echo echo "If your Pacsat Ground Station is transmitting packets, you will see them here" echo -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi #echo #echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." -echo - -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & - -else # echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" @@ -224,8 +94,19 @@ else # /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + + +if [ ! "$1" = "l" ]; then +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" + echo "Using TXC FM transceiver" /home/pi/CubeSatSim/pacsatsim-df.sh & +else + echo "Using audio loopback" + /home/pi/CubeSatSim/pacsatsim-d.sh & + +fi + # 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 f524d8b340c5d7201641ff4c436f7efa06f9bf6e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:52:42 -0500 Subject: [PATCH 490/774] make executable --- groundstation/pacsat-run.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/pacsat-run.sh diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh old mode 100644 new mode 100755 From 0cab7f0623361d2a2f6bcc78ad60972c18cda5a7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:56:48 -0500 Subject: [PATCH 491/774] Update pacsat-d.sh change to loopback --- groundstation/pacsat-d.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh index e1569ce7..a794108c 100755 --- a/groundstation/pacsat-d.sh +++ b/groundstation/pacsat-d.sh @@ -2,5 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf -t 0 - +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 From 34198a02eb1060900c78933f7747dd4e640ebb35 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 15:00:24 -0500 Subject: [PATCH 492/774] Update pacsatsim.sh fix extra fi --- pacsatsim.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index c80132d2..4d965b06 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -112,8 +112,6 @@ fi ## echo "Don't close the direwolf window or the Pacsatsim will stop running." - echo -fi sudo /home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & From 2e2b7d1ec032ee18c737d248313b903833bd6151 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:39:09 -0500 Subject: [PATCH 493/774] Update direwolf-pacsatsim-loopback.conf make same as pam --- direwolf/direwolf-pacsatsim-loopback.conf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index e96bd980..1c74a18c 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -3,6 +3,16 @@ PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP ON -TXDELAY 15 +##FULLDUP ON +##TXDELAY 15 #FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 +FULLDUP OFF From f77025d9825a59324bd1ba2f9fbd468d2651ebd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:41:44 -0500 Subject: [PATCH 494/774] Update direwolf-pacsat-loopback.conf same as pwm --- .../direwolf/direwolf-pacsat-loopback.conf | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 6058c722..a101c334 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,10 +1,19 @@ MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO 20 +PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 KISSPORT 8100 AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 +#FULLDUP OFF +#TXDELAY 30 #FIX_BITS 1 AX25 + +#DWAIT 0 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +TXDELAY 1000 +#TXDELAY 150 +#TXTAIL 10 +FULLDUP OFF From e9d0e570fc92ebb9b852ea0d734395667f364611 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:45:54 -0500 Subject: [PATCH 495/774] Update direwolf-pacsat-loopback.conf kissport 8102 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index a101c334..46878576 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -3,7 +3,7 @@ ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 -KISSPORT 8100 +KISSPORT 8102 AGWPORT 8002 #FULLDUP OFF #TXDELAY 30 From e185aa91d84b35e6f02815c614132086a6d1fc5a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:49:28 -0500 Subject: [PATCH 496/774] Update direwolf-pacsatsim-loopback.conf mix loopback 1 0 --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 1c74a18c..7812e543 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 582c570be38748dbec6e6fe9e87e4d032dad98ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:49:35 -0500 Subject: [PATCH 497/774] Update direwolf-pacsat-loopback.conf mix loopback 0 1 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 46878576..22f60b15 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 From a39e52c61706e54741f2e29a9a5ebc039fdc14c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:53:56 -0500 Subject: [PATCH 498/774] Update direwolf-pacsatsim-loopback.conf back to 0 0 --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 7812e543..f2ebf026 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 22e9fd420904ff5d94b3cb032f36b3a98887107a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:54:03 -0500 Subject: [PATCH 499/774] Update direwolf-pacsat-loopback.conf back to 1 1 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 22f60b15..a9a84df3 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 From 20a9466e545a757121c62cc743bac41f88f400dd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 08:58:58 -0500 Subject: [PATCH 500/774] Update pacsat.sh check callsign and update if changed --- groundstation/pacsat.sh | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5c118cdb..96fbef3b 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -2,7 +2,14 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station -if [ ! -d "/home/pi/PacSatGround" ]; then +loopback=0 +if [ "$1" = "l" ] ; then + + loopback=1 + +fi + +if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround @@ -13,6 +20,20 @@ if [ ! -d "/home/pi/PacSatGround" ]; then fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" + +oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) + +if [ ! "$callsign" = "$oldcallsign" ] + + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + +fi + sudo modprobe snd-aloop #sudo systemctl stop cubesatsim >/dev/null 2>&1 @@ -90,15 +111,17 @@ echo sudo usermod -a -G gpio pi -if [ ! "$1" = "l" ]; then +if [ "$loopback" = "1" ]; then #/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" - echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/groundstation/pacsat-df.sh & -else - echo "Using audio loopback" + echo "Using Audio Loopback" /home/pi/CubeSatSim/groundstation/pacsat-d.sh & +else + + echo "Using TXC FM Transceiver" + /home/pi/CubeSatSim/groundstation/pacsat-df.sh & + fi # 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 435045 & From 159d3d839dec3bd1cd2fc0759fe466e66ab3e74d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:01:06 -0500 Subject: [PATCH 501/774] Update pacsat.sh missing then --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 96fbef3b..5a2c7247 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -28,7 +28,7 @@ callsign="$1" oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) -if [ ! "$callsign" = "$oldcallsign" ] +if [ ! "$callsign" = "$oldcallsign" ] ; then sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties From 6c3eec3fd69b50dadd6b76305b1816a7ec39b75f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:05:43 -0500 Subject: [PATCH 502/774] Update pacsat.sh print callsigns --- groundstation/pacsat.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5a2c7247..d4fd31e2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,13 +24,22 @@ value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value + callsign="$1" +echo "Configured callsign is " +echo $callsign + oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) +echo "Callsign in PacSatGround.properties is " +echo $oldcallsign + if [ ! "$callsign" = "$oldcallsign" ] ; then sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + + cat /home/pi/PacSatGround/PacSatGround.properties fi From b8cabfd761edf990748c2cb33edf24cf1bfa4adf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:16:09 -0500 Subject: [PATCH 503/774] Update pacsat.sh fix callsign regex --- groundstation/pacsat.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d4fd31e2..906c9276 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,13 +24,12 @@ value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - callsign="$1" echo "Configured callsign is " echo $callsign -oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) +oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) echo "Callsign in PacSatGround.properties is " echo $oldcallsign From d648b0641982ab11ef4be0a65d3c4ed4071781dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:35:37 -0500 Subject: [PATCH 504/774] Update pacsatsim.sh check callsign and update if changed --- pacsatsim.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 4d965b06..f4b5f725 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -32,6 +32,35 @@ if [ ! -d "/home/pi/PacSat" ]; then fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" + +echo "Configured callsign is " +echo $callsign + +oldcallsign=$(grep -oP '(?<=bbs_callsign=).*(?=-)' /home/pi/pi_pacsat/Debug/pacsat.config) + +echo "Callsign in pacsat.config is " +echo $oldcallsign + +if [ ! "$callsign" = "$oldcallsign" ] ; then + + sudo sed -i "s/bbs_callsign=$oldcallsign/bbs_callsign=$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/broadcast_callsign=$oldcallsign/broadcast_callsign=$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/digi_callsign=$oldcallsign/digi_callsign=$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + + echo "New pacsat.confg is" + echo + + cat /home/pi/pi_pacsat/Debug/pacsat.config + +fi + + + sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start From ff744c5fd7eb371afb7027d90ab97ce28f194b9c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:38:40 -0500 Subject: [PATCH 505/774] Update pacsat.desktop change to pacsat-run --- groundstation/pacsat.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop index 7fef68f8..7097509e 100644 --- a/groundstation/pacsat.desktop +++ b/groundstation/pacsat.desktop @@ -2,7 +2,7 @@ Name=Pacsat GenericName=Pacsat Loopback Comment=Pacsat -Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat.sh" +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-run.sh" Icon=/home/pi/Icons/pacsat.png Terminal=true Type=Application From 7fa62b4ea130e1efaaa220bfa6a2dca2a96f5463 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:46:10 -0500 Subject: [PATCH 506/774] Update pacsatsim.sh fix loopback variable --- pacsatsim.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index f4b5f725..22a70958 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,6 +2,13 @@ # script to run PacsatSim +loopback=0 +if [ "$1" = "l" ] ; then + + loopback=1 + +fi + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" @@ -125,14 +132,15 @@ echo -if [ ! "$1" = "l" ]; then -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" - echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/pacsatsim-df.sh & +if [ "$loopback" = "1" ]; then -else echo "Using audio loopback" /home/pi/CubeSatSim/pacsatsim-d.sh & + +else + + echo "Using TXC FM transceiver" + /home/pi/CubeSatSim/pacsatsim-df.sh & fi From f6280e6fafb6ed4bd7995c3b3ff694557b7e4736 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:54:56 -0500 Subject: [PATCH 507/774] Update config remove all pacsat callsign change code --- config | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config b/config index 038eb8d5..09394c01 100755 --- a/config +++ b/config @@ -566,13 +566,13 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo systemctl stop pacsatsim &>/dev/null - sudo killall -9 java &>/dev/null +# sudo systemctl stop pacsatsim &>/dev/null +# sudo killall -9 java &>/dev/null - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties +# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config +# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config +# sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties +# sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties # sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties # sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi From e6a1b3c922d66d23a014625de62ba41ea15e0d54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 10:05:17 -0500 Subject: [PATCH 508/774] Update pacsatsim.sh killall pi_pacsat and pacsat_telem --- pacsatsim.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 22a70958..d873f254 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -105,6 +105,10 @@ sudo modprobe snd-aloop #sudo killall -9 zenity &>/dev/null +sudo killall -9 pacsat_telem &>/dev/null + +sudo killall -9 pi_pacsat &>/dev/null + echo From 005578a3e0f680874bcec86d9e5f167ec485f1d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 10:56:01 -0500 Subject: [PATCH 509/774] Update pacsatsim.sh sudo for direwolf or shared_mic error --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index d873f254..56fc3033 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -139,12 +139,12 @@ echo if [ "$loopback" = "1" ]; then echo "Using audio loopback" - /home/pi/CubeSatSim/pacsatsim-d.sh & + sudo /home/pi/CubeSatSim/pacsatsim-d.sh & else echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/pacsatsim-df.sh & + sudo /home/pi/CubeSatSim/pacsatsim-df.sh & fi From 646ab6cbc3b3320d8f7bbde010e50b025c5a1741 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 11:55:51 -0500 Subject: [PATCH 510/774] Update pacsat.sh add Loopback directory --- groundstation/pacsat.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 906c9276..4573cecf 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -6,15 +6,18 @@ loopback=0 if [ "$1" = "l" ] ; then loopback=1 + echo "PacSat Ground Station with Loopback" fi if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround + + mkdir /home/pi/PacSatGroundLoop echo - echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" sleep 10 @@ -42,6 +45,19 @@ if [ ! "$callsign" = "$oldcallsign" ] ; then fi +oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGroundLoop/PacSatGround.properties) + +echo "Callsign in Loopback PacSatGround.properties is " +echo $oldcallsign + +if [ ! "$callsign" = "$oldcallsign" ] ; then + + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGroundLoop/PacSatGround.properties + + cat /home/pi/PacSatGroundLoop/PacSatGround.properties + +fi + sudo modprobe snd-aloop #sudo systemctl stop cubesatsim >/dev/null 2>&1 @@ -139,9 +155,15 @@ fi cd /home/pi/Desktop/PacsatGround/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & +if [ "$loopback" = "1" ]; then + setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGroundLoop" # removed & +else + + setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & + +fi #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ #sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" From 88ed76d9dfde98c72368471b286da8a10f70d93a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 11:58:44 -0500 Subject: [PATCH 511/774] Update pacsat-config.sh add Loopback config reset --- groundstation/pacsat-config.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 85d02f91..c3f9a00c 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -27,9 +27,11 @@ sudo killall -9 direwolf &>/dev/null echo echo "3. Set Frequencies" echo - echo "4. Reset PacSat Ground Station" - echo - echo "5. Reset PacSat Satellite" + echo "4. Reset PacSat Ground Station Configuration" + echo + echo "5. Reset PacSat Ground Station Loopback Configuration" + echo + echo "6. Reset PacSat Satellite" echo echo "Which do you choose? Enter 1 - 5" @@ -92,16 +94,23 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "4" ] ; then - echo "You have chosen to reset the PacSat Ground Station" + echo "You have chosen to reset the PacSat Ground Station Configuration" echo echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" echo -# /home/pi/CubeSatSim/groundstation/pacsat-reset.sh - /home/pi/CubeSatSim/config -K n + sudo rm -r /home/pi/PacSatGround + + elif [ "$ANS" = "5" ] ; then + + echo "You have chosen to reset the PacSat Ground Station Loopback Configuration" + echo + echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" + echo + sudo rm -r /home/pi/PacSatGroundLoop - elif [ "$ANS" = "5" ] ; then + elif [ "$ANS" = "6" ] ; then echo "You have chosen to reset the PacSat Satellite" echo From da52631b1cb74612f707e555838e2795e183d14e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 11:59:43 -0500 Subject: [PATCH 512/774] Update pacsat.sh add Loopback configuration --- groundstation/pacsat.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 4573cecf..df8693d8 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -13,6 +13,15 @@ fi if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround + + echo + echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + + sleep 10 + +fi + +if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then mkdir /home/pi/PacSatGroundLoop From 6ece8ea7c917920caab73977ca8ee6bf11b32a39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 12:02:04 -0500 Subject: [PATCH 513/774] Update config remove pacsat ground reset --- config | 9 --------- 1 file changed, 9 deletions(-) diff --git a/config b/config index 09394c01..55aaba34 100755 --- a/config +++ b/config @@ -1490,14 +1490,6 @@ elif [ "$1" = "-I" ]; then # restart=1 # fi -elif [ "$1" = "-K" ]; then - - echo - echo "Reset PacSat Ground Station configuration" - echo - sudo killall -9 java &>/dev/null - sudo rm -r /home/pi/PacSatGround - elif [ "$1" = "-k" ]; then echo @@ -1547,7 +1539,6 @@ elif [ "$1" = "-h" ]; then echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings and shutdown" echo " -k Reset the PacSatSim Configuration" - echo " -K Reset the PacSatSim Ground Station Configuration" echo exit From 4025dca6c1a7b541879ae2fcc0c314adf3d667d7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 12:09:14 -0500 Subject: [PATCH 514/774] Update direwolf-pacsat-loopback.conf change to 8100 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index a9a84df3..6cd3d988 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -3,7 +3,7 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 -KISSPORT 8102 +KISSPORT 8100 AGWPORT 8002 #FULLDUP OFF #TXDELAY 30 From 8d672cccb6d7f8c515c2e8f5834bfbb0e5a4a381 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:19:51 -0500 Subject: [PATCH 515/774] Update pacsat-config.sh add main and simulated --- groundstation/pacsat-config.sh | 160 +++++++++++++++++++++------------ 1 file changed, 101 insertions(+), 59 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index c3f9a00c..2eb59921 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -19,22 +19,18 @@ sudo killall -9 direwolf &>/dev/null # profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") # echo $profile - echo "Here are the PacSat Ground Station configuration choices:" + echo "Here are the PacSat configuration choices:" echo - echo "1. Set PacSat Ground Station Callsign" + echo "1. PacSat Ground Station Configuration" echo - echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" - echo - echo "3. Set Frequencies" + echo "2. PacSat Ground Station Loopback Configuration" echo - echo "4. Reset PacSat Ground Station Configuration" - echo - echo "5. Reset PacSat Ground Station Loopback Configuration" - echo - echo "6. Reset PacSat Satellite" + echo "3. Set Frequencies" echo - echo "Which do you choose? Enter 1 - 5" - + echo "4. Reset PacSat Satellite" + echo + echo "Which do you choose? Enter 1 - 4" + read -r ANS if [ -z "$ANS" ]; then @@ -48,42 +44,106 @@ sudo killall -9 direwolf &>/dev/null fi if [ "$ANS" = "1" ] ; then + + echo "Here are your PacSat Ground Station Configuration choices:" + echo + echo "1. PacSat Ground Station Callsign" + echo + echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" + echo + echo "3. Reset PacSat Ground Station Configuration" + + read -r ANS - echo "You have chosen to set the PacSat Ground Station Callsign" - echo - - /home/pi/CubeSatSim/config -c n - - elif [ "$ANS" = "2" ] ; then - - echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" - echo + + if [ -z "$ANS" ]; then + + echo "No choice made. Exiting." + + sleep 3 + + exit + + fi - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + if [ "$ANS" = "1" ] ; then - echo "Current value of remote PacSat callsign is" - echo $oldcallsign - echo + oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) - echo "Enter new callsign in all capitals: " - read callsign - - if [ -z $callsign ] ; then + echo "Callsign in PacSatGround.properties is " + echo $oldcallsign + + echo "Enter new callsign in all capitals: " + read callsign + + if [ -z $callsign ] ; then + + callsign="$1" + echo "Keeping value of" $oldcallsign - callsign="$1" - echo "Keeping value of" $oldcallsign - - else + else + + echo "Configured callsign is " + echo $callsign + + if [ ! "$callsign" = "$oldcallsign" ] ; then + + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + + cat /home/pi/PacSatGround/PacSatGround.properties + + fi + + elif [ "$ANS" = "2" ] ; then - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo - echo "Changing callsign to " - echo $callsign - echo - echo "You will see the change next time you run the PacSat Ground Station" + + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + + echo "Current value of remote PacSat callsign is" + echo $oldcallsign echo - fi + + echo "Enter new callsign in all capitals: " + read callsign + if [ -z $callsign ] ; then + + callsign="$1" + echo "Keeping value of" $oldcallsign + + else + + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + echo + echo "Changing callsign to " + echo $callsign + echo + echo "You will see the change next time you run the PacSat Ground Station" + echo + fi + + elif [ "$ANS" = "3" ] ; then + + echo "You have chosen to reset the PacSat Ground Station Configuration" + echo + echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" + echo + + sudo rm -r /home/pi/PacSatGround + + elif [ "$ANS" = "2" ] ; then + + echo "Here are your PacSat Ground Station Loopback Configuration choices:" + echo + echo "1. PacSat Ground Station Callsign" + echo + echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" + echo + echo "3. Reset PacSat Ground Station Configuration" + + read -r ANS elif [ "$ANS" = "3" ] ; then @@ -92,25 +152,7 @@ sudo killall -9 direwolf &>/dev/null /home/pi/CubeSatSim/config -F n - elif [ "$ANS" = "4" ] ; then - - echo "You have chosen to reset the PacSat Ground Station Configuration" - echo - echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" - echo - - sudo rm -r /home/pi/PacSatGround - - elif [ "$ANS" = "5" ] ; then - - echo "You have chosen to reset the PacSat Ground Station Loopback Configuration" - echo - echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" - echo - - sudo rm -r /home/pi/PacSatGroundLoop - - elif [ "$ANS" = "6" ] ; then + elif [ "$ANS" = "4" ] ; then echo "You have chosen to reset the PacSat Satellite" echo @@ -119,7 +161,7 @@ sudo killall -9 direwolf &>/dev/null else - echo "Please enter only 1 to 5" + echo "Please enter only 1 to 4" fi From a98b949d20b1491e891c579df6c8795383035e51 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:20:08 -0500 Subject: [PATCH 516/774] Update pacsat.sh add TNC delay set to 750, remove callsign --- groundstation/pacsat.sh | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index df8693d8..16640dd6 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -32,40 +32,8 @@ if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then fi -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -callsign="$1" - -echo "Configured callsign is " -echo $callsign - -oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) - -echo "Callsign in PacSatGround.properties is " -echo $oldcallsign - -if [ ! "$callsign" = "$oldcallsign" ] ; then - - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - - cat /home/pi/PacSatGround/PacSatGround.properties - -fi - -oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGroundLoop/PacSatGround.properties) - -echo "Callsign in Loopback PacSatGround.properties is " -echo $oldcallsign - -if [ ! "$callsign" = "$oldcallsign" ] ; then - - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGroundLoop/PacSatGround.properties - - cat /home/pi/PacSatGroundLoop/PacSatGround.properties - -fi +sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties +sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties sudo modprobe snd-aloop From d90344a08b2afab9032489389a2a91b190c46e83 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:24:21 -0500 Subject: [PATCH 517/774] Update pacsat-config.sh add else --- groundstation/pacsat-config.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 2eb59921..ea8055dc 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -133,6 +133,12 @@ sudo killall -9 direwolf &>/dev/null sudo rm -r /home/pi/PacSatGround + else + + echo "Please choose an option 1-3" + + fi + elif [ "$ANS" = "2" ] ; then echo "Here are your PacSat Ground Station Loopback Configuration choices:" From 7e32427429cf49b238777407f4d28c563844ff53 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:25:38 -0500 Subject: [PATCH 518/774] Update pacsat-config.sh missing fi --- groundstation/pacsat-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index ea8055dc..c69aad16 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -93,6 +93,7 @@ sudo killall -9 direwolf &>/dev/null cat /home/pi/PacSatGround/PacSatGround.properties fi + fi elif [ "$ANS" = "2" ] ; then From 0e86e8771e01c5f3df4d23ea67d95c166401c779 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 14:32:29 -0500 Subject: [PATCH 519/774] Update pacsat-config.sh Loopback config settings --- groundstation/pacsat-config.sh | 66 +++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index c69aad16..d15e7604 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -43,9 +43,13 @@ sudo killall -9 direwolf &>/dev/null fi - if [ "$ANS" = "1" ] ; then - - echo "Here are your PacSat Ground Station Configuration choices:" + if [ "$ANS" = "1" ] || [ "$ANS" = "2" ] ; then + + if [ "$ANS" = "1" ] ; then + echo "Here are your PacSat Ground Station Configuration choices:" + else + echo "Here are your PacSat Ground Station Simulation Configuration choices:" + fi echo echo "1. PacSat Ground Station Callsign" echo @@ -68,8 +72,11 @@ sudo killall -9 direwolf &>/dev/null if [ "$ANS" = "1" ] ; then - oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) - + if [ "$ANS" = "1" ] ; then + oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) + else + oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGroundLoop/PacSatGround.properties) + fi echo "Callsign in PacSatGround.properties is " echo $oldcallsign @@ -87,10 +94,14 @@ sudo killall -9 direwolf &>/dev/null echo $callsign if [ ! "$callsign" = "$oldcallsign" ] ; then - - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - - cat /home/pi/PacSatGround/PacSatGround.properties + + if [ "$ANS" = "1" ] ; then + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + cat /home/pi/PacSatGround/PacSatGround.properties + else + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGroundLoop/PacSatGround.properties + cat /home/pi/PacSatGroundLoop/PacSatGround.properties + fi fi fi @@ -99,9 +110,12 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo - - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) - + + if [ "$ANS" = "1" ] ; then + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + else + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties) + fi echo "Current value of remote PacSat callsign is" echo $oldcallsign echo @@ -115,8 +129,11 @@ sudo killall -9 direwolf &>/dev/null echo "Keeping value of" $oldcallsign else - - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + if [ "$ANS" = "1" ] ; then + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + else + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties + fi echo echo "Changing callsign to " echo $callsign @@ -131,27 +148,18 @@ sudo killall -9 direwolf &>/dev/null echo echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" echo - - sudo rm -r /home/pi/PacSatGround - + + if [ "$ANS" = "1" ] ; then + sudo rm -r /home/pi/PacSatGround + else + sudo rm -r /home/pi/PacSatGroundLoop + fi else echo "Please choose an option 1-3" fi - elif [ "$ANS" = "2" ] ; then - - echo "Here are your PacSat Ground Station Loopback Configuration choices:" - echo - echo "1. PacSat Ground Station Callsign" - echo - echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" - echo - echo "3. Reset PacSat Ground Station Configuration" - - read -r ANS - elif [ "$ANS" = "3" ] ; then echo "You have chosen to set the Frequency of the PacSat Ground Station" From a1dee64675510da8568df5912e0f0d3fb739990f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 14:35:50 -0500 Subject: [PATCH 520/774] Update pacsat-config.sh cleanup --- groundstation/pacsat-config.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index d15e7604..ed820b13 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -21,13 +21,13 @@ sudo killall -9 direwolf &>/dev/null echo "Here are the PacSat configuration choices:" echo - echo "1. PacSat Ground Station Configuration" + echo " 1. PacSat Ground Station Configuration" echo - echo "2. PacSat Ground Station Loopback Configuration" + echo " 2. PacSat Ground Station Simulation Configuration" echo - echo "3. Set Frequencies" + echo " 3. Set Frequencies" echo - echo "4. Reset PacSat Satellite" + echo " 4. Reset PacSat Satellite" echo echo "Which do you choose? Enter 1 - 4" @@ -51,11 +51,11 @@ sudo killall -9 direwolf &>/dev/null echo "Here are your PacSat Ground Station Simulation Configuration choices:" fi echo - echo "1. PacSat Ground Station Callsign" + echo " 1. PacSat Ground Station Callsign" echo - echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" + echo " 2. Set Remote PacSat Satellite Callsign in Ground Station configuration" echo - echo "3. Reset PacSat Ground Station Configuration" + echo " 3. Reset PacSat Ground Station Configuration" read -r ANS @@ -72,6 +72,7 @@ sudo killall -9 direwolf &>/dev/null if [ "$ANS" = "1" ] ; then + echo if [ "$ANS" = "1" ] ; then oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) else From 5cd4ebec220a2678688312c53fbb339bce1fa84c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 16:18:30 -0500 Subject: [PATCH 521/774] Update pacsat-run.sh add kill direwolf --- groundstation/pacsat-run.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index f4242560..922fb3a5 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -5,16 +5,18 @@ echo "Startup script to run the PacSat Ground Station for FIAB v4" echo -source /home/pi/venv/bin/activate +# source /home/pi/venv/bin/activate sudo killall -9 java &>/dev/null sudo killall -9 zenity &>/dev/null +sudo killall -9 direwolf &>/dev/null + #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Loopback" "Run a Locally Simulated PacSat") + profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=170 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") echo $profile @@ -56,9 +58,9 @@ sudo killall -9 zenity &>/dev/null /home/pi/CubeSatSim/groundstation/pacsat-config.sh - elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then + elif [ "$ANS" = "3" ] || [ "$profile" = "Simulate" ] ; then - echo "You have chosen the Loopback Simulated PacSat Ground Station" + echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" sleep 1 From 7c9e8e39b2fe43de5fcfb7bcbd4bec8b1c35541e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 16:19:47 -0500 Subject: [PATCH 522/774] Update pacsat-run.sh kill direwolf at end if quit Pacsat ground station --- groundstation/pacsat-run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 922fb3a5..37704d0f 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -76,6 +76,7 @@ sudo killall -9 direwolf &>/dev/null fi +sudo killall -9 direwolf &>/dev/null sleep 10 From ac14553038547bddc7c9d428582061ddf8b57f2c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 22:30:01 -0500 Subject: [PATCH 523/774] Update install fix pacsat_telem install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 459b7abc..a28bbcb3 100755 --- a/install +++ b/install @@ -165,7 +165,7 @@ if [ -f "$FILE" ]; then fi FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled -if [ -f "$FILE" ]; then +if [ ! -f "$FILE" ]; then cd sudo apt-get install -y libbsd-dev git clone https://github.com/alanbjohnston/pacsat_telem.git From a269cca2b35ea69c7d1884e3eb1d3a7f146603c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 22:38:30 -0500 Subject: [PATCH 524/774] Update install fix g0kla lib --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index a28bbcb3..b30dc015 100755 --- a/install +++ b/install @@ -129,8 +129,8 @@ sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ -f "$FILE" ]; then cd - git clone https://github.com/alanbjohnston/iors_common.git - cd iors_common/Debug/ + git clone https://github.com/alanbjohnston/g0kla_common.git + cd g0kla_common/Debug/ make all sudo ./install.sh From 0a69610f8ca53a52d66639893b84aa463fd11432 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 22:48:43 -0500 Subject: [PATCH 525/774] Update install add desktop install --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index b30dc015..d4e12a4a 100755 --- a/install +++ b/install @@ -31,6 +31,8 @@ cd CubeSatSim/config -c -n CubeSatSim/config -l -n + +cp /home/piCubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop sudo apt-get update && sudo apt-get dist-upgrade -y From b1ff14c3bc0825462046cfed1c0a9e8810a6498d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 05:13:13 -0500 Subject: [PATCH 526/774] Update install fix pi_pacsat install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index d4e12a4a..c1037a53 100755 --- a/install +++ b/install @@ -129,7 +129,7 @@ cd rpitx sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled -if [ -f "$FILE" ]; then +if [ ! -f "$FILE" ]; then cd git clone https://github.com/alanbjohnston/g0kla_common.git cd g0kla_common/Debug/ From e2a1cb0fc98074dadc9316ac8641d90f955c2e36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 09:13:26 -0500 Subject: [PATCH 527/774] fix second menu --- groundstation/pacsat-config.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index ed820b13..6a2ce55c 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -57,10 +57,10 @@ sudo killall -9 direwolf &>/dev/null echo echo " 3. Reset PacSat Ground Station Configuration" - read -r ANS + read -r CH - if [ -z "$ANS" ]; then + if [ -z "$CH" ]; then echo "No choice made. Exiting." @@ -70,7 +70,7 @@ sudo killall -9 direwolf &>/dev/null fi - if [ "$ANS" = "1" ] ; then + if [ "$CH" = "1" ] ; then echo if [ "$ANS" = "1" ] ; then @@ -107,7 +107,7 @@ sudo killall -9 direwolf &>/dev/null fi fi - elif [ "$ANS" = "2" ] ; then + elif [ "$CH" = "2" ] ; then echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo @@ -143,7 +143,7 @@ sudo killall -9 direwolf &>/dev/null echo fi - elif [ "$ANS" = "3" ] ; then + elif [ "$CH" = "3" ] ; then echo "You have chosen to reset the PacSat Ground Station Configuration" echo From b456129b8855f8ba51da1eea3b0867c800fae0c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 09:50:14 -0500 Subject: [PATCH 528/774] direwolf checkout master-sync-invert --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index c1037a53..1979bdcc 100755 --- a/install +++ b/install @@ -84,7 +84,7 @@ git clone https://github.com/alanbjohnston/direwolf.git cd direwolf -git checkout invert +git checkout master-sync-invert make -j From c22b8bc79b3033fff3c1461bb710e50d5d17d218 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 10:39:52 -0500 Subject: [PATCH 529/774] change to current version direwolf --- install | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/install b/install index 1979bdcc..7d65daa8 100755 --- a/install +++ b/install @@ -80,18 +80,14 @@ fi cd -git clone https://github.com/alanbjohnston/direwolf.git - +git clone https://github.com/wb2osz/direwolf.git cd direwolf - -git checkout master-sync-invert - -make -j - +mkdir build +cd build +cmake .. +make -j4 sudo make install - -make install-rpi - +make install-conf cd From f42b8f0f7ba9ad28492bb49c7a4bcf87861710c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 10:57:29 -0500 Subject: [PATCH 530/774] Update install fix desktop copy --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 7d65daa8..4e431f4e 100755 --- a/install +++ b/install @@ -32,7 +32,7 @@ CubeSatSim/config -c -n CubeSatSim/config -l -n -cp /home/piCubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop +cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop sudo apt-get update && sudo apt-get dist-upgrade -y From 183374f903de9770f4e6739f8e28ff0a5538b867 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 11:17:40 -0500 Subject: [PATCH 531/774] Update install to install cmake --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 4e431f4e..71e5262f 100755 --- a/install +++ b/install @@ -80,6 +80,7 @@ fi cd +sudo apt-get install -y cmake git clone https://github.com/wb2osz/direwolf.git cd direwolf mkdir build From 3ddf0b897d943a83e765e961ddd7ff8b86ff6a0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:13:17 -0500 Subject: [PATCH 532/774] Update install remove peripheral --- install | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/install b/install index 71e5262f..4096ca2d 100755 --- a/install +++ b/install @@ -256,17 +256,10 @@ sudo raspi-config nonint do_legacy 0 fi if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then - - if [[ $(grep 'dtoverlay=dwc2,dr_mode=peripheral' /boot/config.txt) ]]; then - echo "dtoverlay=dwc2,dr_mode=peripheral aalready in /boot/config.txt" - else - sudo sed -i 's/dtoverlay=dwc2/dtoverlay=dwc2,dr_mode=peripheral/g' /boot/config.txt - echo " adding dr_mode=peripheral to /boot/config.txt" - fi - + echo "dtoverlay=dwc2 aalready in /boot/config.txt" else - echo "adding dtoverlay=dwc2,dr_mode=peripheral to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2,dr_mode=peripheral" >> /boot/config.txt' + echo "adding dtoverlay=dwc2 to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' fi if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then From 8e92c2111472b0eba75fe04545e46a2720702137 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:44:39 -0500 Subject: [PATCH 533/774] Update pacsatsim.sh add v option for USB audio TX and RX --- pacsatsim.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 56fc3033..7b59fad8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -140,7 +140,12 @@ if [ "$loopback" = "1" ]; then echo "Using audio loopback" sudo /home/pi/CubeSatSim/pacsatsim-d.sh & - + +elif [ "$loopback" = "v" ]; then + + echo "Using USB Audio TX and RX" + sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & + else echo "Using TXC FM transceiver" From f801396a49495df1155c052ea6756af5f43e3799 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:46:59 -0500 Subject: [PATCH 534/774] Update pacsatsim.sh add vox variable --- pacsatsim.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 7b59fad8..6e9d363f 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -3,9 +3,14 @@ # script to run PacsatSim loopback=0 +vox=0 if [ "$1" = "l" ] ; then loopback=1 + +elif [ "$1" = "v" ] ; then + + vox=1 fi @@ -141,7 +146,7 @@ if [ "$loopback" = "1" ]; then echo "Using audio loopback" sudo /home/pi/CubeSatSim/pacsatsim-d.sh & -elif [ "$loopback" = "v" ]; then +elif [ "$vox" = "1" ]; then echo "Using USB Audio TX and RX" sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & From c7a359fd7de98db2fa9d2ddee33421a9e28a9847 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:52:26 -0500 Subject: [PATCH 535/774] Update pacsatsim.sh add vox print --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6e9d363f..1ea856b1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -148,7 +148,7 @@ if [ "$loopback" = "1" ]; then elif [ "$vox" = "1" ]; then - echo "Using USB Audio TX and RX" + echo "Using Soundcard Audio TX and RX (VOX)" sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & else From 5b16fe457fcab7abda679342e21ce3a768971236 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:53:46 -0500 Subject: [PATCH 536/774] Update pacsat.sh add sound card VOX option --- groundstation/pacsat.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 16640dd6..321907d2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -3,10 +3,16 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station loopback=0 +vox=0 if [ "$1" = "l" ] ; then loopback=1 echo "PacSat Ground Station with Loopback" + +elif [ "$1" = "v" ] ; then + + vox=1 + echo "PacSat Ground Station with Soundcard (VOX)" fi @@ -118,6 +124,11 @@ if [ "$loopback" = "1" ]; then echo "Using Audio Loopback" /home/pi/CubeSatSim/groundstation/pacsat-d.sh & +elif [ "$vox" = "1" ]; then + + echo "Using Soundcard Audio TX RX (VOX)" + /home/pi/CubeSatSim/groundstation/pacsat-dj.sh & + else echo "Using TXC FM Transceiver" From 8221559d770ea50e6675b068c49c1c591db0815b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 17:12:41 -0500 Subject: [PATCH 537/774] Update direwolf-fm-pacsat-jp14.conf turn off ptt --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index eb0bf0a2..5df8f59e 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,6 +1,6 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO -20 +#PTT GPIO -20 CHANNEL 0 MODEM 1200 KISSPORT 8100 From 6b23a0b47898b6c9354b7ed9f4bbbb06ec59be79 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 09:10:23 -0500 Subject: [PATCH 538/774] Update config merge conflict --- config | 875 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 711 insertions(+), 164 deletions(-) diff --git a/config b/config index 55aaba34..75cca3c1 100755 --- a/config +++ b/config @@ -1,7 +1,8 @@ #!/bin/bash -function transmit_command_aprs { +function transmit_command { +<<<<<<< HEAD FILE=/home/pi/CubeSatSim/transmit_dtmf if [ -f "$FILE" ]; then @@ -104,113 +105,119 @@ function transmit_command_bpsk { exit } +======= + MODE=$1 + echo "CubeSatSim is in Transmit Commands mode" + echo +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 -function transmit_command_sstv { + 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 "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 + echo "Sending DTMF tones to change to mode "$MODE - fi + case $MODE in + + a) + number=1 + ;; + f) + number=2 + ;; + b) + number=3 + ;; + s) + number=4 + ;; + m) + number=5 + ;; + e) + number=6 + ;; + j) + number=7 + ;; + o) + number=10 + ;; + *) + number=0 + ;; + esac - exit -} +# echo $number -function transmit_command_cw { + 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 - FILE=/home/pi/CubeSatSim/transmit_dtmf - if [ -f "$FILE" ]; then +# echo "Stopping command and control" +# sudo systemctl stop 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/direwolf-transmit-dtmf-cw.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 +# echo "Resuming command and control" +# sudo systemctl start command else - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" + 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 CW" + echo -n "Sending APRS packet to change mode to "$MODE" " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 fi - exit + echo + echo "To change the mode of this CubeSatSim use config -n" } -function transmit_command_beacon { - - FILE=/home/pi/CubeSatSim/transmit_dtmf - if [ -f "$FILE" ]; then - - echo "Stopping command and control" - sudo systemctl stop command +function check_restart { - 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 + 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 + restart=1 +# echo "Need to restart since batt saver" + else + reboot=1 +# echo "Need to reboot" + fi 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 + restart=1 +# echo "Need to restart" + fi } +<<<<<<< HEAD echo "CubeSatSim v2.1 configuration tool" +======= +echo +echo "CubeSatSim v2.2 configuration tool" +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo # echo $1 # echo $2 @@ -222,8 +229,13 @@ sudo modprobe snd-aloop if [ -z "$2" ] ; then noreboot=0 else - noreboot=1 - echo "Reboot disabled" + if [ "$2" = "n" ] ; then + echo "Reboot disabled" + noreboot=1 + else + fail=$2 + fi + fi # echo "No reboot" @@ -249,6 +261,8 @@ if [ "$1" = "" ]; then echo "Mode is SSTV" elif [ "$1" = "e" ]; then echo "Mode is Repeater" + elif [ "$1" = "j" ]; then + echo "Mode is FUNcube" elif [ "$1" = "n" ]; then echo -n "Mode is Transmit Commands with " FILE=/home/pi/CubeSatSim/transmit_dtmf @@ -270,13 +284,89 @@ if [ "$1" = "" ]; then set -- $value if [ "$5" = "y" ] || [ "$5" = "yes" ] ; then -# sim="yes" echo "Simulated Telemetry is ON" else -# sim="no" - echo "Simulated Telemetry is OFF" + FILE=/home/pi/CubeSatSim/sim_mode_auto + if [ -f "$FILE" ]; then + echo "Simulated Telemetry is automatically turned ON" +# elif [[ $(timeout 2 i2cdetect -y 1 | grep -e "44" -e "45") ]]; then # check for battery board sensors +# # Check the exit code of the last command +# if [ $? -ne 0 ]; then +# echo "Simulated Telemetry is automatically turned ON" +# else +# echo "Simulated Telemetry is OFF" +# fi + else + echo "Simulated Telemetry is OFF" + fi fi - echo +# echo + + FILE=/home/pi/CubeSatSim/failure_mode.txt + if [ -f "$FILE" ]; then + if [[ $(grep "\-1" $FILE) ]]; then + echo "No simulated failure" + else + fail=$(<$FILE) + echo -n "Simulated " +# cat $FILE + + case $fail in + + 1) + echo "+Y Solar Panel Unplugged (1)" + ;; + 2) + echo "+X Solar Panel Failure (2)" + ;; + 3) + echo "-X Solar Panel Degredation (3)" + ;; + 4) + echo "-Y Solar Panel Short Circuit (4)" + ;; + 5) + echo "Failed I2C Bus 1 (5)" + ;; + 6) + echo "Failed I2C Bus 3 (6)" + ;; + 7) + echo "Failed Camera (7)" + ;; + 8) + echo "Failed Payload (8)" + ;; + 9) + echo "Failed BME Sensor (9)" + ;; + 10) + echo "Failed MPU Sensor (10)" + ;; + "11") + echo "Failed FM Audio (11)" + ;; + *) + echo "Unknown Failure" + ;; + esac +# echo $fail + fi + else + echo "No simulated failure" + fi + + if [ "${12}" = "y" ] || [ "${12}" = "yes" ] ; then + echo "Random Failure Mode is ON with time period" ${13} "seconds" + else + echo "Random Failure Mode is OFF" + fi + + 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" @@ -284,7 +374,7 @@ if [ "$1" = "" ]; then echo "Balloon mode is OFF" fi - echo +# echo echo -n "Current command count is: " cat /home/pi/CubeSatSim/command_count.txt echo @@ -295,7 +385,7 @@ if [ "$1" = "" ]; then echo -n "Squelch level is: " echo $6 - echo +# echo FILE=/home/pi/CubeSatSim/command_control if [ -f "$FILE" ]; then @@ -314,14 +404,14 @@ if [ "$1" = "" ]; then echo "Radio command and control is OFF" fi - echo +# echo echo -n "RX PL code is: " echo -n ${10} # echo echo -n " TX PL code is: " echo ${11} - echo +# echo FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then @@ -330,7 +420,7 @@ if [ "$1" = "" ]; then echo "Battery saver mode is OFF" fi - echo +# echo FILE=/home/pi/CubeSatSim/beacon_off if [ -f "$FILE" ]; then echo "Transmit beacon telemetry is OFF" @@ -342,7 +432,7 @@ if [ "$1" = "" ]; then echo -e "Current sim.cfg configuration file:" # echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} + echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo echo "To change, include an OPTION" @@ -364,11 +454,12 @@ elif [ "$1" = "-a" ]; then if [ "$1" == "n" ]; then - transmit_command_aprs + transmit_command "a" else echo "changing CubeSatSim to AFSK mode" +<<<<<<< HEAD sudo echo "a" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver @@ -382,6 +473,11 @@ elif [ "$1" = "-a" ]; then else restart=1 fi +======= + check_restart + sudo echo "a" > /home/pi/CubeSatSim/.mode + +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-m" ]; then @@ -392,12 +488,14 @@ elif [ "$1" = "-m" ]; then if [ "$1" == "n" ]; then - transmit_command_cw + transmit_command "m" else echo "changing CubeSatSim to CW mode" + check_restart sudo echo "m" > /home/pi/CubeSatSim/.mode +<<<<<<< HEAD if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then @@ -410,6 +508,9 @@ elif [ "$1" = "-m" ]; then else restart=1 fi +======= + +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-f" ]; then @@ -420,7 +521,7 @@ elif [ "$1" = "-f" ]; then if [ "$1" == "n" ]; then - transmit_command_fsk + transmit_command "f" else @@ -441,7 +542,7 @@ elif [ "$1" = "-b" ]; then if [ "$1" == "n" ]; then - transmit_command_bpsk + transmit_command "b" else @@ -462,14 +563,15 @@ elif [ "$1" = "-s" ]; then if [ "$1" == "n" ]; then - transmit_command_sstv + transmit_command "s" else echo "changing CubeSatSim to SSTV mode" + check_restart sudo echo "s" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then +<<<<<<< HEAD FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 @@ -481,6 +583,8 @@ elif [ "$1" = "-s" ]; then else restart=1 fi +======= +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-t" ]; then @@ -495,14 +599,14 @@ elif [ "$1" = "-t" ]; then set -- $value if [ "$5" = "yes" ] || [ "$5" = "y" ]; then - echo "Simualted Telemetry is ON" + echo "Simulated Telemetry is ON" else - echo "Simualted Telemetry is OFF" + echo "Simulated Telemetry is OFF" fi echo -# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} echo "Do you want Simulated Telemetry ON (y/n) " read sim @@ -514,13 +618,14 @@ elif [ "$1" = "-t" ]; then else sim="no" echo "Simulated Telemetry is OFF" + echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures fi # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" # echo - echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} - echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} + echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg echo ## echo "Rebooting CubeSatSim with new configuration file" ## echo @@ -549,7 +654,7 @@ elif [ "$1" = "-c" ]; then echo $oldcallsign echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} echo "Enter callsign in all capitals: " read callsign @@ -563,6 +668,7 @@ elif [ "$1" = "-c" ]; then echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" +<<<<<<< HEAD echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg @@ -575,6 +681,10 @@ elif [ "$1" = "-c" ]; then # sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties # sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties # sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties +======= + echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} + echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi if [ "$norestart" = "1" ]; then @@ -607,7 +717,7 @@ elif [ "$1" = "-r" ]; then echo $2 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter Reset Count (integer): " @@ -627,8 +737,8 @@ elif [ "$1" = "-r" ]; then echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" - echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} + echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg fi if [ "$norestart" = "1" ]; then @@ -662,7 +772,7 @@ elif [ "$1" = "-l" ]; then echo $3 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter latitude (decimal degrees, positive is north): " @@ -704,8 +814,8 @@ elif [ "$1" = "-l" ]; then fi echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" - echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} - echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} + echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg if [ "$norestart" = "1" ]; then echo @@ -756,7 +866,6 @@ elif [ "$1" = "-C" ]; then elif [ "$1" = "-T" ]; then - echo echo "Change command and control state" echo @@ -769,28 +878,51 @@ 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" sudo systemctl restart command + echo "restarting transmit" + sudo systemctl restart transmit ## sudo reboot now 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 -## 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" + + 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 + 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 @@ -918,7 +1050,7 @@ elif [ "$1" = "-R" ]; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null 2>&1 echo "Commands count reset to 0" - echo "0\n" > /home/pi/CubeSatSim/command_count.txt + echo "0" > /home/pi/CubeSatSim/command_count.txt else echo "Commands count not reset" fi @@ -994,7 +1126,7 @@ elif [ "$1" = "-q" ]; then echo $6 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter squelch (integer 1 - 8): " @@ -1016,8 +1148,8 @@ elif [ "$1" = "-q" ]; then # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" # echo - echo $1 $2 $3 $4 $5 $sq $7 $8 $9 ${10} ${11} - echo $1 $2 $3 $4 $4 $sq $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + echo $1 $2 $3 $4 $5 $sq $7 $8 $9 ${10} ${11} ${12} ${13} + echo $1 $2 $3 $4 $4 $sq $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg echo echo "Restarting CubeSatSim with new configuration file" ## echo @@ -1039,7 +1171,7 @@ elif [ "$1" = "-P" ]; then echo echo "Editing the PL (Private Line) CTCSS/CDCSS setting in" - echo "the configuration file for CubeSatSim" + echo "the configuration file for CubeSatSim" echo value=`cat /home/pi/CubeSatSim/sim.cfg` @@ -1053,7 +1185,7 @@ elif [ "$1" = "-P" ]; then echo ${11} echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter RX PL value integer 0: None, 01-38: CTCSS (analog, 39-121:CDCSS (digital)" @@ -1096,8 +1228,8 @@ elif [ "$1" = "-P" ]; then # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" # echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl > /home/pi/CubeSatSim/sim.cfg + echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl ${12} ${13} + echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl ${12} ${13} > /home/pi/CubeSatSim/sim.cfg echo ## echo "Rebooting CubeSatSim with new configuration file" ## echo @@ -1127,7 +1259,7 @@ elif [ "$1" = "-F" ]; then echo $8 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo "Enter tx frequency as 4XX.XXXX: " read tx @@ -1146,23 +1278,24 @@ elif [ "$1" = "-F" ]; then rx="$8" echo "Keeping value of" $rx fi -# else - - echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" + echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" - echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} - echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg -# fi - -# if [ "$norestart" = "1" ]; then -# echo + echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} ${12} ${13} + echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg + + echo + echo "Restarting CubeSatSim with new configuration file" + +# if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then + sudo systemctl restart transmit # else - echo - echo "Restarting CubeSatSim with new configuration file" -## echo -# reboot=1 -## sudo reboot now +# echo +# echo "temporarily disabling gpsd and rebooting to program FM module" +# echo "this will take about 40 seconds" +# sudo systemctl stop gpsd.socket sudo systemctl restart transmit +# sleep 10 +# reboot=1 # fi elif [ "$1" = "-o" ]; then @@ -1173,7 +1306,7 @@ elif [ "$1" = "-o" ]; then if [ "$1" == "n" ]; then - transmit_command_beacon + transmit_command "o" else echo @@ -1212,6 +1345,7 @@ elif [ "$1" = "-o" ]; then # restart=1 fi fi + sleep 3 fi elif [ "$1" = "-H" ]; then @@ -1233,7 +1367,7 @@ elif [ "$1" = "-H" ]; then echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo "Do you want Balloon mode ON (y/n) " read hab @@ -1250,8 +1384,8 @@ elif [ "$1" = "-H" ]; then # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" # echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} - echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} ${12} ${13} + echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg echo ## echo "Rebooting CubeSatSim with new configuration file" ## echo @@ -1277,59 +1411,111 @@ 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 + if [ "$1" == "n" ]; then + +<<<<<<< HEAD if [ "$1" = "p" ] || [ "$1" = "P" ] ; then reboot=1 else +======= + transmit_command "e" + + else + + echo "changing CubeSatSim to Repeater mode" + sudo echo "e" > /home/pi/CubeSatSim/.mode +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 restart=1 fi elif [ "$1" = "-n" ]; then - echo "changing CubeSatSim to Transmit Commands mode" +# 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 Command and Control mode OFF" - echo "Switching to BPSK mode" - sudo echo "b" > /home/pi/CubeSatSim/.mode - reboot=1 + 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 + elif [ "$new" = "f" ] || [ "$new" = "b" ] || [ "$new" = "e" ] || [ "$new" = "j" ] ; then + echo "Switching to mode "$new + sudo echo $new > /home/pi/CubeSatSim/.mode + restart=1 + else + echo "Switching to BPSK mode" + sudo echo "b" > /home/pi/CubeSatSim/.mode + reboot=1 + fi + sudo systemctl restart command else - echo "Turning Transmit Command and Control mode ON" + 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 " MHz" + echo + + check_restart sudo echo "n" > /home/pi/CubeSatSim/.mode - restart=1 + sudo systemctl stop command 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/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "TX Frequency is: " + echo -n ${7} + echo " MHz" echo value=`cat /home/pi/CubeSatSim/.mode` 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 sudo systemctl stop transmit - # 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 + sudo systemctl stop command - sim="y" + MODE="0" - while [ "$sim" = "y" ] + while [ "$MODE" != "x" ]; do - echo "Enter the mode number to change: 1=APRS, 2=FSK, 3=BPSK, 4=SSTV, 5=CW" + 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 +<<<<<<< HEAD case $MODE in @@ -1371,17 +1557,23 @@ elif [ "$1" = "-A" ]; then # sudo touch /home/pi/CubeSatSim/ready # sleep 5 # sudo touch /home/pi/CubeSatSim/ready +======= + + if [ "$MODE" != "x" ]; then + transmit_command $MODE + fi +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 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 - 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 @@ -1412,7 +1604,7 @@ elif [ "$1" = "-g" ]; then if [ "$rset" = "y" ] || [ "$rset" = "yes" ] ; then - echo "Resetting" + echo "Resetting and shutting down." echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0" > /home/pi/CubeSatSim/sim.cfg @@ -1422,11 +1614,13 @@ elif [ "$1" = "-g" ]; then sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1 - touch /home/pi/CubeSatSim/command_control_direwolf + sudo touch /home/pi/CubeSatSim/command_control_direwolf sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 - sudo echo "0" > /home/pi/CubeSatSim/command_count.txt + sudo echo "0" > /home/pi/CubeSatSim/command_count.txt + + sudo rm /home/pi/CubeSatSim/failure_mode.txt > /dev/null 2>&1 sudo systemctl stop cubesatsim sudo systemctl stop transmit @@ -1436,13 +1630,356 @@ elif [ "$1" = "-g" ]; then sudo journalctl --rotate sudo journalctl --vacuum-time=1s + + rm -rf ~/.config/chromium/Singleton* + + cat /dev/null > ~/.bash_history && history -c + + sudo shutdown now - reboot=1 +# reboot=1 else echo "Not resetting" fi +elif [ "$1" = "-j" ]; then + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" == "n" ]; then + + transmit_command "j" + + else + + echo "changing CubeSatSim to FUNcube mode" + sudo echo "j" > /home/pi/CubeSatSim/.mode + restart=1 + fi + +elif [ "$1" = "-M" ]; then + + if [ $fail ]; then + MODE=$fail + else + + FILE=/home/pi/CubeSatSim/failure_mode.txt + if [ -f "$FILE" ]; then + if [[ $(grep "\-1" $FILE) ]]; then + echo "Currently, no simulated failure (0)" + else + fail=$(<$FILE) + echo -n "Currently, simulated " + case $fail in + + 1) + echo "+Y Solar Panel Unplugged (1)" + ;; + 2) + echo "+X Solar Panel Failure (2)" + ;; + 3) + echo "-X Solar Panel Degredation (3)" + ;; + 4) + echo "-Y Solar Panel Short Circuit (4)" + ;; + 5) + echo "Failed I2C Bus 1 (5)" + ;; + 6) + echo "Failed I2C Bus 3 (6)" + ;; + 7) + echo "Failed Camera (7)" + ;; + 8) + echo "Failed Payload (8)" + ;; + 9) + echo "Failed BME Sensor (9)" + ;; + "10") + echo "Failed MPU Sensor (10)" + ;; + "11") + echo "Failed FM Audio (11)" + ;; + *) + echo "Unknown Failure" + ;; + esac + fi + else + echo "Currently, no simulated failure" + fi + + echo + echo "Set simulated failure mode (or Return to turn OFF)" + echo + + echo " 0 No Failure (turn OFF)" + echo " 1 +Y Solar Panel Unplugged" + echo " 2 +X Solar Panel Failure" + echo " 3 -X Solar Panel Degredation" + echo " 4 -Y Solar Panel Short Circuit" + echo " 5 Failed I2C Bus 1" + echo " 6 Failed I2C Bus 3" + echo " 7 Failed Camera" + echo " 8 Failed Payload" + echo " 9 Failed BME Sensor" + echo "10 Failed MPU Sensor" + echo "11 Failed FM Audio" + echo + + echo "Enter the failure number to set: 0 - 11" + read MODE + echo + fi + + if [ "$MODE" = "0" ]; then + echo "Setting No Simulated Failure" + MODE=-1 +# elif [ "$MODE" = "12" ]; then + +# if [ "$norestart" = "1" ]; then +# echo +# else +# reboot=1 +# fi + + else + case $MODE in + 1) + echo "+Y Solar Panel Unplugged" + ;; + 2) + echo "Setting Simulated +X Solar Panel Failure" + ;; + 3) + echo "Setting Simulated -X Solar Panel Degredation" + ;; + 4) + echo "Setting Simulated -Y Solar Panel Short Circuit" + ;; + 5) + echo "Setting Simulated Failed I2C Bus 1" + ;; + 6) + echo "Setting Simulated Failed I2C Bus 3" + ;; + 7) + echo "Setting Simulated Failed Camera" + ;; + 8) + echo "Setting Simulated Failed Payload" + ;; + 9) + echo "Setting Simulated Failed BME Sensor" + ;; + "10") + echo "Setting Simulated Failed MPU Sensor" + ;; + "11") + echo "Setting Failed FM Audio" + ;; + *) + echo "Setting No Simulated Failure" + MODE=-1 + ;; + esac + fi + +# echo $MODE + echo + sudo rm /home/pi/CubeSatSim/failure_mode.txt + echo $MODE > /home/pi/CubeSatSim/failure_mode.txt + + echo "Changing simulated failure mode to $MODE" | wall + +elif [ "$1" = "-N" ]; then + + FILE=/home/pi/CubeSatSim/failure_mode.txt + if [ -f "$FILE" ]; then + if [[ $(grep "\-1" $FILE) ]]; then + echo "No simulated failure" + fail=0 + else + echo "Simulated failure mode" + fail=$(<$FILE) + echo $fail + fi + else + echo "No simulated failure" + fail=0 + fi + + if [ $fail == 0 ]; then + echo "Changing to next mode" + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" = "a" ]; then + echo "Current mode is APRS" + echo "Next mode is FSK" + /home/pi/CubeSatSim/config -f + elif [ "$1" = "m" ]; then + echo "Current mode is CW" + echo "Next mode is FunCube" + /home/pi/CubeSatSim/config -j + elif [ "$1" = "f" ]; then + echo "Current mode is FSK" + echo "Next mode is BPSK" + /home/pi/CubeSatSim/config -b + elif [ "$1" = "b" ]; then + echo "Current mode is BPSK" + echo "Next mode is SSTV" + /home/pi/CubeSatSim/config -s + elif [ "$1" = "s" ]; then + echo "Current mode is SSTV" + echo "Next mode is CW" + /home/pi/CubeSatSim/config -m + elif [ "$1" = "e" ]; then + echo "Current mode is Repeater" + echo "Next mode is APRS" + /home/pi/CubeSatSim/config -a + elif [ "$1" = "j" ]; then + echo "Current mode is FUNcube" + echo "Next mode is Repeater" + /home/pi/CubeSatSim/config -e + else + echo "Unknown mode" + fi + else + echo "Changing to next simulated failure mode" + fail=$((fail + 1)) +# if [ $fail == 12 ]; then + if [ "$fail" -gt "11" ]; then + fail=1 + fi + echo $fail + /home/pi/CubeSatSim/config -M $fail + + fi + +elif [ "$1" = "-U" ]; then + + echo + echo "Changing the Random Simulated Failure setting in" + echo "the configuration file for CubeSatSim" + echo + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + if [ "${12}" = "yes" ] || [ "${12}" = "y" ]; then + echo "Random Simulated Failure is ON" + else + echo "Random Simulated Failure is OFF" + fi + + echo + +# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} + + echo "Do you want Random Simulated Failure ON (y/n) " + read sim + echo + + if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then + sim="yes" + echo "Random Simulated Failure is ON" + echo + echo "A new random failure is selected every" + echo ${13} "seconds." + echo + echo "Enter a new value or Return keeps current value." + + echo "Enter time in seconds (integer): " + + read time + + if [ -z $time ] ; then + time="${13}" + echo "Keeping value of " $time " seconds" + fi + + if ! [[ $time =~ ^[0-9]+$ ]] ; then + echo "Error: not an integer!" + time="${13}" + echo "Keeping value of" $time + fi + + else + sim="no" + echo "Random Simulated Failure is OFF" + time="${13}" +# echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures + fi + +# echo + echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" +# echo + echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim $time + echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim $time > /home/pi/CubeSatSim/sim.cfg + echo + + if [ "${12}" != "$sim" ] || [ "${13}" != "$time" ] ; then + reboot=1 + fi + +elif [ "$1" = "-u" ]; then + + echo + echo "Change gpsd state" + echo + + if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then + echo "gpsd is inactive" + echo + echo "Do you want to turn gpsd to ON (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to ON" + sudo systemctl enable gpsd + sudo systemctl enable gpsd.socket + echo + echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" + echo + + cat /etc/default/gpsd + + echo + echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + echo + echo "To monitor your gps device, use the gpsmon command." + echo + reboot=1 + fi + + else + echo "gpsd is active" + echo + echo "Do you want to turn gpsd to OFF (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to OFF" + sudo systemctl disable gpsd + sudo systemctl disable gpsd.socket +reboot=1 + fi + + fi elif [ "$1" = "-G" ]; then @@ -1511,7 +2048,8 @@ elif [ "$1" = "-h" ]; then echo " -f Change to FSK/DUV mode" echo " -b Change to BPSK mode" echo " -s Change to SSTV mode" - echo " -n Change to Transmit Commands mode" + echo " -j Change to FUNcube mode" + echo " -n Change to Transmit Commands mode" echo " -e Change to Repeater mode" echo " -j Change to FUNcube mode" echo " -G Change to PacSatSim mode" @@ -1528,18 +2066,27 @@ elif [ "$1" = "-h" ]; then echo " -R Change the Commands Count in the file command_count.txt" echo " -B Change Safe Mode (battery saver mode) manually" echo " -q Change the Squelch setting for command receiver" + echo " -Q Read the current Squelch for 10 seconds" echo " -F Change the RX and TX frequency" echo " -H Change the Balloon (HAB) mode" - echo " -p Display payload sensor data" + echo " -p Display payload sensor data for 3 seconds" echo " -v Display voltage and current data" echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for FM RX and TX" echo " -A Transmit APRS control packets to control another CubeSatSim" echo " -D Change Transmit Commands state APRS or DTMF" echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" +<<<<<<< HEAD echo " -g Reset configuration back to default settings and shutdown" echo " -k Reset the PacSatSim Configuration" +======= + echo " -g Reset configuration back to default settings" + echo " -M Set simulated failure mode" + echo " -U Change the random failure mode setting" + echo " -N Set next mode or failure" + echo " -u Change gpsd state" +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo exit From 7b0544ba23f21a0f75ca6dd53256738167cc08aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 09:42:46 -0500 Subject: [PATCH 539/774] Update config resolve merge conflicts --- config | 248 +++++---------------------------------------------------- 1 file changed, 18 insertions(+), 230 deletions(-) diff --git a/config b/config index 75cca3c1..22fb272d 100755 --- a/config +++ b/config @@ -2,114 +2,9 @@ function transmit_command { -<<<<<<< HEAD - 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 -} -======= MODE=$1 echo "CubeSatSim is in Transmit Commands mode" echo ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null @@ -148,6 +43,9 @@ function transmit_command_bpsk { j) number=7 ;; + p) + number=8 + ;; o) number=10 ;; @@ -197,7 +95,9 @@ function check_restart { echo "$value" > /dev/null set -- $value - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + elif [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 @@ -212,12 +112,8 @@ function check_restart { fi } -<<<<<<< HEAD -echo "CubeSatSim v2.1 configuration tool" -======= echo echo "CubeSatSim v2.2 configuration tool" ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo # echo $1 # echo $2 @@ -459,25 +355,9 @@ elif [ "$1" = "-a" ]; then else echo "changing CubeSatSim to AFSK mode" -<<<<<<< HEAD - sudo echo "a" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else - restart=1 - fi -======= check_restart sudo echo "a" > /home/pi/CubeSatSim/.mode ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-m" ]; then @@ -495,22 +375,7 @@ elif [ "$1" = "-m" ]; then echo "changing CubeSatSim to CW mode" check_restart sudo echo "m" > /home/pi/CubeSatSim/.mode -<<<<<<< HEAD - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else - restart=1 - fi -======= ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-f" ]; then @@ -571,22 +436,6 @@ elif [ "$1" = "-s" ]; then check_restart sudo echo "s" > /home/pi/CubeSatSim/.mode -<<<<<<< HEAD - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else - restart=1 - fi -======= ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 - fi - elif [ "$1" = "-t" ]; then echo @@ -668,23 +517,9 @@ elif [ "$1" = "-c" ]; then echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" -<<<<<<< HEAD - echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - -# sudo systemctl stop pacsatsim &>/dev/null -# sudo killall -9 java &>/dev/null - -# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config -# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config -# sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties -# sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties -# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties -# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties -======= echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} > /home/pi/CubeSatSim/sim.cfg ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 + fi if [ "$norestart" = "1" ]; then @@ -1417,19 +1252,16 @@ elif [ "$1" = "-e" ]; then if [ "$1" == "n" ]; then -<<<<<<< HEAD - if [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else -======= transmit_command "e" else echo "changing CubeSatSim to Repeater mode" sudo echo "e" > /home/pi/CubeSatSim/.mode ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 fi elif [ "$1" = "-n" ]; then @@ -1452,6 +1284,10 @@ elif [ "$1" = "-n" ]; then echo "Switching to mode "$new sudo echo $new > /home/pi/CubeSatSim/.mode restart=1 + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + echo "Switching to PacSat mode" + sudo echo $new > /home/pi/CubeSatSim/.mode + reboot=1 else echo "Switching to BPSK mode" sudo echo "b" > /home/pi/CubeSatSim/.mode @@ -1513,56 +1349,12 @@ elif [ "$1" = "-A" ]; then 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" + echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, p=PacSat, o=Beacon on/off x=Exit this mode" read MODE -<<<<<<< HEAD - - case $MODE in - - 1) - echo "Mode 1 is APRS" - transmit_command_aprs -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" - ;; - 2) - echo "Mode 2 is FSK" - transmit_command_fsk -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f" - ;; - 3) - echo "Mode 3 is BPSK" - transmit_command_bpsk -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b" - ;; - 4) - echo "Mode 4 is SSTV" - transmit_command_sstv -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=s" - ;; - 5) - echo "Mode 5 is CW" - transmit_command_cw -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" - ;; - *) - 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 -# sudo touch /home/pi/CubeSatSim/ready -======= if [ "$MODE" != "x" ]; then transmit_command $MODE fi ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo @@ -2076,17 +1868,13 @@ elif [ "$1" = "-h" ]; then echo " -D Change Transmit Commands state APRS or DTMF" echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" -<<<<<<< HEAD - echo " -g Reset configuration back to default settings and shutdown" - echo " -k Reset the PacSatSim Configuration" - -======= echo " -g Reset configuration back to default settings" echo " -M Set simulated failure mode" echo " -U Change the random failure mode setting" echo " -N Set next mode or failure" echo " -u Change gpsd state" ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 + echo " -k Reset the PacSatSim Configuration" + echo exit From c6bda6325e5bc0e8ec2fde37c1d8d74a353fead2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 10:10:31 -0500 Subject: [PATCH 540/774] Update direwolf-cc.conf resolve merge conflict --- direwolf-cc.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index 2a3b5ef9..af71089d 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -1,4 +1,3 @@ -#ADEVICE hw:CARD=Device,DEV=0 default ADEVICE shared_mic hw:CARD=Loopback,DEV=1 DTMF MYCALL AMSAT From 13fe23c425b22c0ff3786b19ef73a4f00cfa7145 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 10:18:32 -0500 Subject: [PATCH 541/774] Update dtmf_aprs_cc.py needs merge conflict done --- dtmf_aprs_cc.py | 157 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 153 insertions(+), 4 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index d9eba04a..68ae8954 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,15 +1,24 @@ import sys from os import system -import RPi.GPIO as GPIO -from RPi.GPIO import output +# import RPi.GPIO as GPIO +# from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') +def blink(times): + for i in range(times): + system("gpio write 27 0") +# GPIO.output(27, 0) + sleep(0.1) + system("gpio write 27 1") +# GPIO.output(27, 1) + sleep(0.1) + if __name__ == "__main__": powerPin = 16 - txLed = 27 + txLed = 17 change_mode = False debug_mode = False counter = 1 @@ -18,6 +27,7 @@ if __name__ == "__main__": if ('d' == sys.argv[1]): debug_mode = True +<<<<<<< HEAD while True: try: for line in sys.stdin: @@ -206,7 +216,146 @@ if __name__ == "__main__": change_mode = False except: print("Error reading line (probably due to UTF-8 issue)") +======= + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + 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 + if ((line.find("DTMF>APDW15:t6#")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + if ((line.find("MODE=j")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("DTMF>APDW15:t7#")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("MODE=o")) > 0): + counter = (counter + 1) % 2 # Direwolf prints it twice, only do once + if (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 (mode == 'f'): + blink(2) + sleep(1) + + elif (mode == 'b'): + blink(3) + sleep(1) + + elif (mode == 's'): + blink(4) + sleep(1) + + elif (mode == 'm'): + blink(5) + sleep(1) + + elif (mode == 'e'): + blink(6) + sleep(1) + + elif (mode == 'j'): + blink(7) + sleep(1) + + elif (mode == 'a'): + mode = 'a' + blink(1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + +# GPIO.output(txLed, 0) +# GPIO.output(powerPin, 0) + system("gpio write 27 1") + system("gpio write 0 0") + system("gpio write 2 0") + + system("sudo systemctl stop transmit") +# system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + + change_mode = False + +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") - From e24cdc072448caf34debc3d1057d85351ae73d06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 12:23:59 -0500 Subject: [PATCH 542/774] add try around read for UTF-8 issue --- dtmf_aprs_cc.py | 280 ++++++++++++++++++++++++------------------------ 1 file changed, 141 insertions(+), 139 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 18ed491f..cd883f5a 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -26,153 +26,155 @@ if __name__ == "__main__": # print("There are arguments!") if ('d' == sys.argv[1]): debug_mode = True - - for line in sys.stdin: -# if (debug_mode): - print(line, end =" ") - logging.warning(line) - -# if '^c' == line.rstrip(): -# break - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - 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 - if ((line.find("DTMF>APDW15:t6#")) > 0): - system("echo '\nRepeater Mode!!\n'") - mode = 'e' - change_mode = True - if ((line.find("MODE=j")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("DTMF>APDW15:t7#")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("MODE=o")) > 0): - counter = (counter + 1) % 2 # Direwolf prints it twice, only do once - if (counter == 1): + try: + for line in sys.stdin: + # if (debug_mode): + print(line, end =" ") + logging.warning(line) + + # if '^c' == line.rstrip(): + # break + + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + 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 + if ((line.find("DTMF>APDW15:t6#")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + if ((line.find("MODE=j")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("DTMF>APDW15:t7#")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("MODE=o")) > 0): + counter = (counter + 1) % 2 # Direwolf prints it twice, only do once + if (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 - 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 (mode == 'f'): - blink(2) - sleep(1) - - elif (mode == 'b'): - blink(3) - sleep(1) - - elif (mode == 's'): - blink(4) - sleep(1) - - elif (mode == 'm'): - blink(5) - sleep(1) - - elif (mode == 'e'): - blink(6) - sleep(1) - - elif (mode == 'j'): - blink(7) - sleep(1) - - elif (mode == 'a'): - mode = 'a' - blink(1) - sleep(1) + + # 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 (mode == 'f'): + blink(2) + sleep(1) - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) + elif (mode == 'b'): + blink(3) + sleep(1) + + elif (mode == 's'): + blink(4) + sleep(1) -# GPIO.output(txLed, 0) -# GPIO.output(powerPin, 0) - system("gpio write 27 1") - system("gpio write 0 0") - system("gpio write 2 0") - - system("sudo systemctl stop transmit") -# system("sudo systemctl stop cubesatsim") + elif (mode == 'm'): + blink(5) + sleep(1) + + elif (mode == 'e'): + blink(6) + sleep(1) + + elif (mode == 'j'): + blink(7) + sleep(1) + + elif (mode == 'a'): + mode = 'a' + blink(1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + + # GPIO.output(txLed, 0) + # GPIO.output(powerPin, 0) + system("gpio write 27 1") + system("gpio write 0 0") + system("gpio write 2 0") - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - + system("sudo systemctl stop transmit") + # system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + change_mode = False + except: + print("Error reading line (probably due to UTF-8 issue)") - change_mode = False - print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") From e4d08dc1f01dcdcabc3bd812023281890b988c82 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 12:40:51 -0500 Subject: [PATCH 543/774] Update dtmf_aprs_cc.py making changes to merge --- dtmf_aprs_cc.py | 173 ++++-------------------------------------------- 1 file changed, 12 insertions(+), 161 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 68ae8954..7eec1ed2 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,24 +1,15 @@ import sys from os import system -# import RPi.GPIO as GPIO -# from RPi.GPIO import output +import RPi.GPIO as GPIO +from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') -def blink(times): - for i in range(times): - system("gpio write 27 0") -# GPIO.output(27, 0) - sleep(0.1) - system("gpio write 27 1") -# GPIO.output(27, 1) - sleep(0.1) - if __name__ == "__main__": powerPin = 16 - txLed = 17 + txLed = 27 change_mode = False debug_mode = False counter = 1 @@ -27,7 +18,6 @@ if __name__ == "__main__": if ('d' == sys.argv[1]): debug_mode = True -<<<<<<< HEAD while True: try: for line in sys.stdin: @@ -42,7 +32,7 @@ if __name__ == "__main__": system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' @@ -51,7 +41,7 @@ if __name__ == "__main__": system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' @@ -60,7 +50,7 @@ if __name__ == "__main__": system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' @@ -69,7 +59,7 @@ if __name__ == "__main__": system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' @@ -78,7 +68,7 @@ if __name__ == "__main__": system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' @@ -87,7 +77,7 @@ if __name__ == "__main__": system("echo '\nPacSatSim Mode!!\n'") mode = 'G' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") mode = 'G' @@ -96,7 +86,7 @@ if __name__ == "__main__": system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' @@ -106,7 +96,7 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - counter = (counter + 1) % 2 + counter = (counter + 1) % 2 if ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' @@ -216,146 +206,7 @@ if __name__ == "__main__": change_mode = False except: print("Error reading line (probably due to UTF-8 issue)") -======= - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - 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 - if ((line.find("DTMF>APDW15:t6#")) > 0): - system("echo '\nRepeater Mode!!\n'") - mode = 'e' - change_mode = True - if ((line.find("MODE=j")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("DTMF>APDW15:t7#")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("MODE=o")) > 0): - counter = (counter + 1) % 2 # Direwolf prints it twice, only do once - if (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 (mode == 'f'): - blink(2) - sleep(1) - - elif (mode == 'b'): - blink(3) - sleep(1) - - elif (mode == 's'): - blink(4) - sleep(1) - - elif (mode == 'm'): - blink(5) - sleep(1) - - elif (mode == 'e'): - blink(6) - sleep(1) - - elif (mode == 'j'): - blink(7) - sleep(1) - - elif (mode == 'a'): - mode = 'a' - blink(1) - sleep(1) - - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) - -# GPIO.output(txLed, 0) -# GPIO.output(powerPin, 0) - system("gpio write 27 1") - system("gpio write 0 0") - system("gpio write 2 0") - - system("sudo systemctl stop transmit") -# system("sudo systemctl stop cubesatsim") - - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - - - change_mode = False - ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") + From 0e0a8e9927198f5d3be9c26df77b104a600c5a4d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 12:50:54 -0500 Subject: [PATCH 544/774] Update dtmf_aprs_cc.py finish merge conflict changes --- dtmf_aprs_cc.py | 115 ++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 67 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 7eec1ed2..67b82ec8 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,12 +1,21 @@ import sys from os import system -import RPi.GPIO as GPIO -from RPi.GPIO import output +#import RPi.GPIO as GPIO +#from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') +def blink(times): + for i in range(times): + system("gpio write 27 0") +# GPIO.output(27, 0) + sleep(0.1) + system("gpio write 27 1") +# GPIO.output(27, 1) + sleep(0.1) + if __name__ == "__main__": powerPin = 16 txLed = 27 @@ -64,6 +73,7 @@ if __name__ == "__main__": system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True + if ((line.find("MODE=m")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' @@ -73,15 +83,27 @@ if __name__ == "__main__": 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 + + if ((line.find(":t6#")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' + mode = 'p' change_mode = True if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' - change_mode = True + mode = 'p' + change_mode = True + if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' @@ -91,91 +113,50 @@ if __name__ == "__main__": system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - # Currently, C2C does not support Repeater mode e + if ((line.find("MODE=o")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True counter = (counter + 1) % 2 + if ((line.find(":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 - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(txLed, GPIO.OUT) if (mode == 'f'): - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(2) sleep(1) elif (mode == 'b'): - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(3) sleep(1) elif (mode == 's'): - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(4) sleep(1) elif (mode == 'm'): - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(5) + sleep(1) + + elif (mode == 'e'): + blink(6) + sleep(1) + + elif (mode == 'j'): + blink(7) + sleep(1) + + elif (mode == 'p'): + blink(8) sleep(1) + elif (mode == 'a'): - mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) + blink(1) sleep(1) try: @@ -196,7 +177,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 42aa30f83d7a4363749fd0e5fa1721a3644d2b9e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:49:54 -0500 Subject: [PATCH 545/774] Update cubicsdr.sh resolve merge conflict --- groundstation/cubicsdr.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/groundstation/cubicsdr.sh b/groundstation/cubicsdr.sh index 2bfb65dc..3b125dc6 100755 --- a/groundstation/cubicsdr.sh +++ b/groundstation/cubicsdr.sh @@ -31,6 +31,8 @@ sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + #sudo kill `ps -aux | grep cubicsdr-packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null #sudo kill `ps -aux | grep packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null @@ -42,6 +44,24 @@ sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start +sudo killall -9 rtl_fm &>/dev/null + +zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & + +sleep 5 + +setsid CubicSDR + +sleep 10 + +#$SHELL +#sudo kill `ps -aux | grep sstv_decode_prompt| grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +sudo killall -9 zenity &>/dev/null + +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & sleep 5 From 47705af70746c7c05fb4a5ca81a03ba30cdc7692 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:51:43 -0500 Subject: [PATCH 546/774] Update direwolf.conf resolve merge conflict --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index 3b372144..7bf93998 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Loopback,DEV=1 From 11bd5a7d1ec49a3c28e2494c627248bb2e4effe4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:53:45 -0500 Subject: [PATCH 547/774] Update fox.sh resolve merge conflict --- groundstation/fox.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/groundstation/fox.sh b/groundstation/fox.sh index 36e241e0..27050f9a 100755 --- a/groundstation/fox.sh +++ b/groundstation/fox.sh @@ -21,6 +21,8 @@ sudo killall -9 java &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 direwolf &>/dev/null #sudo killall -9 aplay &>/dev/null @@ -32,6 +34,8 @@ sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start +sudo killall -9 rtl_fm &>/dev/null + sleep 5 #/home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData-CubeSatSim From 55e717332f98e25713fa926e46f6cde648f9391a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:54:58 -0500 Subject: [PATCH 548/774] Update loc.sh resolve merge conflict --- groundstation/loc.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/groundstation/loc.sh b/groundstation/loc.sh index 8aa8cd9f..94558962 100755 --- a/groundstation/loc.sh +++ b/groundstation/loc.sh @@ -7,10 +7,8 @@ sudo killall -9 gpredict &>/dev/null source /home/pi/venv/bin/activate - python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py #/usr/bin/gpredict nohup /usr/bin/gpredict /dev/null 2>&1 & - From 987cabaf327c7bab62bdaca48d2d1aee3cbed767 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:58:20 -0500 Subject: [PATCH 549/774] Update packet.sh resolve merge conflicts --- groundstation/packet.sh | 63 ++++++++++++----------------------------- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 24c04f0b..2b47089f 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -4,6 +4,8 @@ sudo modprobe snd-aloop +sudo killall -9 CubicSDR &>/dev/null + sudo systemctl stop openwebrx sudo systemctl stop rtl_tcp @@ -24,26 +26,28 @@ sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 java &>/dev/null -sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null sudo killall -9 zenity &>/dev/null +sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 fctelem &>/dev/null + sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start echo -frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") +frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" APRS "Test APRS decoding with CubeSatSim WAV file") #echo $frequency if [ -z "$frequency" ]; then -echo "No choice made. Exiting." +echo "No choice made." -sleep 3 - -exit +frequency=434900 #echo "Choose the number for the packet decoding option:" #echo @@ -102,38 +106,6 @@ elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." echo -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." @@ -170,19 +142,19 @@ echo "Note that the 'Tuned to' frequency will be different from the chosen frequ echo -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then +#if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" +# echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & +# direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & -else +#else echo -e "Auto decoding APRS packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf & # -t 0 & + setsid direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf & -fi +#fi sleep 5 @@ -191,7 +163,8 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 + rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 91a6c2d9025334f11c895e1d59d23e08c7f9d578 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:06:32 -0500 Subject: [PATCH 550/774] Update rtl-tcp.sh resolve merge conflicts --- groundstation/rtl-tcp.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index d5d541b1..3d49d11d 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -39,6 +39,8 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -52,15 +54,9 @@ sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start -#sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' -sudo systemctl start rtl_tcp &>/dev/null - -sudo journalctl -af -u rtl_tcp & +sudo killall -9 rtl_fm &>/dev/null -while [[ $(sudo systemctl status rtl_tcp | grep "Active: active (running)") ]] -do - sleep 5 -done +sudo /bin/sh -c 'rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sleep 5 From 0f55b6019254a977967909bc112abcda726f6840 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:08:05 -0500 Subject: [PATCH 551/774] Update sdr.sh resolve merge conflicts --- groundstation/sdr.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 66983556..2821d7c0 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -36,6 +36,8 @@ sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 qsstv &>/dev/null #sudo killall -9 aplay &>/dev/null @@ -49,7 +51,9 @@ sudo systemctl stop rtl_tcp &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start -sudo systemctl restart openwebrx &>/dev/null +sudo killall -9 rtl_fm &>/dev/null + +sudo systemctl restart openwebrx sleep 10 From 891a60befab640e0586f05127e3dfd8c6c4b541b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:11:05 -0500 Subject: [PATCH 552/774] Update sstv_decode_prompt.sh resolve merge conflicts --- groundstation/sstv_decode_prompt.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index fbc55895..ae49a758 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -28,24 +28,26 @@ sudo killall -9 java &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start +sudo killall -9 rtl_fm &>/dev/null + #echo "s" >> .mode -frequency=$(zenity --list 2>/dev/null --width=410 --height=220 --title="SSTV Decoding using QSSTV" --text="Choose the frequency for SSTV decoding:" --column="kHz" --column="Use" 145800 "ISS" 434900 "CubeSatSim" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file") +frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=220 --title="SSTV Decoding using QSSTV" --text="Choose the frequency for SSTV decoding:" --column="kHz" --column="Use" 145800 "ISS" 434900 "CubeSatSim" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file") echo $frequency if [ -z "$frequency" ]; then -echo "No choice made. Exiting." - -sleep 3 +echo "No choice made." -exit +frequency=434900 #echo "Choose the number for the frequency for SSTV decoding:" #echo "1. ISS (145800Hz)" @@ -120,7 +122,7 @@ echo -e "Auto decoding SSTV on $frequency Hz" sleep 2 -qsstv & +setsid qsstv & sleep 5 @@ -133,10 +135,9 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 332a2fd21614ff6a685f3558970af09c8e8274f1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:39:57 -0500 Subject: [PATCH 553/774] Update install resolve merge conflicts --- install | 765 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 599 insertions(+), 166 deletions(-) diff --git a/install b/install index 4096ca2d..b1981204 100755 --- a/install +++ b/install @@ -1,13 +1,313 @@ #!/bin/bash -echo -e "\ninstallation script for CubeSatSim v2.1\n" +FLAG=0 +checkout=0 +BULLSEYE=0 +UPDATE=0 + +FILE=/home/pi/CubeSatSim/cubesatsim # code has already been compiled +if [ -f "$FILE" ]; then + + UPDATE=1 + + echo -e "\nUpdate script for CubeSatSim v2.2\n" + + if [ -z "$1" ] ; then + checkout=0 + else + checkout=1 + branch="$1" + echo -n "changing to branch " + echo $branch + FLAG=1 + fi + + if [ "$2" = "n" ] ; then + noreboot=1 + else + noreboot=0 + fi + +else + + echo -e "\nInstallation script for CubeSatSim v2.2\n" + + touch /home/pi/CubeSatSim/command_control_direwolf + + echo "creating $FILE" + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg + + /home/pi/CubeSatSim/config -c -n + + /home/pi/CubeSatSim/config -l -n + +fi + +if [[ $(grep '11.' /etc/debian_version) ]]; then + + BULLSEYE=1 + + echo "Debian 11 (Bullseye) detected" + + sudo cp /boot/config.txt /boot/config.txt.0 + + sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 + + sudo raspi-config nonint do_i2c 0 + + sudo raspi-config nonint do_camera 0 + + sudo raspi-config nonint do_legacy 0 + + sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt + + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt + + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then + echo "dtoverlay=i2c-gpio already in /boot/config.txt" + else + echo "adding dtoverlay=i2c-gpio to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt' + fi + + if [[ $(grep 'enable_uart=1' /boot/config.txt) ]]; then + echo "enable_uart=1 already in /boot/config.txt" + else + echo "adding enable_uart=1 to /boot/config.txt" + sudo sh -c 'echo "\nenable_uart=1" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=disable-bt' /boot/config.txt) ]]; then + echo "dtoverlay=disable-bt already in /boot/config.txt" + else + echo "adding dtoverlay=disable-bt to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then + echo "dtoverlay=dwc2 aalready in /boot/config.txt" + else + echo "adding dtoverlay=dwc2 to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + fi + + if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then + echo "modules-load=dwc2,g_ether already in /boot/cmdline.txt" + else + echo "adding modules-load=dwc2,g_ether to /boot/cmdline.txt" + sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt + fi + + if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then + echo "dtparam=audio=on already in /boot/config.txt" + else + echo "adding dtparam=audio=on to /boot/config.txt" + sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then + echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" + else + echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then + echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" + else + echo "adding overlay=pwm,pin=18,func=2 to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' + fi + + if [[ $(grep 'disable_splash=1' /boot/config.txt) ]]; then + echo "disable_splash=1 already in /boot/config.txt" + else + echo "adding disable_splash=1 to /boot/config.txt" + sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' + fi + + if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then + echo "boot_delay=0 already in /boot/config.txt" + else + echo "adding boot_delay=0 to /boot/config.txt" + sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' + fi + + if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi + + sudo sh -c 'echo "\n" >> /boot/config.txt' + fi + +if [[ $(grep 'bookworm' /etc/os-release) ]]; then + + echo "Debian 12 (Bookworm) detected" + + sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 + + sudo cp /boot/firmware/cmdline.txt /boot/firmware/cmdline.txt.0 + + sudo raspi-config nonint do_i2c 0 + + sudo raspi-config nonint do_camera 0 + + sudo raspi-config nonint do_legacy 0 + + sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt + + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt + + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=i2c-gpio to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'enable_uart=1' /boot/firmware/config.txt) ]]; then + echo "enable_uart=1 already in /boot/firmware/config.txt" + else + echo "adding enable_uart=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\nenable_uart=1" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=disable-bt' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=disable-bt already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=disable-bt to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=dwc2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=dwc2 aalready in /boot/firmware/config.txt" + else + echo "adding dtoverlay=dwc2 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'modules-load=dwc2,g_ether' /boot/firmware/cmdline.txt) ]]; then + echo "modules-load=dwc2,g_ether already in /boot/firmware/cmdline.txt" + else + echo "adding modules-load=dwc2,g_ether to /boot/firmware/cmdline.txt" + sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/firmware/cmdline.txt + fi + + if [[ $(grep 'dtparam=audio=on' /boot/firmware/config.txt) ]]; then + echo "dtparam=audio=on already in /boot/firmware/config.txt" + else + echo "adding dtparam=audio=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=audremap,enable_jack=on already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=audremap,enable_jack=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=pwm,pin=18,func=2 already in /boot/firmware/config.txt" + else + echo "adding to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'disable_splash=1' /boot/firmware/config.txt) ]]; then + echo "disable_splash=1 already in /boot/firmware/config.txt" + else + echo "adding disable_splash=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndisable_splash=1" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'boot_delay=0' /boot/firmware/config.txt) ]]; then + echo "boot_delay=0 already in /boot/firmware/config.txt" + else + echo "adding boot_delay=0 to /boot/firmware/config.txt" + sudo sh -c 'echo "\nboot_delay=0" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'camera_auto_detect=1' /boot/firmware/config.txt) ]]; then + echo "camera_auto_detect=1 already in /boot/firmware/config.txt" + else + echo "adding camera_auto_detect=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ncamera_auto_detect=1" >> /boot/firmware/config.txt' + fi + + if ! grep -q force_turbo=1 /boot/firmware/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/firmware/config.txt'; fi + + sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' + +elif [[ $(grep 'trixie' /etc/os-release) ]]; then + + echo "Trixie detected, installation continuing." + echo "Your Pi OS version is not Bookworm or Bullseye." + echo "The software installation will likely not work." + echo "See the README.md for how to install using Bookworm." + echo + + echo "Are you sure you want to continue the installation (y/n)?" + + read -r ANS + + if [ "$ANS" = "n" ]; then + exit 1 + fi +fi +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." + + changed=0 + value=`cat /home/pi/CubeSatSim/sim.cfg` + # echo "$value" + echo "$value" > /dev/null + set -- $value + + if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign + if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count + if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat + if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon + if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode + if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch + if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency + if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency + if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode + if [ -z "${10}" ] ; then m1="0" ; changed=1 ; else m1=${10} ; fi # rx pl code + if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code + if [ -z "${12}" ] ; then m3="no" ; changed=1 ; else m3=${12} ; fi # random fail + if [ -z "${13}" ] ; then m4="60" ; changed=1 ; else m4=${13} ; fi # random fail period + + 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} ${12} ${13} + echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" + echo + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4 + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4> /home/pi/CubeSatSim/sim.cfg + echo + fi + else echo "creating $FILE" - echo "AMSAT 1 0.0 0.0" > /home/pi/CubeSatSim/sim.cfg + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg +fi + +if [[ $(grep 'cubesatsim' /etc/motd) ]]; then + echo "motd already updated" +else + echo "updating motd" + sudo sh -c 'cat /home/pi/CubeSatSim/motd.txt >> /etc/motd' fi FILE=/home/pi/CubeSatSim/command_tx @@ -25,48 +325,87 @@ else echo "creating $FILE" echo "0\n" > /home/pi/CubeSatSim/command_count.txt fi + +sudo apt-get update && sudo apt-get dist-upgrade -y -cd +# if [ $BULLSEYE -eq 1 ]; then +# sudo apt purge -y python3-pip +# sudo apt install -y python3-pip +# fi -CubeSatSim/config -c -n +cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop -CubeSatSim/config -l -n +if [ ! -d "/home/pi/venv" ]; then -cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop - -sudo apt-get update && sudo apt-get dist-upgrade -y + cd + sudo apt install -y python3-venv + sudo python3 -m venv venv + source /home/pi/venv/bin/activate + + curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 + + sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus + sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 + +fi +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 sudo apt-get remove pulseaudio -y +sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev raspi-config + # removed wiringpi and python-picamera python3-picamera sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom -cd /tmp +if [ ! -d "/home/pi/direwolf" ]; then -# wget https://project-downloads.drogon.net/wiringpi-latest.deb + cd + git clone https://github.com/alanbjohnston/direwolf.git + cd direwolf + make -j + sudo make install + make install-rpi +fi -# sudo dpkg -i wiringpi-latest.deb + sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps + sudo systemctl disable gpsd + sudo systemctl disable gpsd.socket + +if [ ! -d "/home/pi/WiringPi" ]; then + cd + git clone https://github.com/alanbjohnston/WiringPi + cd WiringPi + ./build debian + sudo dpkg -i debian-template/wiringpi-2.61-1.deb +fi cd -git clone https://github.com/alanbjohnston/WiringPi -cd WiringPi -./build debian +if [ ! $BULLSEYE -eq 1 ]; then + sudo apt install -y libtiff6 +fi -sudo dpkg -i debian-template/wiringpi-2.61-1.deb +sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev -cd +if [ $BULLSEYE -eq 1 ] || [ $UPDATE -eq 0 ] ; then -#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 + sudo pip3 install --upgrade setuptools + + sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 -sudo pip3 install --upgrade setuptools +fi -sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 +cd /home/pi/CubeSatSim -cd ~/CubeSatSim +git pull --no-rebase > .updated -git pull --no-rebase +if [ $checkout -eq 1 ]; then + git checkout $branch + git pull --no-rebase > .updated + FLAG=1 + echo "Running update script again" + /home/pi/CubeSatSim/install +fi make debug @@ -80,7 +419,6 @@ fi cd -sudo apt-get install -y cmake git clone https://github.com/wb2osz/direwolf.git cd direwolf mkdir build @@ -92,39 +430,30 @@ make install-conf cd -git clone https://github.com/alanbjohnston/pi-power-button.git - -cd pi-power-button - -git checkout master +if [ ! -d "/home/pi/pi-power-button" ]; then -./script/install - - -cd - -git clone https://github.com/alanbjohnston/PiSSTVpp.git - -cd PiSSTVpp + cd + git clone https://github.com/alanbjohnston/pi-power-button.git + cd pi-power-button + git checkout master + ./script/install + sudo apt-get install -y libraspberrypi-dev -make pisstvpp +fi -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 +cd /home/pi/pi-power-button -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 +git pull --no-rebase > .updated_p +git checkout master +grep 'changed' /home/pi/pi-power-button/.updated_p +if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then + echo "updating pi-power-button." + script/install + FLAG=1 +fi cd -git clone https://github.com/alanbjohnston/rpitx.git - -cd rpitx - -./install.sh - -sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf - FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ ! -f "$FILE" ]; then cd @@ -198,154 +527,258 @@ sudo apt-get install default-jdk -y cd -sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service - -sudo systemctl enable cubesatsim - -sudo cp ~/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - -# sudo systemctl enable transmit - -sudo cp ~/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - -sudo systemctl enable command +if [ ! -d "/home/pi/PiSSTVpp" ]; then -sudo cp ~/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo apt-get update -y + sudo apt-get install -y python-picamera python3-picamera build-essential libgd-dev libmagic-dev + cd + git clone https://github.com/alanbjohnston/PiSSTVpp.git + cd PiSSTVpp + make pisstvpp -sudo cp /boot/config.txt /boot/config.txt.0 - -sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 +fi +if [ ! -d "/home/pi/rpitx" ]; then -sudo raspi-config nonint do_i2c 0 + cd + git clone https://github.com/alanbjohnston/rpitx.git + cd rpitx + ./install.sh + cd +else -sudo raspi-config nonint do_camera 0 + if [[ $(grep 'SYNCWITHPWM' /home/pi/rpitx/src/librpitx/src/fskburst.h) ]]; then + echo "rpitx library already updated" + else + echo "updating rpitx" + cd /home/pi/rpitx + git pull + ./update.sh + cd + fi +fi -sudo raspi-config nonint do_legacy 0 +FILE=/etc/systemd/system/cubesatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then + echo "changed cubesatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + FLAG=1 + else + echo "no changes to cubesatsim.service." + fi +else + echo "creating cubesatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + sudo systemctl enable command -#if [ "$1" = "u" ]; then -#fi + FLAG=1 +fi -## sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - - sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt +FILE=/etc/systemd/system/rpitx.service +if [ -f "$FILE" ]; then + sudo systemctl disable rpitx + sudo rm /etc/systemd/system/rpitx.service +fi - #sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 - - sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt - - if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then - echo "dtoverlay=i2c-gpio already in /boot/config.txt" +FILE=/etc/systemd/system/transmit.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then + echo "changed transmit.service." + sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service + FLAG=1 else - echo "adding dtoverlay=i2c-gpio to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt' + echo "no change to transmit.service." fi +else + echo "creating transmit.service." + sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service + FLAG=1 +fi - if [[ $(grep 'enable_uart=1' /boot/config.txt) ]]; then - echo "enable_uart=1 already in /boot/config.txt" - else - echo "adding enable_uart=1 to /boot/config.txt" - sudo sh -c 'echo "\nenable_uart=1" >> /boot/config.txt' - fi - - if [[ $(grep 'dtoverlay=disable-bt' /boot/config.txt) ]]; then - echo "dtoverlay=disable-bt already in /boot/config.txt" - else - echo "adding dtoverlay=disable-bt to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/config.txt' - fi - - if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then - echo "dtoverlay=dwc2 aalready in /boot/config.txt" +FILE=/etc/systemd/system/command.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service) ]]; then + echo "changed command.service." + sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service + FLAG=1 else - echo "adding dtoverlay=dwc2 to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + echo "no change to command.service." fi +else + echo "creating command.service." + sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service + sudo systemctl enable command + FLAG=1 +fi - if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then - echo "modules-load=dwc2,g_ether already in /boot/cmdline.txt" - else - echo "adding modules-load=dwc2,g_ether to /boot/cmdline.txt" - sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt - fi - - if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then - echo "dtparam=audio=on already in /boot/config.txt" +FILE=/etc/systemd/system/pacsatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then + echo "changed pacsatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + FLAG=1 else - echo "adding dtparam=audio=on to /boot/config.txt" - sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' + echo "no change to pacsatsim.service." fi +else + echo "creating pacsatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo systemctl enable command + FLAG=1 +fi - if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then - echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" +FILE=/etc/asound.conf +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/asound.conf /etc/asound.conf) ]]; then + echo "changed /etc/asound.conf." + sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf + FLAG=1 else - echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' + echo "no change to /etc/asound.conf." fi +else + echo "creating /etc/asound.conf." + sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf + FLAG=1 +fi - if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then - echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' - fi +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 - if [[ $(grep 'disable_splash=1 ' /boot/config.txt) ]]; then - echo "disable_splash=1 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' - fi +sudo sed -i 's/DEVICES=""/DEVICES="\/dev\/serial0"/g' /etc/default/gpsd - if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then - echo "boot_delay=0 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' - fi +sudo sed -i 's/GPSD_OPTIONS=""/GPSD_OPTIONS="-s 9600"/g' /etc/default/gpsd - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi - -sudo sh -c 'echo "\n" >> /boot/config.txt' - -changed=0 -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign -if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count -if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat -if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon -if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode -if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch -if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency -if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency -if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode -if [ -z "${10}" ] ; then n10="0" ; changed=1 ; else n10=${10} ; fi # rx pl code -if [ -z "${11}" ] ; then n11="0" ; changed=1 ; else n11=${11} ; fi # tx pl code - -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 - 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 - echo +if [ ! -d "/home/pi/fctelem" ]; then + echo "Installing fctelem binary v0.2 for FUNcube mode" + cd + 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 -u fctelem.zip + FLAG=1 +elif [ ! -f "/home/pi/fctelem/v0.2" ]; then + echo "Updating fctelem binary to version v0.2 for FUNcube mode" + cd + cd /home/pi/fctelem + sudo mv fctelem fctelem.bk + sudo mv fcdecode.conf fcdecode.conf.bk + sudo mv fctelem.zip fctelem.zip.1 + wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip + unzip -u fctelem.zip + FLAG=1 fi -echo "Would you like to reboot to complete the installation (y/n)?" +if [ ! -f "/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/mpu6050" ]; then + echo "Installing MPU6050-C-CPP-Library-for-Raspberry-Pi" + sudo apt-get install -y libi2c-dev + cd + git clone https://github.com/alanbjohnston/MPU6050-C-CPP-Library-for-Raspberry-Pi.git + cd MPU6050-C-CPP-Library-for-Raspberry-Pi + sudo make install + make payload +fi + +cd /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi +git checkout master +git pull --no-rebase > .updated_p + +if [[ $(grep 'changed' /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/.updated_p) ]]; then + echo "updating MPU6050-C-CPP-Library-for-Raspberry-Pi" + sudo make install + make payload +else + echo "nothing to do for MPU6050-C-CPP-Library-for-Raspberry-Pi." +fi + +if [ ! -f "/home/pi/raspberry-pi-bme280/bme280" ]; then + echo "Installing raspberry-pi-bme280" + sudo apt-get install -y libi2c-dev + cd + git clone https://github.com/alanbjohnston/raspberry-pi-bme280.git + cd raspberry-pi-bme280 + git checkout payload + make +fi -read -r ANS +cd /home/pi/raspberry-pi-bme280 +git checkout payload +git pull --no-rebase > .updated_p -if [ "$ANS" = "y" ]; then +if [[ $(grep 'changed' /home/pi/raspberry-pi-bme280/.updated_p) ]]; then - sudo reboot now + echo "updating raspberry-pi-bme280" + make else + echo "nothing to do for raspberry-pi-bme280." +fi + +if [ ! -f "/home/pi/fcdctl/fcdctl" ]; then + echo "Installing fcdctl to set FUNcubeDongle Pro gain" + sudo rm /var/lib/dpkg/info/python3-pip.list + sudo apt install python3-pip --reinstall + sudo apt-get install -y python3-smbus libusb-1.0 + cd + git clone https://github.com/csete/fcdctl.git + cd fcdctl + make fcdpp +fi - echo "The CubeSatSim software will start next time you reboot" +if [ ! -f "/home/pi/ssdv/ssdv" ]; then + cd + echo "Installing SSDV for FUNcube mode" + git clone https://github.com/alanbjohnston/ssdv.git # install ssdv for FUNcube images + cd ssdv + make +fi + +cd + +#echo "Would you like to reboot to complete the installation (y/n)?" + +#read -r ANS + +#if [ "$ANS" = "y" ]; then + +# sudo reboot now + +#else + + # echo "The CubeSatSim software will start next time you reboot" +#fi + +if [ "$noreboot" = "0" ] ; then + + if [ $FLAG -eq 1 ]; then + echo "systemctl daemon-reload and reboot" + sudo systemctl daemon-reload + sudo reboot -h now +# sudo cubesatsim + else + grep 'changed' /home/pi/CubeSatSim/.updated + if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then + echo "reboot due to code changes " | wall + sudo reboot -h now +# sudo cubesatsim + else + echo "nothing to do." + fi + fi +else + if [ $FLAG -eq 1 ]; then + echo "reboot needed for changes to take effect" | wall + fi fi From 9e0c897d60815b5287d44725fa285dc372eb4596 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:54:30 -0500 Subject: [PATCH 554/774] Update main.c resolve merge conflicts --- main.c | 2269 +++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 1594 insertions(+), 675 deletions(-) diff --git a/main.c b/main.c index e0fda7e1..bcb7d75d 100644 --- a/main.c +++ b/main.c @@ -18,17 +18,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include "main.h" //#define HAB // uncomment to change APRS icon from Satellite to Balloon and only BAT telemetry int main(int argc, char * argv[]) { - printf("\n\nCubeSatSim v2.1 starting...\n\n"); + printf("\n\nCubeSatSim v2.2 starting...\n\n"); wiringPiSetup(); - + + strcpy(fail_yes, "no"); // Open configuration file with callsign and reset count FILE * config_file = fopen("/home/pi/CubeSatSim/sim.cfg", "r"); if (config_file == NULL) { @@ -41,11 +42,11 @@ int main(int argc, char * argv[]) { // char * cfg_buf[100]; - fscanf(config_file, "%s %d %f %f %s %d %s %s %s %d %d", - call, & reset_count, & lat_file, & long_file, sim_yes, & squelch, tx, rx, hab_yes, & rx_pl, & tx_pl); + fscanf(config_file, "%s %d %f %f %s %d %s %s %s %d %d %s %d", + call, &reset_count, &lat_file, &long_file, sim_yes, &squelch, tx, rx, hab_yes, &rx_pl, &tx_pl, fail_yes, &fail_time); fclose(config_file); - fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d\n", - call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl); + fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d %s %d\n", + call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time); fprintf(stderr, "Transmit on %s MHz Receive on %s MHz\n", tx, rx); @@ -79,13 +80,19 @@ int main(int argc, char * argv[]) { if (strcmp(sim_yes, "yes") == 0) { sim_mode = TRUE; - fprintf(stderr, "Sim mode is turned ON by configuration\n"); + fprintf(stderr, "Sim Mode is turned ON by configuration\n"); sim_config = TRUE; } if (strcmp(hab_yes, "yes") == 0) { hab_mode = TRUE; fprintf(stderr, "HAB mode is ON\n"); } + if (strcmp(fail_yes, "yes") == 0) { + fail_rnd_mode = TRUE; + fprintf(stderr, "Random fail mode is ON\n"); + failTime = 0; + srand((unsigned int)time(0)); + } FILE * command_file = fopen("/home/pi/CubeSatSim/command_control", "r"); if (command_file == NULL) { @@ -102,6 +109,25 @@ int main(int argc, char * argv[]) { } } printf("c2cStatus: %d \n", c2cStatus); + + printf("Test bus 1\n"); + fflush(stdout); + i2c_bus1 = (test_i2c_bus(1) != -1) ? 1 : OFF; + printf("Test bus 3\n"); + fflush(stdout); + i2c_bus3 = (test_i2c_bus(3) != -1) ? 3 : OFF; + printf("Finished testing\n"); + fflush(stdout); + + if (i2c_bus3 == OFF) { + printf("Sim Mode turned on automatically\n"); + sim_mode = TRUE; + FILE * sim_mode_auto = popen("touch /home/pi/CubeSatSim/sim_mode_auto", "r"); // store sim_mode_auto flag + pclose(sim_mode_auto); + } else { + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } char resbuffer[1000]; // const char testStr[] = "cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' | sed 's/^1000//' | grep '9000'"; @@ -121,21 +147,26 @@ int main(int argc, char * argv[]) { fgets(resbuffer, 1000, file2_test); fprintf(stderr, "Pi Zero 2 test result: %s\n", resbuffer); fclose(file2_test); - if (strlen(resbuffer) > 5) + if (strlen(resbuffer) > 5) { fprintf(stderr, "Pi Zero 2 detected\n"); + FILE * pi_zero2 = popen("touch /home/pi/CubeSatSim/pi_zero2", "r"); // store Pi Zero 2 flag + pclose(pi_zero2); + } else fprintf(stderr, "Not a Pi Zero or Pi Zero 2\n"); - pi_zero_2_offset = 500; - if (uptime_sec < 30.0) { - FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); - pclose(transmit_stop); + pi_zero_2_offset = 500; + if (uptime_sec < 30.0) { + FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); + pclose(transmit_stop); fprintf(stderr, "Sleep 5 sec\n"); - sleep(5); // try sleep at start to help boot + sleep(5); // try sleep at start to help boot } } else { fprintf(stderr,"Pi Zero detected\n"); + FILE * pi_zero2 = popen("sudo rm /home/pi/CubeSatSim/pi_zero2 &>/dev/null", "r"); // remove Pi Zero 2 flag if present + pclose(pi_zero2); if ((c2cStatus == DISABLED) || (c2cStatus == CARRIER)) { pi_zero_2_offset = 500; } @@ -156,15 +187,6 @@ int main(int argc, char * argv[]) { // FILE * file_deletes = popen("sudo rm /home/pi/CubeSatSim/ready /home/pi/CubeSatSim/cwready > /dev/null", "r"); // pclose(file_deletes); - - printf("Test bus 1\n"); - fflush(stdout); - i2c_bus1 = (test_i2c_bus(1) != -1) ? 1 : OFF; - printf("Test bus 3\n"); - fflush(stdout); - i2c_bus3 = (test_i2c_bus(3) != -1) ? 3 : OFF; - printf("Finished testing\n"); - fflush(stdout); // sleep(2); @@ -190,6 +212,9 @@ int main(int argc, char * argv[]) { } else if ( * argv[1] == 'm') { mode = CW; printf("Mode is CW\n"); + } else if ( * argv[1] == 'j') { + mode = FC; + printf("Mode is FUNcube\n"); } else { printf("Mode is BPSK\n"); } @@ -228,6 +253,9 @@ int main(int argc, char * argv[]) { } else if ( mode_string == 'm') { mode = CW; printf("Mode is CW\n"); + } else if ( mode_string == 'j') { + mode = FC; + printf("Mode is FUNcube\n"); } else if ( mode_string == 'e') { mode = REPEATER; printf("Mode is Repeater\n"); @@ -276,47 +304,10 @@ int main(int argc, char * argv[]) { /**/ fflush(stderr); - - if (mode == AFSK) - { - // Check for SPI and AX-5043 Digital Transceiver Board - FILE * file = popen("sudo raspi-config nonint get_spi", "r"); -// printf("getc: %c \n", fgetc(file)); - if (fgetc(file) == 48) { - printf("SPI is enabled!\n"); - - FILE * file2 = popen("ls /dev/spidev0.* 2>&1", "r"); - printf("Result getc: %c \n", getc(file2)); - - if (fgetc(file2) != 'l') { - printf("SPI devices present!\n"); - // } - - setSpiChannel(SPI_CHANNEL); - setSpiSpeed(SPI_SPEED); - initializeSpi(); - ax25_init( & hax25, (uint8_t * ) dest_addr, 11, (uint8_t * ) call, 11, AX25_PREAMBLE_LEN, AX25_POSTAMBLE_LEN); - if (init_rf()) { - printf("AX5043 successfully initialized!\n"); - ax5043 = TRUE; - cw_id = OFF; -// mode = AFSK; - // cycle = OFF; - printf("Mode AFSK with AX5043\n"); - transmit = TRUE; -// sleep(10); // just in case CW ID is sent - } else - printf("AX5043 not present!\n"); - pclose(file2); - } - } - pclose(file); - } - + txLed = 2; txLedOn = HIGH; txLedOff = LOW; - vB5 = TRUE; onLed = 27; onLedOn = HIGH; onLedOff = LOW; @@ -330,44 +321,52 @@ int main(int argc, char * argv[]) { } config_file = fopen("sim.cfg", "w"); - fprintf(config_file, "%s %d %8.4f %8.4f %s %d %s %s %s %d %d", call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl); + fprintf(config_file, "%s %d %8.4f %8.4f %s %d %s %s %s %d %d %s %d", + call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time); // fprintf(config_file, "%s %d", call, reset_count); fclose(config_file); config_file = fopen("sim.cfg", "r"); - if (vB4) { - map[BAT] = BAT2; - map[BAT2] = BAT; - snprintf(busStr, 10, "%d %d", i2c_bus1, test_i2c_bus(0)); - } else if (vB5) { - map[MINUS_X] = MINUS_Y; - map[PLUS_Z] = MINUS_X; - map[MINUS_Y] = PLUS_Z; + map[MINUS_X] = MINUS_Y; + map[PLUS_Z] = MINUS_X; + map[MINUS_Y] = PLUS_Z; - if (access("/dev/i2c-11", W_OK | R_OK) >= 0) { // Test if I2C Bus 11 is present + if (access("/dev/i2c-11", W_OK | R_OK) >= 0) { // Test if I2C Bus 11 is present printf("/dev/i2c-11 is present\n\n"); snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(11)); - } else { - snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); - } } else { - map[BAT2] = MINUS_Z; - map[BAT] = BAT2; - map[PLUS_Z] = BAT; - map[MINUS_Z] = PLUS_Z; - snprintf(busStr, 10, "%d %d", i2c_bus1, test_i2c_bus(0)); - voltageThreshold = 8.0; + snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); } - - // check for camera -// char cmdbuffer1[1000]; - FILE * file4 = popen("vcgencmd get_camera", "r"); - fgets(cmdbuffer, 1000, file4); - char camera_present[] = "supported=1 detected=1"; + + FILE * os_test = popen("cat /etc/os-release", "r"); + fgets(cmdbuffer, 1000, os_test); + printf("os-release: %s\n", cmdbuffer); + char os_present[] = "bookworm"; // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); - camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; - printf("Camera result:%s camera: %d \n", & cmdbuffer, camera); - pclose(file4); + int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; + printf("os_status: %d\n", os_status); + pclose(os_test); + + // check for camera + FILE *cam_test; + if (os_status == ON) { // bookworm + cam_test = popen("sudo rpicam-hello --list-cameras | grep 'No cameras available!'", "r"); + fgets(cmdbuffer, 1000, cam_test); + char no_camera_present[] = "No cameras available!"; + // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); + camera = (strstr( (const char *)& cmdbuffer, no_camera_present) != NULL) ? OFF : ON; + } + else // bullseye + { + cam_test = popen("vcgencmd get_camera", "r"); + fgets(cmdbuffer, 1000, cam_test); + char camera_present[] = "supported=1 detected=1"; + // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); + camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; + } + + printf("Camera result: %s camera: %d \n", & cmdbuffer, camera); + pclose(cam_test); #ifdef DEBUG_LOGGING printf("INFO: I2C bus status 0: %d 1: %d 3: %d camera: %d\n", i2c_bus0, i2c_bus1, i2c_bus3, camera); @@ -377,68 +376,117 @@ int main(int argc, char * argv[]) { //file5 = popen("sudo rm /home/pi/CubeSatSim/camera_out.jpg.wav > /dev/null 2>&1", "r"); pclose(file5); - if (!ax5043) // don't test for payload if AX5043 is present - { + cmdbuffer[0] = '\0'; + gps_status = OFF; + FILE *gps_read = NULL; + if ((mode == AFSK) || (mode == CW) || (mode == SSTV)) + { + gps_read = sopen("python3 /home/pi/CubeSatSim/gps_client.py"); // python sensor polling function + + if (gps_read != NULL) { + fgets(cmdbuffer, 1000, gps_read); + fprintf(stderr, "gps read: %s\n", cmdbuffer); + if ((cmdbuffer[0] == '-') && (cmdbuffer[1] == '1')) + { + gps_status = OFF; + fprintf(stderr, "Pi GPS off\n"); + } else if ((cmdbuffer[0] == '1') || (cmdbuffer[0] == '2') || (cmdbuffer[0] == '3')) { + gps_status = ON; + fprintf(stderr, "Pi GPS on\n"); + } + fclose(gps_read); + } else + fprintf(stderr, "Error checking gps"); + } + payload = OFF; - fprintf(stderr,"Opening serial\n"); - if ((uart_fd = serialOpen("/dev/ttyAMA0", 115200)) >= 0) { // was 9600 - fprintf(stderr,"Serial opened to Pico\n"); -// payload = ON; - payload = get_payload_serial(FALSE); - fprintf(stderr,"Get_payload_status: %d \n", payload); // not debug - - } else { - fprintf(stderr, "Unable to open UART: %s\n -> Did you configure /boot/config.txt and /boot/cmdline.txt?\n", strerror(errno)); - } - } - if ((i2c_bus3 == OFF) || (sim_mode == TRUE)) { + if (gps_status == OFF) + { + fprintf(stderr,"Opening serial\n"); + if ((uart_fd = serialOpen("/dev/ttyAMA0", 115200)) >= 0) { // was 9600 + fprintf(stderr,"Serial opened to Pico\n"); + // payload = ON; + payload = get_payload_serial(FALSE); + fprintf(stderr,"Get_payload_status: %d \n", payload); // not debug + + if (sim_mode && payload && !sim_config) { + sim_mode = FALSE; + printf("Turning off Sim Mode since payload is present and Sim Mode not manually configured.\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } + } else { + fprintf(stderr, "Unable to open UART: %s\n -> Did you configure /boot/config.txt and /boot/cmdline.txt?\n", strerror(errno)); + } + } + else + { + payload = FALSE; + printf("get_payload_status not run since gps_status is ON\n"); + } + + sensor_setup(); - sim_mode = TRUE; - - fprintf(stderr, "Simulated telemetry mode!\n"); + if (sim_mode == TRUE) { + + fprintf(stderr, "Sim Mode is active\n"); srand((unsigned int)time(0)); - axis[0] = rnd_float(-0.2, 0.2); - if (axis[0] == 0) - axis[0] = rnd_float(-0.2, 0.2); - axis[1] = rnd_float(-0.2, 0.2); - axis[2] = (rnd_float(-0.2, 0.2) > 0) ? 1.0 : -1.0; + axis[X] = rnd_float(-0.2, 0.2); + if (axis[X] == 0) + axis[X] = rnd_float(-0.2, 0.2); + axis[Y] = rnd_float(-0.2, 0.2); + float axis_z; + axis_z = sqrt(1 - axis[X] * axis[X] - axis[Y] * axis[Y]); + axis[Z] = (rnd_float(-0.2, 0.2) > 0) ? axis_z : -1.0 * axis_z; - angle[0] = (float) atan(axis[1] / axis[2]); - angle[1] = (float) atan(axis[2] / axis[0]); - angle[2] = (float) atan(axis[1] / axis[0]); + angle[X] = (float) atan(axis[Y] / axis[Z]); + angle[Y] = (float) atan(axis[Z] / axis[X]); + angle[Z] = (float) atan(axis[Y] / axis[X]); - volts_max[0] = rnd_float(4.5, 5.5) * (float) sin(angle[1]); - volts_max[1] = rnd_float(4.5, 5.5) * (float) cos(angle[0]); - volts_max[2] = rnd_float(4.5, 5.5) * (float) cos(angle[1] - angle[0]); + volts_max[X] = rnd_float(9.0, 12.0) * (float) sin(angle[Y]); + volts_max[Y] = rnd_float(9.0, 12.0) * (float) cos(angle[X]); + volts_max[Z] = rnd_float(9.0, 12.0) * (float) cos(angle[Y] - angle[X]); - float amps_avg = rnd_float(150, 300); + float amps_avg = rnd_float(150, 750); - amps_max[0] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) sin(angle[1]); - amps_max[1] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[0]); - amps_max[2] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[1] - angle[0]); + amps_max[X] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) sin(angle[Y]); + amps_max[Y] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[X]); + amps_max[Z] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[Y] - angle[X]); - batt = rnd_float(3.8, 4.3); + batt = rnd_float(3.8, 4.1); speed = rnd_float(1.0, 2.5); eclipse = (rnd_float(-1, +4) > 0) ? 1.0 : 0.0; + atmosphere = (rnd_float(-1, +1) > 0) ? 0.0 : 1.0; + +// eclipse = 1; period = rnd_float(150, 300); tempS = rnd_float(20, 55); temp_max = rnd_float(50, 70); temp_min = rnd_float(10, 20); - #ifdef DEBUG_LOGGING - for (int i = 0; i < 3; i++) +// #ifdef DEBUG_LOGGING + for (int i = X; i <= Z; i++) printf("axis: %f angle: %f v: %f i: %f \n", axis[i], angle[i], volts_max[i], amps_max[i]); - printf("batt: %f speed: %f eclipse_time: %f eclipse: %f period: %f temp: %f max: %f min: %f\n", batt, speed, eclipse_time, eclipse, period, tempS, temp_max, temp_min); - #endif + printf("batt: %f speed: %f eclipse_time: %f eclipse: %f period: %f temp: %f max: %f min: %f atmosphere: %f\n", + batt, speed, eclipse_time, eclipse, period, tempS, temp_max, temp_min, atmosphere); +// #endif time_start = (long int) millis(); eclipse_time = (long int)(millis() / 1000.0); if (eclipse == 0.0) eclipse_time -= period / 2; // if starting in eclipse, shorten interval + + tempP = rnd_float(80, 90); // simulated payload parameters + altSP = rnd_float(28000, 32000); + changeP = rnd_float(-10, 10); + presP = rnd_float(1014, 1016); + altGP = rnd_float(20,120); + humiP = rnd_float(40,60); + } // tx_freq_hz -= tx_channel * 50000; @@ -472,6 +520,7 @@ int main(int argc, char * argv[]) { bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); // } else if (mode == BPSK) { } else { + bitRate = 1200; rsFrames = 3; payloads = 6; @@ -506,16 +555,61 @@ int main(int argc, char * argv[]) { // printf(" %d", sin_map[j]); } printf("\n"); + + } else if (mode == FC) { // for now copy BPSK settings + bitRate = 1200; +// rsFrames = 3; +// payloads = 6; +// rsFrameLen = 159; + headerLen = 768; // 8; + dataLen = 5200; // 78; + syncBits = 32; // 31; + syncWord = 0x1acffc1d; // 0b1000111110011010010000101011101; +// parityLen = 32; + amplitude = 32767; + samples = S_RATE / bitRate; + // bufLen = (frameCnt * (syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen))) * samples); + bufLen = (headerLen + syncBits + dataLen)/8; + + // samplePeriod = ((float)((syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen))))/(float)bitRate) * 1000 - 1800; + samplePeriod = 5000; + // samplePeriod = 3000; + // sleepTime = 3.0; + //samplePeriod = 2200; // reduce dut to python and sensor querying delays +// sleepTime = 2.2f; + +// frameTime = ((float)((float)bufLen / (samples * frameCnt * bitRate))) * 1000; // frame time in ms + frameTime = 5000; + + printf("\n FC Mode, bufLen: %d, %d bits per frame, %d bits per second, %d ms per frame %d ms sample period\n", + bufLen, bufLen / samples, bitRate, frameTime, samplePeriod); + + sin_samples = S_RATE/freq_Hz; + for (int j = 0; j < sin_samples; j++) { + sin_map[j] = (short int)(amplitude * sin((float)(2 * M_PI * j / sin_samples))); + + FILE * delete_image = popen("sudo rm /home/pi/CubeSatSim/image_file.bin", "r"); // delete any previous camera images + pclose(delete_image); + } + printf("\n"); } memset(voltage, 0, sizeof(voltage)); memset(current, 0, sizeof(current)); memset(sensor, 0, sizeof(sensor)); - memset(other, 0, sizeof(other)); + memset(other, 0, sizeof(other)); if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored - firstTime = 1; +// get_tlm_fox(); + } + else if (mode == FC) // && !sim_mode) + get_tlm_fc(); // fill transmit buffer with reset count 0 packets that will be ignored + else if (mode == CW) + get_tlm(); // generate a frame of telemetry right away + + if (firstTime == 0) + firstTime = 1; // if (!sim_mode) // always read sensors, even in sim mode { @@ -529,7 +623,7 @@ int main(int argc, char * argv[]) { file1 = sopen(pythonConfigStr); // python sensor polling function fgets(cmdbuffer, 1000, file1); - fprintf(stderr, "pythonStr result: %s\n", cmdbuffer); + fprintf(stderr, "pythonStr INA219 read result: %s\n", cmdbuffer); } for (int i = 0; i < 9; i++) { @@ -539,13 +633,13 @@ int main(int argc, char * argv[]) { current_max[i] = -1000.0; } for (int i = 0; i < SENSOR_FIELDS; i++) { - sensor_min[i] = 1000.0; - sensor_max[i] = -1000.0; + sensor_min[i] = 100000.0; + sensor_max[i] = -100000.0; // printf("Sensor min and max initialized!"); } for (int i = 0; i < 3; i++) { - other_min[i] = 1000.0; - other_max[i] = -1000.0; + other_min[i] = 100000.0; + other_max[i] = -100000.0; } loopTime = millis(); @@ -554,11 +648,13 @@ int main(int argc, char * argv[]) { fflush(stdout); fflush(stderr); // frames_sent++; +// if (!sim_mode) { + sensor_payload[0] = '\0'; + memset(sensor, 0, sizeof(sensor)); +// } - sensor_payload[0] = 0; memset(voltage, 0, sizeof(voltage)); memset(current, 0, sizeof(current)); - memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); FILE * uptime_file = fopen("/proc/uptime", "r"); @@ -571,12 +667,40 @@ int main(int argc, char * argv[]) { // #endif fclose(uptime_file); + if (fail_rnd_mode) { + if ((millis() - failTime) > fail_time * 1000) { + failureMode = rnd_float(1.0, 10.0); + printf("Simulated Random Failure Change to %d\n", failureMode); + FILE * failure_mode_file = fopen("/home/pi/CubeSatSim/failure_mode.txt", "w"); + fprintf(failure_mode_file, "%d", failureMode); + fclose(failure_mode_file); + failTime = loopTime; + } else + printf("No random failure change. millis: %ld failTime: %ld fail_time: %d\n", millis(), failTime, fail_time); + } +// else +// { +// failureMode = OFF; + FILE * failure_mode_file = fopen("/home/pi/CubeSatSim/failure_mode.txt", "r"); + if (failure_mode_file != NULL) { + char failure_string[10]; + if ( (fgets(failure_string, 10, failure_mode_file)) != NULL) { + failureMode = atoi(failure_string); + fclose(failure_mode_file); + printf("Failure mode: %d\n", failureMode); + } + } else { + failureMode = FAIL_NONE; + printf("No simulated failure.\n"); + } +// } + { int count1; char * token; fputc('\n', file1); fgets(cmdbuffer, 1000, file1); -// fprintf(stderr, "Python read Result: %s\n", cmdbuffer); + fprintf(stderr, "Python INA219 read Result: %s\n", cmdbuffer); // serialPuts(uart_fd, cmdbuffer); // write INA data to Pico over serial @@ -600,32 +724,61 @@ int main(int argc, char * argv[]) { token = strtok(NULL, space); } } - if (voltage[map[BAT]] == 0.0) - batteryVoltage = 4.5; - else { - batteryVoltage = voltage[map[BAT]]; - if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode - sim_mode = FALSE; - fprintf(stderr, "Turning off sim_mode since battery sensor is present\n"); + if (voltage[map[BAT]] == 0.0) // No BAT Board + if (voltage[map[BAT2]] == 0.0) // No BAT2 Board + batteryVoltage = 4.5; + else { + batteryVoltage = voltage[map[BAT2]]; // only BAT2 Board present + if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode + sim_mode = FALSE; + fprintf(stderr, "Turning off Sim Mode since battery sensor 2 is present\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } + } + else { + batteryVoltage = voltage[map[BAT]]; // BAT Board present + if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode + sim_mode = FALSE; + fprintf(stderr, "Turning off Sim Mode since battery sensor is present\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } } - } - batteryCurrent = current[map[BAT]]; - + batteryCurrent = current[map[BAT]] + current[map[BAT2]]; // Sum BAT and BAT2 currents } + + if (gps_status == OFF) + { + payload = get_payload_serial(FALSE); // not debug + printf("get_payload_status: %d \n", payload); + } + else + { + payload = FALSE; + printf("get_payload_status not run since gps_status is ON\n"); + } + + if (payload == FALSE) { + payload = pi_sensors(buffer2); + printf("pi_sensors status: %d \n", payload); + } -// if (payload == ON) { // moved to here - if (!ax5043) { -// if ((payload == ON) && (mode != BPSK)) { // moved to here -// STEMBoardFailure = 0; - payload = get_payload_serial(FALSE); - printf("get_payload_status: %d \n", payload); // not debug + if (sim_mode && payload && !sim_config) { + sim_mode = FALSE; + printf("Turning off Sim Mode since payload is present and Sim Mode not manually configured.\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } + fflush(stdout); // printf("String: %s\n", buffer2); fflush(stdout); - strcpy(sensor_payload, buffer2); -// printf(" Response from STEM Payload board: %s\n", sensor_payload); + strcpy(sensor_payload, buffer2); + + printf(" Response from STEM Payload: %s\n", sensor_payload); - telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); + telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); // printf("Writing payload string\n"); time_t timeStamp; time(&timeStamp); // get timestamp @@ -634,17 +787,30 @@ int main(int argc, char * argv[]) { char timeStampNoNl[31], bat_string[31]; snprintf(timeStampNoNl, 30, "%.24s", ctime(&timeStamp)); // printf("TimeStamp: %s\n", timeStampNoNl); - +/* if (c2cStatus == DISABLED) snprintf(bat_string, 30, "BAT %4.2f %5.1f", batteryVoltage, batteryCurrent); else snprintf(bat_string, 30, "BAT %4.2f %5.1f C", batteryVoltage, batteryCurrent); - + */ + snprintf(bat_string, 30, "BAT %.2f %.1f", batteryVoltage, batteryCurrent); + if (c2cStatus != DISABLED) + strcat(bat_string," C"); + if (sim_mode || (failureMode != FAIL_NONE)) + strcat(bat_string," S"); fprintf(telem_file, "%s %s %s\n", timeStampNoNl, bat_string, sensor_payload); // write telemetry string to telem.txt file fclose(telem_file); - + + if (failureMode == FAIL_PAYLOAD) { + sensor_payload[0] = '\0'; // This will cause the payload to not be processed. + printf("Simulated Payload Failure.\n"); + } + +//// if (!sim_mode) { + { if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) // only process if valid payload response { +// printf("Valid Payload!\n"); int count1; char * token; @@ -654,14 +820,66 @@ int main(int argc, char * argv[]) { for (count1 = 0; count1 < SENSOR_FIELDS; count1++) { if (token != NULL) { sensor[count1] = (float) atof(token); + strcpy(sensor_string[count1], token); // #ifdef DEBUG_LOGGING // printf("sensor: %f ", sensor[count1]); // print sensor data +// printf("Sensor String %d is %s\n",count1, sensor_string[count1]); // #endif token = strtok(NULL, space); } } - printf("\n"); + if (gps_status == TRUE) { + fprintf(stderr, "Checking Pi gps\n"); + cmdbuffer[0] = '\0'; + gps_read = sopen("python3 /home/pi/CubeSatSim/gps_client.py"); // python sensor polling function + + if (gps_read != NULL) { +// fputc('\n', gps_read); + fgets(cmdbuffer, 1000, gps_read); + +// const char gpsTestStr[] = "2 32.3 -54 333\n"; +// strcpy(cmdbuffer, gpsTestStr); + + fprintf(stderr, "gps read: %s\n", cmdbuffer); + if ((cmdbuffer[0] == '2') || (cmdbuffer[0] == '3')) + { + printf("Valid gps data!\n"); +// printf("%x %x \n", cmdbuffer[strlen(cmdbuffer) - 2], cmdbuffer[strlen(cmdbuffer) - 1] ); + if (cmdbuffer[strlen(cmdbuffer) - 1] == '\n') + cmdbuffer[strlen(cmdbuffer) - 1] = '\0'; +// printf("%x %x \n", cmdbuffer[strlen(cmdbuffer) - 2], cmdbuffer[strlen(cmdbuffer) - 1] ); + + int count1; + char * token; + + const char space[2] = " "; + token = strtok(cmdbuffer, space); + // printf("token: %s\n", token); + for (count1 = GPS; count1 < (GPS + 4); count1++) { + if (token != NULL) { + sensor[count1] = (float) atof(token); + strcpy(sensor_string[count1], token); + // #ifdef DEBUG_LOGGING +// printf("sensor: %f ", sensor[count1]); // print sensor data +// printf("Sensor String %d is %s\n",count1, sensor_string[count1]); + // #endif + token = strtok(NULL, space); + } + } +// printf("\n"); + strcpy(sensor_string[GPS], "GPS"); + + } else { + fprintf(stderr, "No Pi gps available\n"); + } + fclose(gps_read); + } else + fprintf(stderr, "Error checking gps"); + + } + + printf("\n"); // if (sensor[GPS1] != 0) { if ((sensor[GPS1] > -90.0) && (sensor[GPS1] < 90.0) && (sensor[GPS1] != 0.0)) { if (sensor[GPS1] != latitude) { @@ -678,10 +896,11 @@ int main(int argc, char * argv[]) { newGpsTime = millis(); } } - } - else - ; //payload = OFF; // turn off since STEM Payload is not responding - } + } + } +// else +// ; //payload = OFF; // turn off since STEM Payload is not responding + if ((millis() - newGpsTime) > 60000) { longitude += rnd_float(-0.05, 0.05) / 100.0; // was .05 latitude += rnd_float(-0.05, 0.05) / 100.0; @@ -689,8 +908,130 @@ int main(int argc, char * argv[]) { // printf("GPS Location with Rnd: APRS %07.2f, %08.2f \n", toAprsFormat(latitude), toAprsFormat(longitude)); newGpsTime = millis(); } - + +// if (sim_mode && (failureMode != FAIL_PAYLOAD) && !payload) { + if (sim_mode && (failureMode != FAIL_PAYLOAD)) { + char str_tmp[10]; + printf("Generating simulated payload telemetry\n"); + if (atmosphere == 0) { + sensor[PRES] = 0; + strcpy(sensor_string[PRES], "0.0"); + altSP += changeP; + sensor[ALT] = altSP; + sprintf(str_tmp, "%5.0f", altSP); + strcpy(sensor_string[ALT], str_tmp); + printf("Alt: %s\n", sensor_string[ALT]); + sensor[HUMI] = 0; + strcpy(sensor_string[HUMI], "0.0"); + sensor[TEMP] = tempP - 80 * (1 - eclipse) + rnd_float(-0.7, 0.7); + sprintf(str_tmp, "%4.1f", sensor[TEMP]); + strcpy(sensor_string[TEMP], str_tmp); + printf("Temp: %s\n", sensor_string[TEMP]); + } else { + sensor[PRES] = presP + rnd_float(-1, 1); + sprintf(str_tmp, "%6.1f", presP); + strcpy(sensor_string[PRES], str_tmp); + printf("Pres: %s\n", sensor_string[PRES]); + sensor[ALT] = altGP; + sprintf(str_tmp, "%5.0f", altGP); + strcpy(sensor_string[ALT], str_tmp); + sensor[HUMI] = humiP + rnd_float(-1, 1); + sprintf(str_tmp, "%4.1f", sensor[HUMI]); + strcpy(sensor_string[HUMI], str_tmp); + sensor[TEMP] = tempS + rnd_float(-0.7, 0.7); + sprintf(str_tmp, "%4.1f",sensor[TEMP]); + strcpy(sensor_string[TEMP], str_tmp); + printf("Temp: %s\n", sensor_string[TEMP]); + } + char sensor_number[20]; + sensor[ACCEL_X] = axis[X]; + sprintf(sensor_number, "%.2f", axis[X]); + strcpy(sensor_string[ACCEL_X], sensor_number); + sensor[ACCEL_Y] = axis[Y]; + sprintf(sensor_number, "%.2f", axis[Y]); + strcpy(sensor_string[ACCEL_Y], sensor_number); + sensor[ACCEL_Z] = axis[Z]; + sprintf(sensor_number, "%.2f", axis[Z]); + strcpy(sensor_string[ACCEL_Z], sensor_number); + + float spin; + spin = rnd_float(-30.0, 30.0); + sensor[GYRO_X] = axis[X] * spin; + sprintf(sensor_number, "%.2f", sensor[GYRO_X]); + strcpy(sensor_string[GYRO_X], sensor_number); + sensor[GYRO_Y] = axis[Y] * spin; + sprintf(sensor_number, "%.2f", sensor[GYRO_Y]); + strcpy(sensor_string[GYRO_Y], sensor_number); + sensor[GYRO_Z] = axis[Z] * spin; + sprintf(sensor_number, "%.2f", sensor[GYRO_Z]); + strcpy(sensor_string[GYRO_Z], sensor_number); + + // printf("sim sensor: %s\n", sensor_string[GYRO_Z]); + printf("sim sensor spin: %f value: %f length: %d string: %s\n", spin, sensor[GYRO_Z], strlen(sensor_string[GYRO_Z]), sensor_string[GYRO_Z]); + } + + if (failureMode == FAIL_BME) { + sensor[TEMP] = 0.0; + strcpy(sensor_string[TEMP], "0.0"); + sensor[PRES] = 0.0; + strcpy(sensor_string[PRES], "0.0"); + sensor[HUMI] = 0.0; + strcpy(sensor_string[HUMI], "0.0"); + sensor[ALT] = 0.0; + strcpy(sensor_string[ALT], "0.0"); + printf("Simulated BME Failure!\n"); + } + + if (failureMode == FAIL_MPU) { + sensor[ACCEL_X] = 0.0; + strcpy(sensor_string[ACCEL_X], "0.0"); + sensor[ACCEL_Y] = 0.0; + strcpy(sensor_string[ACCEL_Y], "0.0"); + sensor[ACCEL_Z] = 0.0; + strcpy(sensor_string[ACCEL_Z], "0.0"); + sensor[GYRO_X] = 0.0; + strcpy(sensor_string[GYRO_X], "0.0"); + sensor[GYRO_Y] = 0.0; + strcpy(sensor_string[GYRO_Y], "0.0"); + sensor[GYRO_Z] = 0.0; + strcpy(sensor_string[GYRO_Z], "0.0"); + printf("Simulated MPU Failure!\n"); + } + +// if ((failureMode == FAIL_BME) || (failureMode == FAIL_MPU) || (sim_mode && (failureMode != FAIL_PAYLOAD))) // recreaate sensor_payload string + if (failureMode != FAIL_PAYLOAD) + { + sensor_payload[0] = '\0'; + strcpy(sensor_string[0], "OK"); + strcpy(sensor_string[1], "BME280"); + strcpy(sensor_string[6], "MPU6050"); + + for (count1 = 0; count1 < SENSOR_FIELDS; count1++) { + strcat(sensor_payload, sensor_string[count1]); + strcat(sensor_payload, " "); + } + printf("Updated Sensor String: %s\n", sensor_payload); + } +// else if (failureMode != FAIL_PAYLOAD) { +// printf("Restoring sensor_payload\n"); +// strcpy(sensor_payload, buffer2); // restore sensor_payload after strtok operation +// } + + char sensor_buffer[30]; + int sensor_count; + sensor_buffer[0] = 0; + sensor_count = sensor_loop(sensor_buffer); + if (sensor_count > NEW_SENSOR_FIELDS_MAX) + sensor_count = NEW_SENSOR_FIELDS_MAX; + if ((sensor_count > 0) && (failureMode != FAIL_PAYLOAD)) { + char space[] = " "; + strcat(sensor_payload, space); + strcat(sensor_payload, sensor_buffer); + printf(" Payload after new sensor read: %s\n", sensor_payload); + } + if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) { +// printf("Valid Payload!!\n"); for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { if (sensor[count1] < sensor_min[count1]) sensor_min[count1] = sensor[count1]; @@ -719,7 +1060,7 @@ int main(int argc, char * argv[]) { double Yv = eclipse * volts_max[1] * (float) sin((2.0 * 3.14 * time / (46.0 * speed)) + (3.14 / 2.0)) + rnd_float(-0.2, 0.2); double Zv = 2.0 * eclipse * volts_max[2] * (float) sin((2.0 * 3.14 * time / (46.0 * speed)) + 3.14 + angle[2]) + rnd_float(-0.2, 0.2); - // printf("Yi: %f Zi: %f %f %f Zv: %f \n", Yi, Zi, amps_max[2], angle[2], Zv); + printf("Yi: %f Zi: %f %f %f Zv: %f \n", Yi, Zi, amps_max[2], angle[2], Zv); current[map[PLUS_X]] = (Xi >= 0) ? Xi : 0; current[map[MINUS_X]] = (Xi >= 0) ? 0 : ((-1.0f) * Xi); @@ -728,15 +1069,6 @@ int main(int argc, char * argv[]) { current[map[PLUS_Z]] = (Zi >= 0) ? Zi : 0; current[map[MINUS_Z]] = (Zi >= 0) ? 0 : ((-1.0f) * Zi); - voltage[map[PLUS_X]] = (Xv >= 1) ? Xv : rnd_float(0.9, 1.1); - voltage[map[MINUS_X]] = (Xv <= -1) ? ((-1.0f) * Xv) : rnd_float(0.9, 1.1); - voltage[map[PLUS_Y]] = (Yv >= 1) ? Yv : rnd_float(0.9, 1.1); - voltage[map[MINUS_Y]] = (Yv <= -1) ? ((-1.0f) * Yv) : rnd_float(0.9, 1.1); - voltage[map[PLUS_Z]] = (Zv >= 1) ? Zv : rnd_float(0.9, 1.1); - voltage[map[MINUS_Z]] = (Zv <= -1) ? ((-1.0f) * Zv) : rnd_float(0.9, 1.1); - - // printf("temp: %f Time: %f Eclipse: %d : %f %f | %f %f | %f %f\n",tempS, time, eclipse, voltage[map[PLUS_X]], voltage[map[MINUS_X]], voltage[map[PLUS_Y]], voltage[map[MINUS_Y]], current[map[PLUS_Z]], current[map[MINUS_Z]]); - tempS += (eclipse > 0) ? ((temp_max - tempS) / 50.0f) : ((temp_min - tempS) / 50.0f); tempS += +rnd_float(-1.0, 1.0); // IHUcpuTemp = (int)((tempS + rnd_float(-1.0, 1.0)) * 10 + 0.5); @@ -745,31 +1077,47 @@ int main(int argc, char * argv[]) { voltage[map[BAT2]] = 0.0; // rnd_float(5.0, 5.005); current[map[BAT2]] = 0.0; // rnd_float(158, 171); - // float charging = current[map[PLUS_X]] + current[map[MINUS_X]] + current[map[PLUS_Y]] + current[map[MINUS_Y]] + current[map[PLUS_Z]] + current[map[MINUS_Z]]; - float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0)); + float charging = current[map[PLUS_X]] + current[map[MINUS_X]] + current[map[PLUS_Y]] + current[map[MINUS_Y]] + current[map[PLUS_Z]] + current[map[MINUS_Z]]; +// float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0)); // current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; current[map[BAT]] = rnd_float(320, 510) - charging; printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); - batt -= (batt > 3.5) ? current[map[BAT]] / 30000 : current[map[BAT]] / 3000; - if (batt < 3.0) { - batt = 3.0; + batt -= (batt > 3.5) ? current[map[BAT]] / 300000 : current[map[BAT]] / 30000; + if (batt < 3.6) { + batt = 3.6; SafeMode = 1; printf("Safe Mode!\n"); } else SafeMode= 0; - if (batt > 4.5) - batt = 4.5; + if (batt > 4.1) + batt = 4.1; voltage[map[BAT]] = batt + rnd_float(-0.01, 0.01); + + float Vm, Vp; + Vm = batt + 0.5; + Vp = (Xv > 0) ? Xv : rnd_float(0.0, 0.1); + voltage[map[PLUS_X]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Xv < 0) ? ((-1.0f) * Xv) : rnd_float(0.0, 0.1); + voltage[map[MINUS_X]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Yv > 0) ? Yv : rnd_float(0.0, 0.1); + voltage[map[PLUS_Y]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Yv < 0) ? ((-1.0f) * Yv) : rnd_float(0.0, 0.1); + voltage[map[MINUS_Y]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Zv > 0) ? Zv : rnd_float(0.0, 0.1); + voltage[map[PLUS_Z]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Zv < 0) ? ((-1.0f) * Zv) : rnd_float(0.0, 0.1); + voltage[map[MINUS_Z]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + + printf("temp: %f Time: %f Eclipse: %d : %f %f | %f %f | %f %f\n",tempS, time, eclipse, voltage[map[PLUS_X]], voltage[map[MINUS_X]], voltage[map[PLUS_Y]], voltage[map[MINUS_Y]], current[map[PLUS_Z]], current[map[MINUS_Z]]); // end of simulated telemetry - } - else { - } + } + FILE * cpuTempSensor = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); if (cpuTempSensor) { // double cpuTemp; @@ -787,9 +1135,9 @@ int main(int argc, char * argv[]) { fclose(cpuTempSensor); } - #ifdef DEBUG_LOGGING -// fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold); - #endif +// #ifdef DEBUG_LOGGING + fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold); +// #endif if ((batteryCurrent > currentThreshold) && (batteryVoltage < (voltageThreshold + 0.15)) && !sim_mode && !hab_mode) { @@ -834,22 +1182,7 @@ int main(int argc, char * argv[]) { sleep(10); } //#endif - - FILE * fp = fopen("/home/pi/CubeSatSim/telem_string.txt", "w"); - if (fp != NULL) { -// printf("Writing telem_string.txt\n"); - if (batteryVoltage != 4.5) - if (c2cStatus == DISABLED) - fprintf(fp, "BAT %4.2fV %4.0fmA\n", batteryVoltage, batteryCurrent); - else - fprintf(fp, "BAT %4.2fV %4.0fmA C\n", batteryVoltage, batteryCurrent); // show command and control is on - else - fprintf(fp, "\n"); // don't show voltage and current if it isn't a sensor value - - fclose(fp); - } else - printf("Error writing to telem_string.txt\n"); - + /**/ // sleep(1); // Delay 1 second ctr = 0; @@ -878,6 +1211,75 @@ int main(int argc, char * argv[]) { } } // printf("c2cStatus: %d \n", c2cStatus); + + if (failureMode == FAIL_NONE) + printf("No Simulated Failure!\n"); + if (failureMode == FAIL_UNPLUG) { + voltage[map[PLUS_Y]] = rnd_float(0.8, 0.95); + current[map[PLUS_Y]] = 0.0; + printf("+Y Solar Unplugged Failure\n"); + } + if (failureMode == FAIL_SOLAR) { + voltage[map[PLUS_X]] = 0.0; + current[map[PLUS_X]] = 0.0; + printf("+X Solar Simulated Failure\n"); + } + if (failureMode == FAIL_DEGRADE) { + voltage[map[MINUS_X]] = voltage[map[MINUS_X]] * 0.5; + current[map[MINUS_X]] = current[map[MINUS_X]] * 0.5; + printf("-X Solar Deg Simulated Failure\n"); + } + if (failureMode == FAIL_SHORT) { + voltage[map[MINUS_Y]] = 0.0; + printf("-Y Solar SC Simulated Failure!\n"); + } + if (failureMode == FAIL_I2C1) { + voltage[map[PLUS_X]] = 0.0; + current[map[PLUS_X]] = 0.0; + voltage[map[PLUS_Y]] = 0.0; + current[map[PLUS_Y]] = 0.0; + voltage[map[BAT]] = 0.0; + current[map[BAT]] = 0.0; + voltage[map[BAT2]] = 0.0; + current[map[BAT2]] = 0.0; + printf("I2C Bus 1 Simulated Failure!\n"); + } + if (failureMode == FAIL_I2C3) { + voltage[map[MINUS_X]] = 0.0; + current[map[MINUS_X]] = 0.0; + voltage[map[MINUS_Y]] = 0.0; + current[map[MINUS_Y]] = 0.0; + voltage[map[MINUS_Z]] = 0.0; + current[map[MINUS_Z]] = 0.0; + voltage[map[PLUS_Z]] = 0.0; + current[map[PLUS_Z]] = 0.0; + printf("I2C Bus 3 Simulated Failure!\n"); + } + + FILE * fp = fopen("/home/pi/CubeSatSim/telem_string.txt", "w"); + if (fp != NULL) { +// printf("Writing telem_string.txt v: %f v2: %f batteryVoltage: %f\n", voltage[map[BAT]], voltage[map[BAT2]], batteryVoltage); + if (sim_mode || (failureMode != FAIL_NONE)) { + if (voltage[map[BAT2]] == 0) + fprintf(fp, "BAT %.2f %.1f ", voltage[map[BAT]], current[map[BAT]]); + else + fprintf(fp, "BAT %.2f %.1f ", voltage[map[BAT2]], current[map[BAT]] + current[map[BAT2]]); + } + else { + fprintf(fp, "BAT %.2fV %.0fmA", batteryVoltage, batteryCurrent); + } + +// fprintf(fp, "BAT %.2fV %.0fmA", batteryVoltage, batteryCurrent); + + if (c2cStatus != DISABLED) + fprintf(fp," C"); + if (sim_mode || (failureMode != FAIL_NONE)) + fprintf(fp," S\n"); + else + fprintf(fp,"\n"); + fclose(fp); + } else + printf("Error writing to telem_string.txt\n"); if ((mode == AFSK) || (mode == CW)) { get_tlm(); @@ -890,7 +1292,9 @@ int main(int argc, char * argv[]) { } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV or PACSATGND + } else if ((mode == FC)) { + get_tlm_fc(); + } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); sleep(30); } @@ -900,7 +1304,7 @@ int main(int argc, char * argv[]) { #endif } - if (mode == BPSK) { + if ((mode == BPSK) || (mode == FC)) { // digitalWrite(txLed, txLedOn); #ifdef DEBUG_LOGGING // printf("Tx LED On 1\n"); @@ -946,20 +1350,6 @@ int upper_digit(int number) { return digit; } -static int init_rf() { - int ret; - fprintf(stderr, "Initializing AX5043\n"); - - ret = ax5043_init( & hax5043, XTAL_FREQ_HZ, VCO_INTERNAL); - if (ret != PQWS_SUCCESS) { - fprintf(stderr, - "ERROR: Failed to initialize AX5043 with error code %d\n", ret); - // exit(EXIT_FAILURE); - return (0); - } - return (1); -} - void get_tlm(void) { FILE * txResult; @@ -1016,22 +1406,22 @@ void get_tlm(void) { char header_lat[10]; char header_long[10]; char header_str4[] = "hi hi de "; + char header_c2c[] = " C"; // char footer_str1[] = "\' > t.txt && echo \'"; char footer_str1[] = "\' > t.txt"; // char footer_str[] = "-11>APCSS:010101/hi hi ' >> t.txt && touch /home/pi/CubeSatSim/ready"; // transmit is done by transmit.py char footer_str[] = " && echo 'AMSAT-11>APCSS:010101/hi hi ' >> t.txt && touch /home/pi/CubeSatSim/ready"; // transmit is done by transmit.py char footer_str2[] = " && touch /home/pi/CubeSatSim/ready"; + char zero[] = "0.0"; - if (ax5043) { - strcpy(str, header_str); - } else { + strcpy(str, header_str3); // } if (mode == AFSK) { strcat(str, call); strcat(str, header_str2); } - } + // printf("Str: %s \n", str); if (mode != CW) { // sprintf(header_str2b, "=%7.2f%c%c%c%08.2f%cShi hi ",4003.79,'N',0x5c,0x5c,07534.33,'W'); // add APRS lat and long @@ -1044,9 +1434,6 @@ void get_tlm(void) { else sprintf(header_long, "%08.2f%c",toAprsFormat( longitude) * (-1.0), 'W'); // long - if (ax5043) - sprintf(header_str2b, "=%s%c%sShi hi ", header_lat, 0x5c, header_long); // add APRS lat and long - else //#ifdef HAB if (hab_mode) sprintf(header_str2b, "=%s%c%sOhi hi ", header_lat, 0x2f, header_long); // add APRS lat and long with Balloon HAB icon @@ -1059,7 +1446,13 @@ void get_tlm(void) { strcat(str, header_str2b); } else { // CW mode strcat(str, header_str4); - strcat(str, call); + strcat(str, call); + if (c2cStatus != DISABLED) { + strcat(str, " C"); + } + if (sim_mode || failureMode != FAIL_NONE) { + strcat(str, " S"); + } sprintf(tlm_str, "%s' > cw0.txt", &str); printf("CW string to execute: %s\n", &tlm_str); @@ -1086,21 +1479,35 @@ void get_tlm(void) { pclose(cw_file); } - if (c2cStatus != DISABLED) { - FILE *file_append = sopen("echo 'C' >> cw6.txt"); - fclose(file_append); - } +// if (c2cStatus != DISABLED) { +// FILE *file_append = sopen("echo 'C' >> cw6.txt"); +// fclose(file_append); +// } } else { // APRS - if (c2cStatus == 0) - sprintf(tlm_str, "BAT %4.2f %5.1f ", voltage[map[BAT]] , current[map[BAT]] ); - else - sprintf(tlm_str, "BAT %4.2f %5.1f C ", voltage[map[BAT]] , current[map[BAT]] ); - - strcat(str, tlm_str); + if (sim_mode || (failureMode != FAIL_NONE)) { + if (voltage[map[BAT2]] == 0) + snprintf(tlm_str, 30, "BAT %.2f %.1f ", voltage[map[BAT]], current[map[BAT]]); + else + snprintf(tlm_str, 30, "BAT %.2f %.1f ", voltage[map[BAT2]], current[map[BAT]] + current[map[BAT2]]); + + if (c2cStatus != DISABLED) + strcat(tlm_str,"C "); + + strcat(tlm_str,"S "); + } + else { + snprintf(tlm_str, 30, "BAT %.2f %.1f ", batteryVoltage, batteryCurrent); + + if (c2cStatus != DISABLED) + strcat(tlm_str,"C "); + } +// printf("tlm_str: %s\n", tlm_str); + strcat(str, tlm_str); } - strcpy(sensor_payload, buffer2); - printf(" Response from STEM Payload board:: %s\n", sensor_payload); + +// strcpy(sensor_payload, buffer2); + printf(" sensor_payload: %s\n", sensor_payload); // printf(" Str so far: %s\n", str); if (mode != CW) @@ -1124,30 +1531,7 @@ void get_tlm(void) { sleep(5); } } - else if (ax5043) { - digitalWrite(txLed, txLedOn); - fprintf(stderr, "INFO: Transmitting X.25 packet using AX5043\n"); - memcpy(data, str, strnlen(str, 256)); - printf("data: %s \n", data); - int ret = ax25_tx_frame( & hax25, & hax5043, data, strnlen(str, 256)); - if (ret) { - fprintf(stderr, - "ERROR: Failed to transmit AX.25 frame with error code %d\n", - ret); - exit(EXIT_FAILURE); - } - ax5043_wait_for_transmit(); - digitalWrite(txLed, txLedOff); - - if (ret) { - fprintf(stderr, - "ERROR: Failed to transmit entire AX.25 frame with error code %d\n", - ret); - exit(EXIT_FAILURE); - } - sleep(4); // was 2 - - } else { // APRS using transmit + else { // APRS using transmit strcat(str, footer_str1); // strcat(str, call); @@ -1156,7 +1540,7 @@ void get_tlm(void) { else strcat(str, footer_str2); - fprintf(stderr, "String to execute: %s\n", str); + fprintf(stderr, "APRS String to execute: %s\n", str); printf("\n\nTelemetry string is %s \n\n", str); @@ -1183,23 +1567,24 @@ void get_tlm(void) { // generates telemetry which is decoded by AMSAT's FoxTelem: https://www.amsat.org/foxtelem-software-for-windows-mac-linux/ // for more info about how we use FoxTelem see https://www.g0kla.com/foxtelem/amsat_telemetry_designers_handbook.pdf -void get_tlm_fox() { +void get_tlm_fox() { int i; long int sync = syncWord; + int cam = ON; - smaller = (int) (S_RATE / (2 * freq_Hz)); + smaller = (int)(S_RATE / (2 * freq_Hz)); // if (mode == PACSAT) // dataLen = 78; short int b[dataLen]; short int b_max[dataLen]; short int b_min[dataLen]; - + memset(b, 0, sizeof(b)); memset(b_max, 0, sizeof(b_max)); memset(b_min, 0, sizeof(b_min)); - + short int h[headerLen]; memset(h, 0, sizeof(h)); @@ -1216,124 +1601,128 @@ void get_tlm_fox() { int posXi = 0, negXi = 0, posYi = 0, negYi = 0, posZi = 0, negZi = 0; int head_offset = 0; + STEMBoardFailure = 1; + short int buffer_test[bufLen]; int buffSize; - buffSize = (int) sizeof(buffer_test); + buffSize = (int)sizeof(buffer_test); + + if (failureMode == FAIL_PAYLOAD) { + payload = OFF; + printf("Payload Simulated Failure!\n"); + } + if (failureMode == FAIL_CAMERA) { + cam = OFF; + printf("Camera Simulated Failure!\n"); + } + else { + cam = camera; + } + if (mode == FSK) id = 7; else - id = 0; // 99 in h[6] - - // for (int frames = 0; frames < FRAME_CNT; frames++) + id = 0; // 99 in h[6] + + // for (int frames = 0; frames < FRAME_CNT; frames++) for (int frames = 0; frames < frameCnt; frames++) { - - if (firstTime != ON) { + // if (firstTime != ON) { + if (TRUE) { // delay for sample period -/**/ -// while ((millis() - sampleTime) < (unsigned int)samplePeriod) - int startSleep = millis(); - if ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 500 for FSK -// sleep(2.0); // 0.5); // 25); // initial period - sleep(1.0); // 0.5); // 25); // initial period - while ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 - sleep(0.1); // 25); // 0.5); // 25); -// sleep((unsigned int)sleepTime); -/**/ + /**/ + // while ((millis() - sampleTime) < (unsigned int)samplePeriod) + int startSleep = millis(); + if ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 500 for FSK + // sleep(2.0); // 0.5); // 25); // initial period + sleep(1.0); // 0.5); // 25); // initial period + while ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 + sleep(0.1); // 25); // 0.5); // 25); + // sleep((unsigned int)sleepTime); + /**/ printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, (unsigned int)frameTime - 750 + pi_zero_2_offset); fflush(stdout); - - sampleTime = (unsigned int) millis(); + + sampleTime = (unsigned int)millis(); } else { printf("first time - no sleep\n"); firstTime = OFF; } - printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime) / 1000.0); fflush(stdout); - loopTime = millis(); - -// if (mode == FSK) + loopTime = millis(); + + // if (mode == FSK) { // just moved for (int count1 = 0; count1 < 8; count1++) { - if (voltage[count1] < voltage_min[count1]) - voltage_min[count1] = voltage[count1]; - if (current[count1] < current_min[count1]) - current_min[count1] = current[count1]; - - if (voltage[count1] > voltage_max[count1]) - voltage_max[count1] = voltage[count1]; - if (current[count1] > current_max[count1]) - current_max[count1] = current[count1]; + if (voltage[count1] < voltage_min[count1]) voltage_min[count1] = voltage[count1]; + if (current[count1] < current_min[count1]) current_min[count1] = current[count1]; -// printf("Vmin %4.2f Vmax %4.2f Imin %4.2f Imax %4.2f \n", voltage_min[count1], voltage_max[count1], current_min[count1], current_max[count1]); + if (voltage[count1] > voltage_max[count1]) voltage_max[count1] = voltage[count1]; + if (current[count1] > current_max[count1]) current_max[count1] = current[count1]; + + // printf("Vmin %4.2f Vmax %4.2f Imin %4.2f Imax %4.2f \n", voltage_min[count1], voltage_max[count1], current_min[count1], current_max[count1]); } - for (int count1 = 0; count1 < 3; count1++) { - if (other[count1] < other_min[count1]) - other_min[count1] = other[count1]; - if (other[count1] > other_max[count1]) - other_max[count1] = other[count1]; + for (int count1 = 0; count1 < 3; count1++) { + if (other[count1] < other_min[count1]) other_min[count1] = other[count1]; + if (other[count1] > other_max[count1]) other_max[count1] = other[count1]; // printf("Other min %f max %f \n", other_min[count1], other_max[count1]); } - if (mode == FSK) - { - if (loop % 32 == 0) { // was 8 -// printf("Sending MIN frame \n"); - frm_type = 0x03; - for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { - if (count1 < 3) - other[count1] = other_min[count1]; - if (count1 < 8) { - voltage[count1] = voltage_min[count1]; - current[count1] = current_min[count1]; - } - if (sensor_min[count1] != 1000.0) // make sure values are valid - sensor[count1] = sensor_min[count1]; - } - } - if ((loop + 16) % 32 == 0) { // was 8 -// printf("Sending MAX frame \n"); - frm_type = 0x02; - for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { - if (count1 < 3) - other[count1] = other_max[count1]; - if (count1 < 8) { - voltage[count1] = voltage_max[count1]; - current[count1] = current_max[count1]; - } - if (sensor_max[count1] != -1000.0) // make sure values are valid - sensor[count1] = sensor_max[count1]; - } - } - } - else - frm_type = 0x02; // BPSK always send MAX MIN frame - } + if (mode == FSK) { + if (loop % 32 == 0) { // was 8 + // printf("Sending MIN frame \n"); + frm_type = 0x03; + for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { + if (count1 < 3) other[count1] = other_min[count1]; + if (count1 < 8) { + voltage[count1] = voltage_min[count1]; + current[count1] = current_min[count1]; + } + if (sensor_min[count1] != 100000.0) // make sure values are valid + sensor[count1] = sensor_min[count1]; + } + } + if ((loop + 16) % 32 == 0) { // was 8 + // printf("Sending MAX frame \n"); + frm_type = 0x02; + for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { + if (count1 < 3) other[count1] = other_max[count1]; + if (count1 < 8) { + voltage[count1] = voltage_max[count1]; + current[count1] = current_max[count1]; + } + if (sensor_max[count1] != -100000.0) // make sure values are valid + sensor[count1] = sensor_max[count1]; + } + } + } else + frm_type = 0x02; // BPSK always send MAX MIN frame + } sensor_payload[0] = 0; // clear for next payload - -// if (mode == FSK) { // remove this -// } + + // if (mode == FSK) { // remove this + // } memset(rs_frame, 0, sizeof(rs_frame)); memset(parities, 0, sizeof(parities)); - h[0] = (short int) ((h[0] & 0xf8) | (id & 0x07)); // 3 bits - if (uptime != 0) // if uptime is 0, leave reset count at 0 + h[0] = (short int)((h[0] & 0xf8) | (id & 0x07)); // 3 bits + if (uptime != 0) // if uptime is 0, leave reset count at 0 { - h[0] = (short int) ((h[0] & 0x07) | ((reset_count & 0x1f) << 3)); - h[1] = (short int) ((reset_count >> 5) & 0xff); - h[2] = (short int) ((h[2] & 0xf8) | ((reset_count >> 13) & 0x07)); + h[0] = (short int)((h[0] & 0x07) | ((reset_count & 0x1f) << 3)); + h[1] = (short int)((reset_count >> 5) & 0xff); + h[2] = (short int)((h[2] & 0xf8) | ((reset_count >> 13) & 0x07)); } - h[2] = (short int) ((h[2] & 0x0e) | ((uptime & 0x1f) << 3)); - h[3] = (short int) ((uptime >> 5) & 0xff); - h[4] = (short int) ((uptime >> 13) & 0xff); - h[5] = (short int) ((h[5] & 0xf0) | ((uptime >> 21) & 0x0f)); - h[5] = (short int) ((h[5] & 0x0f) | (frm_type << 4)); + h[2] = (short int)((h[2] & 0x0e) | ((uptime & 0x1f) << 3)); + h[3] = (short int)((uptime >> 5) & 0xff); + h[4] = (short int)((uptime >> 13) & 0xff); + h[5] = (short int)((h[5] & 0xf0) | ((uptime >> 21) & 0x0f)); + h[5] = (short int)((h[5] & 0x0f) | (frm_type << 4)); - if (mode == BPSK) - h[6] = 99; + if (mode == BPSK) h[6] = 99; posXi = (int)(current[map[PLUS_X]] + 0.5) + 2048; posYi = (int)(current[map[PLUS_Y]] + 0.5) + 2048; @@ -1354,22 +1743,23 @@ void get_tlm_fox() { BAT2Voltage = (int)(voltage[map[BAT2]] * 100); BAT2Current = (int)(current[map[BAT2]] + 0.5) + 2048; - if (payload == ON) - STEMBoardFailure = 0; +// if (payload == ON) STEMBoardFailure = 0; + if ((payload == ON) || (sim_mode && (failureMode != FAIL_PAYLOAD))) + STEMBoardFailure = 0; // read payload sensor if available -// encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below -// encodeB(b, 1 + head_offset, batt_b_v); + // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below + // encodeB(b, 1 + head_offset, batt_b_v); encodeA(b, 3 + head_offset, batt_c_v); - encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel - encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel - encodeB(b, 7 + head_offset, (int)(sensor[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel + encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel + encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel + encodeB(b, 7 + head_offset, (int)(sensor[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel encodeA(b, 9 + head_offset, battCurr); - encodeB(b, 10 + head_offset, (int)(sensor[TEMP] * 10 + 0.5)); // Temp + encodeB(b, 10 + head_offset, (int)(sensor[TEMP] * 10 + 0.5)); // Temp if (mode == FSK) { encodeA(b, 12 + head_offset, posXv); @@ -1385,7 +1775,7 @@ void get_tlm_fox() { encodeB(b, 25 + head_offset, negYi); encodeA(b, 27 + head_offset, posZi); encodeB(b, 28 + head_offset, negZi); - } else // BPSK + } else // BPSK { encodeA(b, 12 + head_offset, posXv); encodeB(b, 13 + head_offset, posYv); @@ -1400,7 +1790,7 @@ void get_tlm_fox() { encodeB(b, 25 + head_offset, negXi); encodeA(b, 27 + head_offset, negYi); encodeB(b, 28 + head_offset, negZi); - + encodeA(b_max, 12 + head_offset, (int)(voltage_max[map[PLUS_X]] * 100)); encodeB(b_max, 13 + head_offset, (int)(voltage_max[map[PLUS_Y]] * 100)); encodeA(b_max, 15 + head_offset, (int)(voltage_max[map[PLUS_Z]] * 100)); @@ -1413,159 +1803,228 @@ void get_tlm_fox() { encodeA(b_max, 24 + head_offset, (int)(current_max[map[PLUS_Z]] + 0.5) + 2048); encodeB(b_max, 25 + head_offset, (int)(current_max[map[MINUS_X]] + 0.5) + 2048); encodeA(b_max, 27 + head_offset, (int)(current_max[map[MINUS_Y]] + 0.5) + 2048); - encodeB(b_max, 28 + head_offset, (int)(current_max[map[MINUS_Z]] + 0.5) + 2048); + encodeB(b_max, 28 + head_offset, (int)(current_max[map[MINUS_Z]] + 0.5) + 2048); encodeA(b_max, 9 + head_offset, (int)(current_max[map[BAT]] + 0.5) + 2048); encodeA(b_max, 3 + head_offset, (int)(voltage_max[map[BAT]] * 100)); encodeA(b_max, 30 + head_offset, (int)(voltage_max[map[BAT2]] * 100)); encodeB(b_max, 46 + head_offset, (int)(current_max[map[BAT2]] + 0.5) + 2048); - - encodeB(b_max, 37 + head_offset, (int)(other_max[RSSI] + 0.5) + 2048); + + encodeB(b_max, 37 + head_offset, (int)(other_max[RSSI] + 0.5) + 2048); encodeA(b_max, 39 + head_offset, (int)(other_max[IHU_TEMP] * 10 + 0.5)); encodeB(b_max, 31 + head_offset, ((int)(other_max[SPIN] * 10)) + 2048); - if (sensor_min[TEMP] != 1000.0) // make sure values are valid - { - encodeB(b_max, 4 + head_offset, (int)(sensor_max[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel - encodeA(b_max, 6 + head_offset, (int)(sensor_max[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel - encodeB(b_max, 7 + head_offset, (int)(sensor_max[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel - - encodeA(b_max, 33 + head_offset, (int)(sensor_max[PRES] + 0.5)); // Pressure - encodeB(b_max, 34 + head_offset, (int)(sensor_max[ALT] * 10.0 + 0.5)); // Altitude - encodeB(b_max, 40 + head_offset, (int)(sensor_max[GYRO_X] + 0.5) + 2048); - encodeA(b_max, 42 + head_offset, (int)(sensor_max[GYRO_Y] + 0.5) + 2048); - encodeB(b_max, 43 + head_offset, (int)(sensor_max[GYRO_Z] + 0.5) + 2048); - - encodeA(b_max, 48 + head_offset, (int)(sensor_max[DTEMP] * 10 + 0.5) + 2048); -// encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS1] * 10 + 0.5) + 2048); - encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5)); - encodeA(b_max, 45 + head_offset, (int)(sensor_max[HUMI] * 10 + 0.5)); - - encodeB(b_max, 49 + head_offset, (int)(sensor[XS1])); - encodeA(b_max, 0 + head_offset, (int)(sensor[XS2])); - encodeB(b_max, 1 + head_offset, (int)(sensor[XS3])); - } - else - { - encodeB(b_max, 4 + head_offset, 2048); // 0 - encodeA(b_max, 6 + head_offset, 2048); // 0 - encodeB(b_max, 7 + head_offset, 2048); // 0 - - encodeB(b_max, 40 + head_offset, 2048); - encodeA(b_max, 42 + head_offset, 2048); - encodeB(b_max, 43 + head_offset, 2048); - - encodeA(b_max, 48 + head_offset, 2048); -// encodeB(b_max, 49 + head_offset, 2048); - } - encodeA(b_min, 12 + head_offset, (int)(voltage_min[map[PLUS_X]] * 100)); - encodeB(b_min, 13 + head_offset, (int)(voltage_min[map[PLUS_Y]] * 100)); - encodeA(b_min, 15 + head_offset, (int)(voltage_min[map[PLUS_Z]] * 100)); - encodeB(b_min, 16 + head_offset, (int)(voltage_min[map[MINUS_X]] * 100)); - encodeA(b_min, 18 + head_offset, (int)(voltage_min[map[MINUS_Y]] * 100)); - encodeB(b_min, 19 + head_offset, (int)(voltage_min[map[MINUS_Z]] * 100)); + if (sensor_min[TEMP] != 100000.0) // make sure values are valid + { + encodeB(b_max, 4 + head_offset, (int)(sensor_max[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel + encodeA(b_max, 6 + head_offset, (int)(sensor_max[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel + encodeB(b_max, 7 + head_offset, (int)(sensor_max[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel + + encodeA(b_max, 33 + head_offset, (int)(sensor_max[PRES] + 0.5)); // Pressure + if (sensor_max[ALT] < 0) sensor_max[ALT] = 0.0; + encodeB(b_max, 34 + head_offset, (int)(sensor_max[ALT] / 10.0 + 0.5)); // Altitude + encodeB(b_max, 40 + head_offset, (int)(sensor_max[GYRO_X] + 0.5) + 2048); + encodeA(b_max, 42 + head_offset, (int)(sensor_max[GYRO_Y] + 0.5) + 2048); + encodeB(b_max, 43 + head_offset, (int)(sensor_max[GYRO_Z] + 0.5) + 2048); + + // encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS1] * 10 + 0.5) + 2048); + encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5)); + encodeA(b_max, 45 + head_offset, (int)(sensor_max[HUMI] * 10 + 0.5)); + if (failureMode != FAIL_PAYLOAD) { + encodeA(b_max, 48 + head_offset, (int)(sensor_max[DTEMP] * 10 + 0.5) + 2048); + encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS1])); + encodeA(b_max, 0 + head_offset, (int)(sensor_max[XS2])); + encodeB(b_max, 1 + head_offset, (int)(sensor_max[XS3])); + } + else { + encodeA(b_max, 48 + head_offset, 2048); + encodeB(b_max, 49 + head_offset, 0); + encodeA(b_max, 0 + head_offset, 0); + encodeB(b_max, 1 + head_offset, 0); + } + } else { + encodeB(b_max, 4 + head_offset, 2048); // 0 + encodeA(b_max, 6 + head_offset, 2048); // 0 + encodeB(b_max, 7 + head_offset, 2048); // 0 + + encodeB(b_max, 40 + head_offset, 2048); + encodeA(b_max, 42 + head_offset, 2048); + encodeB(b_max, 43 + head_offset, 2048); + + encodeA(b_max, 48 + head_offset, 2048); + // encodeB(b_max, 49 + head_offset, 2048); + } + encodeA(b_min, 12 + head_offset, (int)(voltage_min[map[PLUS_X]] * 100)); + encodeB(b_min, 13 + head_offset, (int)(voltage_min[map[PLUS_Y]] * 100)); + encodeA(b_min, 15 + head_offset, (int)(voltage_min[map[PLUS_Z]] * 100)); + encodeB(b_min, 16 + head_offset, (int)(voltage_min[map[MINUS_X]] * 100)); + encodeA(b_min, 18 + head_offset, (int)(voltage_min[map[MINUS_Y]] * 100)); + encodeB(b_min, 19 + head_offset, (int)(voltage_min[map[MINUS_Z]] * 100)); encodeA(b_min, 21 + head_offset, (int)(current_min[map[PLUS_X]] + 0.5) + 2048); encodeB(b_min, 22 + head_offset, (int)(current_min[map[PLUS_Y]] + 0.5) + 2048); encodeA(b_min, 24 + head_offset, (int)(current_min[map[PLUS_Z]] + 0.5) + 2048); encodeB(b_min, 25 + head_offset, (int)(current_min[map[MINUS_X]] + 0.5) + 2048); encodeA(b_min, 27 + head_offset, (int)(current_min[map[MINUS_Y]] + 0.5) + 2048); - encodeB(b_min, 28 + head_offset, (int)(current_min[map[MINUS_Z]] + 0.5) + 2048); - + encodeB(b_min, 28 + head_offset, (int)(current_min[map[MINUS_Z]] + 0.5) + 2048); + encodeA(b_min, 9 + head_offset, (int)(current_min[map[BAT]] + 0.5) + 2048); encodeA(b_min, 3 + head_offset, (int)(voltage_min[map[BAT]] * 100)); encodeA(b_min, 30 + head_offset, (int)(voltage_min[map[BAT2]] * 100)); encodeB(b_min, 46 + head_offset, (int)(current_min[map[BAT2]] + 0.5) + 2048); - + encodeB(b_min, 31 + head_offset, ((int)(other_min[SPIN] * 10)) + 2048); - encodeB(b_min, 37 + head_offset, (int)(other_min[RSSI] + 0.5) + 2048); + encodeB(b_min, 37 + head_offset, (int)(other_min[RSSI] + 0.5) + 2048); encodeA(b_min, 39 + head_offset, (int)(other_min[IHU_TEMP] * 10 + 0.5)); - - if (sensor_min[TEMP] != 1000.0) // make sure values are valid - { - encodeB(b_min, 4 + head_offset, (int)(sensor_min[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel - encodeA(b_min, 6 + head_offset, (int)(sensor_min[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel - encodeB(b_min, 7 + head_offset, (int)(sensor_min[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel - - encodeA(b_min, 33 + head_offset, (int)(sensor_min[PRES] + 0.5)); // Pressure - encodeB(b_min, 34 + head_offset, (int)(sensor_min[ALT] * 10.0 + 0.5)); // Altitude - encodeB(b_min, 40 + head_offset, (int)(sensor_min[GYRO_X] + 0.5) + 2048); - encodeA(b_min, 42 + head_offset, (int)(sensor_min[GYRO_Y] + 0.5) + 2048); - encodeB(b_min, 43 + head_offset, (int)(sensor_min[GYRO_Z] + 0.5) + 2048); - - encodeA(b_min, 48 + head_offset, (int)(sensor_min[DTEMP] * 10 + 0.5) + 2048); -// encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1] * 10 + 0.5) + 2048); - encodeB(b_min, 10 + head_offset, (int)(sensor_min[TEMP] * 10 + 0.5)); - encodeA(b_min, 45 + head_offset, (int)(sensor_min[HUMI] * 10 + 0.5)); - - encodeB(b_min, 49 + head_offset, (int)(sensor[XS1])); - encodeA(b_min, 0 + head_offset, (int)(sensor[XS2])); - encodeB(b_min, 1 + head_offset, (int)(sensor[XS3])); - } - else - { - encodeB(b_min, 4 + head_offset, 2048); // 0 - encodeA(b_min, 6 + head_offset, 2048); // 0 - encodeB(b_min, 7 + head_offset, 2048); // 0 - - encodeB(b_min, 40 + head_offset, 2048); - encodeA(b_min, 42 + head_offset, 2048); - encodeB(b_min, 43 + head_offset, 2048); - - encodeA(b_min, 48 + head_offset, 2048); -// encodeB(b_min, 49 + head_offset, 2048); - } - } + + if (sensor_min[TEMP] != 100000.0) // make sure values are valid + { + encodeB(b_min, 4 + head_offset, (int)(sensor_min[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel + encodeA(b_min, 6 + head_offset, (int)(sensor_min[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel + encodeB(b_min, 7 + head_offset, (int)(sensor_min[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel + + encodeA(b_min, 33 + head_offset, (int)(sensor_min[PRES] + 0.5)); // Pressure + if (sensor_min[ALT] < 0) sensor_min[ALT] = 0.0; + encodeB(b_min, 34 + head_offset, (int)(sensor_min[ALT] / 10.0 + 0.5)); // Altitude + encodeB(b_min, 40 + head_offset, (int)(sensor_min[GYRO_X] + 0.5) + 2048); + encodeA(b_min, 42 + head_offset, (int)(sensor_min[GYRO_Y] + 0.5) + 2048); + encodeB(b_min, 43 + head_offset, (int)(sensor_min[GYRO_Z] + 0.5) + 2048); + + // encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1] * 10 + 0.5) + 2048); + encodeB(b_min, 10 + head_offset, (int)(sensor_min[TEMP] * 10 + 0.5)); + encodeA(b_min, 45 + head_offset, (int)(sensor_min[HUMI] * 10 + 0.5)); + + if (failureMode != FAIL_PAYLOAD) { + encodeA(b_min, 48 + head_offset, (int)(sensor_min[DTEMP] * 10 + 0.5) + 2048); + encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1])); + encodeA(b_min, 0 + head_offset, (int)(sensor_min[XS2])); + encodeB(b_min, 1 + head_offset, (int)(sensor_min[XS3])); + } + else { + encodeA(b_min, 48 + head_offset, 2048); + encodeB(b_min, 49 + head_offset, 0); + encodeA(b_min, 0 + head_offset, 0); + encodeB(b_min, 1 + head_offset, 0); + } + } else { + encodeB(b_min, 4 + head_offset, 2048); // 0 + encodeA(b_min, 6 + head_offset, 2048); // 0 + encodeB(b_min, 7 + head_offset, 2048); // 0 + + encodeB(b_min, 40 + head_offset, 2048); + encodeA(b_min, 42 + head_offset, 2048); + encodeB(b_min, 43 + head_offset, 2048); + + encodeA(b_min, 48 + head_offset, 2048); + // encodeB(b_min, 49 + head_offset, 2048); + } + } + encodeA(b, 30 + head_offset, BAT2Voltage); + + encodeB(b, 31 + head_offset, ((int)(other[SPIN] * 10)) + 2048); + + encodeA(b, 33 + head_offset, (int)(sensor[PRES] + 0.5)); // Pressure + if (sensor[ALT] < 0) sensor[ALT] = 0.0; + encodeB(b, 34 + head_offset, (int)(sensor[ALT] / 10.0 + 0.5)); // Altitude + encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1])); + encodeA(b_min, 0 + head_offset, (int)(sensor_min[XS2])); + encodeB(b_min, 1 + head_offset, (int)(sensor_min[XS3])); + // } + // else + // { + // encodeB(b_min, 4 + head_offset, 2048); // 0 + // encodeA(b_min, 6 + head_offset, 2048); // 0 + // encodeB(b_min, 7 + head_offset, 2048); // 0 + // + // encodeB(b_min, 40 + head_offset, 2048); + // encodeA(b_min, 42 + head_offset, 2048); + // encodeB(b_min, 43 + head_offset, 2048); + // + // encodeA(b_min, 48 + head_offset, 2048); + // // encodeB(b_min, 49 + head_offset, 2048); + // } + // + // } encodeA(b, 30 + head_offset, BAT2Voltage); encodeB(b, 31 + head_offset, ((int)(other[SPIN] * 10)) + 2048); - encodeA(b, 33 + head_offset, (int)(sensor[PRES] + 0.5)); // Pressure - encodeB(b, 34 + head_offset, (int)(sensor[ALT] * 10.0 + 0.5)); // Altitude + encodeA(b, 33 + head_offset, (int)(sensor[PRES] + 0.5)); // Pressure + if (sensor[ALT] < 0) sensor[ALT] = 0.0; + encodeB(b, 34 + head_offset, (int)(sensor[ALT] / 10.0 + 0.5)); // Altitude + encodeA(b, 45 + head_offset, (int)(sensor[HUMI] * 10 + 0.5)); // in place of sensor1 + encodeA(b, 39 + head_offset, (int)(other[TEMP] * 10 + 0.5)); encodeA(b, 36 + head_offset, Resets); encodeB(b, 37 + head_offset, (int)(other[RSSI] + 0.5) + 2048); - encodeA(b, 39 + head_offset, (int)(other[IHU_TEMP] * 10 + 0.5)); - encodeB(b, 40 + head_offset, (int)(sensor[GYRO_X] + 0.5) + 2048); encodeA(b, 42 + head_offset, (int)(sensor[GYRO_Y] + 0.5) + 2048); encodeB(b, 43 + head_offset, (int)(sensor[GYRO_Z] + 0.5) + 2048); - encodeA(b, 45 + head_offset, (int)(sensor[HUMI] * 10 + 0.5)); // in place of sensor1 + if (failureMode != FAIL_PAYLOAD) { + encodeA(b, 48 + head_offset, (int)(sensor[DTEMP] * 10 + 0.5) + 2048); + encodeB(b, 49 + head_offset, (int)(sensor[XS1])); + encodeA(b, 0 + head_offset, (int)(sensor[XS2])); + encodeB(b, 1 + head_offset, (int)(sensor[XS3])); + } + else { + encodeA(b, 48 + head_offset, 2048); + encodeB(b, 49 + head_offset, 0); + encodeA(b, 0 + head_offset, 0); + encodeB(b, 1 + head_offset, 0); + } encodeB(b, 46 + head_offset, BAT2Current); - encodeA(b, 48 + head_offset, (int)(sensor[DTEMP] * 10 + 0.5) + 2048); -// encodeB(b, 49 + head_offset, (int)(sensor[XS1] * 10 + 0.5) + 2048); - - encodeB(b, 49 + head_offset, (int)(sensor[XS1])); - encodeA(b, 0 + head_offset, (int)(sensor[XS2])); - encodeB(b, 1 + head_offset, (int)(sensor[XS3])); - - FILE * command_count_file = fopen("/home/pi/CubeSatSim/command_count.txt", "r"); - if (command_count_file != NULL) { - char count_string[10]; - if ( (fgets(count_string, 10, command_count_file)) != NULL) - groundCommandCount = atoi(count_string); -// fclose(command_count_file); - } else - printf("Error opening command_count.txt!\n"); + encodeA(b, 39 + head_offset, (int)(other[IHU_TEMP] * 10 + 0.5)); + + // encodeB(b, 49 + head_offset, (int)(sensor[XS1] * 10 + 0.5) + 2048); + + FILE* command_count_file = fopen("/home/pi/CubeSatSim/command_count.txt", "r"); + if (command_count_file != NULL) { + char count_string[10]; + if ((fgets(count_string, 10, command_count_file)) != NULL) + groundCommandCount = atoi(count_string); + else + printf("command_count.txt is invalid\n"); + // fclose(command_count_file); + } else + printf("Error opening command_count.txt!\n"); fclose(command_count_file); - -// printf("Command count: %d\n", groundCommandCount); - - int status = STEMBoardFailure + SafeMode * 2 + sim_mode * 4 + PayloadFailure1 * 8 + - (i2c_bus0 == OFF) * 16 + (i2c_bus1 == OFF) * 32 + (i2c_bus3 == OFF) * 64 + (camera == OFF) * 128 + groundCommandCount * 256; + + printf("Command count: %d\n", groundCommandCount); + int simulated; + simulated = sim_mode; + if (failureMode != FAIL_NONE) { + simulated = TRUE; + printf("Showing Simulated in FoxTelem\n"); + } + int i2c_1, i2c_3; + i2c_1 = i2c_bus1; + i2c_3 = i2c_bus3; + // printf("Bus1: %d Bus2: %d \n", i2c_1, i2c_3); + if (failureMode == FAIL_I2C1) { + i2c_1 = OFF; + // printf("I2C Bus 1 Simulated Failure\n"); + } else if (failureMode == FAIL_I2C3) { + i2c_3 = OFF; + // printf("I2C Bus 3 Simulated Failure\n"); + } + // int status = STEMBoardFailure + SafeMode * 2 + sim_mode * 4 + PayloadFailure1 * 8 + + // (i2c_bus0 == OFF) * 16 + (i2c_bus1 == OFF) * 32 + (i2c_bus3 == OFF) * 64 + (camera == OFF) * 128 + groundCommandCount * 256; + int status = STEMBoardFailure + SafeMode * 2 + simulated * 4 + PayloadFailure1 * 8 + (i2c_bus0 == OFF) * 16 + (i2c_1 == OFF) * 32 + (i2c_3 == OFF) * 64 + (cam == OFF) * 128 + groundCommandCount * 256; encodeA(b, 51 + head_offset, status); encodeB(b, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); - if ((mode == BPSK) || (mode == PACSAT)) { - encodeA(b_max, 51 + head_offset, status); + encodeA(b, 53 + head_offset, groundCommandCount); + + if ((mode == BPSK) || (mode == PACSAT)) { + encodeA(b_max, 51 + head_offset, status); encodeA(b_min, 51 + head_offset, status); encodeB(b_max, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); encodeB(b_min, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); } - + if (txAntennaDeployed == 0) { txAntennaDeployed = 1; printf("TX Antenna Deployed!\n"); @@ -1573,13 +2032,13 @@ void get_tlm_fox() { if (rxAntennaDeployed == 0) { rxAntennaDeployed = 1; printf("RX Antenna Deployed!\n"); - } - + } + if (mode == BPSK) { // wod field experiments unsigned long val = 0xffff; - encodeA(b, 64 + head_offset, 0xff & val); - encodeA(b, 65 + head_offset, val >> 8); - encodeA(b, 63 + head_offset, 0x00); + encodeA(b, 64 + head_offset, 0xff & val); + encodeA(b, 65 + head_offset, val >> 8); + encodeA(b, 63 + head_offset, 0x00); encodeA(b, 62 + head_offset, 0x01); encodeB(b, 74 + head_offset, 0xfff); } @@ -1612,6 +2071,7 @@ void get_tlm_fox() { else { // extra bracket for some reason? { + short int data10[headerLen + rsFrames * (rsFrameLen + parityLen)]; short int data8[headerLen + rsFrames * (rsFrameLen + parityLen)]; @@ -1619,7 +2079,7 @@ void get_tlm_fox() { int ctr3 = 0; for (i = 0; i < rsFrameLen; i++) { for (int j = 0; j < rsFrames; j++) { - if (!((i == (rsFrameLen - 1)) && (j == 2))) // skip last one for BPSK + if (!((i == (rsFrameLen - 1)) && (j == 2))) // skip last one for BPSK { if (ctr1 < headerLen) { rs_frame[j][i] = h[ctr1]; @@ -1628,30 +2088,23 @@ void get_tlm_fox() { data8[ctr1++] = rs_frame[j][i]; // printf ("data8[%d] = %x \n", ctr1 - 1, rs_frame[j][i]); } else { - if (mode == FSK) - { - rs_frame[j][i] = b[ctr3 % dataLen]; - update_rs(parities[j], b[ctr3 % dataLen]); - } else // BPSK - if ((int)(ctr3/dataLen) == 3) - { - rs_frame[j][i] = b_max[ctr3 % dataLen]; - update_rs(parities[j], b_max[ctr3 % dataLen]); - } - else if ((int)(ctr3/dataLen) == 4) - { - rs_frame[j][i] = b_min[ctr3 % dataLen]; - update_rs(parities[j], b_min[ctr3 % dataLen]); - } - else - { - rs_frame[j][i] = b[ctr3 % dataLen]; - update_rs(parities[j], b[ctr3 % dataLen]); - } - { - } - - // printf("%d rs_frame[%d][%d] = %x %d \n", + if (mode == FSK) { + rs_frame[j][i] = b[ctr3 % dataLen]; + update_rs(parities[j], b[ctr3 % dataLen]); + } else // BPSK + if ((int)(ctr3 / dataLen) == 3) { + rs_frame[j][i] = b_max[ctr3 % dataLen]; + update_rs(parities[j], b_max[ctr3 % dataLen]); + } else if ((int)(ctr3 / dataLen) == 4) { + rs_frame[j][i] = b_min[ctr3 % dataLen]; + update_rs(parities[j], b_min[ctr3 % dataLen]); + } else { + rs_frame[j][i] = b[ctr3 % dataLen]; + update_rs(parities[j], b[ctr3 % dataLen]); + } + {} + + // printf("%d rs_frame[%d][%d] = %x %d \n", // ctr1, j, i, b[ctr3 % DATA_LEN], ctr3 % DATA_LEN); data8[ctr1++] = rs_frame[j][i]; // printf ("data8[%d] = %x \n", ctr1 - 1, rs_frame[j][i]); @@ -1661,54 +2114,54 @@ void get_tlm_fox() { } } - #ifdef DEBUG_LOGGING - // printf("\nAt end of data8 write, %d ctr1 values written\n\n", ctr1); - /* - printf("Parities "); - for (int m = 0; m < parityLen; m++) { - printf("%d ", parities[0][m]); - } - printf("\n"); - */ - #endif - +#ifdef DEBUG_LOGGING +// printf("\nAt end of data8 write, %d ctr1 values written\n\n", ctr1); +/* + printf("Parities "); + for (int m = 0; m < parityLen; m++) { + printf("%d ", parities[0][m]); + } + printf("\n"); +*/ +#endif + int ctr2 = 0; memset(data10, 0, sizeof(data10)); - for (i = 0; i < dataLen * payloads + headerLen; i++) // 476 for BPSK + for (i = 0; i < dataLen * payloads + headerLen; i++) // 476 for BPSK { - data10[ctr2] = (Encode_8b10b[rd][((int) data8[ctr2])] & 0x3ff); - nrd = (Encode_8b10b[rd][((int) data8[ctr2])] >> 10) & 1; + data10[ctr2] = (Encode_8b10b[rd][((int)data8[ctr2])] & 0x3ff); + nrd = (Encode_8b10b[rd][((int)data8[ctr2])] >> 10) & 1; // printf ("data10[%d] = encoded data8[%d] = %x \n", - // ctr2, ctr2, data10[ctr2]); + // ctr2, ctr2, data10[ctr2]); - rd = nrd; // ^ nrd; + rd = nrd; // ^ nrd; ctr2++; } -// { - for (i = 0; i < parityLen; i++) { - for (int j = 0; j < rsFrames; j++) { - if ((uptime != 0) || (i != 0)) // don't correctly update parties if uptime is 0 so the frame will fail the FEC check and be discarded - data10[ctr2++] = (Encode_8b10b[rd][((int) parities[j][i])] & 0x3ff); - nrd = (Encode_8b10b[rd][((int) parities[j][i])] >> 10) & 1; + // { + for (i = 0; i < parityLen; i++) { + for (int j = 0; j < rsFrames; j++) { + if ((uptime != 0) || (i != 0)) // don't correctly update parties if uptime is 0 so the frame will fail the FEC check and be discarded + data10[ctr2++] = (Encode_8b10b[rd][((int)parities[j][i])] & 0x3ff); + nrd = (Encode_8b10b[rd][((int)parities[j][i])] >> 10) & 1; // printf ("data10[%d] = encoded parities[%d][%d] = %x \n", - // ctr2 - 1, j, i, data10[ctr2 - 1]); + // ctr2 - 1, j, i, data10[ctr2 - 1]); - rd = nrd; - } + rd = nrd; } - // } - #ifdef DEBUG_LOGGING - // printf("\nAt end of data10 write, %d ctr2 values written\n\n", ctr2); - #endif + } + // } +#ifdef DEBUG_LOGGING +// printf("\nAt end of data10 write, %d ctr2 values written\n\n", ctr2); +#endif int data; int val; - //int offset = 0; + // int offset = 0; - #ifdef DEBUG_LOGGING - // printf("\nAt start of buffer loop, syncBits %d samples %d ctr %d\n", syncBits, samples, ctr); - #endif +#ifdef DEBUG_LOGGING +// printf("\nAt start of buffer loop, syncBits %d samples %d ctr %d\n", syncBits, samples, ctr); +#endif for (i = 1; i <= syncBits * samples; i++) { write_wave(ctr, buffer); @@ -1718,7 +2171,7 @@ void get_tlm_fox() { val = sync; data = val & 1 << (bit - 1); // printf ("%d i: %d new frame %d sync bit %d = %d \n", - // ctr/SAMPLES, i, frames, bit, (data > 0) ); + // ctr/, i, frames, bit, (data > 0) ); if (mode == FSK) { phase = ((data != 0) * 2) - 1; // printf("Sending a %d\n", phase); @@ -1726,18 +2179,17 @@ void get_tlm_fox() { if (data == 0) { phase *= -1; if ((ctr - smaller) > 0) { - for (int j = 1; j <= smaller; j++) - buffer[ctr - j] = buffer[ctr - j] * 0.4; + for (int j = 1; j <= smaller; j++) buffer[ctr - j] = buffer[ctr - j] * 0.4; } flip_ctr = ctr; } } } } - #ifdef DEBUG_LOGGING - // printf("\n\nValue of ctr after header: %d Buffer Len: %d\n\n", ctr, buffSize); - #endif - for (i = 1; i <= (10 * (headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // 572 +#ifdef DEBUG_LOGGING +// printf("\n\nValue of ctr after header: %d Buffer Len: %d\n\n", ctr, buffSize); +#endif + for (i = 1; i <= (10 * (headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // 572 { write_wave(ctr, buffer); if ((i % samples) == 0) { @@ -1746,7 +2198,7 @@ void get_tlm_fox() { val = data10[symbol]; data = val & 1 << (bit - 1); // printf ("%d i: %d new frame %d data10[%d] = %x bit %d = %d \n", - // ctr/SAMPLES, i, frames, symbol, val, bit, (data > 0) ); + // ctr/, i, frames, symbol, val, bit, (data > 0) ); if (mode == FSK) { phase = ((data != 0) * 2) - 1; // printf("Sending a %d\n", phase); @@ -1754,8 +2206,7 @@ void get_tlm_fox() { if (data == 0) { phase *= -1; if ((ctr - smaller) > 0) { - for (int j = 1; j <= smaller; j++) - buffer[ctr - j] = buffer[ctr - j] * 0.4; + for (int j = 1; j <= smaller; j++) buffer[ctr - j] = buffer[ctr - j] * 0.4; } flip_ctr = ctr; } @@ -1763,53 +2214,29 @@ void get_tlm_fox() { } } } - #ifdef DEBUG_LOGGING - // printf("\nValue of ctr after looping: %d Buffer Len: %d\n", ctr, buffSize); - // printf("\ctr/samples = %d ctr/(samples*10) = %d\n\n", ctr/samples, ctr/(samples*10)); - #endif +#ifdef DEBUG_LOGGING +// printf("\nValue of ctr after looping: %d Buffer Len: %d\n", ctr, buffSize); +// printf("\ctr/samples = %d ctr/(samples*10) = %d\n\n", ctr/samples, ctr/(samples*10)); +#endif - int error = 0; - // int count; - // for (count = 0; count < dataLen; count++) { - // printf("%02X", b[count]); - // } - // printf("\n"); + // int error = 0; + // int count; + // for (count = 0; count < dataLen; count++) { + // printf("%02X", b[count]); + // } + // printf("\n"); // socket write - if (!socket_open && transmit) { - printf("Opening socket!\n"); - // struct sockaddr_in address; - // int valread; - struct sockaddr_in serv_addr; - // char *hello = "Hello from client"; - // char buffer[1024] = {0}; - if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - printf("\n Socket creation error \n"); - error = 1; - } - - memset( & serv_addr, '0', sizeof(serv_addr)); - - serv_addr.sin_family = AF_INET; - serv_addr.sin_port = htons(PORT); - - // Convert IPv4 and IPv6 addresses from text to binary form - if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { - printf("\nInvalid address/ Address not supported \n"); - error = 1; - } - - if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { - printf("\nConnection Failed \n"); - printf("Error: %s\n", strerror(errno)); - error = 1; -// FILE * transmit_restartf2 = popen("sudo systemctl restart transmit", "r"); -// pclose(transmit_restartf2); -// sleep(10); // was 5 // sleep if socket connection refused - - // try again - error = 0; + socket_send(ctr); + /* + if (!socket_open && transmit) { + printf("Opening socket!\n"); + // struct sockaddr_in address; + // int valread; + struct sockaddr_in serv_addr; + // char *hello = "Hello from client"; + // char buffer[1024] = {0}; if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { printf("\n Socket creation error \n"); error = 1; @@ -1820,7 +2247,7 @@ void get_tlm_fox() { serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(PORT); - // Convert IPv4 and IPv6 addresses from text to binary form + // Convert IPv4 and IPv6 addresses from text to binary form if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { printf("\nInvalid address/ Address not supported \n"); error = 1; @@ -1830,89 +2257,109 @@ void get_tlm_fox() { printf("\nConnection Failed \n"); printf("Error: %s\n", strerror(errno)); error = 1; -// FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); -// pclose(transmit_restartf); -// sleep(10); // was 5 // sleep if socket connection refused - } - } - if (error == 1) { - printf("Socket error count: %d\n", error_count); -// ; //transmitStatus = -1; - if (error_count++ > 5) { - printf("Restarting transmit\n"); - FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); - pclose(transmit_restartf); - sleep(10); // was 5 // sleep if socket connection refused - } - } - else { - socket_open = 1; - error_count = 0; - } - } + // FILE * transmit_restartf2 = popen("sudo systemctl restart transmit", "r"); + // pclose(transmit_restartf2); + // sleep(10); // was 5 // sleep if socket connection refused + + // try again + error = 0; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + printf("\n Socket creation error \n"); + error = 1; + } - if (!error && transmit) { - // digitalWrite (0, LOW); - // printf("Sending %d buffer bytes over socket after %d ms!\n", ctr, (long unsigned int)millis() - start); - start = millis(); - int sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); -// printf("socket send 1 %d ms bytes: %d \n\n", (unsigned int)millis() - start, sock_ret); - fflush(stdout); - - if (sock_ret < (ctr * 2 + 2)) { - // printf("Not resending\n"); - sleep(0.5); - sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); -// printf("socket send 2 %d ms bytes: %d \n\n", millis() - start, sock_ret); - } - - loop_count++; - if ((firstTime == 1) || (((loop_count % 180) == 0) && (mode == FSK)) || (((loop_count % 80) == 0) && (mode == BPSK))) // do first time and was every 180 samples - { - int max; - if (mode == FSK) - if (sim_mode) - max = 6; - else if (firstTime == 1) - max = 4; // 5; // was 6 - else - max = 3; - else - if (firstTime == 1) - max = 5; // 5; // was 6 - else - max = 4; - - for (int times = 0; times < max; times++) - { - start = millis(); // send frame until buffer fills - sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); -// printf("socket send %d in %d ms bytes: %d \n\n",times + 2, (unsigned int)millis() - start, sock_ret); - - if ((millis() - start) > 500) { - printf("Buffer over filled!\n"); - break; - } + memset( & serv_addr, '0', sizeof(serv_addr)); - if (sock_ret < (ctr * 2 + 2)) { - // printf("Not resending\n"); - sleep(0.5); - sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); - printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); - } + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(PORT); + + // Convert IPv4 and IPv6 addresses from text to binary form + if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { + printf("\nInvalid address/ Address not supported \n"); + error = 1; + } + + if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { + printf("\nConnection Failed \n"); + printf("Error: %s\n", strerror(errno)); + error = 1; + // FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); + // pclose(transmit_restartf); + // sleep(10); // was 5 // sleep if socket connection refused + } + } + if (error == 1) { + printf("Socket error count: %d\n", error_count); + // ; //transmitStatus = -1; + if (error_count++ > 5) { + printf("Restarting transmit\n"); + FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); + pclose(transmit_restartf); + sleep(10); // was 5 // sleep if socket connection refused + } + } + else { + socket_open = 1; + error_count = 0; } - sampleTime = (unsigned int) millis(); // resetting time for sleeping - fflush(stdout); -// if (firstTime == 1) -// max -= 1; } - if (sock_ret == -1) { - printf("Error: %s \n", strerror(errno)); - socket_open = 0; - //transmitStatus = -1; + if (!error && transmit) { + // digitalWrite (0, LOW); + // printf("Sending %d buffer bytes over socket after %d ms!\n", ctr, (long unsigned int)millis() - start); + start = millis(); + int sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); + // printf("socket send 1 %d ms bytes: %d \n\n", (unsigned int)millis() - start, sock_ret); + fflush(stdout); + + if (sock_ret < (ctr * 2 + 2)) { + // printf("Not resending\n"); + sleep(0.5); + sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); + // printf("socket send 2 %d ms bytes: %d \n\n", millis() - start, sock_ret); + } + */ + + loop_count++; + if ((firstTime == 1) || (((loop_count % 180) == 0) && (mode == FSK)) || (((loop_count % 80) == 0) && (mode == BPSK))) // do first time and was every 180 samples + { + int max; + if (mode == FSK) + if (sim_mode) + max = 6; + else if (firstTime == 1) + max = 4; // 5; // was 6 + else + max = 3; + else if (firstTime == 1) + max = 5; // 5; // was 6 + else + max = 4; + + for (int times = 0; times < max; times++) { + /// start = millis(); // send frame until buffer fills + socket_send(ctr); + /// sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); + // printf("socket send %d in %d ms bytes: %d \n\n",times + 2, (unsigned int)millis() - start, sock_ret); + + /// if ((millis() - start) > 500) { + /// printf("Buffer over filled!\n"); + /// break; + /// } + + /// if (sock_ret < (ctr * 2 + 2)) { + // printf("Not resending\n"); + /// sleep(0.5); + /// sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); + /// printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); + /// } } + sampleTime = (unsigned int)millis(); // resetting time for sleeping + // fflush(stdout); + // if (firstTime == 1) + // max -= 1; } + if (socket_open == 1) firstTime = 0; // else if (frames_sent > 0) //5) @@ -1992,13 +2439,16 @@ void write_wave(int i, short int *buffer) } else { - if ((ctr - flip_ctr) < smaller) -// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); + if ((ctr - flip_ctr) < smaller) { +// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples] / 2); +// if (ctr < 1000) printf("*"); + } else -// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); - buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]); } -// printf("%d %d \n", i, buffer[ctr - 1]); +// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); + buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]); + } +// if (ctr < 1000) printf("%d %d %d \n", ctr, i, buffer[ctr - 1]); } @@ -2091,8 +2541,7 @@ int get_payload_serial(int debug_camera) { end_flag_detected = FALSE; jpeg_start = 0; - serialFlush (uart_fd); // flush serial buffer so latest payload is read - + serialFlush (uart_fd); // flush serial buffer so latest payload is read // #ifdef GET_IMAGE_DEBUG if (debug_camera) printf("Received from Payload:\n"); @@ -2302,3 +2751,473 @@ if (setting == ON) { } return; } + +void get_tlm_fc() { // FUNcube Mode telemetry generation + + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime) / 1000.0); + fflush(stdout); + loopTime = millis(); + +//# define FC_EM +//#define JY_1 +#define FC_SIM + + /* create data, stream, and waveform buffers */ + + unsigned char source_bytes[256]; + int byte_count = 256; + + /* write telemetry into data buffer */ + +// printf("\nBLOCKSIZE = %d\n", BLOCKSIZE); +// printf("\nSYMPBLOCK = %d\n", SYMPBLOCK); + + memset(source_bytes, 0x00, sizeof(source_bytes)); +#ifdef FC_EM + source_bytes[0] = 0b00000001 ; // Sat Id is FUNcube-EM +#endif +#ifdef JY_1 +// source_bytes[0] = 0b11000001 ; // Sat Id is extended, Frame 2 (RT2 + WO2) + source_bytes[0] = 0xE0 | 0x20 | 0x00; // 1; // Sat Id is extended, Frame 34 (RT2 + IMG2) + + source_bytes[0] = source_bytes[0] | ( 0x01 & (uint8_t)(sequence % 2)); // alternate last bit for RT1, RT2. + + // source_bytes[1] = 0x08 ; // extended Nayify - works per code + source_bytes[1] = 0x10 ; // extended JY-1 - works, no documentation + + int extended = 1; +#endif +#ifdef FC_SIM +// source_bytes[0] = 0b11000001 ; // Sat Id is extended, Frame 2 (RT2 + WO2) + source_bytes[0] = 0xE0 | 0x20 | 0x00; // 1; // Sat Id is extended, Frame 34 (RT2 + IMG2) + + source_bytes[0] = source_bytes[0] | ( 0x01 & (uint8_t)(sequence % 2)); // alternate last bit for RT1, RT2. + + // source_bytes[1] = 0x08 ; // extended Nayify - works per code + source_bytes[1] = 0xfb ; // funcube sim sat id per AMSAT-UK allocation + int extended = 1; +#endif +#if defined(FC_SIM) || defined(JY_1) +// if (sequence > 10) { + if (image_file == NULL) { + image_file = fopen("/home/pi/CubeSatSim/image_file.bin", "r"); + image_id++; + printf("Opening file image_file.bin for image_id: %d\n", image_id); + } +// } + int pos = FC_PAYLOAD + extended; + int value; + if (image_file != NULL) { + printf("Writing image data to payload\n"); + while ((pos < 256) && ((value = getc(image_file)) != EOF)) { + source_bytes[pos++] = value; +// printf("%2x ", value); + } + if (value == EOF) { + image_file = NULL; + printf("End of file reached! Delete image_file.bin"); + FILE * delete_image = popen("sudo rm /home/pi/CubeSatSim/image_file.bin", "r"); + pclose(delete_image); + } + } + +#endif + +// printf("Volts: %f %f %f %f \n", voltage[map[BAT]], voltage[map[PLUS_X]] , voltage[map[PLUS_Y]], voltage[map[PLUS_Z]]); +// printf("AmpsPlus: %f %f %f %f \n", current[map[BAT]], current[map[PLUS_X]] , current[map[PLUS_Y]], current[map[PLUS_Z]]); +// printf("AmpsMinus: %f %f %f %f \n", current[map[BAT2]], current[map[MINUS_X]] , current[map[MINUS_Y]], current[map[MINUS_Z]]); + + float xmax = (voltage[map[PLUS_X]] > voltage[map[MINUS_X]]) ? voltage[map[PLUS_X]] : voltage[map[MINUS_X]]; + float ymax = (voltage[map[PLUS_Y]] > voltage[map[MINUS_Y]]) ? voltage[map[PLUS_Y]] : voltage[map[MINUS_Y]]; + float zmax = (voltage[map[PLUS_Z]] > voltage[map[MINUS_Z]]) ? voltage[map[PLUS_Z]] : voltage[map[MINUS_Z]]; + +// printf("Vmax: %f %f %f \n", xmax, ymax, zmax); + + uint16_t x = (uint16_t)(xmax * 1000) & 0x3fff; // 14 bits + uint16_t y = (uint16_t)(ymax * 1000) & 0x3fff; + uint16_t z = (uint16_t)(zmax * 1000) & 0x3fff; + uint16_t b = (uint16_t)(voltage[map[BAT]] * 1000) & 0x3fff; + + uint16_t ix = (uint16_t)((current[map[PLUS_X]] + current[map[MINUS_X]])) & 0x3ff; // 10 bits + uint16_t iy = (uint16_t)((current[map[PLUS_Y]] + current[map[MINUS_Y]])) & 0x3ff; + uint16_t iz = (uint16_t)((current[map[PLUS_Z]] + current[map[MINUS_Z]])) & 0x3ff; + + uint16_t ic = 0; + uint16_t ib = 0; + + if (current[map[BAT]] < 0 ) + ic = (uint16_t)(current[map[BAT]] * (-1)) & 0x3ff; // charging current + else + ib = (uint16_t)(current[map[BAT]]) & 0x3ff; // supplying current + +// printf("X %x Y %x Z %x B %x\n", x, y, z, b); +// printf("iX %x iY %x iZ %x iB %x iC\n", ix, iy, iz, ib, ic); + +#if defined(FC_SIM) || defined(JY_1) + source_bytes[extended + FC_EPS + 0] = 0xff & (x >> 6); // Vx + source_bytes[extended + FC_EPS + 1] = 0xfc & (x << 2); + source_bytes[extended + FC_EPS + 1] = source_bytes[extended + FC_EPS + 1] | (0x03 & (y >> 12)); + source_bytes[extended + FC_EPS + 2] = 0xff & (y >> 2); // Vy + source_bytes[extended + FC_EPS + 3] = 0xf0 & (y << 4); + + source_bytes[extended + FC_EPS + 3] = source_bytes[extended + FC_EPS + 3] | (0x0f & (z >> 10)); + source_bytes[extended + FC_EPS + 4] = 0xff & (z >> 2); // Vz + source_bytes[extended + FC_EPS + 5] = 0xc0 & (z << 6); + + source_bytes[extended + FC_EPS + 5] = source_bytes[extended + FC_EPS + 5] | (0x3f & (b >> 8)); + source_bytes[extended + FC_EPS + 6] = 0xff & (b >> 0); // Vb + + source_bytes[extended + FC_EPS + 7] = 0xff & (ix >> 2); // ix + source_bytes[extended + FC_EPS + 8] = 0xc0 & (iy << 6); // iy + + source_bytes[extended + FC_EPS + 8] = source_bytes[extended + FC_EPS + 8] | (0x3f & (iy >> 4)); + source_bytes[extended + FC_EPS + 9] = 0xf0 & (iy << 4); + + source_bytes[extended + FC_EPS + 9] = source_bytes[extended + FC_EPS + 9] | (0x0f & (iz >> 6)); + source_bytes[extended + FC_EPS + 10] = 0x3f & (iz << 2); // iz + + source_bytes[extended + FC_EPS + 10] = source_bytes[extended + FC_EPS + 10] | (0x03 & (ic >> 8)); + source_bytes[extended + FC_EPS + 11] = 0xff & (ic << 0); // ic battery charging curent + + source_bytes[extended + FC_EPS + 12] = 0xff & (ib >> 2); // ib battery discharging current + source_bytes[extended + FC_EPS + 13] = 0xc0 & (ib << 6); + + source_bytes[extended + FC_EPS + 13] = source_bytes[extended + FC_EPS + 13] | 0x3f & (((unsigned long int)reset_count) >> 2); + source_bytes[extended + FC_EPS + 14] = 0xff & (((unsigned long int)reset_count) << 6); // reset count + + uint8_t temp = (int)(other[IHU_TEMP] + 0.5); + + source_bytes[extended + FC_EPS + 17] = source_bytes[extended + FC_EPS + 17] | 0x3f & (temp >> 2); // cpu temp + source_bytes[extended + FC_EPS + 18] = 0xff & (temp << 6); + + source_bytes[extended + 48] = 0x0c; // Antenna 1 and 2 deployed + + source_bytes[extended + 49] = 0xff & ((unsigned long int)sequence >> 16); // sequence number + source_bytes[extended + 50] = 0xff & ((unsigned long int)sequence >> 8); + source_bytes[extended + 51] = 0xff & (unsigned long int)sequence++; + + uint16_t groundCommandCount = 0; + FILE * command_count_file = fopen("/home/pi/CubeSatSim/command_count.txt", "r"); + if (command_count_file != NULL) { + char count_string[10]; + if ( (fgets(count_string, 10, command_count_file)) != NULL) + groundCommandCount = (uint16_t) atoi(count_string); + else + printf("command_count.txt is invalid\n"); + } else + printf("Error opening command_count.txt!\n"); + fclose(command_count_file); + +// source_bytes[extended + 52] = 0xfc & (groundCommandCount << 2); // command doesn't work + + source_bytes[extended + 53] = 0x0f; // SW valid + source_bytes[extended + 54] = 0xe0; // SW valid + + if ((ix + iy + iz) < 4) + source_bytes[extended + 54] = source_bytes[extended + 54] | 0x10; // eclipse + if (SafeMode == 1) + source_bytes[extended + 54] = source_bytes[extended + 54] | 0x08; // safe mode +#endif + +#ifdef FC_EM + source_bytes[FC_EPS + 0] = 0xff & (((unsigned int)((voltage[map[PLUS_X]] + voltage[map[MINUS_X]]) * 1000) >> 8)); // mV + source_bytes[FC_EPS + 1] = 0xff & ((unsigned int)((voltage[map[PLUS_X]] + voltage[map[MINUS_X]]) * 1000)); + source_bytes[FC_EPS + 2] = 0xff & (((unsigned int)((voltage[map[PLUS_Y]] + voltage[map[MINUS_Y]]) * 1000) >> 8)); // mV + source_bytes[FC_EPS + 3] = 0xff & ((unsigned int)((voltage[map[PLUS_Y]] + voltage[map[MINUS_Y]]) * 1000)); + source_bytes[FC_EPS + 4] = 0xff & (((unsigned int)((voltage[map[PLUS_Z]] + voltage[map[MINUS_Z]]) * 1000) >> 8)); // mV + source_bytes[FC_EPS + 5] = 0xff & ((unsigned int)((voltage[map[PLUS_Z]] + voltage[map[MINUS_Z]]) * 1000)); + unsigned int total_solar_current = (unsigned int) (current[map[PLUS_X]] + current[map[MINUS_X]] + + current[map[PLUS_Y]] + current[map[MINUS_Y]] + + current[map[PLUS_Z]] + current[map[MINUS_Z]]); + source_bytes[FC_EPS + 6] = 0xff & total_solar_current >> 8; + source_bytes[FC_EPS + 7] = 0xff & total_solar_current; + source_bytes[FC_EPS + 8] = 0xff & (((unsigned int)(voltage[map[BAT]] * 1000) >> 8)); // mV + source_bytes[FC_EPS + 9] = 0xff & ((unsigned int)(voltage[map[BAT]] * 1000)); + source_bytes[FC_EPS + 10] = 0xff & (((unsigned int)(current[map[BAT]] * 1) >> 8)); // mA + source_bytes[FC_EPS + 11] = 0xff & ((unsigned int)(current[map[BAT]] * 1)); + source_bytes[FC_EPS + 12] = 0xff & (((unsigned long int)reset_count >> 8)); + source_bytes[FC_EPS + 13] = 0xff & ((unsigned long int)reset_count); + + source_bytes[FC_SW + 0] = 0xff & ((unsigned long int)sequence >> 16); // Sequence number + source_bytes[FC_SW + 1] = 0xff & ((unsigned long int)sequence >> 8); + source_bytes[FC_SW + 2] = 0xff & (unsigned long int)sequence++; + +#endif + +/**/ + printf("\nsource_bytes\n"); + for (int i=0; i<256; i++) + printf("%x ", source_bytes[i]); + printf("\n\n"); +/**/ + + /* convert data buffer into stream buffer */ + + const unsigned char* encoded_bytes = encode(source_bytes, byte_count); +/* + printf("\nencoded_bytes\n"); + for (int i=0; i<5200; i++) + printf("%d", encoded_bytes[i]); + printf("\n\n"); +*/ + /* convert to waveform buffer */ + + int data; + int val; + int i; + ctr = 0; + int symbol = 0; + smaller = (int) (S_RATE / (2 * freq_Hz)); +// printf("\n\nsmaller = %d \n\n",smaller); + + for (i = 1; i <= headerLen * samples; i++) { + write_wave(ctr, buffer); + if ((i % samples) == 0) { + phase *= -1; + if ((ctr - smaller) > 0) { + int j; + for (j = 1; j <= smaller; j++) { + buffer[ctr - j] = buffer[ctr - j] * 0.5; +// if (ctr < 1000) printf("# %d %d\n", ctr - j, buffer[ctr - j]); + } + } + flip_ctr = ctr; + } + } + + for (i = 1; i <= syncBits * samples; i++) { + write_wave(ctr, buffer); + // printf("%d ",ctr); + if ((i % samples) == 0) { + int bit = syncBits - i / samples + 1; + val = syncWord; + data = val & 1 << (bit - 1); +// printf ("--- %d i: %d sync bit %d = %d \n", +// ctr, i, bit, (data > 0) ); + if (data == 0) { + phase *= -1; + if ((ctr - smaller) > 0) { + int j; + for (j = 1; j <= smaller; j++) + buffer[ctr - j] = buffer[ctr - j] * 0.5; + } + flip_ctr = ctr; + } + } + } + + for (i = 1; i <= (dataLen * samples); i++) // 5200 + { + write_wave(ctr, buffer); + if ((i % samples) == 0) { + symbol = i / samples - 1; +// if (i < 100) printf("symbol = %d\n",symbol); + data = encoded_bytes[symbol]; + if (data == 0) { + phase *= -1; + if ((ctr - smaller) > 0) { + int j; + for (j = 1; j <= smaller; j++) { + buffer[ctr - j] = buffer[ctr - j] * 0.5; +// if (ctr < 1000) printf("# %d %d\n", ctr - j, buffer[ctr - j]); + } + } + flip_ctr = ctr; + } + } + } +// printf("symbol = %d\n",symbol); +// printf("\nctr = %d\n\n", ctr); + +// socket_send((((headerLen + syncBits + dataLen) * samples) * 2) + 2); + socket_send(ctr); + + if (!transmit) { + fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); + fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); + } + + int startSleep = millis(); + if ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(1.0); + while ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(0.1); + printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, millis() - sampleTime); + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); +} + +void socket_send(int length) { + + printf("Socket_send!\n"); + fflush(stdout); + int error = 0; + + if (!socket_open && transmit) { // open socket if not open + printf("Opening socket!\n"); + // struct sockaddr_in address; + // int valread; + struct sockaddr_in serv_addr; + // char *hello = "Hello from client"; + // char buffer[1024] = {0}; + // error_count = 0; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + printf("\n Socket creation error \n"); + error = 1; + } + + memset( & serv_addr, '0', sizeof(serv_addr)); + + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(PORT); + + // Convert IPv4 and IPv6 addresses from text to binary form + if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { + printf("\nInvalid address/ Address not supported \n"); + error = 1; + } + + if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { + printf("\nConnection Failed \n"); + printf("Error: %s\n", strerror(errno)); + fflush(stdout); + error = 1; + sleep(1); + + // try again + error = 0; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + printf("\n Socket creation error \n"); + error = 1; + } + + memset( & serv_addr, '0', sizeof(serv_addr)); + + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(PORT); + + // Convert IPv4 and IPv6 addresses from text to binary form + if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { + printf("\nInvalid address/ Address not supported \n"); + error = 1; + } + + if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { + printf("\nConnection Failed \n"); + printf("Error: %s\n", strerror(errno)); + fflush(stdout); + error = 1; + sleep(1); + } + } + if (error == 1) { + printf("Socket error count: %d\n", error_count); +// ; //transmitStatus = -1; + if (error_count++ > 5) { + printf("Restarting transmit\n"); + fflush(stdout); + FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); + pclose(transmit_restartf); + sleep(10); // was 5 // sleep if socket connection refused + } + } + else { + socket_open = 1; + error_count = 0; + } + } + +/* write waveform buffer over socket */ + +// int length = (((headerLen + syncBits + dataLen) * samples) * 2) + 2; // ctr * 2 + 2 like bpsk due to 2 bytes per sample. + length = length * 2 + 2; // convert from samples to bytes +// printf("length in bytes: %d\n", length); + + if (!error && transmit) { + // printf("Sending %d buffer bytes over socket after %d ms!\n", ctr, (long unsigned int)millis() - start); + start = millis(); + int sock_ret = send(sock, buffer, length, 0); + printf("socket send 1 %d ms bytes: %d \n\n", (unsigned int)millis() - start, sock_ret); + fflush(stdout); + + if (sock_ret < length) { + // printf("Not resending\n"); + sleep(0.5); + sock_ret = send(sock, &buffer[sock_ret], length - sock_ret, 0); +// printf("socket send 2 %d ms bytes: %d \n\n", millis() - start, sock_ret); + } + +// loop_count++; + + if (sock_ret == -1) { + printf("Error: %s \n", strerror(errno)); + socket_open = 0; + } + } + +/* + if (!transmit) { + fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); + fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); + } + + int startSleep = millis(); + if ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(1.0); + while ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(0.1); + printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, millis() - sampleTime); + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); + */ + + if (socket_open == 1) + firstTime = 0; +} + +int pi_sensors(char *buffer) +{ + char sensor_buffer[1000]; + FILE *sensor_read; + + strcpy(buffer, "OK BME280 "); + + sensor_read = sopen("/home/pi/raspberry-pi-bme280/bme280"); // read BME if present + fgets(sensor_buffer, 1000, sensor_read); + fprintf(stderr, "bme result: %s\n", sensor_buffer); + fclose(sensor_read); + if (sensor_buffer[strlen(sensor_buffer) - 1] == '\n') + sensor_buffer[strlen(sensor_buffer) - 1] = '\0'; // remove newline at end + strcat(buffer, sensor_buffer); + + strcat(buffer, " MPU6050 "); + + sensor_read = sopen("/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/mpu6050"); // read MPU if present + fgets(sensor_buffer, 1000, sensor_read); + fprintf(stderr, "mpu result: %s\n", sensor_buffer); + fclose(sensor_read); + if (sensor_buffer[strlen(sensor_buffer) - 1] == '\n') + sensor_buffer[strlen(sensor_buffer) - 1] = '\0'; // remove newline at end + strcat(buffer, sensor_buffer); + + fprintf(stderr, "pi_sensors string: %s\n", buffer); + + strcat(buffer, " GPS 0.0 0.0 0.0 TMP 0.0"); // place holders for GPS and diode temp +/* + strcat(buffer, " YPR "); + + sensor_read = sopen("/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/ypr"); // read MPU if present + fgets(sensor_buffer, 1000, sensor_read); + fprintf(stderr, "mpu result: %s\n", sensor_buffer); + fclose(sensor_read); + if (sensor_buffer[strlen(sensor_buffer) - 1] == '\n') + sensor_buffer[strlen(sensor_buffer) - 1] = '\0'; // remove newline at end + strcat(buffer, sensor_buffer); // no need to remove newline at end + + fprintf(stderr, "pi_sensors string: %s\n", buffer); +*/ + if (strncmp(buffer, "OK BME280 0.0 0.0 0.0 0.0 MPU6050 0.0 0.0 0.0 0.0 0.0 0.0 GPS 0.0 0.0 0.0", 57) == 0) + return (0); + else + return (1); +} From 876e1c011de49e6fcf5e18cfb9ca33dde2ba09ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:56:22 -0500 Subject: [PATCH 555/774] Update main.h resolve merge conflicts --- main.h | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 155 insertions(+), 14 deletions(-) diff --git a/main.h b/main.h index 068d45d6..dfa37b2e 100644 --- a/main.h +++ b/main.h @@ -13,6 +13,7 @@ #include #include //#include "TelemEncoding.h" +#include "codecAO40.h" #include #include #include @@ -38,26 +39,35 @@ #define PRES 3 #define ALT 4 #define HUMI 5 -#define GYRO_X 7 // MPU6050 is posisition 6 +#define GYRO_X 7 // MPU6050 label is posisition 6 #define GYRO_Y 8 #define GYRO_Z 9 #define ACCEL_X 10 #define ACCEL_Y 11 #define ACCEL_Z 12 -#define GPS1 14 // GPS is position 13 -#define GPS2 15 -#define GPS3 16 -#define DTEMP 18 // TMP is position 17 +#define GPS 13 // GPS label +#define GPS1 14 // latitude +#define GPS2 15 // longitude +#define GPS3 16 // altitude +#define DTEMP 18 // TMP label is position 17 #define XS1 20 // NEW user defined token will be position 19 #define XS2 21 #define XS3 22 -#define SENSOR_FIELDS 26 +#define NEW_SENSOR_FIELDS_MAX 6 +#define SENSOR_FIELDS (26 + 6) +#define FC_EPS 1 +#define FC_BOB 25 +#define FC_SW 50 +#define FC_PAYLOAD 55 +#define X 0 +#define Y 1 +#define Z 2 #define RSSI 0 #define IHU_TEMP 2 #define SPIN 1 -#define OFF - 1 +#define OFF -1 #define ON 1 #define CHECK 0 #define DISABLED 0 @@ -68,14 +78,12 @@ uint32_t tx_freq_hz = 434900000 + FREQUENCY_OFFSET; uint8_t data[1024]; uint32_t tx_channel = 0; -ax5043_conf_t hax5043; -ax25_conf_t hax25; - int twosToInt(int val, int len); float toAprsFormat(float input); float rnd_float(double min, double max); void get_tlm(); void get_tlm_fox(); +void get_tlm_fc(); int encodeA(short int * b, int index, int val); int encodeB(short int * b, int index, int val); void config_x25(); @@ -86,12 +94,16 @@ void update_rs(unsigned char parity[32], unsigned char c); void write_little_endian(unsigned int word, int num_bytes, FILE *wav_file); static int init_rf(); extern int Encode_8b10b[][256]; +extern const unsigned char ALPHA_TO[]; +// const unsigned char *CCodecAO40::encode(unsigned char *source_bytes, int byte_count); void program_radio(); +void socket_send(int length); int socket_open = 0; int sock = 0; int loop = -1, loop_count = 0; int firstTime = ON; // 0; +int secondTime = ON; long start; int testCount = 0; long time_start; @@ -100,6 +112,9 @@ FILE * file1; short int buffer[2336400]; // max size for 10 frames count of BPSK FILE *sopen(const char *program); FILE *telem_file; +long int sequence = 0; +int image_id = 0; +FILE *image_file; #define S_RATE (48000) // (44100) @@ -108,11 +123,28 @@ FILE *telem_file; #define BPSK 3 #define SSTV 4 #define CW 5 +#define FC 6 +#define REPEATER 7 #define PACSAT 8 #define REPEATER 11 #define TXCOMMAND 12 #define PACSATGND 13 +#define FAIL_COUNT 11 +#define FAIL_NONE -1 +#define FAIL_UNPLUG 1 +#define FAIL_SOLAR 2 +#define FAIL_DEGRADE 3 +#define FAIL_SHORT 4 +#define FAIL_I2C1 5 +#define FAIL_I2C3 6 +#define FAIL_CAMERA 7 +#define FAIL_PAYLOAD 8 +#define FAIL_BME 9 +#define FAIL_MPU 10 +#define FAIL_AUDIO 11 +int failureMode = FAIL_NONE; + int transmitStatus = -1; float amplitude; // = ; // 20000; // 32767/(10%amp+5%amp+100%amp) @@ -137,6 +169,8 @@ long int uptime; char call[5]; char sim_yes[10]; char hab_yes[10]; +char fail_yes[10]; +int fail_time = 60; int squelch = 3; // default squelch char rx[12], tx[12]; int tx_pl = 0; @@ -147,16 +181,16 @@ float sleepTime; unsigned int sampleTime = 0; int frames_sent = 0; int cw_id = ON; -int vB4 = FALSE, vB5 = FALSE, vB3 = FALSE, ax5043 = FALSE, transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF; +int transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF; // float voltageThreshold = 3.6, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100; -float voltageThreshold = 3.5, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100; +float voltageThreshold = 3.50, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100; float latitude = 39.027702f, longitude = -77.078064f; float lat_file, long_file; double cpuTemp; int frameTime; long int newGpsTime; -float axis[3], angle[3], volts_max[3], amps_max[3], batt, speed, period, tempS, temp_max, temp_min, eclipse; +float axis[3], angle[3], volts_max[3], amps_max[3], batt, speed, period, tempS, temp_max, temp_min, eclipse, atmosphere, tempP, altSP, presP, altGP, humiP, changeP; int i2c_bus0 = OFF, i2c_bus1 = OFF, i2c_bus3 = OFF, camera = OFF, sim_mode = FALSE, SafeMode = FALSE; int rxAntennaDeployed = 0, txAntennaDeployed = 0, c2cStatus = 0; int sim_config = FALSE; // sim mode not set by configuration @@ -164,11 +198,12 @@ double eclipse_time; float voltage[9], current[9], sensor[SENSOR_FIELDS], other[3]; char sensor_payload[500]; +char sensor_string[SENSOR_FIELDS][32]; int test_i2c_bus(int bus); //const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/python/voltcurrent.py "; -const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/ina219.py "; +const char pythonCmd[] = "/home/pi/venv/bin/python3 -u /home/pi/CubeSatSim/ina219.py "; char pythonStr[100], pythonConfigStr[100], busStr[10]; int map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; char src_addr[5] = ""; @@ -200,8 +235,114 @@ int pi_zero_2_offset = 0; int hab_mode = FALSE; +int fail_rnd_mode = FALSE; int battery_saver_mode = FALSE; long int loopTime; +long int failTime = 0; +int gps_status = OFF; int error_count = 0; int groundCommandCount = 0; + + unsigned char m_RS_block[RSBLOCKS][NROOTS]; /* RS parity blocks */ + unsigned char m_encoded[SYMPBLOCK] ; /* encoded symbols */ + int m_encoded_bytes; /* Byte counter for encode_data() */ + int m_ileaver_index; /* Byte counter for interleaver */ + unsigned char m_conv_sr; /* Convolutional encoder shift register state */ + +void sensor_setup(); // defined in sensor_extension.c +int sensor_loop(char *sensor_buffer); // defined in sensor_extension.c +int pi_sensors(char *buffer); // used to read BME and MPU sensor if connected to Pi + +// from funcubeLib/common/fecConstants.h + +const unsigned char RS_poly[] = { + 249, 59, 66, 4, 43,126,251, 97, 30, 3,213, 50, 66,170, 5, 24 +}; + +/* Tables for RS decoder */ +/* Galois field log/antilog tables */ +const unsigned char ALPHA_TO[] = +{ + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x87, 0x89, 0x95, 0xad, 0xdd, 0x3d, 0x7a, 0xf4, + 0x6f, 0xde, 0x3b, 0x76, 0xec, 0x5f, 0xbe, 0xfb, 0x71, 0xe2, 0x43, 0x86, 0x8b, 0x91, 0xa5, 0xcd, + 0x1d, 0x3a, 0x74, 0xe8, 0x57, 0xae, 0xdb, 0x31, 0x62, 0xc4, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, 0x67, + 0xce, 0x1b, 0x36, 0x6c, 0xd8, 0x37, 0x6e, 0xdc, 0x3f, 0x7e, 0xfc, 0x7f, 0xfe, 0x7b, 0xf6, 0x6b, + 0xd6, 0x2b, 0x56, 0xac, 0xdf, 0x39, 0x72, 0xe4, 0x4f, 0x9e, 0xbb, 0xf1, 0x65, 0xca, 0x13, 0x26, + 0x4c, 0x98, 0xb7, 0xe9, 0x55, 0xaa, 0xd3, 0x21, 0x42, 0x84, 0x8f, 0x99, 0xb5, 0xed, 0x5d, 0xba, + 0xf3, 0x61, 0xc2, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, + 0x47, 0x8e, 0x9b, 0xb1, 0xe5, 0x4d, 0x9a, 0xb3, 0xe1, 0x45, 0x8a, 0x93, 0xa1, 0xc5, 0x0d, 0x1a, + 0x34, 0x68, 0xd0, 0x27, 0x4e, 0x9c, 0xbf, 0xf9, 0x75, 0xea, 0x53, 0xa6, 0xcb, 0x11, 0x22, 0x44, + 0x88, 0x97, 0xa9, 0xd5, 0x2d, 0x5a, 0xb4, 0xef, 0x59, 0xb2, 0xe3, 0x41, 0x82, 0x83, 0x81, 0x85, + 0x8d, 0x9d, 0xbd, 0xfd, 0x7d, 0xfa, 0x73, 0xe6, 0x4b, 0x96, 0xab, 0xd1, 0x25, 0x4a, 0x94, 0xaf, + 0xd9, 0x35, 0x6a, 0xd4, 0x2f, 0x5e, 0xbc, 0xff, 0x79, 0xf2, 0x63, 0xc6, 0x0b, 0x16, 0x2c, 0x58, + 0xb0, 0xe7, 0x49, 0x92, 0xa3, 0xc1, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0xc7, 0x09, 0x12, 0x24, + 0x48, 0x90, 0xa7, 0xc9, 0x15, 0x2a, 0x54, 0xa8, 0xd7, 0x29, 0x52, 0xa4, 0xcf, 0x19, 0x32, 0x64, + 0xc8, 0x17, 0x2e, 0x5c, 0xb8, 0xf7, 0x69, 0xd2, 0x23, 0x46, 0x8c, 0x9f, 0xb9, 0xf5, 0x6d, 0xda, + 0x33, 0x66, 0xcc, 0x1f, 0x3e, 0x7c, 0xf8, 0x77, 0xee, 0x5b, 0xb6, 0xeb, 0x51, 0xa2, 0xc3, 0x00, +}; + +const unsigned char INDEX_OF[]= +{ + 0xff, 0x00, 0x01, 0x63, 0x02, 0xc6, 0x64, 0x6a, 0x03, 0xcd, 0xc7, 0xbc, 0x65, 0x7e, 0x6b, 0x2a, + 0x04, 0x8d, 0xce, 0x4e, 0xc8, 0xd4, 0xbd, 0xe1, 0x66, 0xdd, 0x7f, 0x31, 0x6c, 0x20, 0x2b, 0xf3, + 0x05, 0x57, 0x8e, 0xe8, 0xcf, 0xac, 0x4f, 0x83, 0xc9, 0xd9, 0xd5, 0x41, 0xbe, 0x94, 0xe2, 0xb4, + 0x67, 0x27, 0xde, 0xf0, 0x80, 0xb1, 0x32, 0x35, 0x6d, 0x45, 0x21, 0x12, 0x2c, 0x0d, 0xf4, 0x38, + 0x06, 0x9b, 0x58, 0x1a, 0x8f, 0x79, 0xe9, 0x70, 0xd0, 0xc2, 0xad, 0xa8, 0x50, 0x75, 0x84, 0x48, + 0xca, 0xfc, 0xda, 0x8a, 0xd6, 0x54, 0x42, 0x24, 0xbf, 0x98, 0x95, 0xf9, 0xe3, 0x5e, 0xb5, 0x15, + 0x68, 0x61, 0x28, 0xba, 0xdf, 0x4c, 0xf1, 0x2f, 0x81, 0xe6, 0xb2, 0x3f, 0x33, 0xee, 0x36, 0x10, + 0x6e, 0x18, 0x46, 0xa6, 0x22, 0x88, 0x13, 0xf7, 0x2d, 0xb8, 0x0e, 0x3d, 0xf5, 0xa4, 0x39, 0x3b, + 0x07, 0x9e, 0x9c, 0x9d, 0x59, 0x9f, 0x1b, 0x08, 0x90, 0x09, 0x7a, 0x1c, 0xea, 0xa0, 0x71, 0x5a, + 0xd1, 0x1d, 0xc3, 0x7b, 0xae, 0x0a, 0xa9, 0x91, 0x51, 0x5b, 0x76, 0x72, 0x85, 0xa1, 0x49, 0xeb, + 0xcb, 0x7c, 0xfd, 0xc4, 0xdb, 0x1e, 0x8b, 0xd2, 0xd7, 0x92, 0x55, 0xaa, 0x43, 0x0b, 0x25, 0xaf, + 0xc0, 0x73, 0x99, 0x77, 0x96, 0x5c, 0xfa, 0x52, 0xe4, 0xec, 0x5f, 0x4a, 0xb6, 0xa2, 0x16, 0x86, + 0x69, 0xc5, 0x62, 0xfe, 0x29, 0x7d, 0xbb, 0xcc, 0xe0, 0xd3, 0x4d, 0x8c, 0xf2, 0x1f, 0x30, 0xdc, + 0x82, 0xab, 0xe7, 0x56, 0xb3, 0x93, 0x40, 0xd8, 0x34, 0xb0, 0xef, 0x26, 0x37, 0x0c, 0x11, 0x44, + 0x6f, 0x78, 0x19, 0x9a, 0x47, 0x74, 0xa7, 0xc1, 0x23, 0x53, 0x89, 0xfb, 0x14, 0x5d, 0xf8, 0x97, + 0x2e, 0x4b, 0xb9, 0x60, 0x0f, 0xed, 0x3e, 0xe5, 0xf6, 0x87, 0xa5, 0x17, 0x3a, 0xa3, 0x3c, 0xb7, +}; + +/* 8-bit parity table */ +const unsigned char Partab[] = { + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, +}; + +/* Scramble byte table */ +const unsigned char Scrambler[]= +{ + 0xff, 0x48, 0x0e, 0xc0, 0x9a, 0x0d, 0x70, 0xbc, 0x8e, 0x2c, 0x93, 0xad, 0xa7, 0xb7, 0x46, 0xce, + 0x5a, 0x97, 0x7d, 0xcc, 0x32, 0xa2, 0xbf, 0x3e, 0x0a, 0x10, 0xf1, 0x88, 0x94, 0xcd, 0xea, 0xb1, + 0xfe, 0x90, 0x1d, 0x81, 0x34, 0x1a, 0xe1, 0x79, 0x1c, 0x59, 0x27, 0x5b, 0x4f, 0x6e, 0x8d, 0x9c, + 0xb5, 0x2e, 0xfb, 0x98, 0x65, 0x45, 0x7e, 0x7c, 0x14, 0x21, 0xe3, 0x11, 0x29, 0x9b, 0xd5, 0x63, + 0xfd, 0x20, 0x3b, 0x02, 0x68, 0x35, 0xc2, 0xf2, 0x38, 0xb2, 0x4e, 0xb6, 0x9e, 0xdd, 0x1b, 0x39, + 0x6a, 0x5d, 0xf7, 0x30, 0xca, 0x8a, 0xfc, 0xf8, 0x28, 0x43, 0xc6, 0x22, 0x53, 0x37, 0xaa, 0xc7, + 0xfa, 0x40, 0x76, 0x04, 0xd0, 0x6b, 0x85, 0xe4, 0x71, 0x64, 0x9d, 0x6d, 0x3d, 0xba, 0x36, 0x72, + 0xd4, 0xbb, 0xee, 0x61, 0x95, 0x15, 0xf9, 0xf0, 0x50, 0x87, 0x8c, 0x44, 0xa6, 0x6f, 0x55, 0x8f, + 0xf4, 0x80, 0xec, 0x09, 0xa0, 0xd7, 0x0b, 0xc8, 0xe2, 0xc9, 0x3a, 0xda, 0x7b, 0x74, 0x6c, 0xe5, + 0xa9, 0x77, 0xdc, 0xc3, 0x2a, 0x2b, 0xf3, 0xe0, 0xa1, 0x0f, 0x18, 0x89, 0x4c, 0xde, 0xab, 0x1f, + 0xe9, 0x01, 0xd8, 0x13, 0x41, 0xae, 0x17, 0x91, 0xc5, 0x92, 0x75, 0xb4, 0xf6, 0xe8, 0xd9, 0xcb, + 0x52, 0xef, 0xb9, 0x86, 0x54, 0x57, 0xe7, 0xc1, 0x42, 0x1e, 0x31, 0x12, 0x99, 0xbd, 0x56, 0x3f, + 0xd2, 0x03, 0xb0, 0x26, 0x83, 0x5c, 0x2f, 0x23, 0x8b, 0x24, 0xeb, 0x69, 0xed, 0xd1, 0xb3, 0x96, + 0xa5, 0xdf, 0x73, 0x0c, 0xa8, 0xaf, 0xcf, 0x82, 0x84, 0x3c, 0x62, 0x25, 0x33, 0x7a, 0xac, 0x7f, + 0xa4, 0x07, 0x60, 0x4d, 0x06, 0xb8, 0x5e, 0x47, 0x16, 0x49, 0xd6, 0xd3, 0xdb, 0xa3, 0x67, 0x2d, + 0x4b, 0xbe, 0xe6, 0x19, 0x51, 0x5f, 0x9f, 0x05, 0x08, 0x78, 0xc4, 0x4a, 0x66, 0xf5, 0x58, 0xff, + 0x48, 0x0e, 0xc0, 0x9a, 0x0d, 0x70, 0xbc, 0x8e, 0x2c, 0x93, 0xad, 0xa7, 0xb7, 0x46, 0xce, 0x5a, + 0x97, 0x7d, 0xcc, 0x32, 0xa2, 0xbf, 0x3e, 0x0a, 0x10, 0xf1, 0x88, 0x94, 0xcd, 0xea, 0xb1, 0xfe, + 0x90, 0x1d, 0x81, 0x34, 0x1a, 0xe1, 0x79, 0x1c, 0x59, 0x27, 0x5b, 0x4f, 0x6e, 0x8d, 0x9c, 0xb5, + 0x2e, 0xfb, 0x98, 0x65, 0x45, 0x7e, 0x7c, 0x14, 0x21, 0xe3, 0x11, 0x29, 0x9b, 0xd5, 0x63, 0xfd, +}; From 04dda2aadfcef2fe3f52aae88521b2bf76cabc11 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 15:56:29 -0500 Subject: [PATCH 556/774] Update transmit.py resolve merge conflicts --- transmit.py | 737 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 456 insertions(+), 281 deletions(-) diff --git a/transmit.py b/transmit.py index 602dd3cd..57feed85 100644 --- a/transmit.py +++ b/transmit.py @@ -3,13 +3,99 @@ import RPi.GPIO as GPIO from RPi.GPIO import output #import subprocess -#import time +import time from time import sleep #import os import sys from os import system +from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor import serial +import random +import subprocess + +def output(pin, value): + if (pin != 20): + command = "gpio -g write " + str(pin) + " " + str(value) + system(command) + print(command) + else: # ptt pin + GPIO.output(pin, value) + +def input(pin): + # command = "gpio -g read " + str(pin) + query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + print("Sucess!") + print(f"Output of the command (stdout): {result.stdout}") + return int(result.stdout) + except subprocess.CalledProcessError as e: + print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + print(f"Output of the command (stdout): {e.stdout}") + print(f"Error output of the command (stderr): {e.stderr}") + return -1 + +def setup(pin, config): + if config == "in" or config == "out" or config == "up" or config == "down": + if (pin != 20): + command = "gpio -g mode " + str(pin) + " " + config + system(command) + print(command) + else: # ptt pin + GPIO.setwarnings(False) + GPIO.setmode(GPIO.BCM) + if config == "out: + GPIO.setup(27, GPIO.OUT) + else: + GPIO.setup(27, GPIO.IN) + else: + print(f"Unknown GPIO setup configuration: {config}") + +def blink(times): + powerPin = 16 + for i in range(times): + system("gpio -g write " + str(powerPin) + " 0") # blink two times + sleep(0.1) + system("gpio -g write " + str(powerPin) + " 1") + sleep(0.1) + +def sim_failure_check(): + try: + global card + global cam_fail + global sim_mode + global sim_config + cam_fail = False + file = open("/home/pi/CubeSatSim/failure_mode.txt") + fail_mode = int(file.read(2)) +# print("Fail_mode: ") +# print(fail_mode) + if (fail_mode == 11): + card = "Device" # Change audio so no FM audio plays + print("Failure mode no FM audio") + sim_mode = True + elif (fail_mode == 7): + cam_fail = True + print("Failure mode camera fail") + sim_mode = True + card = "Headphones" + elif (fail_mode == -1): + print("No failure mode") + card = "Headphones" + if sim_config: + sim_mode = True + else: + print("Other failure mode") + card = "Headphones" + sim_mode = True + except: + print("No failure mode") + card = "Headphones" + if sim_config: + sim_mode = True def battery_saver_check(): try: @@ -22,6 +108,14 @@ def battery_saver_check(): except: print("battery saver not activated") # txc = True + +def blink(times): + powerPin = 16 + for i in range(times): + output(powerPin, 0) # blink + sleep(0.1) + output(powerPin, 1) + sleep(0.1) def increment_mode(): print("increment mode") @@ -38,76 +132,26 @@ def increment_mode(): print(mode) if (mode == 'a'): mode = 'f' - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(2) sleep(2.5) elif (mode == 'f'): mode = 'b' - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(3) sleep(2.5) elif (mode == 'b'): mode = 's' - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(4) sleep(2.5) elif (mode == 's'): mode = 'm' - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(5) sleep(2.5) else: mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) + blink(1) sleep(2.5) try: @@ -117,13 +161,13 @@ def increment_mode(): file.close() print(".mode file written") - GPIO.setwarnings(False) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) +# GPIO.setwarnings(False) + output(txLed, 0) + output(powerPin, 0) print("sudo reboot -h now") - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.output(powerPin, 0); +# GPIO.setwarnings(False) + setup(powerPin, "out") + output(powerPin, 0); # system("reboot -h now") # release = True; @@ -135,8 +179,57 @@ def increment_mode(): except: print("can't write to .mode file") +def camera_photo(): + global cam_fail + global os_status + sim_failure_check() + system("sudo rm /home/pi/CubeSatSim/camera_out.jpg") + stored_image = False + try: + if os_status == "bookworm": + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + else: + system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + f = open("/home/pi/CubeSatSim/camera_out.jpg") + f.close() + print("Photo taken") + if (cam_fail == True): + system("cp /home/pi/CubeSatSim/sstv//sstv_image_2_320_x_256.jpeg /home/pi/CubeSatSim/camera_out.jpg") + print("Using stored image") + stored_image = True + except: + system("cp /home/pi/CubeSatSim/sstv//sstv_image_2_320_x_256.jpeg /home/pi/CubeSatSim/camera_out.jpg") + print("Using stored image") + stored_image = True + if (stored_image == False): + file='/home/pi/CubeSatSim/camera_out.jpg' + font1 = ImageFont.truetype('DejaVuSerif.ttf', 20) + font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 16) + + try: + filep = open("/home/pi/CubeSatSim/telem_string.txt") + telem_string = filep.readline() + except: + telem_string = "" + if (debug_mode == 1): + print("Can't read telem_string.txt") + print(telem_string) + + img = Image.open(file) + draw = ImageDraw.Draw(img) + # draw.text((10, 10), callsign, font=font2, fill='white') + # draw.text((120, 10), telem_string, font=font2, fill='white') + draw.text((12, 12), callsign, font=font1, fill='black') + draw.text((10, 10), callsign, font=font1, fill='white') + draw.text((112, 12), telem_string, font=font2, fill='black') # was 122 + draw.text((110, 10), telem_string, font=font2, fill='white') # was 120 + img.save(file) -print("CubeSatSim v2.1 transmit.py starting...") + return True + else: + return False + +print("CubeSatSim v2.2 transmit.py starting...") pd = 21 ptt = 20 @@ -147,20 +240,18 @@ powerPin = 16 command_tx = True -GPIO.setmode(GPIO.BCM) -GPIO.setwarnings(False) -GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(green, GPIO.OUT) -GPIO.output(powerPin, 1) +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) +setup(13, "up") +setup(12, "up") +setup(27, "up") +setup(txc_pin, "up") +setup(green, "out") +output(powerPin, 1) transmit = False txLed = 27 -txLedOn = 1 -txLedOff = 0 -if GPIO.input(12) == False: +if input(12) == False: print("LPF present") transmit = True else: @@ -168,38 +259,38 @@ else: # GPIO.setup(txLed, GPIO.OUT) -# output(txLed, txLedOff) +# output(txLed, 0) -GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 -GPIO.setwarnings(False) -GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 +# GPIO.setwarnings(False) +setup(txLed, "out") -GPIO.setup(pd, GPIO.OUT) +setup(pd, "out") #output(pd, 1) output(pd, 0) -GPIO.setup(ptt, GPIO.OUT) +setup(ptt, "out") output (ptt, 1) txc = False -if GPIO.input(txc_pin) == False: +if input(txc_pin) == False: print("TXC is present") txc = True; else: print("TXC not present") # txc = False # forcing it off -output(txLed, txLedOn) +output(txLed, 1) sleep(1) -output(txLed, txLedOff) +output(txLed, 0) battery_saver_check() -# print(txLedOn) +# print(1) print(txLed) # GPIO.setup(27, GPIO.OUT) # GPIO.output(27, 0) -debug_mode = 0 #no debugging transmit +debug_mode = 0 # change to 1 to debug transmit skip = False @@ -218,6 +309,14 @@ if __name__ == "__main__": print(transmit) + uptime_time = 55 # 55 second boot time if Pi Zero + try: + f = open("/home/pi/CubeSatSim/pi_zero2", "r") + f.close() + print("Pi Zero 2 detected!") + uptime_time = 30 # 30 second boot time if Pi Zero 2 + except: + print("Pi Zero 2 not detected") try: system("cat /proc/uptime > /home/pi/CubeSatSim/uptime") @@ -226,14 +325,16 @@ if __name__ == "__main__": print(up) uptime = float(up) print(uptime) - if (uptime < 45): - print("Uptime < 45 seconds") + if (uptime < uptime_time): + print("Uptime < threshold seconds") else: - print("Uptime > 45 seconds") + print("Uptime > threshold seconds") + print("Skip CW ID") skip = True file.close() except: print("Can't open /proc/uptime") + print(skip) if ( mode == "y"): try: @@ -277,29 +378,53 @@ if __name__ == "__main__": rx_value = '0' sq = '0' tx = '434.9000' - rx = '435.0000' + rx = '435.0000' + txr = '144.9000' + sim_mode = False + sim_config = False + hab_mode = False try: file = open("/home/pi/CubeSatSim/sim.cfg") # callsign = file.readline().split(" ")[0] config = file.readline().split() callsign = config[0] + if len(config) > 4: + if config[4] == 'y' or config[4] == 'yes': + sim_mode = True + sim_config = True + print("Simulated telemetry mode is configured") + else: + try: + if path.isfile("/home/pi/CubeSatSim/sim_mode_auto"): + print("Simulated telemetry mode automatically turned on!") + sim_mode = True + sim_config = True + except: + if (debug_mode == 1): + print("/home/pi/CubeSatSim/sim_mode_auto not found") if len(config) > 5: if (mode != 'p') and (mode != 'P'): # squelch off for Pacsat sq = config[5] print(f'squelch: {sq}') if len(config) > 6: - txf = float(config[6]) -# print(txf) -# print( "{:.4f}".format(txf)) - tx = "{:.4f}".format(txf) - print(tx) + txf = float(config[6]) + if (mode == 'e'): + txr = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + tx = "{:.4f}".format(txr) + else: + tx = "{:.4f}".format(txf) + print("Transmit frequency: ",tx) if len(config) > 7: rxf = float(config[7]) # print(rxf) # print( "{:.4f}".format(rxf)) rx = "{:.4f}".format(rxf) print(rx) + if len(config) > 8: + if config[8] == 'y' or config[8] == 'yes': + hab_mode = True + print("Balloon (HAB) mode is configured.") if len(config) > 9: rxpl = float(config[9]) # print(rxpl) @@ -316,11 +441,11 @@ if __name__ == "__main__": print # print(callsign) print(sq) - if sq == '8': - print("squelch set to 8, no command input!") - no_command = True - else: - no_command = False +# if sq == '8': +# print("squelch set to 8, no command input!") +# no_command = True +# else: + no_command = False print(no_command) except: callsign = "AMSAT" @@ -328,92 +453,119 @@ if __name__ == "__main__": print("Can't read callsign from sim.cfg file, defaulting to AMSAT") file.close() - if (mode != 'p') and (mode != 'P'): - try: - f = open("/home/pi/CubeSatSim/command_control", "r") - f.close() - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - 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: + no_command = True + try: + f = open("/home/pi/CubeSatSim/command_control", "r") + f.close() +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) + setup(squelch, "up") ## pull up in case pin is not connected + if input(squelch) == False: + print("squelch not set correctly, no command input!") + else: + if (mode != 'n') and (mode != 'x'): print("command and control is activated") no_command = False - # system("/home/pi/CubeSatSim/command &") system("sudo systemctl start command") - except: - print("command and control not activated") - no_command = True - + else: + 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") + print(callsign) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - print(txLed) - print(txLedOn) - GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# print(txLed) +# print(1) +# setup(txLed, "out") + query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + os_status = result.stdout.strip() + print(f"Output of the command (stdout): {os_status}") + except subprocess.CalledProcessError as e: +# print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + os_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + if os_status != "VERSION_CODENAME=bullseye": + os_status = "bookworm" + else: + os_status = "bullseye" + print (os_status) + card = "Headphones" # default using pcm audio output of Pi Zero # card = "Device" # using USB sound card for audio output - print("Programming FM module!\n"); - output(pd, 1) - output (ptt, 1) + query = ["sudo", "systemctl", "is-active", "gpsd.socket"] try: - ser = serial.Serial("/dev/ttyAMA0", 9600) - print(ser.portstr) -# uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" - uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" - print(uhf_string) - for i in range(6): -# ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") - ser.write(uhf_string.encode()) - sleep(0.1) - ser.close() - ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data - except: - print("Error in serial write") - output(pd, 0) - -# if (mode != 'x') and (skip == False): -# sleep(10) # delay so cubesatsim code catches up - - system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1") - -# command_control_check() - -# if (mode != ) and (command_tx == True): -# if (command_tx == True): - if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False): -# battery_saver_mode - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) -# if (txc): -# output(pd, 1) -# output (ptt, 0) -# sleep(0.1) -# system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") -# sleep(0.1) -# output (ptt, 1) -# output(pd, 0) -# else: - if (True): + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + gpsd_status = result.stdout.strip() + print(f"Output of the command (stdout): {gpsd_status}") + except subprocess.CalledProcessError as e: +# print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + gpsd_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + + if (mode != 'e'): + + if (gpsd_status == "active"): + print("Stopping gpsd.socket") + system("sudo systemctl stop gpsd.socket") + print("Programming FM module!\n"); + output(pd, 1) + output (ptt, 1) + try: + ser = serial.Serial("/dev/ttyAMA0", 9600) + print(ser.portstr) + # uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" + uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" + print(uhf_string) + for i in range(6): + # ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") + ser.write(uhf_string.encode()) + sleep(0.1) + ser.close() + ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data + except: + print("Error in serial write") + output(pd, 0) + if (gpsd_status == "active"): + print("Restarting gpsd.socket") + system("sudo systemctl restart gpsd.socket") + + sim_failure_check() + if (hab_mode == True) and (mode == 'a'): + print("Don't transmit CW ID since APRS HAB mode is active") + else: + if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) + print("Transmit CW ID") + status = "" + if not no_command: + status = status + " C" + if sim_mode: + status = status + " S" if (debug_mode == 1): -# system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3") - system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: -# system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1") - system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + output(txLed, 0) + + sleep(1) + else: + print("Don't transmit CW ID since command_tx is False or APRS mode or change of mode") + - output(txLed, txLedOff) - - sleep(1) - else: - print("Don't transmit CW ID since command_tx is False or APRS mode") - if (transmit): - # print 'Length: ', len(sys.argv) # if (len(sys.argv)) > 1: @@ -451,12 +603,13 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") else: - GPIO.output(powerPin, 0) +# GPIO.output(powerPin, 0) print("Transmit APRS Commands") + system("sudo systemctl stop command") # while True: # sleep(0.1) - if (mode != 'n'): - system("touch /home/pi/CubeSatSim/ready") +# if (mode != 'n'): +# system("touch /home/pi/CubeSatSim/ready") while True: try: @@ -467,20 +620,21 @@ if __name__ == "__main__": system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # output(pd, 1) # output (ptt, 0) # sleep(.1) # # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) sleep(0.1) # add delay before transmit output (ptt, 0) sleep(0.3) # add even more time at start - system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/telem.wav") + system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/telem.wav") sleep(0.2) # add more time at end output (ptt, 1) # output(pd, 0) @@ -494,7 +648,7 @@ if __name__ == "__main__": sleep(0.1) # output (ptt, 1) # output(pd, 0) - output(txLed, txLedOff) + output(txLed, 0) system("sudo rm /home/pi/CubeSatSim/ready") f.close() @@ -502,11 +656,12 @@ if __name__ == "__main__": print("Ready for next packet!") sleep(0.5) + except: # command_control_check() sleep(1) elif (mode == 'm'): - system("touch /home/pi/CubeSatSim/cwready") +# system("touch /home/pi/CubeSatSim/cwready") print("CW") while True: # command_control_check() @@ -523,11 +678,12 @@ if __name__ == "__main__": system(command) ## chan = chan + 1 if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) if (txc): + sim_failure_check() # output (pd, 1) sleep(0.3) output (ptt, 0) @@ -539,8 +695,8 @@ if __name__ == "__main__": if (debug_mode == 1): system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: - system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + output(txLed, 0) # command_control_check() sleep(2) @@ -559,7 +715,10 @@ if __name__ == "__main__": # from pysstv.sstv import SSTV # camera = PiCamera() print("Testing for camera") - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + if os_status == "bookworm": + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + else: + system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Camera present") @@ -571,7 +730,7 @@ if __name__ == "__main__": camera_present = 0 # while 1: - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) if (camera_present == 1): @@ -583,12 +742,13 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav") @@ -600,42 +760,14 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # sleep(1) except: print("image 2 did not load - copy from CubeSatSim/sstv directory") while 1: # command_control_check() - - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1") - print("Photo taken") - - file='/home/pi/CubeSatSim/camera_out.jpg' - font1 = ImageFont.truetype('DejaVuSerif.ttf', 20) - font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 16) - - try: - filep = open("/home/pi/CubeSatSim/telem_string.txt") - telem_string = filep.readline() - except: - telem_string = "" - if (debug_mode == 1): - print("Can't read telem_string.txt") - print(telem_string) - - img = Image.open(file) - draw = ImageDraw.Draw(img) -# draw.text((10, 10), callsign, font=font2, fill='white') -# draw.text((120, 10), telem_string, font=font2, fill='white') - draw.text((12, 12), callsign, font=font1, fill='black') - draw.text((10, 10), callsign, font=font1, fill='white') - draw.text((122, 12), telem_string, font=font2, fill='black') - draw.text((120, 10), telem_string, font=font2, fill='white') - img.save(file) - -# command_control_check() - + camera_photo() system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/camera_out.jpg") system("sudo rm /home/pi/CubeSatSim/camera_out.jpg > /dev/null 2>&1") @@ -643,12 +775,14 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): +# print(card) + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/camera_out.jpg.wav") @@ -660,7 +794,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) @@ -679,13 +813,14 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") @@ -697,7 +832,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(1) @@ -716,12 +851,13 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") @@ -733,7 +869,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(10) @@ -746,13 +882,14 @@ if __name__ == "__main__": if (command_tx == True): # command_control_check() - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv.wav") @@ -761,102 +898,140 @@ if __name__ == "__main__": else: sleep(60) - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(10) - elif (mode == 'b'): + elif (mode == 'b') or (mode == 'j'): # command_control_check() - print("BPSK") + if (mode == 'b'): + print("BPSK") + else: + print("FUNcube") print("turn on FM rx") output(pd, 1) output(ptt, 1) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# setup(txLed, "out") if (command_tx == True): # system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &") system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f " + tx + "e6 -t float &") print("Turning LED on/off and listening for carrier") + image_id = random.randint(0, 255) + print("Initial image_id: " + str(image_id) + "\n") while 1: - output(txLed, txLedOff) +# print ("LED on") + output(txLed, 0) sleep(0.4) # if (command_tx == False): -# output(txLed, txLedOn) +# output(txLed, 1) # sleep(0.03) -# output(txLed, txLedOff) +# output(txLed, 0) # command_control_check() if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # print(txLed) -# print(txLedOn) - sleep(4.2) +# print(1) + + if (mode == 'b'): + sleep(4.2) + else: # FUNcube mode image + for i in range(4): +# print("Checking image_file.bin") + try: + file = open("/home/pi/CubeSatSim/image_file.bin") + file.close() + # image_present = True + sleep(1.0) + except: + # image_present = False + + # if (image_present == False): + start = time.perf_counter() + camera_photo() + system("/home/pi/ssdv/ssdv -e -n -i " + str(image_id) + " -q 3 -J /home/pi/CubeSatSim/camera_out.jpg /home/pi/CubeSatSim/image_file.bin") + print("image_id: " + str(image_id) + "\n") + image_id = ( image_id + 1 ) % 256 + print("new image_id: " + str(image_id) + "\n") + elapsed_time = time.perf_counter() - start + print("Elapsed time: ") + print(elapsed_time) + if (elapsed_time < 9): + sleep(9 - time.perf_counter() + start) + # else: + sleep(0.6) elif (mode == 'e'): # code based on https://zr6aic.blogspot.com/2016/11/creating-2m-fm-repeater-with-raspberry.html - print("Repeater") - print("Stopping command and control") - system("sudo systemctl stop command") + print("Cross Band Repeater Mode") +# print("Stopping command and control") +# system("sudo systemctl stop command") print("turn on FM rx") output(pd, 1) output(ptt, 1) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected - GPIO.output(powerPin, 0) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# setup(txLed, "out") +# GPIO.setup(powerPin, GPIO.OUT) + setup(squelch, "up") ## pull up in case pin is not connected +# GPIO.output(powerPin, 1) # was 0 +# txf = float(tx) - 288.9 +# print("Transmit frequency: ",txf) + if (command_tx != True): + print("Beacon mode off so no repeater transmission") + + print("Ready to detect carrier") while True: - sleep(0.5) - if (GPIO.input(squelch) == False): + if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) -# system("arecord -D plughw:CARD=Device,DEV=0 | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") -## system("arecord -D plughw:CARD=Device,DEV=0 -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 " + tx + "e3 &") - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") - sleep(1) - system("sudo arecord -D plughw:CARD=Device,DEV=0 -r48000 -fS16_LE -c1 | nc localhost 8011 &") - GPIO.output(powerPin, 1) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) - GPIO.output(powerPin, 0) - while (GPIO.input(squelch) == False): + system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") + while (input(squelch) == False): sleep(1) print("No carrier detected, stopping repeater") - output(txLed, txLedOff) + output(txLed, 0) + system("sudo rpitx -i null > /dev/null 2>&1") system("sudo killall -9 arecord > /dev/null 2>&1") system("sudo killall -9 nc > /dev/null 2>&1") system("sudo killall -9 rpitx > /dev/null 2>&1") - + print("Resetting audio") + system("sudo /etc/init.d/alsa-utils stop") + system("sudo /etc/init.d/alsa-utils start") + print("Finished resetting audio") + print("Ready to detect carrier") else: print("FSK") print("turn on FM rx") output(pd, 1) output(ptt, 1) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# setup(txLed, "out") if (command_tx == True): system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") print("Turning LED on/off and listening for carrier") while 1: - output(txLed, txLedOff) + output(txLed, 0) sleep(0.4) # if (command_tx == False): -# output(txLed, txLedOn) +# output(txLed, 1) # sleep(0.03) -# output(txLed, txLedOff) +# output(txLed, 0) # command_control_check() if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # print(txLed) -# print(txLedOn) +# print(1) sleep(4.2) else: print("No Low Pass Filter so no telemetry transmit. See http://cubesatsim.org/wiki for instructions on how to build the LPF.") From ddefdb9d38c71809ad0ea79765cd45c344ff6e57 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:00:06 -0500 Subject: [PATCH 557/774] Update main.h remove redefinitions --- main.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/main.h b/main.h index 058c0012..082f230c 100644 --- a/main.h +++ b/main.h @@ -126,7 +126,6 @@ FILE *image_file; #define FC 6 #define REPEATER 7 #define PACSAT 8 -#define REPEATER 11 #define TXCOMMAND 12 #define PACSATGND 13 @@ -145,21 +144,6 @@ FILE *image_file; #define FAIL_AUDIO 11 int failureMode = FAIL_NONE; -#define FAIL_COUNT 11 -#define FAIL_NONE -1 -#define FAIL_UNPLUG 1 -#define FAIL_SOLAR 2 -#define FAIL_DEGRADE 3 -#define FAIL_SHORT 4 -#define FAIL_I2C1 5 -#define FAIL_I2C3 6 -#define FAIL_CAMERA 7 -#define FAIL_PAYLOAD 8 -#define FAIL_BME 9 -#define FAIL_MPU 10 -#define FAIL_AUDIO 11 -int failureMode = FAIL_NONE; - int transmitStatus = -1; float amplitude; // = ; // 20000; // 32767/(10%amp+5%amp+100%amp) From a05938d7410e4f9707fc6c686e69c56bd6e68ff6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:01:56 -0500 Subject: [PATCH 558/774] Update main.c fix else --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 26bb93ff..87909a07 100644 --- a/main.c +++ b/main.c @@ -518,8 +518,8 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); -// } else if (mode == BPSK) { - } else { + } else if (mode == BPSK) { +//// } else { bitRate = 1200; rsFrames = 3; From f3c4d4b3adb75bed70a9f8b09c3a3204ed255c20 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:04:50 -0500 Subject: [PATCH 559/774] Update main.c remove extra } --- main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.c b/main.c index 87909a07..78ece5ff 100644 --- a/main.c +++ b/main.c @@ -601,8 +601,6 @@ int main(int argc, char * argv[]) { if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored -// get_tlm_fox(); - } else if (mode == FC) // && !sim_mode) get_tlm_fc(); // fill transmit buffer with reset count 0 packets that will be ignored else if (mode == CW) From 39f523fc85a946f1414f92e885683e9a528c879f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:25:12 -0500 Subject: [PATCH 560/774] Update main.c missing PACSAT conditional --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 78ece5ff..39bbdbfe 100644 --- a/main.c +++ b/main.c @@ -518,7 +518,7 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); - } else if (mode == BPSK) { + } else if ((mode == BPSK) || (mode == PACSAT)) { //// } else { bitRate = 1200; From a0ff427c3b29cd33050d8eaa3d9339cb53b1fc7b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:43:19 -0500 Subject: [PATCH 561/774] Update main.c fix extra { --- main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.c b/main.c index 39bbdbfe..a34859e4 100644 --- a/main.c +++ b/main.c @@ -2731,9 +2731,8 @@ if (setting == ON) { FILE *command = popen("rm /home/pi/CubeSatSim/battery_saver", "r"); pclose(command); fprintf(stderr,"Turning Battery saver mode OFF\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { battery_saver_mode = OFF; - if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); From 08ceffde3794e6b81fe2535e4f2042360dda4d6e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:51:17 -0500 Subject: [PATCH 562/774] Update transmit.py fix output duplicate --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 57feed85..bc6f4b7c 100644 --- a/transmit.py +++ b/transmit.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import RPi.GPIO as GPIO -from RPi.GPIO import output +#from RPi.GPIO import output #import subprocess import time from time import sleep From 61f71a12f4df9ff4eb037bb4198e8b39e6851395 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:52:18 -0500 Subject: [PATCH 563/774] Update transmit.py missing " --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index bc6f4b7c..6ab65269 100644 --- a/transmit.py +++ b/transmit.py @@ -47,7 +47,7 @@ def setup(pin, config): else: # ptt pin GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) - if config == "out: + if config == "out": GPIO.setup(27, GPIO.OUT) else: GPIO.setup(27, GPIO.IN) From 7df84939dc6bb0c2f9c4ff05f14d5381c2404614 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:57:17 -0500 Subject: [PATCH 564/774] Update transmit.py print GPIO setup --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 6ab65269..54415744 100644 --- a/transmit.py +++ b/transmit.py @@ -49,8 +49,10 @@ def setup(pin, config): GPIO.setmode(GPIO.BCM) if config == "out": GPIO.setup(27, GPIO.OUT) + print("GPIO.setup(27, GPIO.OUT") else: GPIO.setup(27, GPIO.IN) + print("GPIO.setup(27, GPIO.IN") else: print(f"Unknown GPIO setup configuration: {config}") From e243b99d4b9bdcc73443889c8f3537a7abf21e04 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:59:56 -0500 Subject: [PATCH 565/774] Update transmit.py change 27 to 20 --- transmit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index 54415744..9fc9675a 100644 --- a/transmit.py +++ b/transmit.py @@ -48,11 +48,11 @@ def setup(pin, config): GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) if config == "out": - GPIO.setup(27, GPIO.OUT) - print("GPIO.setup(27, GPIO.OUT") + GPIO.setup(20, GPIO.OUT) + print("GPIO.setup(20, GPIO.OUT)") else: - GPIO.setup(27, GPIO.IN) - print("GPIO.setup(27, GPIO.IN") + GPIO.setup(20, GPIO.IN) + print("GPIO.setup(20, GPIO.IN)") else: print(f"Unknown GPIO setup configuration: {config}") @@ -271,7 +271,7 @@ setup(pd, "out") #output(pd, 1) output(pd, 0) setup(ptt, "out") -output (ptt, 1) +output(ptt, 1) txc = False if input(txc_pin) == False: From 83b858f1eb148d6eb615805e47457fdc7987342b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 07:02:02 -0500 Subject: [PATCH 566/774] Update config missing fi --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 0a5993d3..67f3c90e 100755 --- a/config +++ b/config @@ -1263,6 +1263,7 @@ elif [ "$1" = "-e" ]; then reboot=1 else restart=1 + fi fi elif [ "$1" = "-n" ]; then From 3b75f3739cf5e312f2a5287874d8ddfb82653255 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 09:26:59 -0500 Subject: [PATCH 567/774] Update pacsatsim.sh add usermod gpio pi --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 1ea856b1..62c0ebd1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -139,7 +139,7 @@ echo # /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" - +sudo usermod -a -G gpio pi if [ "$loopback" = "1" ]; then From dda02ce8e17da945646505c01fc1f9e84e300bf9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 15:14:14 -0500 Subject: [PATCH 568/774] Update install add make clean --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index adbc9fc1..1c4d2ec7 100755 --- a/install +++ b/install @@ -448,6 +448,7 @@ if [ ! -f "$FILE" ]; then cd git clone https://github.com/alanbjohnston/g0kla_common.git cd g0kla_common/Debug/ + make clean make all sudo ./install.sh @@ -457,6 +458,7 @@ if [ ! -f "$FILE" ]; then cd pi_pacsat #git checkout master-debug cd Debug + make clean make all mkdir /home/pi/PacSat @@ -489,6 +491,7 @@ if [ ! -f "$FILE" ]; then cd pacsat_telem git checkout master-fox cd Debug + make clean make all fi From 4c173a9a0faa493dac457ce9e458cb5f64ea48a8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 16:00:18 -0500 Subject: [PATCH 569/774] add sudo usermod -a -G gpio pi --- pacsatsim-df.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh index 5abc76d1..90e5625c 100755 --- a/pacsatsim-df.sh +++ b/pacsatsim-df.sh @@ -4,6 +4,8 @@ pwm=1 sudo modprobe snd-aloop +sudo usermod -a -G gpio pi + if [ "$pwm" = "1" ] ; then direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 From 0942b36c3b749fba07a94c8c49c50198feb9b6b8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 17:27:57 -0500 Subject: [PATCH 570/774] Update pacsatsim.sh pacsat_telem not sudo --- pacsatsim.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 62c0ebd1..bf489175 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -163,8 +163,9 @@ fi ## echo "Don't close the direwolf window or the Pacsatsim will stop running." +export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH -sudo /home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & +/home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & sleep 5 From 861aeee148387b23527bec7abc8c482c55077bfc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 17:54:03 -0500 Subject: [PATCH 571/774] Update install remove cpu limitations, reinstall Direwolf if not latest --- install | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/install b/install index 1c4d2ec7..7f2e7272 100755 --- a/install +++ b/install @@ -61,9 +61,10 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt @@ -158,9 +159,11 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/firmware/cmdline.txt + - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt @@ -355,6 +358,24 @@ sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-c # removed wiringpi and python-picamera python3-picamera sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom +if [ -d "/home/pi/direwolf" ]; then + + # Get the URL of the 'origin' remote + REPO_URL=$(git config --get remote.origin.url) + + # Check if the command was successful and a URL was retrieved + if [ $? -eq 0 ] && [ -n "$REPO_URL" ]; then + + if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git"]; then + + echo "Current Direwolf git repository URL is $REPO_URL" + echo "Reinstalling Direwolf from https://github.com/wb2osz/direwolf.git" + sudo rm -r /home/pi/direwolf + fi + else + echo "Could not find the URL for the 'origin' remote for Direwolf" + fi + if [ ! -d "/home/pi/direwolf" ]; then cd @@ -366,6 +387,7 @@ if [ ! -d "/home/pi/direwolf" ]; then make -j4 sudo make install make install-conf + fi sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps From 5f486fd396a65f6b037a4e545ebc93ce5c156c27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 08:59:14 -0400 Subject: [PATCH 572/774] Update transmit.py sudo for uptime --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 9fc9675a..e154bada 100644 --- a/transmit.py +++ b/transmit.py @@ -321,7 +321,7 @@ if __name__ == "__main__": print("Pi Zero 2 not detected") try: - system("cat /proc/uptime > /home/pi/CubeSatSim/uptime") + system("sudo cat /proc/uptime > /home/pi/CubeSatSim/uptime") file = open("/home/pi/CubeSatSim/uptime") up = file.read().split(" ")[0] print(up) From 882089f9100559ef197b0d0d62bf01250a3b0d1c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:18:42 -0400 Subject: [PATCH 573/774] Update main.c add missing start transmit --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index a34859e4..d8ab1d05 100644 --- a/main.c +++ b/main.c @@ -151,6 +151,8 @@ int main(int argc, char * argv[]) { fprintf(stderr, "Pi Zero 2 detected\n"); FILE * pi_zero2 = popen("touch /home/pi/CubeSatSim/pi_zero2", "r"); // store Pi Zero 2 flag pclose(pi_zero2); + FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); // missing start transmit? + pclose(transmit_stop); } else fprintf(stderr, "Not a Pi Zero or Pi Zero 2\n"); From 02fc6e03c0156b576a3c68f00e6087dce0fdf68c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:27:55 -0400 Subject: [PATCH 574/774] Update main.c not missing transmit --- main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.c b/main.c index d8ab1d05..a34859e4 100644 --- a/main.c +++ b/main.c @@ -151,8 +151,6 @@ int main(int argc, char * argv[]) { fprintf(stderr, "Pi Zero 2 detected\n"); FILE * pi_zero2 = popen("touch /home/pi/CubeSatSim/pi_zero2", "r"); // store Pi Zero 2 flag pclose(pi_zero2); - FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); // missing start transmit? - pclose(transmit_stop); } else fprintf(stderr, "Not a Pi Zero or Pi Zero 2\n"); From 30ee1b7b5172cfeec3fc25af7e9552be0876cd54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:29:45 -0400 Subject: [PATCH 575/774] Update transmit.py add sleep 20 --- transmit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transmit.py b/transmit.py index e154bada..d2feec64 100644 --- a/transmit.py +++ b/transmit.py @@ -233,6 +233,10 @@ def camera_photo(): print("CubeSatSim v2.2 transmit.py starting...") +print("\nSleeping 20 seconds\n") + +sleep(20) + pd = 21 ptt = 20 txc_pin = 7 From 3a7ece7c1ace4ef54332c97f044a99095a1741cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:36:56 -0400 Subject: [PATCH 576/774] Update transmit.py ptt gpio not RPI.GPIO --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index d2feec64..519699ea 100644 --- a/transmit.py +++ b/transmit.py @@ -15,7 +15,7 @@ import random import subprocess def output(pin, value): - if (pin != 20): + if (pin != 30): command = "gpio -g write " + str(pin) + " " + str(value) system(command) print(command) @@ -40,7 +40,7 @@ def input(pin): def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": - if (pin != 20): + if (pin != 30): command = "gpio -g mode " + str(pin) + " " + config system(command) print(command) From be66f93fcf8e5f2894648349bf57b1780417158d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:40:23 -0400 Subject: [PATCH 577/774] Update transmit.py remove GPIO.setup(pttPin, GPIO.IN) --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 519699ea..1b56ffcf 100644 --- a/transmit.py +++ b/transmit.py @@ -597,7 +597,7 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") - GPIO.setup(pttPin, GPIO.IN) +# GPIO.setup(pttPin, GPIO.IN) while (True): sleep(0.1) From e2920121e2416ef0390af413c85543b5fc771f27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:48:37 -0400 Subject: [PATCH 578/774] Update transmit.py change put read to gpio --- transmit.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index 1b56ffcf..1ab21446 100644 --- a/transmit.py +++ b/transmit.py @@ -589,24 +589,31 @@ if __name__ == "__main__": print("Pacsat") # system("sudo systemctl restart pacsatsim") # txPin = 27 - pttPin = 20 +# pttPin = 20 - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(txLed, GPIO.OUT) - GPIO.output(txLed, 0) +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) +# GPIO.setup(txLed, GPIO.OUT) +# GPIO.output(txLed, 0) + output(txLed, 0) print("0") # GPIO.setup(pttPin, GPIO.IN) while (True): sleep(0.1) - GPIO.wait_for_edge(pttPin, GPIO.FALLING) - GPIO.output(txLed, 1) + # GPIO.wait_for_edge(pttPin, GPIO.FALLING) + while (input(pttPin) != 0): + sleep(0.5) +# GPIO.output(txLed, 1) + output(txLed, 1) print("1") - sleep(0.1) +# sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.RISING) - GPIO.output(txLed, 0) + while (input(pttPin) != 1): + sleep(0.5) +# GPIO.output(txLed, 0) + output(txLed, 0) print("0") else: # GPIO.output(powerPin, 0) From 63f693bcbce12a303d7244a31316be60eabe920b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:51:34 -0400 Subject: [PATCH 579/774] Update transmit.py fix ptt --- transmit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index 1ab21446..f795f989 100644 --- a/transmit.py +++ b/transmit.py @@ -603,15 +603,15 @@ if __name__ == "__main__": while (True): sleep(0.1) # GPIO.wait_for_edge(pttPin, GPIO.FALLING) - while (input(pttPin) != 0): - sleep(0.5) + while (input(ptt) != 0): + sleep(0.2) # GPIO.output(txLed, 1) output(txLed, 1) print("1") # sleep(0.1) - GPIO.wait_for_edge(pttPin, GPIO.RISING) - while (input(pttPin) != 1): - sleep(0.5) +# GPIO.wait_for_edge(pttPin, GPIO.RISING) + while (input(ptt) != 1): + sleep(0.2) # GPIO.output(txLed, 0) output(txLed, 0) print("0") From 0aa1d7767ed5e3b29106b97a3e7771767a34241c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:52:17 -0400 Subject: [PATCH 580/774] Update transmit.py don't need sleep 20 at start --- transmit.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/transmit.py b/transmit.py index f795f989..7f5bc067 100644 --- a/transmit.py +++ b/transmit.py @@ -233,10 +233,6 @@ def camera_photo(): print("CubeSatSim v2.2 transmit.py starting...") -print("\nSleeping 20 seconds\n") - -sleep(20) - pd = 21 ptt = 20 txc_pin = 7 From 1bd0b8e008c0528783d079d7bad68980df981379 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:59:59 -0400 Subject: [PATCH 581/774] Update transmit.py input just print output --- transmit.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/transmit.py b/transmit.py index 7f5bc067..65006054 100644 --- a/transmit.py +++ b/transmit.py @@ -27,15 +27,17 @@ def input(pin): query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin try: result = subprocess.run(query, capture_output=True, text=True, check=True) - print(f"Command run was: {query}") - print("Sucess!") - print(f"Output of the command (stdout): {result.stdout}") +# print(f"Command run was: {query}") +# print("Sucess!") +# print(f"Output of the command (stdout): {result.stdout}") + print(f"{query}: {result.stdout}") return int(result.stdout) except subprocess.CalledProcessError as e: - print(f"Command failed with return code: {e.returncode}") - print(f"Command run was: {e.cmd}") - print(f"Output of the command (stdout): {e.stdout}") - print(f"Error output of the command (stderr): {e.stderr}") +# print(f"Command failed with return code: {e.returncode}") +# print(f"Command run was: {e.cmd}") +# print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + print(f"{query}: -1") return -1 def setup(pin, config): From 9a4f5ff1f6daf5cac03801c91f4a5c5835bd207b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:07:56 -0400 Subject: [PATCH 582/774] Update transmit.py remove RPI.GPIO --- transmit.py | 105 ++++++---------------------------------------------- 1 file changed, 11 insertions(+), 94 deletions(-) diff --git a/transmit.py b/transmit.py index 65006054..65d30bd0 100644 --- a/transmit.py +++ b/transmit.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -import RPi.GPIO as GPIO -#from RPi.GPIO import output #import subprocess import time from time import sleep @@ -15,48 +13,36 @@ import random import subprocess def output(pin, value): - if (pin != 30): - command = "gpio -g write " + str(pin) + " " + str(value) - system(command) - print(command) - else: # ptt pin - GPIO.output(pin, value) + command = "gpio -g write " + str(pin) + " " + str(value) + system(command) + print(command) def input(pin): # command = "gpio -g read " + str(pin) query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin + command = "gpio -g read " + str(pin) try: result = subprocess.run(query, capture_output=True, text=True, check=True) # print(f"Command run was: {query}") # print("Sucess!") # print(f"Output of the command (stdout): {result.stdout}") - print(f"{query}: {result.stdout}") + print(f"{command}: {result.stdout}") return int(result.stdout) except subprocess.CalledProcessError as e: # print(f"Command failed with return code: {e.returncode}") # print(f"Command run was: {e.cmd}") # print(f"Output of the command (stdout): {e.stdout}") # print(f"Error output of the command (stderr): {e.stderr}") - print(f"{query}: -1") + print(f"{command}: -1") return -1 def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": - if (pin != 30): - command = "gpio -g mode " + str(pin) + " " + config - system(command) - print(command) - else: # ptt pin - GPIO.setwarnings(False) - GPIO.setmode(GPIO.BCM) - if config == "out": - GPIO.setup(20, GPIO.OUT) - print("GPIO.setup(20, GPIO.OUT)") - else: - GPIO.setup(20, GPIO.IN) - print("GPIO.setup(20, GPIO.IN)") - else: - print(f"Unknown GPIO setup configuration: {config}") + command = "gpio -g mode " + str(pin) + " " + config + system(command) + print(command) +else: + print(f"Unknown gpio setup configuration: {config}") def blink(times): powerPin = 16 @@ -165,11 +151,9 @@ def increment_mode(): file.close() print(".mode file written") -# GPIO.setwarnings(False) output(txLed, 0) output(powerPin, 0) print("sudo reboot -h now") -# GPIO.setwarnings(False) setup(powerPin, "out") output(powerPin, 0); # system("reboot -h now") @@ -244,8 +228,6 @@ powerPin = 16 command_tx = True -# GPIO.setmode(GPIO.BCM) -# GPIO.setwarnings(False) setup(13, "up") setup(12, "up") setup(27, "up") @@ -261,12 +243,6 @@ if input(12) == False: else: print("No LPF") - -# GPIO.setup(txLed, GPIO.OUT) -# output(txLed, 0) - -# GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 -# GPIO.setwarnings(False) setup(txLed, "out") setup(pd, "out") @@ -291,8 +267,6 @@ battery_saver_check() # print(1) print(txLed) -# GPIO.setup(27, GPIO.OUT) -# GPIO.output(27, 0) debug_mode = 0 # change to 1 to debug transmit @@ -461,8 +435,6 @@ if __name__ == "__main__": try: f = open("/home/pi/CubeSatSim/command_control", "r") f.close() -# GPIO.setmode(GPIO.BCM) -# GPIO.setwarnings(False) setup(squelch, "up") ## pull up in case pin is not connected if input(squelch) == False: print("squelch not set correctly, no command input!") @@ -478,10 +450,6 @@ if __name__ == "__main__": print("command and control not activated") print(callsign) -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# print(txLed) -# print(1) -# setup(txLed, "out") query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] try: @@ -549,8 +517,6 @@ if __name__ == "__main__": print("Don't transmit CW ID since APRS HAB mode is active") else: if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) print("Transmit CW ID") status = "" @@ -586,35 +552,20 @@ if __name__ == "__main__": else: print("Pacsat") # system("sudo systemctl restart pacsatsim") -# txPin = 27 -# pttPin = 20 - -# GPIO.setmode(GPIO.BCM) -# GPIO.setwarnings(False) -# GPIO.setup(txLed, GPIO.OUT) -# GPIO.output(txLed, 0) output(txLed, 0) print("0") -# GPIO.setup(pttPin, GPIO.IN) - while (True): sleep(0.1) - # GPIO.wait_for_edge(pttPin, GPIO.FALLING) while (input(ptt) != 0): sleep(0.2) -# GPIO.output(txLed, 1) output(txLed, 1) print("1") -# sleep(0.1) -# GPIO.wait_for_edge(pttPin, GPIO.RISING) while (input(ptt) != 1): sleep(0.2) -# GPIO.output(txLed, 0) output(txLed, 0) print("0") else: -# GPIO.output(powerPin, 0) print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: @@ -631,8 +582,6 @@ if __name__ == "__main__": system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # output(pd, 1) # output (ptt, 0) @@ -689,8 +638,6 @@ if __name__ == "__main__": system(command) ## chan = chan + 1 if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) if (txc): @@ -753,8 +700,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -786,8 +731,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -824,8 +767,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -862,8 +803,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -893,8 +832,6 @@ if __name__ == "__main__": if (command_tx == True): # command_control_check() -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -923,9 +860,6 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) - -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# setup(txLed, "out") if (command_tx == True): # system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &") @@ -944,11 +878,7 @@ if __name__ == "__main__": # command_control_check() if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) -# print(txLed) -# print(1) if (mode == 'b'): sleep(4.2) @@ -984,11 +914,7 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# setup(txLed, "out") -# GPIO.setup(powerPin, GPIO.OUT) setup(squelch, "up") ## pull up in case pin is not connected -# GPIO.output(powerPin, 1) # was 0 # txf = float(tx) - 288.9 # print("Transmit frequency: ",txf) if (command_tx != True): @@ -998,8 +924,6 @@ if __name__ == "__main__": while True: if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) @@ -1023,9 +947,6 @@ if __name__ == "__main__": output(pd, 1) output(ptt, 1) -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# setup(txLed, "out") - if (command_tx == True): system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") print("Turning LED on/off and listening for carrier") @@ -1038,11 +959,7 @@ if __name__ == "__main__": # output(txLed, 0) # command_control_check() if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) -# print(txLed) -# print(1) sleep(4.2) else: print("No Low Pass Filter so no telemetry transmit. See http://cubesatsim.org/wiki for instructions on how to build the LPF.") From f6821e6750ce344dc9fdf0e019afb873d6331107 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:08:50 -0400 Subject: [PATCH 583/774] Update transmit.py missing tab --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 65d30bd0..a1ac0991 100644 --- a/transmit.py +++ b/transmit.py @@ -41,7 +41,7 @@ def setup(pin, config): command = "gpio -g mode " + str(pin) + " " + config system(command) print(command) -else: + else: print(f"Unknown gpio setup configuration: {config}") def blink(times): From cf3e52a2d68c2f7152a827d7f4eb4a2782603b44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:22:00 -0400 Subject: [PATCH 584/774] Update install update pi_pacsat and pacsat_telem if changed --- install | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/install b/install index 7f2e7272..a9945eb7 100755 --- a/install +++ b/install @@ -505,6 +505,18 @@ if [ ! -f "$FILE" ]; then echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state fi +cd /home/pi/pi_pacsat/Debug/ + +git pull --no-rebase > .updated +grep 'changed' /home/pi/pi_pacsat/Debug/.updated +if [[ $(grep 'changed' /home/pi/pi_pacsat/Debug/.updated) ]]; then + + echo "updating pi_pacsat" + make clean + make all + FLAG=1 +fi + FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled if [ ! -f "$FILE" ]; then cd @@ -517,6 +529,19 @@ if [ ! -f "$FILE" ]; then make all fi +cd /home/pi/pacsat_telem/Debug/ + +git pull --no-rebase > .updated +# git checkout master-fox +grep 'changed' /home/pi/pacsat_telem/Debug/.updated +if [[ $(grep 'changed' /home/pi/pacsat_telem/Debug/.updated) ]]; then + + echo "updating pacsat_telem" + make clean + make all + FLAG=1 +fi + sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt From 30d189811c588b83e46fecdbee03ba3c57bfcdf2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:32:08 -0400 Subject: [PATCH 585/774] Update install rerun if install script is updated --- install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install b/install index a9945eb7..2c71a25a 100755 --- a/install +++ b/install @@ -428,6 +428,14 @@ if [ $checkout -eq 1 ]; then FLAG=1 echo "Running update script again" /home/pi/CubeSatSim/install + exit +fi + +grep 'install' /home/pi/CubeSatSim/.updated +if [[ $(grep 'install' /home/pi/CubeSatSim/.updated) ]]; then + echo "install script updated, running again" + /home/pi/CubeSatSim/install + exit fi make debug From 1f86ea0d8130b8211b8f9c58acbb6eee9179c4c6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:33:30 -0400 Subject: [PATCH 586/774] Update install add comment to update script --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 2c71a25a..6a705b6d 100755 --- a/install +++ b/install @@ -809,7 +809,7 @@ cd if [ "$noreboot" = "0" ] ; then - if [ $FLAG -eq 1 ]; then + if [ $FLAG -eq 1 ]; then # Not sure if this is needed echo "systemctl daemon-reload and reboot" sudo systemctl daemon-reload sudo reboot -h now From a5853945913c3774dc4f4c7e41b63f4743dbfdf7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:39:41 -0400 Subject: [PATCH 587/774] Update install add missing fi --- install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install b/install index 6a705b6d..d24d05cc 100755 --- a/install +++ b/install @@ -375,6 +375,7 @@ if [ -d "/home/pi/direwolf" ]; then else echo "Could not find the URL for the 'origin' remote for Direwolf" fi +fi if [ ! -d "/home/pi/direwolf" ]; then @@ -426,7 +427,7 @@ if [ $checkout -eq 1 ]; then git checkout $branch git pull --no-rebase > .updated FLAG=1 - echo "Running update script again" + echo "Running update again" /home/pi/CubeSatSim/install exit fi From 55021b4601d78743ae69d3979fc3c5d0adf77643 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:46:09 -0400 Subject: [PATCH 588/774] Update install missing space before ] --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index d24d05cc..0152650b 100755 --- a/install +++ b/install @@ -366,7 +366,7 @@ if [ -d "/home/pi/direwolf" ]; then # Check if the command was successful and a URL was retrieved if [ $? -eq 0 ] && [ -n "$REPO_URL" ]; then - if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git"]; then + if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git" ]; then echo "Current Direwolf git repository URL is $REPO_URL" echo "Reinstalling Direwolf from https://github.com/wb2osz/direwolf.git" From 2bb215621c19ece8b2fc3c5a3cf4758ce4323f9d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 09:08:18 -0400 Subject: [PATCH 589/774] Update install enable cubesatsim --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 0152650b..3fcb3ead 100755 --- a/install +++ b/install @@ -618,7 +618,7 @@ if [ -f "$FILE" ]; then else echo "creating cubesatsim.service." sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service - sudo systemctl enable command + sudo systemctl enable cubesatsim FLAG=1 fi From 076e7b9725b62f2ea05ed163789c26c51146cf55 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 10:23:56 -0400 Subject: [PATCH 590/774] Update install move direwolf install message --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 3fcb3ead..7086ee4d 100755 --- a/install +++ b/install @@ -369,7 +369,6 @@ if [ -d "/home/pi/direwolf" ]; then if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git" ]; then echo "Current Direwolf git repository URL is $REPO_URL" - echo "Reinstalling Direwolf from https://github.com/wb2osz/direwolf.git" sudo rm -r /home/pi/direwolf fi else @@ -379,6 +378,7 @@ fi if [ ! -d "/home/pi/direwolf" ]; then + echo "Installing Direwolf from https://github.com/wb2osz/direwolf.git" cd git clone https://github.com/wb2osz/direwolf.git cd direwolf From 37af54884cf55cea67ffb163f7453650addd8c8a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 11:33:35 -0400 Subject: [PATCH 591/774] Update install fix direwolf url check --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 7086ee4d..dd989b7a 100755 --- a/install +++ b/install @@ -360,6 +360,8 @@ sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev l if [ -d "/home/pi/direwolf" ]; then + cd + cd direwolf # Get the URL of the 'origin' remote REPO_URL=$(git config --get remote.origin.url) From 19a2bdb41575f5e5b6e38b086e5bd66db56bacb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 11:41:54 -0400 Subject: [PATCH 592/774] Update install only download PacSat Ground if not installed --- install | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/install b/install index dd989b7a..429931e1 100755 --- a/install +++ b/install @@ -559,21 +559,20 @@ sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt sudo raspi-config nonint do_vnc 0 -cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz -tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop +if [ ! -d "/home/pi/PacSatGround" ]; then -rm PacsatGround_unix_0_46o.tar.gz + cd /tmp + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz + tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop + rm PacsatGround_unix_0_46o.tar.gz + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + mkdir /home/pi/PacSatGround + sudo usermod -a -G gpio pi + sudo apt-get install default-jdk -y -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ - -mkdir /home/pi/PacSatGround - -sudo usermod -a -G gpio pi - -sudo apt-get install default-jdk -y +fi cd From 0c430f7586942289337d9094b3b9ae33e308a7b4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 15:44:07 +0000 Subject: [PATCH 593/774] delete update and replace with link to install --- update | 480 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 479 deletions(-) mode change 100755 => 120000 update diff --git a/update b/update deleted file mode 100755 index 3ae8add9..00000000 --- a/update +++ /dev/null @@ -1,479 +0,0 @@ -#!/bin/bash - -echo -e "\nupdate script for CubeSatSim v2.2\n" - -if [ "$1" = "n" ] ; then -# if [ -z "$2" ] ; then - noreboot=1 -else - noreboot=0 -fi - -# echo "No reboot" -# echo $noreboot - -sudo rm /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/id.txt /home/pi/CubeSatSim/cw.txt > /dev/null 2>&1 - -if [ "$1" = "u" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - - sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev python3-pip minicom - -fi - -sudo apt-get install -y python3-smbus cmake - -sudo sed -i 's/update.sh/update /g' /etc/motd - -sudo sed -i 's/installed and/installed\nand/g' /etc/motd - -sudo sed -i 's/more information/more\ninformation/g' /etc/motd - -sudo sed -i 's/update to/update\nto/g' /etc/motd - -#sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 -sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt # remove single core - -cd /home/pi/CubeSatSim - -git pull --no-rebase > .updated - -make debug - -FILE=/home/pi/CubeSatSim/command_tx -if [ -f "$FILE" ]; then - echo "$FILE exists." -else - echo "creating $FILE" - echo "True\n" > /home/pi/CubeSatSim/command_tx -fi - -FILE=/home/pi/CubeSatSim/command_count.txt -if [ -f "$FILE" ]; then - echo "$FILE exists." -else - echo "creating $FILE" - echo "0\n" > /home/pi/CubeSatSim/command_count.txt -fi - -FLAG=0 - -if [[ $(diff systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then - echo "changed cubesatsim.service." - sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service - FLAG=1 -else - echo "no changes to cubesatsim.service." -fi - -FILE=/etc/systemd/system/rpitx.service -if [ -f "$FILE" ]; then - sudo systemctl disable rpitx - sudo rm /etc/systemd/system/rpitx.service -fi - -FILE=/etc/systemd/system/transmit.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then - echo "changed transmit.service." - sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - FLAG=1 - else - echo "no change to transmit.service." - fi -else - echo "creating transmit.service." - sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - FLAG=1 -fi - -FILE=/etc/systemd/system/command.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/command.service /etc/systemd/system/command.service) ]]; then - echo "changed command.service." - sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - FLAG=1 - else - echo "no change to command.service." - fi -else - echo "creating command.service." - sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - sudo systemctl enable command - FLAG=1 -fi - -FILE=/etc/systemd/system/pacsatsim.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then - echo "changed command.service." - sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service - FLAG=1 - else - echo "no change to pacsatsim.service." - fi -else - echo "creating pacsatsim.service." - sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service - sudo systemctl enable pacsatsim - FLAG=1 -fi - -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 - -grep 'update' /home/pi/CubeSatSim/.updated -if [[ $(grep 'update' /home/pi/CubeSatSim/.updated) ]]; then - echo "update script updated, running again" - /home/pi/CubeSatSim/update -fi - -if [ ! -d "/home/pi/PiSSTVpp" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - - sudo apt-get install -y python-picamera python3-picamera build-essential libgd-dev libmagic-dev - - - cd - - git clone https://github.com/alanbjohnston/PiSSTVpp.git - - cd PiSSTVpp - - make pisstvpp - - cd - - - 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 - - cd - git clone https://github.com/alanbjohnston/rpitx.git - cd rpitx - ./install.sh - cd -else - - if [[ $(grep 'SYNCWITHPWM' /home/pi/rpitx/src/librpitx/src/fskburst.h) ]]; then - echo "rpitx library already updated" - else - echo "updating rpitx" - cd /home/pi/rpitx - git pull - ./update.sh - cd - fi -fi - -if [ ! -d "/home/pi/WiringPi" ]; then - - cd - - git clone https://github.com/PinkFreud/WiringPi - cd WiringPi - ./build debian - - sudo dpkg -i debian-template/wiringpi-2.61-1.deb - - cd - - cd CubeSatSim - make debug - - FLAG=1 - - cd - -fi - -cd /home/pi/pi-power-button - -git checkout master - - - git pull --no-rebase > .updated_p - - grep 'changed' /home/pi/pi-power-button/.updated_p - if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then - - echo "updating pi-power-button." - - script/install - - FLAG=1 - - - else - echo "nothing to do for pi-power-button." - fi - - if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then - echo "dtparam=audio=on already in /boot/config.txt" - else - echo "adding dtparam=audio=on to /boot/config.txt" - sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then - echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" - else - echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then - echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" - else - echo "adding dtoverlay=pwm,pin=18,func=2 to /boot/config.txt" - 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 - -# 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 adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 pillow - - fi - - if [[ $(grep 'disable_splash=1' /boot/config.txt) ]]; then - echo "disable_splash=1 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then - echo "boot_delay=0 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' - FLAG=1 - fi - - if ! grep -q force_turbo=1 /boot/config.txt ; then - sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt' - FLAG=1 - fi - -#if [ ! -f "/home/pi/CubeSatSim/telem_string.txt" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - -# sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 -y - -# sudo pip3 install pillow - -#fi - -if [ ! -d "/home/pi/pi_pacsat" ]; then - - FLAG=1 - - cd - - git clone https://github.com/alanbjohnston/g0kla_common.git - - cd g0kla_common/Debug/ - - make all - - sudo ./install.sh - - cd - - git clone https://github.com/ac2cz/pi_pacsat.git - - cd pi_pacsat/Debug - - make all - - mkdir /home/pi/PacSat - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir - -# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - - export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH - - value=`cat /home/pi/CubeSatSim/sim.cfg` - echo "$value" > /dev/null - set -- $value - - echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=$1-12" >> pacsat.config - echo "broadcast_callsign=$1-11" >> pacsat.config - echo "digi_callsign=$1-1" >> pacsat.config - echo "max_frames_in_tx_buffer=5" >> pacsat.config - - echo "pb_open=1" > pacsat.state - echo "uplink_open=1" >> pacsat.state - - sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt - sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt - sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt - - sudo raspi-config nonint do_vnc 0 - -fi - -if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then - - echo "Installing PacSat Ground Station!" - - if [ ! -d "/home/pi/Desktop" ]; then - - echo - echo "You won't be able to run the PacSat Ground Station as this Pi OS does not seem to have the Desktop GUI installed." - echo - - else - - cd /tmp - - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz - - tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop - - rm PacsatGround_unix_0_46o.tar.gz - - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ - - mkdir /home/pi/PacSatGround - - sudo usermod -a -G gpio pi - - sudo apt-get install default-jdk -y - - fi - -cd - -fi - -cd /home/pi/direwolf - -#git status - -#git status | grep 'invert' - -if [[ ! $(git status | grep 'master-sync-invert') ]]; then - - echo "updating direwolf to master-sync-invert version" - - git pull --no-rebase - git checkout master-sync-invert - mkdir build - cd build - cmake .. - make -j4 - sudo make install - make install-conf - cd - -fi - -changed=0 -value=`cat /home/pi/CubeSatSim/sim.cfg` -# echo "$value" -echo "$value" > /dev/null -set -- $value - -if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign -if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count -if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat -if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon -if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode -if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch -if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency -if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency -if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode -if [ -z "${10}" ] ; then m1="0" ; changed=1 ; else m1=${10} ; fi # rx pl code -if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code - -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 configuration sim.cfg file updated to: \n" - echo - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 > /home/pi/CubeSatSim/sim.cfg - echo -fi - -if [ "$noreboot" = "0" ] ; then - - if [ $FLAG -eq 1 ]; then - echo "systemctl daemon-reload and reboot" - sudo systemctl daemon-reload - sudo reboot -h now -# sudo cubesatsim - else - grep 'changed' /home/pi/CubeSatSim/.updated - if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then - echo "reboot due to code changes " | wall - sudo reboot -h now -# sudo cubesatsim - else - echo "nothing to do." - fi - fi -else - if [ $FLAG -eq 1 ]; then - echo "reboot needed for changes to take effect" - fi -fi - -echo "CubeSatSim update complete." diff --git a/update b/update new file mode 120000 index 00000000..f7ffc47a --- /dev/null +++ b/update @@ -0,0 +1 @@ +install \ No newline at end of file From b76f9697ef73ce51ede54af8187fe011cf9cddb3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 15:04:06 -0400 Subject: [PATCH 594/774] Update direwolf-pacsatsim-pwm.conf update to work with Bookworm --- direwolf/direwolf-pacsatsim-pwm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 58667777..65a5bcc3 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,6 +1,6 @@ #ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 -PTT GPIO -20 +PTT GPIOD piochip0 -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 62781b10766ae5c69cf90be95f0cf4f31fd2daaa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 15:25:23 -0400 Subject: [PATCH 595/774] Update direwolf-pacsatsim-pwm.conf fix typo --- direwolf/direwolf-pacsatsim-pwm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 65a5bcc3..9dc44e29 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,6 +1,6 @@ #ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 -PTT GPIOD piochip0 -20 +PTT GPIOD gpiochip0 -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 8a2b7d1e198ec3e60fc13dcfec64bd0ccbe3e6c0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:10:16 -0400 Subject: [PATCH 596/774] Update main.h add python venv --- main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main.h b/main.h index 082f230c..08a9ad5e 100644 --- a/main.h +++ b/main.h @@ -202,6 +202,7 @@ char sensor_string[SENSOR_FIELDS][32]; int test_i2c_bus(int bus); //const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/python/voltcurrent.py "; +const char pythonVenv[] = "source /home/pi/venv/bin/activate"; const char pythonCmd[] = "/home/pi/venv/bin/python3 -u /home/pi/CubeSatSim/ina219.py "; char pythonStr[100], pythonConfigStr[100], busStr[10]; int map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; From 71a16255bdbaf4f14d2c5c9c3b938c6a4c45aeb3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:12:14 -0400 Subject: [PATCH 597/774] Update main.c add python env activation --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index a34859e4..a7b04e4a 100644 --- a/main.c +++ b/main.c @@ -617,6 +617,8 @@ int main(int argc, char * argv[]) { strcat(pythonConfigStr, " c"); fprintf(stderr, "pythonConfigStr: %s\n", pythonConfigStr); + + FILE *file2 = sopen(pythonVenv); // activate venv file1 = sopen(pythonConfigStr); // python sensor polling function From 0407da438df9aa4bb1e7fd6b5925ff67e95b3342 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:20:09 -0400 Subject: [PATCH 598/774] Update telem.c add venv --- telem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telem.c b/telem.c index ce4f14c3..e8a498e4 100644 --- a/telem.c +++ b/telem.c @@ -30,6 +30,9 @@ int main(int argc, char *argv[]) { strcat(pythonConfigStr, " s"); char cmdbuffer[1000]; + + FILE *file2 = sopen(pythonVenv); // activate venv + FILE *file1 = sopen(pythonConfigStr); // try new function fgets(cmdbuffer, 1000, file1); if (debug == ON) From f74042e7e28fff73d08d7cc0c1c596827dd66568 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:21:12 -0400 Subject: [PATCH 599/774] Update main.c remove test for i2c-bus 11 --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index a7b04e4a..a7b50540 100644 --- a/main.c +++ b/main.c @@ -330,13 +330,15 @@ int main(int argc, char * argv[]) { map[MINUS_X] = MINUS_Y; map[PLUS_Z] = MINUS_X; map[MINUS_Y] = PLUS_Z; - +/* if (access("/dev/i2c-11", W_OK | R_OK) >= 0) { // Test if I2C Bus 11 is present printf("/dev/i2c-11 is present\n\n"); snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(11)); } else { snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); } +*/ + snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); FILE * os_test = popen("cat /etc/os-release", "r"); fgets(cmdbuffer, 1000, os_test); From 6f2609dcd40a5c450a19fdaad69bb85d84d205db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 16:39:53 -0400 Subject: [PATCH 600/774] Update direwolf-pacsatsim-pwm.conf add DIGIPEAT --- direwolf/direwolf-pacsatsim-pwm.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 9dc44e29..0b220148 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -17,3 +17,5 @@ TXDELAY 1000 TXTAIL 10 #TXTAIL 1 FULLDUP OFF + +DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From 87ded092284e6e3127d50a365efddc00b33ab5c1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 10:33:59 -0400 Subject: [PATCH 601/774] Update pacsat.sh change reset wording --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 321907d2..9ffc9657 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -21,7 +21,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround echo - echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" sleep 10 @@ -32,7 +32,7 @@ if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then mkdir /home/pi/PacSatGroundLoop echo - echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" sleep 10 From 7fab574ea90d6f100149447db3563cb7c916b59d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:02:04 -0400 Subject: [PATCH 602/774] Update command add /home/pi/venv/bin/ --- command | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/command b/command index 4021f59b..2356a1ff 100755 --- a/command +++ b/command @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nCommand and Control script for CubeSatSim v2.1\n" +echo -e "\nCommand and Control script for CubeSatSim v2.2\n" sudo modprobe snd-aloop @@ -60,11 +60,11 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "debug mode" - direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d else - direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py fi else @@ -109,11 +109,11 @@ else # echo "debug mode" -# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d +# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d # else -# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py +# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py # fi @@ -130,11 +130,11 @@ else echo "debug mode" - python3 /home/pi/CubeSatSim/squelch_cc.py d + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py d else - python3 /home/pi/CubeSatSim/squelch_cc.py + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py fi fi From ea18e415f06fba00592f95deda1606ff65261c8d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:11:21 -0400 Subject: [PATCH 603/774] Update dtmf_aprs_cc.py add echos --- dtmf_aprs_cc.py | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 6afef09e..39af09e0 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -42,94 +42,98 @@ if __name__ == "__main__": mode = 'a' change_mode = True - if ((line.find(":t1#")) > 0): + elif ((line.find(":t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True - if ((line.find("MODE=f")) > 0): + elif ((line.find("MODE=f")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - if ((line.find(":t2#")) > 0): + elif ((line.find(":t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - if ((line.find("MODE=b")) > 0): + + elif ((line.find("MODE=b")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - if ((line.find(":t3#")) > 0): + elif ((line.find(":t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - if ((line.find("MODE=s")) > 0): + elif ((line.find("MODE=s")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - if ((line.find(":t4#")) > 0): + elif ((line.find(":t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - if ((line.find("MODE=m")) > 0): + elif ((line.find("MODE=m")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - if ((line.find(":t5#")) > 0): + elif ((line.find(":t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - if ((line.find("MODE=e")) > 0): + elif ((line.find("MODE=e")) > 0): system("echo '\nRepeater Mode!!\n'") mode = 'e' change_mode = True - if ((line.find(":t6#")) > 0): + elif ((line.find(":t6#")) > 0): system("echo '\nFUNcube Mode!!\n'") mode = 'j' change_mode = True - if ((line.find("MODE=G")) > 0): + elif ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") mode = 'p' change_mode = True - if ((line.find(":t8#")) > 0): + elif ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") mode = 'p' change_mode = True - if ((line.find("MODE=n")) > 0): + elif ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - if ((line.find(":t11#")) > 0): + elif ((line.find(":t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - if ((line.find("MODE=o")) > 0): + elif ((line.find("MODE=o")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True counter = (counter + 1) % 2 - if ((line.find(":t10#")) > 0): + elif ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True + + system("echo 'before if'") if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice if (mode == 'f'): blink(2) sleep(1) + system("echo 'after if'") elif (mode == 'b'): blink(3) @@ -174,7 +178,7 @@ if __name__ == "__main__": print("Can't write command_count file!") print("Command_count: ") print(command_count) - + system("echo 'print command count'") GPIO.output(txLed, 0) GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") @@ -182,6 +186,7 @@ if __name__ == "__main__": print("\n/home/pi/CubeSatSim/config -" + mode) system("/home/pi/CubeSatSim/config -" + mode) + system("echo 'config'") change_mode = False From 21782f6149a6ce32054d659d6d41dc70ae900b7d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:13:10 -0400 Subject: [PATCH 604/774] Update dtmf_aprs_cc.py remove GPIO --- 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 39af09e0..64cd49d3 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -179,8 +179,8 @@ if __name__ == "__main__": print("Command_count: ") print(command_count) system("echo 'print command count'") - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) + # GPIO.output(txLed, 0) + # GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") From 09eb0fbf367d42144a5f171fdde8296c27dfb2c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:16:34 -0400 Subject: [PATCH 605/774] Update dtmf_aprs_cc.py change to gpio command --- dtmf_aprs_cc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 64cd49d3..6a77379c 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -13,7 +13,7 @@ def blink(times): # GPIO.output(27, 0) sleep(0.1) system("gpio write 27 1") -# GPIO.output(27, 1) +# output(27, 1) sleep(0.1) if __name__ == "__main__": @@ -179,6 +179,8 @@ if __name__ == "__main__": print("Command_count: ") print(command_count) system("echo 'print command count'") + system("gpio write " + str(txLed) + " 0") + system("gpio write " + str(powerPin) + " 0") # GPIO.output(txLed, 0) # GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") From 77e8cc788db724b67bfd2392cb4541f697e887d9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:18:12 -0400 Subject: [PATCH 606/774] Update dtmf_aprs_cc.py cleanup --- dtmf_aprs_cc.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 6a77379c..32b614d7 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,7 +1,5 @@ import sys from os import system -#import RPi.GPIO as GPIO -#from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') @@ -10,7 +8,6 @@ logging.basicConfig(format='%(message)s') def blink(times): for i in range(times): system("gpio write 27 0") -# GPIO.output(27, 0) sleep(0.1) system("gpio write 27 1") # output(27, 1) @@ -125,15 +122,12 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - - system("echo 'before if'") if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice if (mode == 'f'): blink(2) sleep(1) - system("echo 'after if'") elif (mode == 'b'): blink(3) @@ -178,19 +172,14 @@ if __name__ == "__main__": print("Can't write command_count file!") print("Command_count: ") print(command_count) - system("echo 'print command count'") system("gpio write " + str(txLed) + " 0") system("gpio write " + str(powerPin) + " 0") - # GPIO.output(txLed, 0) - # GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") print("\n/home/pi/CubeSatSim/config -" + mode) system("/home/pi/CubeSatSim/config -" + mode) - system("echo 'config'") - - + change_mode = False except: print("Error reading line (probably due to UTF-8 issue)") From c618768637d25b4cb759dcae13edfff95bc3670f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:51:40 -0400 Subject: [PATCH 607/774] Update dtmf_aprs_cc.py cleanup --- dtmf_aprs_cc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 32b614d7..e776b2f5 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -10,7 +10,6 @@ def blink(times): system("gpio write 27 0") sleep(0.1) system("gpio write 27 1") -# output(27, 1) sleep(0.1) if __name__ == "__main__": From 7d161c65a76813edc9b55d56c8dd3f8ae93f1e14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:58:06 -0400 Subject: [PATCH 608/774] Update config fix command_count.txt --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 67f3c90e..73eae931 100755 --- a/config +++ b/config @@ -876,7 +876,7 @@ elif [ "$1" = "-R" ]; then echo echo "Current commands count is:" - cat /home/pi/CubeSatSim/commands_count.txt + cat /home/pi/CubeSatSim/command_count.txt echo echo "Do you want to reset the commands count to zero (y/n) " From 6ef472e7854f945fe306872f0800f64fb6dfe314 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 14:39:26 -0400 Subject: [PATCH 609/774] Update install remove aprs files on update --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index 429931e1..13f9d3f0 100755 --- a/install +++ b/install @@ -12,6 +12,9 @@ if [ -f "$FILE" ]; then echo -e "\nUpdate script for CubeSatSim v2.2\n" + sudo rm /home/pi/CubeSatSim/telem.wav &>/dev/null + sudo rm /home/pi/CubeSatSim/t.txt &>/dev/null + if [ -z "$1" ] ; then checkout=0 else From 0f023afeb391ed21ec927fafdc799b1fac69e82a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 15:09:15 -0400 Subject: [PATCH 610/774] Update install also delete uptime file if update --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 13f9d3f0..2492d91e 100755 --- a/install +++ b/install @@ -14,6 +14,7 @@ if [ -f "$FILE" ]; then sudo rm /home/pi/CubeSatSim/telem.wav &>/dev/null sudo rm /home/pi/CubeSatSim/t.txt &>/dev/null + sudo rm /home/pi/CubeSatSim/uptime &>/dev/null if [ -z "$1" ] ; then checkout=0 From c76b1076cff85446ba5d96fc293f7f5d758b8674 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 15:30:04 -0400 Subject: [PATCH 611/774] Update dtmf_aprs_cc.py remove counter on APRS mode 0 --- 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 e776b2f5..9ac5909f 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -115,7 +115,7 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - counter = (counter + 1) % 2 +# counter = (counter + 1) % 2 elif ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") From e37992faf0674b735ccf9d32f540e30ef9e6f8ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:34:07 -0400 Subject: [PATCH 612/774] Update PacSatSim_rttelemetry.csv Altitude times 100 --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index ca11e389..f0873680 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -23,7 +23,7 @@ 21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells 23,int,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -24,float,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,float,Altitude,12,m,37,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count 26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication 27,float,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi From 5ce5e937dd59eed150e16d9fb616579670d5ae8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:34:30 -0400 Subject: [PATCH 613/774] Update PacSatSim-coef.csv add Times 100 for Alt, use Sint16 for currents --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 48187077..16eac43c 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -29,12 +29,13 @@ 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW 29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset -31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset +31,-,Offset,-2048,1,0,0,0,0,Sint16,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED +37,-,Times100,0,100.0,0,0,0,0,Sint16,0,4096,Multiply by 100 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 4d09937032df7cc5d81b1ace36f3c0f4c21d5738 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:42:06 -0400 Subject: [PATCH 614/774] Update PacSatSim-coef.csv Try Counts for integers --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 16eac43c..46bcee48 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -29,13 +29,13 @@ 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW 29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset -31,-,Offset,-2048,1,0,0,0,0,Sint16,0,4096,Offset +31,-,Offset,-2048,1,0,0,0,0,Counts,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED -37,-,Times100,0,100.0,0,0,0,0,Sint16,0,4096,Multiply by 100 +37,-,Times100,0,100.0,0,0,0,0,Counts,0,4096,Multiply by 100 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From d87e304020e5577b494330501b36769fbf008ec7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:45:38 -0400 Subject: [PATCH 615/774] Update PacSatSim_rttelemetry.csv counts for pressure --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index f0873680..24298614 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -22,7 +22,7 @@ 20,int,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current 21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -23,int,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,int,Pressure,12,hPa,2,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 24,float,Altitude,12,m,37,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count 26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication From 248f92f053e08bbc9147d2f85564b40958fefa2b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:51:04 -0400 Subject: [PATCH 616/774] Update PacSatSim-coef.csv change to times 10 --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 46bcee48..cb9f0537 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -35,7 +35,7 @@ 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED -37,-,Times100,0,100.0,0,0,0,0,Counts,0,4096,Multiply by 100 +37,-,Times10,0,10.0,0,0,0,0,Counts,0,4096,Multiply by 10 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From e046477303d7f48cb326ee16137c2a3d1b5c5e0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 16:57:18 -0400 Subject: [PATCH 617/774] Update config for -o start and stop pacsatsim --- config | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/config b/config index 73eae931..7d0ed195 100755 --- a/config +++ b/config @@ -1139,8 +1139,9 @@ elif [ "$1" = "-o" ]; then value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value + MODE=$1 - if [ "$1" == "n" ]; then + if [ "$MODE" == "n" ]; then transmit_command "o" @@ -1151,34 +1152,27 @@ elif [ "$1" = "-o" ]; then FILE=/home/pi/CubeSatSim/beacon_off if [ -f "$FILE" ]; then - echo "Transmit beacon telemetry is off" -# echo -# echo "Do you want to turn beacon telemetry ON (y/n) " -# read reset - - reset="y" + echo "Transmit beacon telemetry is off" echo - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Turn beacon telemetry ON" - sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 - sudo systemctl restart transmit - # restart=1 + echo "Turn beacon telemetry ON" + sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 + sudo systemctl restart transmit + if [ "$MODE" = "p" ]; then + sudo systemctl restart pacsatsim fi else - echo "Transmit beacon telemetry is on" -# echo -# echo "Do you want to turn beacon telemetry OFF (y/n) " -# read reset - reset="y" + echo "Transmit beacon telemetry is on" echo - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Turn beacon telemetry OFF" - touch /home/pi/CubeSatSim/beacon_off + echo "Turn beacon telemetry OFF" + touch /home/pi/CubeSatSim/beacon_off + if [ "$MODE" = "p" ]; then + sudo systemctl stop pacsatsim + sudo systemctl stop transmit + else sudo systemctl restart transmit - # restart=1 fi fi sleep 3 From 04b2b7be846a838b192587c5b35b297f4e389933 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 17:27:56 -0400 Subject: [PATCH 618/774] Update transmit.py only do PacSat txLED if not safe mode --- transmit.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index a1ac0991..c431b015 100644 --- a/transmit.py +++ b/transmit.py @@ -556,15 +556,18 @@ if __name__ == "__main__": print("0") while (True): - sleep(0.1) - while (input(ptt) != 0): - sleep(0.2) - output(txLed, 1) - print("1") - while (input(ptt) != 1): - sleep(0.2) - output(txLed, 0) - print("0") + if (txc): + sleep(0.1) + while (input(ptt) != 0): + sleep(0.2) + output(txLed, 1) + print("1") + while (input(ptt) != 1): + sleep(0.2) + output(txLed, 0) + print("0") + else: + sleep(10) else: print("Transmit APRS Commands") system("sudo systemctl stop command") From 22a9c75cdd3be0305e1819129e60f322b05875db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 17:42:49 -0400 Subject: [PATCH 619/774] Create pacsatsim-direwolf-pwm-loop.conf --- direwolf/pacsatsim-direwolf-pwm-loop.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 direwolf/pacsatsim-direwolf-pwm-loop.conf diff --git a/direwolf/pacsatsim-direwolf-pwm-loop.conf b/direwolf/pacsatsim-direwolf-pwm-loop.conf new file mode 100644 index 00000000..a459abac --- /dev/null +++ b/direwolf/pacsatsim-direwolf-pwm-loop.conf @@ -0,0 +1,21 @@ +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 +ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 +PTT GPIOD gpiochip0 -27 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +##FULLDUP ON +##TXDELAY 15 +#FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 +FULLDUP OFF + +DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From a5d8b49f38ab727cc9f3dd45506e0e840f30799d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 17:59:33 -0400 Subject: [PATCH 620/774] Update pacsatsim.sh add safe mode --- pacsatsim.sh | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index bf489175..48826249 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,6 +4,8 @@ loopback=0 vox=0 +safe=0 + if [ "$1" = "l" ] ; then loopback=1 @@ -14,6 +16,13 @@ elif [ "$1" = "v" ] ; then fi +FILE=/home/pi/CubeSatSim/battery_saver +if [ -f "$FILE" ]; then + + safe=1 + +fi + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" @@ -71,8 +80,6 @@ if [ ! "$callsign" = "$oldcallsign" ] ; then fi - - sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start @@ -141,25 +148,51 @@ echo sudo usermod -a -G gpio pi -if [ "$loopback" = "1" ]; then +if [ "$safe" = "1" ] ; then + + echo "Safe mode - battery saver" +# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & + + 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 & + + +elif [ "$loopback" = "1" ] ; then echo "Using audio loopback" - sudo /home/pi/CubeSatSim/pacsatsim-d.sh & +# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & elif [ "$vox" = "1" ]; then echo "Using Soundcard Audio TX and RX (VOX)" - sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & +# sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 & else echo "Using TXC FM transceiver" - sudo /home/pi/CubeSatSim/pacsatsim-df.sh & +# sudo /home/pi/CubeSatSim/pacsatsim-df.sh & + + pwm=1 + + if [ "$pwm" = "1" ] ; then + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & + + else + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + + fi fi # 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 & +## 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 & ## echo "Don't close the direwolf window or the Pacsatsim will stop running." From 7072f03327f715a7db4494c211bfdbf793d71249 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 10:48:20 -0400 Subject: [PATCH 621/774] Rename pacsatsim-direwolf-pwm-loop.conf to pacsatsim-direwolf-pwm-loopback.conf --- ...irewolf-pwm-loop.conf => pacsatsim-direwolf-pwm-loopback.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename direwolf/{pacsatsim-direwolf-pwm-loop.conf => pacsatsim-direwolf-pwm-loopback.conf} (100%) diff --git a/direwolf/pacsatsim-direwolf-pwm-loop.conf b/direwolf/pacsatsim-direwolf-pwm-loopback.conf similarity index 100% rename from direwolf/pacsatsim-direwolf-pwm-loop.conf rename to direwolf/pacsatsim-direwolf-pwm-loopback.conf From 3b6daedb490fa399470175b3c935620d5448cb9e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 10:50:05 -0400 Subject: [PATCH 622/774] Rename pacsatsim-direwolf-pwm-loopback.conf to direwolf-pacsatsim-pwm-loopback.conf --- ...olf-pwm-loopback.conf => direwolf-pacsatsim-pwm-loopback.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename direwolf/{pacsatsim-direwolf-pwm-loopback.conf => direwolf-pacsatsim-pwm-loopback.conf} (100%) diff --git a/direwolf/pacsatsim-direwolf-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf similarity index 100% rename from direwolf/pacsatsim-direwolf-pwm-loopback.conf rename to direwolf/direwolf-pacsatsim-pwm-loopback.conf From aad8a8c77a3b7d0876265f737bcfa825e4d575c8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 10:51:43 -0400 Subject: [PATCH 623/774] Update direwolf-pacsatsim-pwm-loopback.conf add loopback --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf index a459abac..2dc8d9eb 100644 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ b/direwolf/direwolf-pacsatsim-pwm-loopback.conf @@ -1,5 +1,4 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 +ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 PTT GPIOD gpiochip0 -27 MYCALL AMSAT-12 CHANNEL 0 From f907b83a18ba002dd1aa3cc27e8d05d3c955f68f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:13:09 -0400 Subject: [PATCH 624/774] Update direwolf-pacsatsim-pwm-loopback.conf ptt to 27 --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf index 2dc8d9eb..87a3ee6a 100644 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ b/direwolf/direwolf-pacsatsim-pwm-loopback.conf @@ -1,5 +1,5 @@ ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 -PTT GPIOD gpiochip0 -27 +PTT GPIOD gpiochip0 27 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 418ee8dcc418a77d3df3e9816455e6f93e36e947 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:45:03 -0400 Subject: [PATCH 625/774] Update direwolf-pacsatsim-pwm-loopback.conf gpis 17 for PTT (need jumper) --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf index 87a3ee6a..0d4d022d 100644 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ b/direwolf/direwolf-pacsatsim-pwm-loopback.conf @@ -1,5 +1,5 @@ ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 -PTT GPIOD gpiochip0 27 +PTT GPIOD gpiochip0 17 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 2e66c5e80410dc08e9c0692b41d0ff8b4373e3d6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:52:14 -0400 Subject: [PATCH 626/774] Update transmit.py add start/stop rpitx --- transmit.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index c431b015..f68fc3da 100644 --- a/transmit.py +++ b/transmit.py @@ -554,7 +554,8 @@ if __name__ == "__main__": # system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") - + rpitx = "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 &" + stop_rpitx = "sudo killall -9 rpitx" while (True): if (txc): sleep(0.1) @@ -567,8 +568,19 @@ if __name__ == "__main__": output(txLed, 0) print("0") else: - sleep(10) - else: +# sleep(0.1) + while (input(17) == 0): + sleep(0.05) + system(rpitx) +# print("1") + while (input(17) -= 1): + sleep(0.05) + system(stop_rpitx) +# print("0") + +# sleep(10) + + else: print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: From 698cb0646f3ae777a4c1c7949af080e248d1e9f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:53:50 -0400 Subject: [PATCH 627/774] Update transmit.py typo --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f68fc3da..e84e2388 100644 --- a/transmit.py +++ b/transmit.py @@ -573,7 +573,7 @@ if __name__ == "__main__": sleep(0.05) system(rpitx) # print("1") - while (input(17) -= 1): + while (input(17) == 1): sleep(0.05) system(stop_rpitx) # print("0") From edada6e8b93bef851dd299c2a559e029b8209e54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:55:34 -0400 Subject: [PATCH 628/774] Update transmit.py indent fix --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index e84e2388..10696468 100644 --- a/transmit.py +++ b/transmit.py @@ -580,7 +580,7 @@ if __name__ == "__main__": # sleep(10) - else: + else: print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: From da0f8f6301d667b825c1c083c8631665efcf8e45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:58:57 -0400 Subject: [PATCH 629/774] Update transmit.py kill arecord too --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 10696468..9d3342fc 100644 --- a/transmit.py +++ b/transmit.py @@ -555,7 +555,8 @@ if __name__ == "__main__": output(txLed, 0) print("0") rpitx = "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 &" - stop_rpitx = "sudo killall -9 rpitx" + stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord" + system(stop_rpitx) while (True): if (txc): sleep(0.1) From 2b01295c5475df29cba93584dd61c82347228006 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 12:03:48 -0400 Subject: [PATCH 630/774] Update transmit.py rerun rpitx to stop it --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 9d3342fc..45f4af1b 100644 --- a/transmit.py +++ b/transmit.py @@ -555,7 +555,7 @@ if __name__ == "__main__": output(txLed, 0) print("0") rpitx = "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 &" - stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord" + stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3" system(stop_rpitx) while (True): if (txc): From 3ad7cdb6f9bc9e4127711a2b3ebf7ba566a93619 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:20:36 -0400 Subject: [PATCH 631/774] Update pacsatsim.sh safe mode read frequency from sim.cfg --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 48826249..d0d08592 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -58,6 +58,7 @@ echo "$value" > /dev/null set -- $value callsign="$1" +frequency="$7e3" echo "Configured callsign is " echo $callsign @@ -155,7 +156,8 @@ if [ "$safe" = "1" ] ; then direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & - 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 & +# 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 & + 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 $frequency & elif [ "$loopback" = "1" ] ; then From f5b12239a871d68dbe057459bedb1be68881da4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:28:04 -0400 Subject: [PATCH 632/774] Update transmit.py for safe mode, use sim.cfg frequency --- transmit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 45f4af1b..520d3212 100644 --- a/transmit.py +++ b/transmit.py @@ -26,7 +26,7 @@ def input(pin): # print(f"Command run was: {query}") # print("Sucess!") # print(f"Output of the command (stdout): {result.stdout}") - print(f"{command}: {result.stdout}") +# print(f"{command}: {result.stdout}") return int(result.stdout) except subprocess.CalledProcessError as e: # print(f"Command failed with return code: {e.returncode}") @@ -554,8 +554,8 @@ if __name__ == "__main__": # system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") - rpitx = "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 &" - stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3" + rpitx = "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 " + rx + "e3 > /dev/null 2>&1 &" + stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" system(stop_rpitx) while (True): if (txc): From fb52cee8b8eaf2b233e4a550f2123174c20a3fe6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:29:01 -0400 Subject: [PATCH 633/774] Update pacsatsim.sh remove arecord and rpitx --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index d0d08592..5cf2da1a 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -157,7 +157,7 @@ if [ "$safe" = "1" ] ; then direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & # 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 & - 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 $frequency & +# 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 $frequency & elif [ "$loopback" = "1" ] ; then From 6f0b5ad64127b3c0bb3bc61f70cd13fbdf1c4d97 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:43:26 -0400 Subject: [PATCH 634/774] Update transmit.py change to tx --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 520d3212..d5f180f2 100644 --- a/transmit.py +++ b/transmit.py @@ -4,7 +4,7 @@ import time from time import sleep #import os -import sys +import system from os import system from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor @@ -554,7 +554,7 @@ if __name__ == "__main__": # system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") - rpitx = "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 " + rx + "e3 > /dev/null 2>&1 &" + rpitx = "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 " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" system(stop_rpitx) while (True): From 344da1ae49fdb3ee386c58b086f4a514eac449df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:43:48 -0400 Subject: [PATCH 635/774] Update transmit.py fix sys --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d5f180f2..56d62236 100644 --- a/transmit.py +++ b/transmit.py @@ -5,7 +5,7 @@ import time from time import sleep #import os import system -from os import system +from os import sys from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor import serial From a85fa3d797847e91989a5f832f1dcff72c2963cf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:56:00 -0400 Subject: [PATCH 636/774] Update transmit.py change back to sys --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 56d62236..189f4f97 100644 --- a/transmit.py +++ b/transmit.py @@ -4,7 +4,7 @@ import time from time import sleep #import os -import system +import sys from os import sys from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor From 657e82899d19f0a819128419e7404f5e54b141ae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:57:12 -0400 Subject: [PATCH 637/774] Update transmit.py fix system --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 189f4f97..b6ac4475 100644 --- a/transmit.py +++ b/transmit.py @@ -5,7 +5,7 @@ import time from time import sleep #import os import sys -from os import sys +from os import system from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor import serial From 4a9811ec945894cda37d20324086055dc06ff720 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 10:43:46 -0400 Subject: [PATCH 638/774] Update transmit.py don't stop and start rpitx --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index b6ac4475..13c66910 100644 --- a/transmit.py +++ b/transmit.py @@ -557,6 +557,7 @@ if __name__ == "__main__": rpitx = "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 " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" system(stop_rpitx) + system(rpitx) while (True): if (txc): sleep(0.1) @@ -572,11 +573,11 @@ if __name__ == "__main__": # sleep(0.1) while (input(17) == 0): sleep(0.05) - system(rpitx) +## system(rpitx) # print("1") while (input(17) == 1): sleep(0.05) - system(stop_rpitx) +## system(stop_rpitx) # print("0") # sleep(10) From 85fed02a784a9d6f1aa67f9699cd64bf9eac0378 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 10:50:15 -0400 Subject: [PATCH 639/774] Update direwolf-pacsatsim.conf to common settings --- direwolf/direwolf-pacsatsim.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 87f09de1..c80de461 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,6 +1,10 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO 20 -MYCALL AMSAT +MYCALL AMSAT-1 # was -12 CHANNEL 0 MODEM 1200 +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +TXTAIL 10 FULLDUP OFF +DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From 41c74f422c5ebb413791f2efad9e9007538032c6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 10:56:59 -0400 Subject: [PATCH 640/774] Update pacsatsim.sh use direwolf template to create conf --- pacsatsim.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5cf2da1a..e7088bcf 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -149,11 +149,15 @@ echo sudo usermod -a -G gpio pi + if [ "$safe" = "1" ] ; then echo "Safe mode - battery saver" # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + PTT="PTT GPIOD gpiochip0 17" + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & # 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 & @@ -193,6 +197,16 @@ else fi +echo "$ADEVICE" > /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +echo "$PTT" >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +cat /home/pi/CubeSatSim/direwolf-pacsatsim.conf >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf + +echo +echo "direwolf-pacsatsim-tmp.conf" +echo +cat /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +echo + # 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 8348da54e98b8d10c5109c455d55e044b47a31ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:00:46 -0400 Subject: [PATCH 641/774] Update pacsatsim.sh fix file names --- pacsatsim.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index e7088bcf..f12f7d84 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -197,14 +197,16 @@ else fi -echo "$ADEVICE" > /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf -echo "$PTT" >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf -cat /home/pi/CubeSatSim/direwolf-pacsatsim.conf >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +DIREWOLF_CONF="/home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf" + +echo "$ADEVICE" > $DIREWOLF_CONF +echo "$PTT" >> $DIREWOLF_CONF +cat /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf >> $DIREWOLF_CONF echo -echo "direwolf-pacsatsim-tmp.conf" +echo "$DIREWOLF_CONF" echo -cat /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +cat $DIREWOLF_CONF echo # 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 & From dcdc203e1f58959097d0bd4cf31f6faec8c37b63 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:03:48 -0400 Subject: [PATCH 642/774] Update pacsatsim.sh add configured callsign --- pacsatsim.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index f12f7d84..6fe6b541 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -200,6 +200,7 @@ fi DIREWOLF_CONF="/home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf" echo "$ADEVICE" > $DIREWOLF_CONF +echo "MYCALL $callsign-1" >> $DIREWOLF_CONF echo "$PTT" >> $DIREWOLF_CONF cat /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf >> $DIREWOLF_CONF From 70220236d6fde5ff0b6a495bb67efa151d225980 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:04:22 -0400 Subject: [PATCH 643/774] Update direwolf-pacsatsim.conf remove callsign --- direwolf/direwolf-pacsatsim.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index c80de461..b96fc68f 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,4 +1,3 @@ -MYCALL AMSAT-1 # was -12 CHANNEL 0 MODEM 1200 DWAIT 0 From b4adf4d0591cad9022ebc1a0ec1d4aeadf036d96 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:07:58 -0400 Subject: [PATCH 644/774] Update pacsatsim.sh move direwolf call --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6fe6b541..65edc986 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -158,7 +158,7 @@ if [ "$safe" = "1" ] ; then ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & # 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 & # 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 $frequency & @@ -210,6 +210,8 @@ echo cat $DIREWOLF_CONF echo +direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 & + # 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 0d8355d0181b7cc5012f29fce9d9f81d52ec32ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:13:56 -0400 Subject: [PATCH 645/774] Update pacsatsim.sh add pwm --- pacsatsim.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 65edc986..9ec4bd20 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -187,7 +187,10 @@ else if [ "$pwm" = "1" ] ; then - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & else From 836ec52844131ab6dc5390a7390e8ac686d56686 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:18:02 -0400 Subject: [PATCH 646/774] Update transmit.py don't stop start rpitx unless safe mode --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 13c66910..32e89afa 100644 --- a/transmit.py +++ b/transmit.py @@ -556,8 +556,9 @@ if __name__ == "__main__": print("0") rpitx = "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 " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" - system(stop_rpitx) - system(rpitx) + if not txc: + system(stop_rpitx) + system(rpitx) while (True): if (txc): sleep(0.1) From 288e4b47abdb5839b108f7b47ef995888b05feaf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:36:27 -0400 Subject: [PATCH 647/774] Update pacsatsim.sh add soundcard mode --- pacsatsim.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 9ec4bd20..50b9d975 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -183,10 +183,11 @@ else echo "Using TXC FM transceiver" # sudo /home/pi/CubeSatSim/pacsatsim-df.sh & - pwm=1 + #pwm=1 if [ "$pwm" = "1" ] ; then - + + echo "Using Soundcard input (JP13), PWM output" ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" @@ -194,7 +195,10 @@ else else - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + echo "Using Soundcard input (JP13) and output (JP14)" + ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From 2941a55e61ebd8be8973b6e8cbfa8133548cfb0c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:42:35 -0400 Subject: [PATCH 648/774] Update pacsatsim.sh back to pwm --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 50b9d975..49d07f06 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -183,7 +183,7 @@ else echo "Using TXC FM transceiver" # sudo /home/pi/CubeSatSim/pacsatsim-df.sh & - #pwm=1 + pwm=1 if [ "$pwm" = "1" ] ; then From 85ea8724ba4b8ce50dfa4641c6b82509dcec47eb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:51:08 -0400 Subject: [PATCH 649/774] Update pacsatsim.sh add vox and pwm set by parameters --- pacsatsim.sh | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 49d07f06..8b42d752 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -5,6 +5,8 @@ loopback=0 vox=0 safe=0 +card=0 +pwm=0 if [ "$1" = "l" ] ; then @@ -13,6 +15,14 @@ if [ "$1" = "l" ] ; then elif [ "$1" = "v" ] ; then vox=1 + +elif [ "$1" = "c" ] ; then + + card=1 + +else + + pwm=1 fi @@ -173,35 +183,28 @@ elif [ "$loopback" = "1" ] ; then elif [ "$vox" = "1" ]; then - echo "Using Soundcard Audio TX and RX (VOX)" + echo "Using Soundcard Audio TX and RX (VOX, no PTT)" + ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 17" # sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 & +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 & -else - - echo "Using TXC FM transceiver" -# sudo /home/pi/CubeSatSim/pacsatsim-df.sh & - - pwm=1 - - if [ "$pwm" = "1" ] ; then +elif [ "$pwm" = "1" ] ; then - echo "Using Soundcard input (JP13), PWM output" + echo "FM TXC using Soundcard input (JP13), PWM output" ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & - else +else - echo "Using Soundcard input (JP13) and output (JP14)" + echo "FM TXC using Soundcard input (JP13) and output (JP14)" ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 -20" # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & - fi - fi DIREWOLF_CONF="/home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf" From cdf9ec99b3268764ef2a5fdc0fc5b48da627f032 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 15:39:22 -0400 Subject: [PATCH 650/774] Update pacsatsim.sh loopback changes --- pacsatsim.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8b42d752..54ef4c89 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -159,8 +159,17 @@ echo sudo usermod -a -G gpio pi +if [ "$loopback" = "1" ] ; then -if [ "$safe" = "1" ] ; then + echo "Using audio loopback" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=0" + PTT="PTT GPIOD gpiochip0 17" + +# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + +elif [ "$safe" = "1" ] ; then echo "Safe mode - battery saver" # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & @@ -174,13 +183,6 @@ if [ "$safe" = "1" ] ; then # 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 $frequency & -elif [ "$loopback" = "1" ] ; then - - echo "Using audio loopback" -# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - elif [ "$vox" = "1" ]; then echo "Using Soundcard Audio TX and RX (VOX, no PTT)" From 21b9687ddbebe11ee2a1d70985c5890fd154f51c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 15:45:19 -0400 Subject: [PATCH 651/774] Update direwolf-pacsat.conf default pacsat conf --- groundstation/direwolf/direwolf-pacsat.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index e526e272..3b9d337b 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,5 +1,9 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 -PTT GPIO 20 +CHANNEL 0 +MODEM 1200 KISSPORT 8100 +AGWPORT 8002 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +TXDELAY 1000 FULLDUP OFF From 0dd73605ea05e455802d11a995d25bf60d93f7c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 15:55:22 -0400 Subject: [PATCH 652/774] Update pacsat.sh update to using default direwolf conf --- groundstation/pacsat.sh | 52 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9ffc9657..d4ff81ed 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -16,6 +16,26 @@ elif [ "$1" = "v" ] ; then fi +FILE=/home/pi/CubeSatSim/battery_saver +if [ -f "$FILE" ]; then + + safe=1 + +fi + +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" +frequency="$7e3" + +echo -n "Callsign is " +echo $callsign +echo -n "Transmit Frequency is " +echo $frequency +echo + if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround @@ -132,10 +152,40 @@ elif [ "$vox" = "1" ]; then else echo "Using TXC FM Transceiver" - /home/pi/CubeSatSim/groundstation/pacsat-df.sh & + pwm=1 +# /home/pi/CubeSatSim/groundstation/pacsat-df.sh & + + if [ "$pwm" = "1" ] ; then + +# direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 & + + echo "FM TXC using Soundcard input (JP13), PWM output" + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" + + else + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + + fi fi +DIREWOLF_CONF="/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" + +echo "$ADEVICE" > $DIREWOLF_CONF +echo "MYCALL $callsign-1" >> $DIREWOLF_CONF +echo "$PTT" >> $DIREWOLF_CONF +cat /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf >> $DIREWOLF_CONF + +echo +echo "$DIREWOLF_CONF" +echo +cat $DIREWOLF_CONF +echo + +direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & + # 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 435045 & ##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 435045 & From 4ebdc99d773ed632793f45fc8383f8ec91a73645 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 16:12:46 -0400 Subject: [PATCH 653/774] Update pacsat.sh add loopback --- groundstation/pacsat.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d4ff81ed..215c52a0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -142,7 +142,12 @@ if [ "$loopback" = "1" ]; then #/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" echo "Using Audio Loopback" - /home/pi/CubeSatSim/groundstation/pacsat-d.sh & +# /home/pi/CubeSatSim/groundstation/pacsat-d.sh & + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 + + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="PTT GPIOD gpiochip0 17" elif [ "$vox" = "1" ]; then From fef665ee8f4e41a904e6e056447da2840c4e5bd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 16:21:06 -0400 Subject: [PATCH 654/774] Update transmit.py add safe mode txLed on/off --- transmit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 32e89afa..d7d8ea5e 100644 --- a/transmit.py +++ b/transmit.py @@ -565,20 +565,22 @@ if __name__ == "__main__": while (input(ptt) != 0): sleep(0.2) output(txLed, 1) - print("1") +# print("1") while (input(ptt) != 1): sleep(0.2) output(txLed, 0) - print("0") +# print("0") else: # sleep(0.1) while (input(17) == 0): sleep(0.05) ## system(rpitx) + output(txLed, 1) # print("1") while (input(17) == 1): sleep(0.05) ## system(stop_rpitx) + output(txLed, 0) # print("0") # sleep(10) From 5b961fc5582e744ac3f30f546e74547e6e59da13 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 17:39:33 -0400 Subject: [PATCH 655/774] Update install bookworm vnc and desktop execute --- install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install b/install index 2492d91e..74a10384 100755 --- a/install +++ b/install @@ -170,6 +170,8 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then # sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt + + sudo sed -i 's/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/firmware/config.txt if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" @@ -813,6 +815,10 @@ cd #fi +sed -i 's/quick_exec=0/quick_exec=1/' ~/.config/libfm/libfm.conf + +sudo apt install -y raspberrypi-ui-mods + if [ "$noreboot" = "0" ] ; then if [ $FLAG -eq 1 ]; then # Not sure if this is needed From a09d1aea2a344f111cb0058ae3c83593542be067 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 17:45:07 -0400 Subject: [PATCH 656/774] Update transmit.py add Safe Mode print --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d7d8ea5e..ac8c42b1 100644 --- a/transmit.py +++ b/transmit.py @@ -558,7 +558,8 @@ if __name__ == "__main__": stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" if not txc: system(stop_rpitx) - system(rpitx) + system(rpitx) + print("Safe Mode!") while (True): if (txc): sleep(0.1) From 623c181effde9d8e4943864934f4e269d9e7194c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 18:03:36 -0400 Subject: [PATCH 657/774] Update .gitignore add tmp conf files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 04810931..acb007e4 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,6 @@ logt.txt telem.txt.bk failure_mode.txt sim_mode_auto +direwolf-pacsatsim-tmp.conf +groundstation/direwolf-pacsat-tmp.conf +tlm.bin From 60d11e78d79c7070a1cff5ff98aa622044a9335a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 08:58:50 -0600 Subject: [PATCH 658/774] directory preloaded with PacSatSim --- spacecraft/PacSatGround_0.46o/PacSatGround.zip | Bin 0 -> 3076 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGround.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip new file mode 100644 index 0000000000000000000000000000000000000000..1ed803547071145536dee3358a256583ad2daf27 GIT binary patch literal 3076 zcmb7`3pkT|9LHbgl5~1hb8vF2W-6K6$?Y5`Q_6jWagbt0>tHkUgmOx59k-gO5IR;i zYL#$Y!l+b^)5WbMiKD1==02e~?`sFMSx(#Yf44n*_WAz)zu))${%3Cu6I%&Dk9sW0 zWA@E|mu~CWZw1XgNDc0k8~(GQtjUg@j52B4Tf005E&82QhH)hbw?5 zAZARhQrcP+06u|VBlt1AOcaSsB;m;v0zP<_P6x@Uf^_^|TVjtYymCb2ba*HH2RjyG zwcQ77tG>*CL?XAed-W)%$H3sNt> ztw9?0h7{X%G=c^G$BtlW(5 zNM(jfVx@Lc#hrEN>Ea`+W1o7snbvvVi`Q%zrjN#WVpgP7jp$9s$K@6wVaA`N>s#q6Q*fNjRrErveeydwd89}>|Ta}L_EuiAz>tmbkgvw zlXI-UT%7CheHO7v)W})ag}rks^W=G_?dQNDd0}7Sg z+GSQ^BYVu;DqKJcwxcZ#@2-^^{hHb^n7>I~rPvji!o{)UJ zwYzOx`LWGN{)1;jK*&_ix1%s00yQ==&`h~9WjCYOk3IxsiIs{s7AJe2IwNDxI@S}% zj1kSj61(yl*#T+SR1)M=0tbrpYm6UpLS%xQIHt$y=ws?*Vtrm?{*>K=pG~r{Vun(Q5^{ZT<1gHgxvo{=chN9`uc&?ByepK4)h_A@i+>R9ES4oo;N-uzz269 zIU8A0b`p)$)KlMHhG1=W)-q%<5Zl#MHSZKMHWxOj7nMbeh{~tS%WsXBM>MA0ZZ(-s zBYPTc{2;n3i-h(5IoFe5>6@(VVQ$`|_B{Rmx;|Y!?Qq>2a6jy2Ec|#P%1?wU3oJCH zfv+h_!uQ~0W4p_Y+nQ{!a%k~YFB~f*6rf&nu`ZZhD1uMuY;V4rj$E#2P{Us5|MLs^ zngZwN2UAEWA1}&mwSizCpe3{y5N*S&7o#GeMW7`}!v`%#(_Uz8IbU(|0>zQMaCjWq z%a_6(Rs>jF=+Xsp6C5JCOa)f$0IP$6DZcFsL~fXabK_5PNCjGaZP-V(wT9`)#12fz zN}IgUDzw@Vm&;tS_3v<%oAt%(D=eR;|5h^7*}_zaXoZ$9}N?Q`m%q-9|Gr0YJW>$pXqkE+HtinT-)a?nPs zk@39#wt-yFs+KFKuB4M6oIQH1U?NUGHL)o6O-fFF9R0AX$+a>6f{a+Lk@B@4w13RR z{dsffC2P7+Pxn%d#eNI73T^$!B>(1d!$v!$8zP(&r}LYc7OV?4?BFQBTB&Y*rQ@fz znHOpP8Vj!t6V*xT%t#J0CBKsgG*cV2$0Ig&zfyQzt)Zfra{htgpxu59ktkQtr&)Z^ zBP`Ip_(+%HM}N*L{g?x}FlD>ovotk$TaN<^S)NOlz`Siy=uI&HlqB1(A9-nGFn(WD zzofmjh^R75*m*4vx(Ry70RNz&SKgBroV_^r^yZrg7b)!Q<{}}RUW(kqkL2Yqnm?$t zM40gwFBrbO#Sen6%oD+gZATB0U zXf8WJi6wJ$Vaogx2w+YE+Kb0>67xCw^-9P^N)^i~@nq`qT7rqnyQ}ZS`5HH$uONBJ zY+dM=V7hY2Tnir*AkSs(@?^oFovRrdcBufF#1p$9eTgvSz4Zh`m$z;y3I2{O(C60Mg*o6rAWaN$AtRrWxQd literal 0 HcmV?d00001 From 10b7a28ee9dc4bef3c95a1df89a743dc6ab802bd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:03:02 -0400 Subject: [PATCH 659/774] Update pacsat-config.sh download preloaded PacSatGround --- groundstation/pacsat-config.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 6a2ce55c..352396b4 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -152,6 +152,11 @@ sudo killall -9 direwolf &>/dev/null if [ "$ANS" = "1" ] ; then sudo rm -r /home/pi/PacSatGround + cd + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/60d11e78d79c7070a1cff5ff98aa622044a9335a/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip + sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop fi From d720f030552ef7a8ad9dcfab80fdadaa9c8a2f85 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:48:02 -0400 Subject: [PATCH 660/774] Update transmit.py if beacon on, restart pacsatsim --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index ac8c42b1..fffd0909 100644 --- a/transmit.py +++ b/transmit.py @@ -551,7 +551,8 @@ if __name__ == "__main__": print("Pacsat Ground Station") else: print("Pacsat") -# system("sudo systemctl restart pacsatsim") + if (command_tx == True): + system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") rpitx = "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 " + tx + "e3 > /dev/null 2>&1 &" From add244e5417fb2260a10525f708a2cd06a5c93ec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:51:41 -0400 Subject: [PATCH 661/774] Update transmit.py stop pacsatsim if not mode p --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index fffd0909..a3fcda5c 100644 --- a/transmit.py +++ b/transmit.py @@ -324,7 +324,8 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) -# system("sudo systemctl stop pacsatsim") + if ( mode != "p"): + system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") From d05f624998983793725b4b41c56582cf16e3d541 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:52:27 -0400 Subject: [PATCH 662/774] Update main.c move start/stop pacsatsim to transmit --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index a7b50540..2f1954a6 100644 --- a/main.c +++ b/main.c @@ -273,7 +273,7 @@ int main(int argc, char * argv[]) { } } } - +/* if ( mode == PACSAT) { FILE * pacsat_file = popen("sudo systemctl restart pacsatsim", "r"); pclose(pacsat_file); @@ -282,7 +282,7 @@ int main(int argc, char * argv[]) { FILE * pacsat_file = popen("sudo systemctl stop pacsatsim", "r"); pclose(pacsat_file); } - +*/ // Open telemetry file with STEM Payload Data telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); if (telem_file == NULL) From cf44ee82d37a12181aff1c447121b06bcd6e562e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 12:02:06 -0400 Subject: [PATCH 663/774] Update config don't restart/stop pacsatsim for beacon on/off --- config | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config b/config index 7d0ed195..9be7c3e1 100755 --- a/config +++ b/config @@ -1158,9 +1158,9 @@ elif [ "$1" = "-o" ]; then echo "Turn beacon telemetry ON" sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 sudo systemctl restart transmit - if [ "$MODE" = "p" ]; then - sudo systemctl restart pacsatsim - fi +# if [ "$MODE" = "p" ]; then +# sudo systemctl restart pacsatsim +# fi else echo "Transmit beacon telemetry is on" @@ -1168,12 +1168,12 @@ elif [ "$1" = "-o" ]; then echo "Turn beacon telemetry OFF" touch /home/pi/CubeSatSim/beacon_off - if [ "$MODE" = "p" ]; then - sudo systemctl stop pacsatsim - sudo systemctl stop transmit - else +# if [ "$MODE" = "p" ]; then +# sudo systemctl stop pacsatsim +# sudo systemctl stop transmit +# else sudo systemctl restart transmit - fi +# fi fi sleep 3 fi From 71321b0c92677d9696cd0fd07a8051c4543205b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 12:08:15 -0400 Subject: [PATCH 664/774] Update transmit.py add print to start pacsatsim --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index a3fcda5c..4127e8db 100644 --- a/transmit.py +++ b/transmit.py @@ -554,6 +554,7 @@ if __name__ == "__main__": print("Pacsat") if (command_tx == True): system("sudo systemctl restart pacsatsim") + print("Starting PacSatSim") output(txLed, 0) print("0") rpitx = "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 " + tx + "e3 > /dev/null 2>&1 &" From a90e87ac061f279082da29e36c53d76ebfd453ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:32:33 -0400 Subject: [PATCH 665/774] add !command_tx to stop pacsatsim --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 4127e8db..d299389c 100644 --- a/transmit.py +++ b/transmit.py @@ -324,8 +324,6 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) - if ( mode != "p"): - system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") @@ -337,6 +335,9 @@ if __name__ == "__main__": print("Can't open beacon_off file, defaulting to False") print("Command_tx: ") print(command_tx) + + if (mode != "p") || (!command_tx): + system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/command_count.txt", "r") From cb92741418aa488084711b76dadfb661990e6a77 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:33:28 -0400 Subject: [PATCH 666/774] Update transmit.py fix or --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d299389c..d0069606 100644 --- a/transmit.py +++ b/transmit.py @@ -336,7 +336,7 @@ if __name__ == "__main__": print("Command_tx: ") print(command_tx) - if (mode != "p") || (!command_tx): + if (mode != "p") or (!command_tx): system("sudo systemctl stop pacsatsim") try: From 7a7e4e0c5b14624a98e9fb9c05248b4fa7a72a49 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:34:40 -0400 Subject: [PATCH 667/774] Update transmit.py fix not --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d0069606..5ac26bb3 100644 --- a/transmit.py +++ b/transmit.py @@ -336,7 +336,7 @@ if __name__ == "__main__": print("Command_tx: ") print(command_tx) - if (mode != "p") or (!command_tx): + if (mode != "p") or (command_tx == False): system("sudo systemctl stop pacsatsim") try: From 3caa7043332e9f835975bac55d0c54f8fae4242a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 13:47:23 -0600 Subject: [PATCH 668/774] Add files via upload --- .../PacSatGround_0.46o/PacSatGround.zip | Bin 3076 -> 3076 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip index 1ed803547071145536dee3358a256583ad2daf27..ed8a02312015782bdc385e835d1b838ba137755c 100644 GIT binary patch delta 947 zcmZpXXp!Iv@MdP=VgP}l+KD_WY}&CqG9ScDHeiA2aHFn~Z z^m^ZSlYZn0J+#p-@Oh-Y<*`#ON9arbZ;D#iFRgIjS#qdUG@xmRX7oqCH9~Dl+^drO zjJco5@~qvtrJ?I+k7)F?r~WUw_s$bgDGlb9oENjLihX)@p=1f$Opj0N|0y@!YuWnd z>*dDOJBF`!6q?L@^hC`6*k5tsId>kb99KC!Sweksz4E*VDzCi%I~#>$Kb_xI@32^+ zRBXm4p17}p?l-gEiUy}!Iry3P9q6|>yC_fvS& ztt9I$TNFjsFdc8*QnE4T$qU|u^ImxezOMUTeRb>f+bofrpUzo3?X}XKsZpl)e{>qoj3DY@Wl0x8DD*~*L}f$;*t_C^W7Gk3f10#v*+vm9y3~T=5a5| zl-(<*uDGD?|1th(ZdSXs_YMRH+TPZRwHMR3yK^r+x1n^-+t&)umb`8J*X94({}t!C z!>?|>=y~wF+D19OaDm@Dx0>{wtG^~L@ohfG{wpeb_1fT?>&L%UJvl4u+PKhO_*CP{ zN>0a{8?OA(oX_w3j~SX!Sb-@es&?`pCOvSP(2fNq6(*pFFS8X`#5#6zFLM)9aP4G4 z785o-V7k!*sS%x=z`_O+&0w*{B6^I)7G2b=cCs3)HrtPw9hpBs2@-4quNg2=D&D{S zg%Riu#>s}PqLa8e)HxZLA(cBku}tC z`ApW&d~Mfaq8yGU9qZCP{b~7^);NETNxN3I^7!jT?`=N4cL$GEvyaNp@c)92`G=yu z{d#%8=-rIcI~KEi3X8hcAOGv-^m|u0DS6UE&z{LA>jnJ_guX8QuPC`{>nH!C_6q`g zthjwD+1CGBu{dYzx2~1OvI@&*A4|5)WXMWfle{eWu*HM*^64d0-`!zI`}yT(W9sSs z-OG<3ea~2;kZ4|U@Y}BGvJ+Ka*{*fidO%yP)N^~Z6Ce8%-LRk)=4@U2y;iVUva5w? z#~l?9KDl(uqCk`Sx%rovEJKaL-#P!D-7#VD-PuVylP(`ma$cNl>pS0gn_u^wdvQOt z9dkFzM%@zN3Tu4q6tyctujmWghICc)2UXX9?|pUabZ*m{n?>isPL~S4^IALWeQoQz zpYv-T{$xL|_3*}bx${1sSDv{3k)ibWe6cUgDVY=78uOgw_DphH@hrW5`A3GiEZbQx zZt08bpDYltzy5Li+E%9dVfhbMu9%lQb)9^-xP0FG&1MIz&V4HtD8BT~q5kOduj*e} zo+p0IDRKMo*LL2-%@zUb<;wdu-?{qB;L8eTxoUn9uq2 zz?D5M3vwc|{!KaGuJ)f1nowAQDdj@gABEHO4V3FmLlY5z)m`;aH z7GyDDn+Hrc^FV4uCnvD5fkZP{tg(n5W3fdS-554mja8d14`@Oj+yvf@z(lEd|MnL~ zpgR~R8?uT{;^t82WMGCU+mTsX!Og(P@`9Ox0ZbSm()Z4=$%k3>*=m92RX|(~6cJ@} z28+~6ZjNJ%VPrZPHhB-b5fji`AJ}E#IbgCVhcgq Date: Mon, 16 Mar 2026 13:53:34 -0600 Subject: [PATCH 669/774] Add files via upload --- .../PacSatGround_0.46o/PacSatGround.zip | Bin 3076 -> 2662 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip index ed8a02312015782bdc385e835d1b838ba137755c..900415dcd54bc85e08ddeafaeec93d4cc324e294 100644 GIT binary patch delta 459 zcmY+9y-EW?6oqfHv&rrqk!1|YE*o4eY^;Kc5VC3lD#A847XFl488BiY2o^yL!EWyh zSVX~6Qsgbv#upH@3y6(PK<6ehkf{#eIcMg~wf|WV+leKpg+-BvGSG&-l4o&tbV^(H zOjKdJ000i`UA7LEANw~+7GPijlsF$d!PD(Ywh(Jmr_7OTzS|8EvFOR!?oMt$L*H3n zAd}Fliz17r)fFC#ir6Hyklx%Wx)VzxU|7X4waY0Yy`rECoKSi2%_E&QOS;FJ!5IxY z?FQptoTFz4r^h#s+N0PN$6}{O^U_n&T8TVwB7o9tv!m-jo zX!pTcRYik&P2JYGY55eo3(7MVKl3xR+;vqlc(^~O8!v96f-#&juHqtn$=oCY!m*z7 Hp&`H@&lFKl delta 803 zcmaDR(js9N;LXg!#Q*|9wFNO?29)4skYNZ&Ob$*gaWBd*%}db_4dG;9){fng`5>a~12CvjjGTOc!%kiqY7of6C5?{2s6bUC z!09C~3s(a&hm{3gO%A6E+(8g?VldRivq?_A&1odB1~&_2-!2Sw8`z{LTX9KDcHrdF zH$zKXA}D&LSkc`f%x*0YQv(T@3=B01?5dL=v5Uz|z|8{rX*-5GE)IKn9jF?JS)6R> Y_C<48im(Dj85p>M&;jU|b?hJ>0LI?EGynhq From 9009f08738e6c98b35de892b94b49c3745e54ba5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:55:20 -0400 Subject: [PATCH 670/774] Delete spacecraft/PacSatGround_0.46o/PacSatGround.zip --- spacecraft/PacSatGround_0.46o/PacSatGround.zip | Bin 2662 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatGround.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip deleted file mode 100644 index 900415dcd54bc85e08ddeafaeec93d4cc324e294..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2662 zcmWIWW@h1H00Fbwf*3FZO0YA?Fcg;*=%plOvBbS7 zzcepJub?QuAhoC@Gqo7(BvskEuVf)K}zm6UZ6%PG$Fu%e4^Ru%@yQWLO`_O!G?y3*R3e~q9(q8;M zVGcvL-m`u4iklZ}%lN*V^dnE`p^bKd&m-+EkDY2cLSOQKQ`EYCX@&dFl0&7U0ZltJ zqd)Sk5o%N7UX|o$%>7K3XYI}{4P8fjM5CuY^?%8|cb?5 zdVE^{Pr2z{%hoqvFE^&%F?_wF&}8PLCu07`{)!9Fx${`%xXR(l66%wc=RHt)<^A8; zC?xyo{H}V3#S*1rGd}UeeGPQKne|pQINi#@&%F0|)g^{2ha!&qEN?435O06(h1T7j zjAuT*{LFlMTD`b`fA@Xn7Y>K=J~X{8)wfpiyiy(2nAI5W^J-Gw_7)kw6VYpy1myFG z)K3lIE#mW85w@pGf7vAOOxML3R`-{%7OhHIcc=ZExuBx^Zu6r>N0;>z0y@F;8CbCY<-mJMeYg_v))#r{89Y-28OT+G($q z?o5p`z5ko*?q~a-hd%Sq3q7>)z3sf2&w?kef6Vymo4xJ}_7j(sc$x3E*i@+Y2AnwrtDrhb;SjB|BvxUbF}ou(Dt@gti71N-JN^sxecXr-o93Nw&ZQ& zzb^mR{;xRC9e#E5MbCrZ)i%oMg$w-Nxz(iaT>Uk1iEr~c_FqxitJenCTtEJ;>d9GI z*T#kR!lxQnR&qMt+;HWO=6rtNf6R!~ZG)CQxIx*YATc>LxhOHML?4_UnSp8XKlUsF zN#Gzu!hh%OwFl-8W?&+hM>PbJ)`K&1(GxnzU=T)2=&=)hy_pRK+TQ;Z<+i=8ztKyv zebHJDtw&Yzn@(<#-sO31X6M%b_pYo}*n95xlgg84UYxyg%j2turhE9+q$A5C_6EM1 zctm;i#kQKQ2bV>KY~KC!Pnui*R;i%v|dsbBT8-E2zF=C-Gk=C5pDULIk)?rYAfS#A2CcM82Ru$i5F zYSYKN`~Ph;Hd=DPBiz`iHTV{<* zl!{Yhn_sgdA{SKfK#M&v#RV^TfRO=-TToe}jTr@~h1bl>+tbp4CiDWa7>XGwnMJ9| zCHX~_dMQcpvI}G;T9ihAp4PZ^M~9=DuCco54wd~Hq52m4SE!h(D(D{GxI$y&CH2ia zS{RumW=cqCbxEjPoOywLdb$zUQbLMg3=SIc` zRYn^`(!-X9i8S=+r87Rh9vWwBO80m&fq8L62i{VJw4VUq( RKy3^RTtJu&OaxECJOI-LSm*!% From aa0742af68c6a6a8a1c96a6ccab37ca51705fd26 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 13:58:05 -0600 Subject: [PATCH 671/774] Add files via upload --- spacecraft/PacSatGround_0.46o/PacSatGround.zip | Bin 0 -> 2662 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGround.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip new file mode 100644 index 0000000000000000000000000000000000000000..900415dcd54bc85e08ddeafaeec93d4cc324e294 GIT binary patch literal 2662 zcmWIWW@h1H00Fbwf*3FZO0YA?Fcg;*=%plOvBbS7 zzcepJub?QuAhoC@Gqo7(BvskEuVf)K}zm6UZ6%PG$Fu%e4^Ru%@yQWLO`_O!G?y3*R3e~q9(q8;M zVGcvL-m`u4iklZ}%lN*V^dnE`p^bKd&m-+EkDY2cLSOQKQ`EYCX@&dFl0&7U0ZltJ zqd)Sk5o%N7UX|o$%>7K3XYI}{4P8fjM5CuY^?%8|cb?5 zdVE^{Pr2z{%hoqvFE^&%F?_wF&}8PLCu07`{)!9Fx${`%xXR(l66%wc=RHt)<^A8; zC?xyo{H}V3#S*1rGd}UeeGPQKne|pQINi#@&%F0|)g^{2ha!&qEN?435O06(h1T7j zjAuT*{LFlMTD`b`fA@Xn7Y>K=J~X{8)wfpiyiy(2nAI5W^J-Gw_7)kw6VYpy1myFG z)K3lIE#mW85w@pGf7vAOOxML3R`-{%7OhHIcc=ZExuBx^Zu6r>N0;>z0y@F;8CbCY<-mJMeYg_v))#r{89Y-28OT+G($q z?o5p`z5ko*?q~a-hd%Sq3q7>)z3sf2&w?kef6Vymo4xJ}_7j(sc$x3E*i@+Y2AnwrtDrhb;SjB|BvxUbF}ou(Dt@gti71N-JN^sxecXr-o93Nw&ZQ& zzb^mR{;xRC9e#E5MbCrZ)i%oMg$w-Nxz(iaT>Uk1iEr~c_FqxitJenCTtEJ;>d9GI z*T#kR!lxQnR&qMt+;HWO=6rtNf6R!~ZG)CQxIx*YATc>LxhOHML?4_UnSp8XKlUsF zN#Gzu!hh%OwFl-8W?&+hM>PbJ)`K&1(GxnzU=T)2=&=)hy_pRK+TQ;Z<+i=8ztKyv zebHJDtw&Yzn@(<#-sO31X6M%b_pYo}*n95xlgg84UYxyg%j2turhE9+q$A5C_6EM1 zctm;i#kQKQ2bV>KY~KC!Pnui*R;i%v|dsbBT8-E2zF=C-Gk=C5pDULIk)?rYAfS#A2CcM82Ru$i5F zYSYKN`~Ph;Hd=DPBiz`iHTV{<* zl!{Yhn_sgdA{SKfK#M&v#RV^TfRO=-TToe}jTr@~h1bl>+tbp4CiDWa7>XGwnMJ9| zCHX~_dMQcpvI}G;T9ihAp4PZ^M~9=DuCco54wd~Hq52m4SE!h(D(D{GxI$y&CH2ia zS{RumW=cqCbxEjPoOywLdb$zUQbLMg3=SIc` zRYn^`(!-X9i8S=+r87Rh9vWwBO80m&fq8L62i{VJw4VUq( RKy3^RTtJu&OaxECJOI-LSm*!% literal 0 HcmV?d00001 From 8e0dcb858034c34b9479e911484aea34cde6962d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 16:04:17 -0400 Subject: [PATCH 672/774] Update pacsat-config.sh add reset ground station with zip file --- groundstation/pacsat-config.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 352396b4..e2b86625 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -154,11 +154,15 @@ sudo killall -9 direwolf &>/dev/null sudo rm -r /home/pi/PacSatGround cd sudo rm PacSatGround.zip - wget https://github.com/alanbjohnston/CubeSatSim/raw/60d11e78d79c7070a1cff5ff98aa622044a9335a/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGroundLoop + sudo rm PacSatGround.zip fi else From 3ac84675d2d94376a663d094dd4eec7336d378a3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 16:29:01 -0400 Subject: [PATCH 673/774] Update pacsat-config.sh change properties file for satellite --- groundstation/pacsat-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index e2b86625..4c6cf617 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -131,9 +131,9 @@ sudo killall -9 direwolf &>/dev/null else if [ "$ANS" = "1" ] ; then - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties else - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties fi echo echo "Changing callsign to " From 7e94f40ea9a66196c546449c770e349cae754112 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 16:31:04 -0400 Subject: [PATCH 674/774] Update pacsat-config.sh change old callsign too --- groundstation/pacsat-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 4c6cf617..65b49fde 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -113,9 +113,9 @@ sudo killall -9 direwolf &>/dev/null echo if [ "$ANS" = "1" ] ; then - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) else - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) fi echo "Current value of remote PacSat callsign is" echo $oldcallsign From 16e78829787583ec6db0b4c66d6a3e341e8a8471 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 11:37:38 -0400 Subject: [PATCH 675/774] Update asound.conf add ipc permissions to everyone --- asound.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asound.conf b/asound.conf index cf3cc9a0..a752802a 100644 --- a/asound.conf +++ b/asound.conf @@ -22,6 +22,7 @@ pcm.softvol { pcm.shared_speaker { type dmix ipc_key 1024 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" rate 48000 @@ -35,6 +36,7 @@ pcm.shared_speaker { pcm.shared_mic { type dsnoop ipc_key 2048 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" # channels 1 From 8db0be76f4dc0e3467029afd1c20a97e11a4a042 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 11:42:35 -0400 Subject: [PATCH 676/774] Update asound.conf add ipc permissions to everyone --- asound.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asound.conf b/asound.conf index cf3cc9a0..a752802a 100644 --- a/asound.conf +++ b/asound.conf @@ -22,6 +22,7 @@ pcm.softvol { pcm.shared_speaker { type dmix ipc_key 1024 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" rate 48000 @@ -35,6 +36,7 @@ pcm.shared_speaker { pcm.shared_mic { type dsnoop ipc_key 2048 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" # channels 1 From 000bf1f9e32effd9ce3d737181833eedd6df8848 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 14:03:02 -0400 Subject: [PATCH 677/774] Update pacsat.sh add safe and fix vox and other modes --- groundstation/pacsat.sh | 58 ++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 215c52a0..d64eacb3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,15 +4,25 @@ loopback=0 vox=0 +safe=0 +card=0 +pwm=0 + if [ "$1" = "l" ] ; then loopback=1 - echo "PacSat Ground Station with Loopback" elif [ "$1" = "v" ] ; then - vox=1 - echo "PacSat Ground Station with Soundcard (VOX)" + vox=1 + +elif [ "$1" = "c" ] ; then + + card=1 + +else + + pwm=1 fi @@ -139,41 +149,35 @@ echo sudo usermod -a -G gpio pi if [ "$loopback" = "1" ]; then -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" echo "Using Audio Loopback" -# /home/pi/CubeSatSim/groundstation/pacsat-d.sh & + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="PTT GPIOD gpiochip0 17" -# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 +elif [ "$safe" = "1" ] ; then - ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" - PTT="PTT GPIOD gpiochip0 17" + echo "Safe mode - battery saver" + ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + PTT="PTT GPIOD gpiochip0 17" elif [ "$vox" = "1" ]; then - echo "Using Soundcard Audio TX RX (VOX)" - /home/pi/CubeSatSim/groundstation/pacsat-dj.sh & - -else - - echo "Using TXC FM Transceiver" - pwm=1 -# /home/pi/CubeSatSim/groundstation/pacsat-df.sh & - - if [ "$pwm" = "1" ] ; then + echo "Using Soundcard Audio TX and RX (VOX, no PTT)" + ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 17" -# direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 & - - echo "FM TXC using Soundcard input (JP13), PWM output" - ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" - PTT="PTT GPIOD gpiochip0 -20" +elif [ "$pwm" = "1" ] ; then + + echo "FM TXC using Soundcard input (JP13), PWM output" + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" - else +else - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + echo "FM TXC using Soundcard input (JP13) and output (JP14)" + ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" - fi - fi DIREWOLF_CONF="/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" From 2a3d546fef6b9bed3a63508fe7b11c2bce73f131 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 17:59:20 -0400 Subject: [PATCH 678/774] Update config remove commented out code --- config | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/config b/config index 9be7c3e1..c4ab7d94 100755 --- a/config +++ b/config @@ -1158,22 +1158,13 @@ elif [ "$1" = "-o" ]; then echo "Turn beacon telemetry ON" sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 sudo systemctl restart transmit -# if [ "$MODE" = "p" ]; then -# sudo systemctl restart pacsatsim -# fi - else echo "Transmit beacon telemetry is on" echo echo "Turn beacon telemetry OFF" touch /home/pi/CubeSatSim/beacon_off -# if [ "$MODE" = "p" ]; then -# sudo systemctl stop pacsatsim -# sudo systemctl stop transmit -# else - sudo systemctl restart transmit -# fi + sudo systemctl restart transmit fi sleep 3 fi From e9edb14d331389cab7aabc38a71751ae0c43be62 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 18:11:04 -0400 Subject: [PATCH 679/774] Update pacsat.sh add pkill --- groundstation/pacsat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d64eacb3..9aac313a 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -1,6 +1,8 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station +# script to auto decode packets using Direwolf and FM TXC and run Pacsat Ground Station + +sudo pkill -f "/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" loopback=0 vox=0 From 080f5680744f822e4530dcce19c9fc5d11f37b26 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:00:28 -0400 Subject: [PATCH 680/774] Update pacsatsim.sh detect sound card, TXC, and RTL --- pacsatsim.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 54ef4c89..86836f78 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -33,6 +33,30 @@ if [ -f "$FILE" ]; then fi +if [[ $(arecord -l | grep "USB Audio Device") ]] ; then + echo "USB Sound Card detected" + soundcard=1 +else + echo "No USB Sound Card detected" + soundcard=0 + +gpio -g mode 7 up +if [[ $(gpio -g read 7 | grep 0) ]]; then + echo "TXC is present" + txc=1 +else: + echo "TXC not present" + txc=0 + +timeout 1 rtl_test &> out.txt +if [[ $(grep "No supported" out.txt) ]] ; then + echo "No RTL-SDR detected" + rtl=0 +else + echo "RTL-SDR detected." + rtl=1 +fi + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" From 28c335c9852eed570c78d61c0ee630aab04f485b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:10:14 -0400 Subject: [PATCH 681/774] fix missing fi --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 86836f78..20bb50f1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -39,14 +39,16 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] ; then else echo "No USB Sound Card detected" soundcard=0 +fi gpio -g mode 7 up -if [[ $(gpio -g read 7 | grep 0) ]]; then +if [[ $(gpio -g read 7 | grep 0) ]] ; then echo "TXC is present" txc=1 else: echo "TXC not present" txc=0 +fi timeout 1 rtl_test &> out.txt if [[ $(grep "No supported" out.txt) ]] ; then From 86a17ea38e2065a613cca77fdfda70888647debf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:44:03 -0400 Subject: [PATCH 682/774] Update pacsatsim.sh fix else --- pacsatsim.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 20bb50f1..78c952a8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -43,10 +43,10 @@ fi gpio -g mode 7 up if [[ $(gpio -g read 7 | grep 0) ]] ; then - echo "TXC is present" - txc=1 -else: - echo "TXC not present" + echo "TXC is present" + txc=1 +else + echo "TXC not present" txc=0 fi From 53b7455e2e35fc7d902a20bb5bb9955cee893b1a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:49:00 -0400 Subject: [PATCH 683/774] Update pacsat.sh with tests for sound card, txc, and rtl --- groundstation/pacsat.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9aac313a..61ece654 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -28,6 +28,32 @@ else fi +if [[ $(arecord -l | grep "USB Audio Device") ]] ; then + echo "USB Sound Card detected" + soundcard=1 +else + echo "No USB Sound Card detected" + soundcard=0 +fi + +gpio -g mode 7 up +if [[ $(gpio -g read 7 | grep 0) ]] ; then + echo "TXC is present" + txc=1 +else + echo "TXC not present" + txc=0 +fi + +timeout 1 rtl_test &> out.txt +if [[ $(grep "No supported" out.txt) ]] ; then + echo "No RTL-SDR detected" + rtl=0 +else + echo "RTL-SDR detected." + rtl=1 +fi + FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then From 918bff84464af0a338eb9e21dce65e28c691723b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:51:20 -0400 Subject: [PATCH 684/774] Update config add to status --- config | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config b/config index c4ab7d94..861b0624 100755 --- a/config +++ b/config @@ -324,6 +324,32 @@ if [ "$1" = "" ]; then echo "Transmit beacon telemetry is ON" fi + if [[ $(arecord -l | grep "USB Audio Device") ]] ; then + echo "USB Sound Card detected" + soundcard=1 + else + echo "No USB Sound Card detected" + soundcard=0 + fi + + gpio -g mode 7 up + if [[ $(gpio -g read 7 | grep 0) ]] ; then + echo "FM TXC is present" + txc=1 + else + echo "FM TXC not present" + txc=0 + fi + + timeout 1 rtl_test &> out.txt + if [[ $(grep "No supported" out.txt) ]] ; then + echo "No RTL-SDR detected" + rtl=0 + else + echo "RTL-SDR detected" + rtl=1 + fi + echo echo -e "Current sim.cfg configuration file:" # echo From 1fe7a1b57b74cbb61663b59ae71580bd7a9747d2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 22:15:11 -0400 Subject: [PATCH 685/774] Update pacsat.sh print error messages if txc or sound card not present --- groundstation/pacsat.sh | 42 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 61ece654..461d8069 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -184,27 +184,61 @@ if [ "$loopback" = "1" ]; then elif [ "$safe" = "1" ] ; then - echo "Safe mode - battery saver" ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" + if [ ! "$txc" = "1" ] then + echo "Safe mode - battery saver won't work since no TXC present" + sleep 5 + elif [ ! "$soundcard" = "1" ] ; then + echo "Safe mode - battery saver won't work since no sound card present" + sleep 5 + else + echo "Safe mode - battery saver" + fi + elif [ "$vox" = "1" ]; then - echo "Using Soundcard Audio TX and RX (VOX, no PTT)" ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 17" + if [ "$soundcard" = "1" ] ; then + echo "Using Soundcard Audio TX and RX (VOX, no PTT)" + else + echo "Soundcard Audio TX and RX (VOX, no PTT) will not work since no sound card present" + sleep 5 + fi + elif [ "$pwm" = "1" ] ; then - echo "FM TXC using Soundcard input (JP13), PWM output" ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" + + if [ ! "$txc" = "1" ] then + echo "FM TXC using Soundcard input (JP13), PWM output won't work since no TXC present" + sleep 5 + elif [ ! "$soundcard" = "1" ] ; then + echo "FM TXC using Soundcard input (JP13), PWM output won't work since no sound card present" + sleep 5 + else + echo "FM TXC using Soundcard input (JP13), PWM output" + fi else echo "FM TXC using Soundcard input (JP13) and output (JP14)" ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" - PTT="PTT GPIOD gpiochip0 -20" + PTT="PTT GPIOD gpiochip0 -20" + + if [ ! "$txc" = "1" ] then + echo "FM TXC using Soundcard input (JP13) and output (JP14) won't work since no TXC present" + sleep 5 + elif [ ! "$soundcard" = "1" ] ; then + echo "FM TXC using Soundcard input (JP13), output (JP14) won't work since no sound card present" + sleep 5 + else + echo "FM TXC using Soundcard input (JP13), output JP14" + fi fi From 0761ced4ca8074e066a6ab77222fa3657bd3e800 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 22:21:16 -0400 Subject: [PATCH 686/774] Update pacsat.sh missing ; --- groundstation/pacsat.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 461d8069..ad7910aa 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -176,7 +176,7 @@ echo sudo usermod -a -G gpio pi -if [ "$loopback" = "1" ]; then +if [ "$loopback" = "1" ] ; then echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" @@ -187,7 +187,7 @@ elif [ "$safe" = "1" ] ; then ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" - if [ ! "$txc" = "1" ] then + if [ ! "$txc" = "1" ] ; then echo "Safe mode - battery saver won't work since no TXC present" sleep 5 elif [ ! "$soundcard" = "1" ] ; then @@ -197,7 +197,7 @@ elif [ "$safe" = "1" ] ; then echo "Safe mode - battery saver" fi -elif [ "$vox" = "1" ]; then +elif [ "$vox" = "1" ] ; then ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 17" @@ -214,7 +214,7 @@ elif [ "$pwm" = "1" ] ; then ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" - if [ ! "$txc" = "1" ] then + if [ ! "$txc" = "1" ] ; then echo "FM TXC using Soundcard input (JP13), PWM output won't work since no TXC present" sleep 5 elif [ ! "$soundcard" = "1" ] ; then @@ -230,7 +230,7 @@ else ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 -20" - if [ ! "$txc" = "1" ] then + if [ ! "$txc" = "1" ] ; then echo "FM TXC using Soundcard input (JP13) and output (JP14) won't work since no TXC present" sleep 5 elif [ ! "$soundcard" = "1" ] ; then @@ -264,7 +264,7 @@ direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & cd /home/pi/Desktop/PacsatGround/ -if [ "$loopback" = "1" ]; then +if [ "$loopback" = "1" ] ; then setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGroundLoop" # removed & From 7fbfb32309bab1c9814ff4d363a37a90c2e930b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 22:28:02 -0400 Subject: [PATCH 687/774] Update pacsat.sh cleanup --- groundstation/pacsat.sh | 46 ----------------------------------------- 1 file changed, 46 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index ad7910aa..545dea57 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -135,45 +135,11 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null -echo - #sudo systemctl restart pacsatsim #sudo /etc/init.d/alsa-utils stop #sudo /etc/init.d/alsa-utils start - -#echo "Waiting 10 seconds for Pacsatsim to start" - -#sleep 10 - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -#echo "Receive frequency is $8 MHz" -#echo "Transmit frequency is $7 MHz" -#echo -#echo "To change, quit and type CubeSatSim/config -F" -#echo - -#frequency="$8e6" - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -#echo - -echo -echo "The Pacsat Ground Station is running on this Pi using FM receiver or RTL-SDR" -echo - -#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -#setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & - -#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - sudo usermod -a -G gpio pi if [ "$loopback" = "1" ] ; then @@ -257,11 +223,6 @@ echo direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & -# 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 435045 & -##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 435045 & - -# echo "Don't close the direwolf window or the Pacsatsim will stop running." - cd /home/pi/Desktop/PacsatGround/ if [ "$loopback" = "1" ] ; then @@ -273,13 +234,6 @@ else setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & fi -#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" - -cd - -#sudo systemctl stop pacsatsim sleep 10 From a3c3c165db88b402fdd4351f2346b4a2cc29419a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 12:24:16 -0400 Subject: [PATCH 688/774] Update PacSatSim.dat fix satellite name --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat index 1e5abfff..7b738eb6 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -10,7 +10,7 @@ layout0.name=TLMP1 layout1.filename=PacSatSim_rttelemetry.csv layout1.name=WOD passMeasurementsFileName=passmeasurements.csv -name=ISS +name=CubeSatSim description=PacSatSim satId=3 catalogNumber=0 From c6a2c31495ab4163f48e8ab511b3b38462370dff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:10:39 -0400 Subject: [PATCH 689/774] Update install fix kms setting --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 74a10384..06805f10 100755 --- a/install +++ b/install @@ -172,6 +172,8 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt sudo sed -i 's/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/firmware/config.txt + sudo sed -i 's/#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d/g' /boot/firmware/config.txt + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" From a26bff8679574498f61eb7d2eb70892870fda1b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:13:58 -0400 Subject: [PATCH 690/774] Update pacsat-config.sh add missing cd --- groundstation/pacsat-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 65b49fde..776ea84b 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -159,6 +159,7 @@ sudo killall -9 direwolf &>/dev/null sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop + cd sudo rm PacSatGround.zip wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGroundLoop From d93ef609c1535fd9f1908409a20ff3e7ba8c5e92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:14:44 -0400 Subject: [PATCH 691/774] Update pacsat.sh on first run, download zip file of spacecraft --- groundstation/pacsat.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 545dea57..9dcf8742 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -76,10 +76,15 @@ echo if [ ! -d "/home/pi/PacSatGround" ] ; then - mkdir /home/pi/PacSatGround - + sudo rm -r /home/pi/PacSatGround + cd + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGround + sudo rm PacSatGround.zip + echo - echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign" sleep 10 @@ -87,10 +92,13 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then - mkdir /home/pi/PacSatGroundLoop + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGroundLoop + sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign" sleep 10 From 3efc2cb03883feac0868e5317d4b54ab6cb489e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:24:59 -0400 Subject: [PATCH 692/774] Update pacsat.sh fix first time prints --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9dcf8742..8cd8114d 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -76,7 +76,6 @@ echo if [ ! -d "/home/pi/PacSatGround" ] ; then - sudo rm -r /home/pi/PacSatGround cd sudo rm PacSatGround.zip wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip @@ -84,7 +83,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to put in your callsign" + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" sleep 10 @@ -92,13 +91,14 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then + cd sudo rm PacSatGround.zip wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to put in your callsign" + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" sleep 10 From 000641f36fff1c7c3e1582096d07e01befb2a5f3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 15:51:03 -0400 Subject: [PATCH 693/774] Update config don't print no rtl-sdr --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 861b0624..9c01db76 100755 --- a/config +++ b/config @@ -343,7 +343,7 @@ if [ "$1" = "" ]; then timeout 1 rtl_test &> out.txt if [[ $(grep "No supported" out.txt) ]] ; then - echo "No RTL-SDR detected" +# echo "No RTL-SDR detected" rtl=0 else echo "RTL-SDR detected" From fd367d77a2dd0c995cc374ab3393f261fb4a7cee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 16:25:24 -0400 Subject: [PATCH 694/774] Update transmit.py repeater mode gain 8000 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 5ac26bb3..5c55381a 100644 --- a/transmit.py +++ b/transmit.py @@ -950,7 +950,7 @@ if __name__ == "__main__": if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") output(txLed, 1) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 8000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") while (input(squelch) == False): From 7c00ec70f18aa41b81880369841c04786104a97c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 16:27:22 -0400 Subject: [PATCH 695/774] Update transmit.py repeater gain 4000 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 5c55381a..cfaa2730 100644 --- a/transmit.py +++ b/transmit.py @@ -950,7 +950,7 @@ if __name__ == "__main__": if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") output(txLed, 1) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 8000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") while (input(squelch) == False): From 88956a36b2d55b7a9db5c829756fe676a4b5f507 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 23:59:56 -0400 Subject: [PATCH 696/774] Delete pacsatsim-d.sh --- pacsatsim-d.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 pacsatsim-d.sh diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh deleted file mode 100755 index 7480af0c..00000000 --- a/pacsatsim-d.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 From 50ba696b8b17c2e1635440a0b4e3ca38a222e0e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:13 -0400 Subject: [PATCH 697/774] Delete pacsat-test.sh --- pacsat-test.sh | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 pacsat-test.sh diff --git a/pacsat-test.sh b/pacsat-test.sh deleted file mode 100755 index dd43979c..00000000 --- a/pacsat-test.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim-d.sh" - -sleep 1 - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim.sh" - -sleep 1 - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-loopback.conf -t 0" - -sleep 1 - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/groundstation/pacsat.sh" - - From 55028e0692e8b08a128204825456c70ddd91b240 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:29 -0400 Subject: [PATCH 698/774] Delete pacsatsim-df.sh --- pacsatsim-df.sh | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 pacsatsim-df.sh diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh deleted file mode 100755 index 90e5625c..00000000 --- a/pacsatsim-df.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -pwm=1 - -sudo modprobe snd-aloop - -sudo usermod -a -G gpio pi - -if [ "$pwm" = "1" ] ; then - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 - -else - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 - -fi From 2ea40d3500c99ba156858e6b644ec8539bd1ac8c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:43 -0400 Subject: [PATCH 699/774] Delete pacsatsim-dj.sh --- pacsatsim-dj.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 pacsatsim-dj.sh diff --git a/pacsatsim-dj.sh b/pacsatsim-dj.sh deleted file mode 100755 index 888124e6..00000000 --- a/pacsatsim-dj.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 From 97fd6433a8b6d5c6cc5d2a68b941c973a1ac67db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:59 -0400 Subject: [PATCH 700/774] Delete pacsatsim-djf.sh --- pacsatsim-djf.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 pacsatsim-djf.sh diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh deleted file mode 100755 index 1d0c3036..00000000 --- a/pacsatsim-djf.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 From fe33cc013dc458ecf8631d6f6f77bca3ac9b158d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:01:33 -0400 Subject: [PATCH 701/774] Delete pacsatsim-f.sh --- pacsatsim-f.sh | 211 ------------------------------------------------- 1 file changed, 211 deletions(-) delete mode 100755 pacsatsim-f.sh diff --git a/pacsatsim-f.sh b/pacsatsim-f.sh deleted file mode 100755 index 2a8bb965..00000000 --- a/pacsatsim-f.sh +++ /dev/null @@ -1,211 +0,0 @@ -#!/bin/bash - -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat - -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - -#sudo systemctl stop cubesatsim - -#sudo systemctl stop transmit - -sudo systemctl stop command &>/dev/null - -sudo modprobe snd-aloop - -#sudo systemctl stop openwebrx - -#sudo systemctl stop rtl_tcp &>/dev/null - -#pkill -o chromium &>/dev/null - -#sudo killall -9 rtl_fm &>/dev/null - -#sudo killall -9 direwolf &>/dev/null - -#udo killall -9 aplay &>/dev/null - -#sudo killall -9 qsstv &>/dev/null - -#sudo killall -9 rtl_tcp &>/dev/null - -#sudo killall -9 java &>/dev/null - -#sudo killall -9 CubicSDR &>/dev/null - -#sudo killall -9 zenity &>/dev/null - -echo - -#frequency=$(zenity --list 2>/dev/null --width=410 --height=360 --title="Packet Decoding with Direwolf" --text="Choose the frequency for packet decoding" --column="kHz" --column="Application" 144390 "APRS US 2m" 434900 "CubeSatSim" 144800 "APRS European 2m" 145175 "APRS Australian 2m" Other "Choose another frequency" 145825 "APRS on ISS" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") - -#echo $frequency - -#if [ -z "$frequency" ]; then - -#echo "No choice made. Exiting." - -#sleep 3 - -#exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -choice=2 - -#fi - -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 - echo - echo "If your Pacsat Ground Station is transmitting packets, you will see them here" - echo - -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi - -#echo - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -echo - -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & - -else - -# echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - -# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - - /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" - -### 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 & - - echo "Don't close the direwolf window or the Pacsatsim will stop running." - - echo -fi - -sleep 5 - -value=`aplay -l | grep "Loopback"` -echo "$value" > /dev/null -set -- $value - -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - -cd /home/pi/pi_pacsat/Debug - -./pi_pacsat -c pacsat.config -d /home/pi/PacSat - -sleep 5 From 941db56402f0abdd0a7107d6574e77aa1d86df00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:01:56 -0400 Subject: [PATCH 702/774] Delete txLED.py --- txLED.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 txLED.py diff --git a/txLED.py b/txLED.py deleted file mode 100644 index af9b6d51..00000000 --- a/txLED.py +++ /dev/null @@ -1,25 +0,0 @@ -import RPi.GPIO as GPIO -import subprocess -import time -import os -from time import sleep - -txPin = 27 -pttPin = 20 - -GPIO.setmode(GPIO.BCM) -GPIO.setwarnings(False) -GPIO.setup(txPin, GPIO.OUT) -GPIO.output(txPin, 0) -print("0") -GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) - -while (True): - sleep(0.1) - GPIO.wait_for_edge(pttPin, GPIO.FALLING) - GPIO.output(txPin, 1) - sleep(0.1) - print("1") - GPIO.wait_for_edge(pttPin, GPIO.RISING) - GPIO.output(txPin, 0) - print("0") From 41a81a72e44851de9400458010eb1ee22287956c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:02:29 -0400 Subject: [PATCH 703/774] Delete direwolf/direwolf-pacsatsim-jp14-half.conf --- direwolf/direwolf-pacsatsim-jp14-half.conf | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-jp14-half.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-half.conf b/direwolf/direwolf-pacsatsim-jp14-half.conf deleted file mode 100644 index d6a05876..00000000 --- a/direwolf/direwolf-pacsatsim-jp14-half.conf +++ /dev/null @@ -1,9 +0,0 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -#FULLDUP ON -FULLDUP OFF -TXDELAY 15 -#FIX_BITS 1 AX25 From 699241ced8a643054e85a2992f466204e9311873 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:02:40 -0400 Subject: [PATCH 704/774] Delete direwolf/direwolf-pacsatsim-jp14-loop.conf --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-jp14-loop.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf deleted file mode 100644 index bd04ddbc..00000000 --- a/direwolf/direwolf-pacsatsim-jp14-loop.conf +++ /dev/null @@ -1,15 +0,0 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -#FULLDUP ON -TXDELAY 15 -#FIX_BITS 1 AX25 -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -TXTAIL 10 -FULLDUP OFF From cc3a2452d1ade9d200986c11a064be28a2be7122 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:03:03 -0400 Subject: [PATCH 705/774] Delete direwolf/direwolf-pacsatsim-jp14.conf --- direwolf/direwolf-pacsatsim-jp14.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-jp14.conf diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf deleted file mode 100644 index 750c0fee..00000000 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ /dev/null @@ -1,19 +0,0 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -ADEVICE shared_mic plughw:CARD=Device,DEV=0 -PTT GPIO -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF From e88234a816f35e92245d8eca52ce0b9b39262515 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:03:15 -0400 Subject: [PATCH 706/774] Delete direwolf/direwolf-pacsatsim-loopback.conf --- direwolf/direwolf-pacsatsim-loopback.conf | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-loopback.conf diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf deleted file mode 100644 index f2ebf026..00000000 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ /dev/null @@ -1,18 +0,0 @@ -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 -PTT GPIO -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF From bb4d84bc645b654d3e915a14591584c624ee7ad5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:03:45 -0400 Subject: [PATCH 707/774] Delete direwolf/direwolf-pacsatsim-pwm-loopback.conf --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-pwm-loopback.conf diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf deleted file mode 100644 index 0d4d022d..00000000 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ /dev/null @@ -1,20 +0,0 @@ -ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 -PTT GPIOD gpiochip0 17 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF - -DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From 20a6e49d84e15c464480bb0abcb6e2a1251d43db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:04:01 -0400 Subject: [PATCH 708/774] Delete direwolf/direwolf-pacsatsim-pwm.conf --- direwolf/direwolf-pacsatsim-pwm.conf | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-pwm.conf diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf deleted file mode 100644 index 0b220148..00000000 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ /dev/null @@ -1,21 +0,0 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 -PTT GPIOD gpiochip0 -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF - -DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From ced62e0286295d8810126705b2765ae18c8a1132 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:04:32 -0400 Subject: [PATCH 709/774] Delete direwolf/direwolf.conf --- direwolf/direwolf.conf | 1 - 1 file changed, 1 deletion(-) delete mode 100644 direwolf/direwolf.conf diff --git a/direwolf/direwolf.conf b/direwolf/direwolf.conf deleted file mode 100644 index 701d80b4..00000000 --- a/direwolf/direwolf.conf +++ /dev/null @@ -1 +0,0 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 From 44ec5a6bbb06253c62fc9c16b195d69c63d115ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:05:00 -0400 Subject: [PATCH 710/774] Delete groundstation/pacsat-d.sh --- groundstation/pacsat-d.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 groundstation/pacsat-d.sh diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh deleted file mode 100755 index a794108c..00000000 --- a/groundstation/pacsat-d.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 From 5e5ca19f5b1275d8286c0bb7f962704cd739dc72 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:05:23 -0400 Subject: [PATCH 711/774] Delete groundstation/pacsat-df.sh --- groundstation/pacsat-df.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100755 groundstation/pacsat-df.sh diff --git a/groundstation/pacsat-df.sh b/groundstation/pacsat-df.sh deleted file mode 100755 index 99ffc988..00000000 --- a/groundstation/pacsat-df.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -pwm=1 - -sudo modprobe snd-aloop - -#gpio -g mode 20 out - -#gpio -g write 20 1 - -#direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 - -if [ "$pwm" = "1" ] ; then - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 - -else - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 - -fi From bbe6740c148b94682146039c56bc39d749d5fe94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:05:38 -0400 Subject: [PATCH 712/774] Delete groundstation/pacsat-dj.sh --- groundstation/pacsat-dj.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 groundstation/pacsat-dj.sh diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh deleted file mode 100755 index 7a49576e..00000000 --- a/groundstation/pacsat-dj.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0" - - - From cefba788f4cccde9ee3b7088719e78b7bd75eee4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:06:10 -0400 Subject: [PATCH 713/774] Delete groundstation/pacsatlog.desktop --- groundstation/pacsatlog.desktop | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/pacsatlog.desktop diff --git a/groundstation/pacsatlog.desktop b/groundstation/pacsatlog.desktop deleted file mode 100644 index b3032884..00000000 --- a/groundstation/pacsatlog.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Pacsat Log -GenericName=Pacsat Loopback -Comment=Pacsat -Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/log -p" -Icon=/home/pi/Icons/pacsat.png -Terminal=true -Type=Application -Categories=HamRadio; -Keywords=APRS; From c24b0165388e9bdde586568aa905aaef5627ffda Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:07:48 -0400 Subject: [PATCH 714/774] Delete groundstation/reset_pacsat.sh --- groundstation/reset_pacsat.sh | 55 ----------------------------------- 1 file changed, 55 deletions(-) delete mode 100755 groundstation/reset_pacsat.sh diff --git a/groundstation/reset_pacsat.sh b/groundstation/reset_pacsat.sh deleted file mode 100755 index 34e153a3..00000000 --- a/groundstation/reset_pacsat.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# script to clear Pacsat Ground Station and Pacsatsim state - -echo "Clearing all Pacsat Ground Station and Pacsatsim state" - -echo - -sudo systemctl stop pacsatsim - -#sudo killall -9 direwolf &>/dev/null - -sudo killall -9 java &>/dev/null - -cd - -cd pi_pacsat - -cd Debug - -sudo rm -r /home/pi/PacSat - -mkdir /home/pi/PacSat -mkdir /home/pi/PacSat/pacsat -mkdir /home/pi/PacSat/pacsat/dir - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=AMSAT-12" >> pacsat.config -echo "broadcast_callsign=AMSAT-11" >> pacsat.config -echo "digi_callsign=AMSAT-1" >> pacsat.config -echo "max_frames_in_tx_buffer=5" >> pacsat.config - -sudo rm pacsat_last_command_time.dat -sudo rm pacsat_upload_table.dat -sudo rm pacsat.state - -echo "pb_open=1" > pacsat.state -echo "uplink_open=1" >> pacsat.state -echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state -echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state - -touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat - -sudo rm -r /home/pi/PacSatGround - -mkdir /home/pi/PacSatGround - -echo - -echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" - From b756b1e53a1d763dc35fbf8a04a835fa60b3d4dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:08:31 -0400 Subject: [PATCH 715/774] Delete groundstation/direwolf/direwolf-pacsat-loopback.conf --- .../direwolf/direwolf-pacsat-loopback.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-pacsat-loopback.conf diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf deleted file mode 100644 index 6cd3d988..00000000 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ /dev/null @@ -1,19 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 -PTT GPIO -20 27 #Transmit LED -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -#FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 - -#DWAIT 0 -DWAIT 20 -SLOTTIME 300 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 150 -#TXTAIL 10 -FULLDUP OFF From 5609b9426d730f6a3916cfefc941c1a49c5904df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:08:42 -0400 Subject: [PATCH 716/774] Delete groundstation/direwolf/direwolf-fm-pacsat.conf --- groundstation/direwolf/direwolf-fm-pacsat.conf | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf deleted file mode 100644 index 53524acb..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ /dev/null @@ -1,7 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO 20 -KISSPORT 8100 -FULLDUP OFF -CHANNEL 0 -MODEM 1200 From 4f556ec5358480ae6ac3a2f7913950445c7e06f7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:08:52 -0400 Subject: [PATCH 717/774] Delete groundstation/direwolf/direwolf-fm-pacsat-pwm.conf --- .../direwolf/direwolf-fm-pacsat-pwm.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-pwm.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf deleted file mode 100644 index c1d5f5f9..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ /dev/null @@ -1,19 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO -20 27 #Transmit LED -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -#FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 - -#DWAIT 0 -DWAIT 20 -SLOTTIME 300 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 150 -#TXTAIL 10 -FULLDUP OFF From b24c51e00e7797a29f36c1b4a85d478a31ae5d9a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:04 -0400 Subject: [PATCH 718/774] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14.conf --- .../direwolf/direwolf-fm-pacsat-jp14.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf deleted file mode 100644 index 5df8f59e..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ /dev/null @@ -1,19 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO -20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -#FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 - -#DWAIT 0 -DWAIT 20 -SLOTTIME 300 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 150 -#TXTAIL 10 -FULLDUP OFF From 06bcd1022e15ea2b08ba07059f18513453f1f13d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:13 -0400 Subject: [PATCH 719/774] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf --- .../direwolf/direwolf-fm-pacsat-jp14-device.conf | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf deleted file mode 100644 index df741a62..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf +++ /dev/null @@ -1,10 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 -#FIX_BITS 1 AX25 From 0eae3bb40b6882414804da2e13719fb9d65df89d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:41 -0400 Subject: [PATCH 720/774] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf --- .../direwolf/direwolf-fm-pacsat-jp14-loop.conf | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf deleted file mode 100644 index cac3fffe..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf +++ /dev/null @@ -1,10 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO 20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 -#FIX_BITS 1 AX25 From 882747438466e803c53ad87bfdf5d151326ade10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:51 -0400 Subject: [PATCH 721/774] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf --- .../direwolf/direwolf-fm-pacsat-jp14-ptt.conf | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf deleted file mode 100644 index 279b7e0e..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf +++ /dev/null @@ -1,10 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 -#FIX_BITS 1 AX25 From 4cb685a5e54f8bb7377a7d4b4a3298e4f4555d89 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 11:19:09 -0400 Subject: [PATCH 722/774] Update install add auto remove at end --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 06805f10..20af2866 100755 --- a/install +++ b/install @@ -821,6 +821,8 @@ sed -i 's/quick_exec=0/quick_exec=1/' ~/.config/libfm/libfm.conf sudo apt install -y raspberrypi-ui-mods +sudo apt autoremove -y + if [ "$noreboot" = "0" ] ; then if [ $FLAG -eq 1 ]; then # Not sure if this is needed From c8c7859e5a1b78497cf4b49bb0781472178bb8bc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 11:50:48 -0400 Subject: [PATCH 723/774] Update pacsat.sh check for PacSat Ground mode before running --- groundstation/pacsat.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 8cd8114d..879ae1ec 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -61,6 +61,44 @@ if [ -f "$FILE" ]; then fi +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value + +MODE=$1 + +if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then + + echo "Mode is not PacSat Ground Station" + echo + echo "Would you like to change to PacSat Ground Station mode and reboot? (y/n)?" + + read -r ANS + + if [ "$ANS" = "y" ]; then + + /home/pi/CubeSatSim/config -I + exit + + else + + echo "You can run the PacSat Ground Station after you change mode and reboot." + exit + + fi + +elif [ "$loopback" = "1" ] ; then + + echo "Simulated PacSatSim so mode doesn't matter" + echo + +else + + echo "Mode is PacSat Ground Station" + echo + +fi + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value From 7be11fb8fb538cf70407981f54e0ea85d3932f14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 11:57:04 -0400 Subject: [PATCH 724/774] Update pacsat.sh added extra spaces --- groundstation/pacsat.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 879ae1ec..a4cebece 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -69,6 +69,7 @@ MODE=$1 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)?" @@ -81,19 +82,23 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then exit else - + + echo echo "You can run the PacSat Ground Station after you change mode and reboot." + sleep 10 exit fi elif [ "$loopback" = "1" ] ; then + echo echo "Simulated PacSatSim so mode doesn't matter" echo else + echo echo "Mode is PacSat Ground Station" echo From a75fe7433860fa2eca8c3a3dba94ebb25e000b7e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:00:58 -0400 Subject: [PATCH 725/774] Delete spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame --- .../PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame deleted file mode 100644 index 050ff88a..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame +++ /dev/null @@ -1,13 +0,0 @@ -number_of_payloads=6 -payload0.name=rttelemetry -payload0.length=78 -payload1.name=rttelemetry -payload1.length=78 -payload2.name=rttelemetry -payload2.length=78 -payload3.name=rttelemetry -payload3.length=78 -payload4.name=rttelemetry -payload4.length=78 -payload5.name=wodtelemetry -payload5.length=78 From 5faa24c6f3b2ee3a71f64bee840aac02269cdd98 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:01:43 -0400 Subject: [PATCH 726/774] Delete spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame --- .../PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame deleted file mode 100644 index a69be045..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame +++ /dev/null @@ -1,13 +0,0 @@ -number_of_payloads=6 -payload0.name=rttelemetry -payload0.length=78 -payload1.name=rttelemetry -payload1.length=78 -payload2.name=rttelemetry -payload2.length=78 -payload3.name=maxtelemetry -payload3.length=78 -payload4.name=mintelemetry -payload4.length=78 -payload5.name=wodtelemetry -payload5.length=78 From 8bccf46c6cd5043604e1dd1bb6548a1c51f25530 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:02:10 -0400 Subject: [PATCH 727/774] Delete spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv --- .../PacSatSim_maxtelemetry.csv | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv deleted file mode 100644 index 7713c778..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv +++ /dev/null @@ -1,64 +0,0 @@ -62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds -1,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -2,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -3,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage -4,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -5,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -6,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -7,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current -8,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -9,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage -10,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage -11,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage -12,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage -13,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage -14,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage -15,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current -16,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current -17,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current -18,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current -19,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current -20,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current -21,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage -22,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -23,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -24,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -25,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -26,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication -27,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -28,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -29,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -30,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -31,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity -32,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current -33,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -35,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -36,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -37,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -38,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -39,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -40,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -41,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -42,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator -43,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received -44,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status -45,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status -46,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status -47,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -48,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -49,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -50,MAX,rf6,12,-,0,NONE,0,0,0,None,None -51,MAX,rf7,12,-,0,NONE,0,0,0,None,None -52,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -53,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -54,MAX,pad,4,-,34,NONE,0,0,0,None,Unused -55,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -56,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler -57,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -58,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -59,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -60,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -61,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From 830c94501c08c3e25a5f64add54e81e8741c6d6b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:02:33 -0400 Subject: [PATCH 728/774] Delete spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv --- .../PacSatSim_mintelemetry.csv | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv deleted file mode 100644 index adf24a04..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv +++ /dev/null @@ -1,62 +0,0 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,MIN,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -1,MIN,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,MIN,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage -3,MIN,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,MIN,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,MIN,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,MIN,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current -7,MIN,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,MIN,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage -9,MIN,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,MIN,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,MIN,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage -12,MIN,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,MIN,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,MIN,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current -15,MIN,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current -16,MIN,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current -17,MIN,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current -18,MIN,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current -19,MIN,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current -20,MIN,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage -21,MIN,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,MIN,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,MIN,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -24,MIN,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,MIN,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication -26,MIN,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,MIN,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,MIN,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,MIN,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,MIN,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity -31,MIN,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current -32,MIN,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature -33,MIN,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -34,MIN,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,MIN,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,MIN,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -37,MIN,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -38,MIN,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,MIN,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -40,MIN,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -41,MIN,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator -42,MIN,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received -43,MIN,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status -44,MIN,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status -45,MIN,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status -46,MIN,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,MIN,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -48,MIN,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -49,MIN,rf6,12,-,0,NONE,0,0,0,None,None -50,MIN,rf7,12,-,0,NONE,0,0,0,None,None -51,MIN,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,MIN,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -53,MIN,pad,4,-,34,NONE,0,0,0,None,Unused -54,MIN,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -55,MIN,pad1,1,-,0,NONE,0,0,0,NONE,Filler -56,MIN,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -57,MIN,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -58,MIN,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -59,MIN,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -60,MIN,pad2,27,-,0,NONE,0,0,0,NONE,Filler From defe5ac4851953d6ab493f465fc8ac7c96679660 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:02:55 -0400 Subject: [PATCH 729/774] Delete spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv --- .../PacSatSim_wodtelemetry.csv | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv deleted file mode 100644 index d1b53340..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv +++ /dev/null @@ -1,62 +0,0 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,WOD,BATT_A_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Cell A,Battery A voltage (0-2.5V scale) -1,WOD,BATT_B_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,2,3,Cell A+B,Battery A+B voltage (0-3.3V scale) -2,WOD,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Cell A+B+C Voltage,Battery A+B+C voltage (0-5.0V scale) -3,WOD,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,Acceleration around X Axis -4,WOD,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,Acceleration around Y Axis -5,WOD,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,Acceleration around Z Axis -6,WOD,battCurr,12,mA,cubesatsim_current,Battery,4,2,4,Current,Total Battery DC current -7,WOD,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,Temperature,STEM Payload Sensor Temperature -8,WOD,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,+X solar Panel voltage -9,WOD,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,+Y solar Panel voltage -10,WOD,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,+Z solar Panel voltage -11,WOD,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,-X solar Panel voltage -12,WOD,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,-Y solar Panel voltage -13,WOD,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,-Z solar Panel voltage -14,WOD,posXi,12,mA,cubesatsim_current,+X Panel,7,2,4,Current,+X solar Panel current -15,WOD,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,4,Current,+Y solar Panel current -16,WOD,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,4,Current,+Z solar Panel current -17,WOD,negXi,12,mA,cubesatsim_current,-X Panel,10,2,4,Current,-X solar Panel current -18,WOD,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,4,Current,-Y solar Panel current -19,WOD,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,4,Current,-Z solar Panel current -20,WOD,PSUVoltage,12,V,cubesatsim_voltage|FLOAT2,PSU,5,1,3,Voltage,Power Supply Voltage -21,WOD,spin,12,rpm,12,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,WOD,Pressure,12,bar,cubesatsim_pressure,Experiments,6,3,3,Pressure,STEM Payload Sensor Pressure -23,WOD,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,Altitude,STEM Payload Sensor Altitude -24,WOD,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,WOD,rssi,12,dBm,14,Radio,1,1,3,RSSI,Received Signal Strength Indication -26,WOD,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,Temperature,Internal Temperature of IHU -27,WOD,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,Angular Veolcity around X Axis -28,WOD,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,Angular Veolcity around Y Axis -29,WOD,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,Angular Veolcity around Z Axis -30,WOD,Sensor1,12,raw,cubesatsim_sensor1|INT,Experiments,6,5,3,Sensor 1,STEM Payload Extra Sensor 1 -31,WOD,PSUCurrent,12,mA,cubesatsim_current,PSU,5,2,3,Current,Power Supply DC Current -32,WOD,Sensor2,12,signed raw,cubesatsim_sensor2|INT,Experiments,6,6,3,Sensor 2,STEM Payload Extra Sensor 2 -33,WOD,Sensor3,12,signed scaled,cubesatsim_sensor3|FLOAT2,Experiments,6,7,3,Sensor 3,STEM Payload Extra Sensor 3 -34,WOD,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload Board Failure Indicator -35,WOD,Nominal Mode,1,-,17,Computer Software,3,2,0,Nominal Mode, Nominal Mode (Not Safe Mode) -36,WOD,PayloadStatus1,1,-,17,NONE,6,7,0,Exp 2,STEM Payload status 1 failure indicator -37,WOD,PayloadStatus2,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 2 failure indicator -38,WOD,I2CBus0Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,WOD,I2CBus1Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 1,I2C bus 1 failure indicator -40,WOD,I2CBus3Failure,1,-,17,Computer Hardware,2,4,0,I2C Bus 3,I2C bus 3 failure indicator -41,WOD,CameraFailure,1,-,17,Computer Hardware,2,5,0,Camera,Camera failure indicator -42,WOD,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received -43,WOD,RxAntDeploy,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status -44,WOD,TxAntDeploy,2,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status -45,WOD,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -46,WOD,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -47,WOD,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -48,WOD,rf6,12,-,0,NONE,0,0,0,None,None -49,WOD,rf7,12,-,0,NONE,0,0,0,None,None -50,WOD,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -51,WOD,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -52,WOD,pad,4,-,34,NONE,0,0,0,None,Unused -53,WOD,WODTimeStampReset,16,-,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected -54,WOD,pad1,17,-,0,NONE,0,0,0,NONE,Filler -55,WOD,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -56,WOD,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -57,WOD,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -58,WOD,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -59,WOD,WODTimeStampUpTime,25,s,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected -60,WOD,pad2,3,-,0,NONE,0,0,0,NONE,Filler From 27fe4062ccbc2d350c775ba82575d49e1ee1cbc9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 15:20:22 -0400 Subject: [PATCH 730/774] Update install don't create PacSatGround directory --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 20af2866..3c7475e1 100755 --- a/install +++ b/install @@ -569,14 +569,14 @@ sudo raspi-config nonint do_vnc 0 -if [ ! -d "/home/pi/PacSatGround" ]; then +if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then cd /tmp wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop rm PacsatGround_unix_0_46o.tar.gz cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ - mkdir /home/pi/PacSatGround +# mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi sudo apt-get install default-jdk -y From b558f940f9c7763e46774e83fd74ef4b08d3b6d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 15:24:13 -0400 Subject: [PATCH 731/774] Update pacsat.sh cleanup --- groundstation/pacsat.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index a4cebece..5ab273f3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -126,8 +126,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" sleep 10 fi @@ -142,7 +141,6 @@ if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then echo echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 fi From c6e4bd7b12f1ccc5a4ac37aeb7a3f6e72939b3d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:15:51 -0400 Subject: [PATCH 732/774] update g0kla-common if changed, don't create pacsatsim directories --- install | 77 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/install b/install index 3c7475e1..8a7d2c45 100755 --- a/install +++ b/install @@ -482,17 +482,31 @@ if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then FLAG=1 fi -cd - -FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled -if [ ! -f "$FILE" ]; then +if [ ! -d "/home/pi/g0kla_common" ]; then cd git clone https://github.com/alanbjohnston/g0kla_common.git cd g0kla_common/Debug/ make clean make all sudo ./install.sh + +else + cd /home/pi/g0kla_common/Debug/ + + git pull --no-rebase > .updated + grep 'changed' /home/pi/g0kla_common/Debug/.updated + if [[ $(grep 'changed' /home/pi/g0kla_common/Debug/.updated) ]]; then + echo "updating g0kla_common" + make clean + make all + FLAG=1 + fi +fi + +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 @@ -502,38 +516,39 @@ if [ ! -f "$FILE" ]; then make clean make all - mkdir /home/pi/PacSat - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir +# mkdir /home/pi/PacSat +# mkdir /home/pi/PacSat/pacsat +# mkdir /home/pi/PacSat/pacsat/dir - export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - #value=`cat /home/pi/CubeSatSim/sim.cfg` - #echo "$value" > /dev/null - #set -- $value +# #value=`cat /home/pi/CubeSatSim/sim.cfg` +# #echo "$value" > /dev/null +# #set -- $value - echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=AMSAT-12" >> pacsat.config - echo "broadcast_callsign=AMSAT-11" >> pacsat.config - echo "digi_callsign=AMSAT-1" >> pacsat.config - echo "max_frames_in_tx_buffer=5" >> pacsat.config +# echo "bit_rate=9600" > pacsat.config +# echo "bbs_callsign=AMSAT-12" >> pacsat.config +# echo "broadcast_callsign=AMSAT-11" >> pacsat.config +# echo "digi_callsign=AMSAT-1" >> pacsat.config +# echo "max_frames_in_tx_buffer=5" >> pacsat.config - echo "pb_open=1" > pacsat.state - echo "uplink_open=1" >> pacsat.state - echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state - echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state -fi +# echo "pb_open=1" > pacsat.state +# echo "uplink_open=1" >> pacsat.state +# echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +# echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state -cd /home/pi/pi_pacsat/Debug/ - -git pull --no-rebase > .updated -grep 'changed' /home/pi/pi_pacsat/Debug/.updated -if [[ $(grep 'changed' /home/pi/pi_pacsat/Debug/.updated) ]]; then - - echo "updating pi_pacsat" - make clean - make all - FLAG=1 +else + cd /home/pi/pi_pacsat/Debug/ + + git pull --no-rebase > .updated + grep 'changed' /home/pi/pi_pacsat/Debug/.updated + if [[ $(grep 'changed' /home/pi/pi_pacsat/Debug/.updated) ]]; then + + echo "updating pi_pacsat" + make clean + make all + FLAG=1 + fi fi FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled From e4663ab34b4f1a2d005cc9934dde797948aa553e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:23:04 -0400 Subject: [PATCH 733/774] Update pacsatsim.sh setup PacSat and pi_pacsat files if not present --- pacsatsim.sh | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 78c952a8..6bda8ece 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -64,28 +64,40 @@ if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" echo - mkdir /home/pi/PacSat - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir + cd + sudo rm PacSat.zip + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/PacSat.zip + unzip PacSat.zip -d PacSat/pacsat + sudo rm PacSat.zip + + cd + sudo rm pi_pacsat.zip + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pi_pacsat.zip + unzip pi_pacsat.zip -d /pi_pacsat/Debug + sudo rm pi_pacsat.zip + +# mkdir /home/pi/PacSat +# mkdir /home/pi/PacSat/pacsat +# mkdir /home/pi/PacSat/pacsat/dir - cd /home/pi/pi_pacsat/Debug +# cd /home/pi/pi_pacsat/Debug - sudo rm pacsat_last_command_time.dat - sudo rm pacsat_upload_table.dat - sudo rm pacsat.state +# sudo rm pacsat_last_command_time.dat +# sudo rm pacsat_upload_table.dat +# sudo rm pacsat.state - echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=AMSAT-12" >> pacsat.config - echo "broadcast_callsign=AMSAT-11" >> pacsat.config - echo "digi_callsign=AMSAT-1" >> pacsat.config - echo "max_frames_in_tx_buffer=5" >> pacsat.config +# echo "bit_rate=9600" > pacsat.config +# echo "bbs_callsign=AMSAT-12" >> pacsat.config +# echo "broadcast_callsign=AMSAT-11" >> pacsat.config +# echo "digi_callsign=AMSAT-1" >> pacsat.config +# echo "max_frames_in_tx_buffer=5" >> pacsat.config - echo "pb_open=1" > pacsat.state - echo "uplink_open=1" >> pacsat.state - echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state - echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state +# echo "pb_open=1" > pacsat.state +# echo "uplink_open=1" >> pacsat.state +# echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +# echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state - touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat +# touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat fi From e30024cea876923794b026bc555d2581eabbd8e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:26:35 -0400 Subject: [PATCH 734/774] Update pacsatsim.sh remove pi_pacsat config files before unzipping --- pacsatsim.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6bda8ece..46ac1b51 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -71,6 +71,9 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm PacSat.zip cd + sudo rm /home/pi/pi_pacsat/Debug/pacsat.config + 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.1/pi_pacsat.zip unzip pi_pacsat.zip -d /pi_pacsat/Debug From e07b3d5cb044af6af8cf14bbc37e7066356195fd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:33:36 -0400 Subject: [PATCH 735/774] Update pacsatsim.sh fix pi_pacsat extraction --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 46ac1b51..85e479b8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -76,7 +76,7 @@ if [ ! -d "/home/pi/PacSat" ]; then 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.1/pi_pacsat.zip - unzip pi_pacsat.zip -d /pi_pacsat/Debug + unzip pi_pacsat.zip -d /home/pi/pi_pacsat/Debug sudo rm pi_pacsat.zip # mkdir /home/pi/PacSat From 6cbb87c3e22d22afbc9d6e31a94ea80d29063fe9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:37:30 -0400 Subject: [PATCH 736/774] Update pacsatsim.sh make PacSat directory --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 85e479b8..b3bda875 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -66,6 +66,8 @@ if [ ! -d "/home/pi/PacSat" ]; then cd sudo rm PacSat.zip + mkdir PacSat + mkdir PacSat/pacsat wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/PacSat.zip unzip PacSat.zip -d PacSat/pacsat sudo rm PacSat.zip From d1e80499a4454e9e4f99febfdceaf58ac6b713b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:54:30 -0400 Subject: [PATCH 737/774] Update pacsat-config.sh just delete directory for ground station reset --- groundstation/pacsat-config.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 776ea84b..275128bc 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -30,6 +30,7 @@ sudo killall -9 direwolf &>/dev/null echo " 4. Reset PacSat Satellite" echo echo "Which do you choose? Enter 1 - 4" + echo read -r ANS @@ -56,6 +57,7 @@ sudo killall -9 direwolf &>/dev/null echo " 2. Set Remote PacSat Satellite Callsign in Ground Station configuration" echo echo " 3. Reset PacSat Ground Station Configuration" + echo read -r CH @@ -82,6 +84,7 @@ sudo killall -9 direwolf &>/dev/null echo $oldcallsign echo "Enter new callsign in all capitals: " + echo read callsign if [ -z $callsign ] ; then @@ -122,6 +125,7 @@ sudo killall -9 direwolf &>/dev/null echo echo "Enter new callsign in all capitals: " + echo read callsign if [ -z $callsign ] ; then @@ -147,27 +151,28 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to reset the PacSat Ground Station Configuration" echo - echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" - echo +# echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" +# echo if [ "$ANS" = "1" ] ; then sudo rm -r /home/pi/PacSatGround - cd - sudo rm PacSatGround.zip - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGround - sudo rm PacSatGround.zip + # cd + # sudo rm PacSatGround.zip + # wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + # unzip PacSatGround.zip -d PacSatGround + # sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop - cd - sudo rm PacSatGround.zip - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGroundLoop - sudo rm PacSatGround.zip + # cd + # sudo rm PacSatGround.zip + # wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + # unzip PacSatGround.zip -d PacSatGroundLoop + # sudo rm PacSatGround.zip fi else echo "Please choose an option 1-3" + echo fi From 42b68f8a934a3efc6226e8249ee3a6f409cc26b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 17:16:33 -0400 Subject: [PATCH 738/774] Update pacsatsim.sh unzip pacsat-dir --- pacsatsim.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index b3bda875..04d861b6 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -65,12 +65,13 @@ if [ ! -d "/home/pi/PacSat" ]; then echo cd - sudo rm PacSat.zip + sudo rm pacsat-dir.zip mkdir PacSat mkdir PacSat/pacsat - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/PacSat.zip - unzip PacSat.zip -d PacSat/pacsat - sudo rm PacSat.zip + mkdir PacSat/pacsat/dir + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pacsat-dir.zip + unzip pacsat-dir.zip -d PacSat/pacsat/dir + sudo rm pacsat-dir.zip cd sudo rm /home/pi/pi_pacsat/Debug/pacsat.config From a6d576a079519b16e669e02fff380e8fc2d8ec8c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 17:32:19 -0400 Subject: [PATCH 739/774] Update pacsat.sh loopback put in PacSat mode no reboot --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5ab273f3..e8aae9ee 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -120,7 +120,7 @@ echo if [ ! -d "/home/pi/PacSatGround" ] ; then cd - sudo rm PacSatGround.zip + sudo rm PacSatGround.zip &>/dev/null wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip @@ -134,7 +134,7 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then cd - sudo rm PacSatGround.zip + sudo rm PacSatGround.zip &>/dev/null wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip @@ -193,6 +193,8 @@ sudo usermod -a -G gpio pi if [ "$loopback" = "1" ] ; then + /home/pi/CubeSatSim/config -G n + echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="PTT GPIOD gpiochip0 17" From c03f45756521777e01b044e328fde2b8d1b8b73f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 16:14:16 -0600 Subject: [PATCH 740/774] Add files via upload --- .../PacSatGround_0.46o/PacSatGroundLoop.zip | Bin 0 -> 8350 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip b/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip new file mode 100644 index 0000000000000000000000000000000000000000..dd82ecdbfeaec7a462c55f71e97d119d6934d786 GIT binary patch literal 8350 zcmeHM3pkYN9{&cpWJofaNunYpGsaZPrkFNmTq24|#Ee^`aU0Wax*9|`D#^VB`PglNauUU4&P{|*4cB;p3bxXo-s4e_sswDdw=i$egD5~EhVK? zAYfXD+0OhAzyBEzX+pL%cY7M!p5d#%c8vlgv-@f(V|_&_1H5nEA`hXYdQlL>|Gh2W zk1QlBT8tT;yP3c#8M5S?4zg-rZYIP_YXUYuA44*iikd$&FC!T71=t#CBHHjLV;24t_ zUuApR-_4E2^z};gpm}YKW2&bl#8G1zzO+ZJJ`6Wn>LwqWTlyw?vsY$k2eXB{$*qIl z&15j2dok%e2(q=5k=2b|kr@e>0?HXG6kue(BR~i+B_Y7pSXnP$HUt~NrHBt1lU6jk z$Pw6(-awowNZ5u!g8}3_=7T5j`?Y}wSQ3O_n-ms;CJBK@SZ?oX&-Q0|^6OOlopRuP z6iK=g@_jB7l_EX{sT0|E5?1FOT4)<4BEh+pG+} zH9r24*V)Y=xpLc{%?@zAXk}pN;*(CX4N1Ag}Qj*ePI zd5c9`&)}~9&4d2f3XK(2iw-X6ljDVy+b@ySl?i~H8Zpq+L z)&`>)&n1>03vi&XOW(ktctuZhHZyyy-H>=~QafoLaVzPpinl|CgG$H&f;Z|ghL3e( z&3P|xI9ZUe=u*Juoh}Y*u~m%;?!UYNj)!;frwtG%w17hm5dLdxKwx-m8SYr1Yl&Dx z&}U(v!!`o$=+3Am8r-3H{Qf8+;{OA_lSSa`XtVs^i|&liqbn-j*M+SL%w1V17IFSS zQV=wP?MjyaW6=WB#z7Y6i(GNv{?3K+nyJos42n-P6dv)D|gqD>|~<9(_|Nr8ggwph6vzK#-d zN;PJeA9CWHCwZ90)$00~mWR#4Op>-OOS!v!WexLqNzBE-knrregn=WSE7Y5d+wN^R z6>sF2Z5FyC@PI@?d&TYZHu4c9%P7yrm@T1?WsJ+7me0QQ3VjWyXlEQ9V7#=&Ao_9{ z+l0JNSNnne-~@AQ+AZj4G;fXxW6qR}6d(F#nd{lb-%)LzarSL;&+2X^Di?L0GV;y( zW^o9^FgQ5<>9ZHC!IFU`A*xbSrA;>GY;B+^MV97iUzes*cI#gEn=Ey0Cd<&0*LFPA z!(XC`eCsf);pM`?t80kU(Rtbw)%#j29aL*obNzQ|Nb@Rte9N3_Duc?jTe6O8>Cbtf z6})1a-vdmZ;X?&{)C6ffk3>MPI}?X%lq@K4o5FmtwS4_rqYH)c3taFWTMH{cxTJY} zDAj+sr2hzB{bTdGO8keW$GaH>T*Is>sb@Yg$R?&qt$Q^(n%a4DvM&6v>$_rH>baMO zmpUtAE+*GU)^@pGq|GJpw12^EA!K{6*GX<4s2lg|yC3G?j=uAc9{R1uX_a{$C4*Yg z&7>cqqpT#2lUo=86J_XEX;%~@8Z6XTTHNbkrREhHR#7VzcQ9Y9xb^Gm4&3{B1boLn zO!H9%%bQOc=o@=9KpULa#iLkDz?~509eZ}!)pt1Tl_Rf%dX?qJv+R18+0C_ZejW4Lp7i=IuL>K+ z35O)ZRF+w%-4{J2{S7*;fK_iCKkqI3+*!p`%j&)i>bM% z-?{DfBpsaFwU35Ijz86h@p=z)2aYu@aV24oDdJr2mN^WMB(X6}FCUshbY^U|@+N8i z6(g6uZQ?-`1c5~!T7GaS8Y6B?;JZBBr-K4$?w;-}niqR$(2#v7w6WxtCwj6HBJqAlh`R^+MgsY}lEGP9E+^j}|4 zeoiz_cCY&J)r0cE{COnqC39DEr(&WZCyH6~X3?Eh>Ss}Xp@*_+a?Q(Ath$53ym@jh zhUy^)^~}!UcSfl2f+Y;1nv$XeO<7N|5I*(>@y(7IEe~<6Wpg#A#w1){^m3J}jlcio z>~?&?M(1F^^#$9Sr@m$Op$&JtrAtm*6%=<;Tc!T->hf6^(pl0r9ksY8`^^TTFpY*B z?u;N$m#|J5(A^yS{Yp(>dV>`i>263?qT#2yNLG$;5-A{vTeh)L6|X7XgA2y)k%*o? zovfrvy@t~4BisKZg_-Q;cF5w^&vll1v#(R?Zcy|HbMULIDHJ`*T1DB2>{958AsU@7 zyLorUUbDTy+KItg=$>nRUZEGHh_XuSiuH}#I_RikglE)ifxVlwVJJd44=YQK)X~Q!$(CuIAE=Z<+p(;s0l`A;r$8F5RKE{oc^2B zBK5JajMIjQqYWlIBm?jLAkRR82aU}?gWft9F~Cd2u{ICv4H?<#5AXjb3I7uOdStI4 z{eqKD8TN}%B1MH5TkrU*b;zMH99bq@ln;c9>V_58Ap(A0ClDcWA$JrAf*ewXi%OM86!kCb5`uUDEaYqe zzJt+MU|r-B3eeaF;StgS$H=V&Mqz<cov!B~(xSP&2bIq`rQRA5}rT}7eX zhns`A(MH5XIyx9~Yyd-)z_^^9N{D*?^hh;2uJ|G|C;k_Uw43ywDiYj?koQb*OBEQG zvlYHgh`LaIp+5kpNCtu{s=#1+z)q126mcgO(+>nq4tb3Oeub01fPs@1ag+N~Nh_)f bCoRIi$fU=?JsyIv@V_H+5Y!8MfuMf^Q4+f+ literal 0 HcmV?d00001 From 524b38e19cf2534f2a7161af5ad3371328efa939 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 18:16:26 -0400 Subject: [PATCH 741/774] Update pacsat.sh use separate ZIP file for Loopback --- groundstation/pacsat.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e8aae9ee..940cd020 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -121,7 +121,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then cd sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip @@ -134,10 +134,10 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then cd - sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGroundLoop - sudo rm PacSatGround.zip + sudo rm PacSatGroundLoop.zip &>/dev/null + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip + unzip PacSatGroundLoop.zip -d PacSatGroundLoop + sudo rm PacSatGroundLoop.zip echo echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" From 6280e60cfdd144c3ed19398a1115b9fcce616c43 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 18:50:13 -0400 Subject: [PATCH 742/774] Update pacsat.sh only check for directory for that mode --- groundstation/pacsat.sh | 68 +++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 940cd020..a98f9145 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -92,9 +92,27 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then elif [ "$loopback" = "1" ] ; then - echo - echo "Simulated PacSatSim so mode doesn't matter" - echo + if [ ! "$MODE" = "p" ] + echo + echo "Switching to PacSat mode for the Simulated PacSat Satellite" + echo + /home/pi/CubeSatSim/config -G n + fi + +# if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then + if [ ! "$loopback" = "1" ] ; then # don't do this for now. + + cd + sudo rm PacSatGroundLoop.zip &>/dev/null + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip + unzip PacSatGroundLoop.zip -d PacSatGroundLoop + sudo rm PacSatGroundLoop.zip + + echo + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" + sleep 10 + + fi else @@ -102,6 +120,20 @@ else echo "Mode is PacSat Ground Station" echo + if [ ! -d "/home/pi/PacSatGround" ] ; then + + cd + sudo rm PacSatGround.zip &>/dev/null + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGround + sudo rm PacSatGround.zip + + echo + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" + sleep 10 + + fi + fi value=`cat /home/pi/CubeSatSim/sim.cfg` @@ -117,34 +149,6 @@ echo -n "Transmit Frequency is " echo $frequency echo -if [ ! -d "/home/pi/PacSatGround" ] ; then - - cd - sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGround - sudo rm PacSatGround.zip - - echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 - -fi - -if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then - - cd - sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip - unzip PacSatGroundLoop.zip -d PacSatGroundLoop - sudo rm PacSatGroundLoop.zip - - echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 - -fi - sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties @@ -193,8 +197,6 @@ sudo usermod -a -G gpio pi if [ "$loopback" = "1" ] ; then - /home/pi/CubeSatSim/config -G n - echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="PTT GPIOD gpiochip0 17" From 17628e401269bb3fbca5451552793701e4127c11 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 19:05:37 -0400 Subject: [PATCH 743/774] Update pacsat.sh missing then --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index a98f9145..ed80ba01 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -92,7 +92,7 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then elif [ "$loopback" = "1" ] ; then - if [ ! "$MODE" = "p" ] + if [ ! "$MODE" = "p" ] ; then echo echo "Switching to PacSat mode for the Simulated PacSat Satellite" echo From f0e8620c5648db24cdb3363e8fd02fbe2750ef83 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 19:13:56 -0400 Subject: [PATCH 744/774] Delete spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip --- .../PacSatGround_0.46o/PacSatGroundLoop.zip | Bin 8350 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip b/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip deleted file mode 100644 index dd82ecdbfeaec7a462c55f71e97d119d6934d786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8350 zcmeHM3pkYN9{&cpWJofaNunYpGsaZPrkFNmTq24|#Ee^`aU0Wax*9|`D#^VB`PglNauUU4&P{|*4cB;p3bxXo-s4e_sswDdw=i$egD5~EhVK? zAYfXD+0OhAzyBEzX+pL%cY7M!p5d#%c8vlgv-@f(V|_&_1H5nEA`hXYdQlL>|Gh2W zk1QlBT8tT;yP3c#8M5S?4zg-rZYIP_YXUYuA44*iikd$&FC!T71=t#CBHHjLV;24t_ zUuApR-_4E2^z};gpm}YKW2&bl#8G1zzO+ZJJ`6Wn>LwqWTlyw?vsY$k2eXB{$*qIl z&15j2dok%e2(q=5k=2b|kr@e>0?HXG6kue(BR~i+B_Y7pSXnP$HUt~NrHBt1lU6jk z$Pw6(-awowNZ5u!g8}3_=7T5j`?Y}wSQ3O_n-ms;CJBK@SZ?oX&-Q0|^6OOlopRuP z6iK=g@_jB7l_EX{sT0|E5?1FOT4)<4BEh+pG+} zH9r24*V)Y=xpLc{%?@zAXk}pN;*(CX4N1Ag}Qj*ePI zd5c9`&)}~9&4d2f3XK(2iw-X6ljDVy+b@ySl?i~H8Zpq+L z)&`>)&n1>03vi&XOW(ktctuZhHZyyy-H>=~QafoLaVzPpinl|CgG$H&f;Z|ghL3e( z&3P|xI9ZUe=u*Juoh}Y*u~m%;?!UYNj)!;frwtG%w17hm5dLdxKwx-m8SYr1Yl&Dx z&}U(v!!`o$=+3Am8r-3H{Qf8+;{OA_lSSa`XtVs^i|&liqbn-j*M+SL%w1V17IFSS zQV=wP?MjyaW6=WB#z7Y6i(GNv{?3K+nyJos42n-P6dv)D|gqD>|~<9(_|Nr8ggwph6vzK#-d zN;PJeA9CWHCwZ90)$00~mWR#4Op>-OOS!v!WexLqNzBE-knrregn=WSE7Y5d+wN^R z6>sF2Z5FyC@PI@?d&TYZHu4c9%P7yrm@T1?WsJ+7me0QQ3VjWyXlEQ9V7#=&Ao_9{ z+l0JNSNnne-~@AQ+AZj4G;fXxW6qR}6d(F#nd{lb-%)LzarSL;&+2X^Di?L0GV;y( zW^o9^FgQ5<>9ZHC!IFU`A*xbSrA;>GY;B+^MV97iUzes*cI#gEn=Ey0Cd<&0*LFPA z!(XC`eCsf);pM`?t80kU(Rtbw)%#j29aL*obNzQ|Nb@Rte9N3_Duc?jTe6O8>Cbtf z6})1a-vdmZ;X?&{)C6ffk3>MPI}?X%lq@K4o5FmtwS4_rqYH)c3taFWTMH{cxTJY} zDAj+sr2hzB{bTdGO8keW$GaH>T*Is>sb@Yg$R?&qt$Q^(n%a4DvM&6v>$_rH>baMO zmpUtAE+*GU)^@pGq|GJpw12^EA!K{6*GX<4s2lg|yC3G?j=uAc9{R1uX_a{$C4*Yg z&7>cqqpT#2lUo=86J_XEX;%~@8Z6XTTHNbkrREhHR#7VzcQ9Y9xb^Gm4&3{B1boLn zO!H9%%bQOc=o@=9KpULa#iLkDz?~509eZ}!)pt1Tl_Rf%dX?qJv+R18+0C_ZejW4Lp7i=IuL>K+ z35O)ZRF+w%-4{J2{S7*;fK_iCKkqI3+*!p`%j&)i>bM% z-?{DfBpsaFwU35Ijz86h@p=z)2aYu@aV24oDdJr2mN^WMB(X6}FCUshbY^U|@+N8i z6(g6uZQ?-`1c5~!T7GaS8Y6B?;JZBBr-K4$?w;-}niqR$(2#v7w6WxtCwj6HBJqAlh`R^+MgsY}lEGP9E+^j}|4 zeoiz_cCY&J)r0cE{COnqC39DEr(&WZCyH6~X3?Eh>Ss}Xp@*_+a?Q(Ath$53ym@jh zhUy^)^~}!UcSfl2f+Y;1nv$XeO<7N|5I*(>@y(7IEe~<6Wpg#A#w1){^m3J}jlcio z>~?&?M(1F^^#$9Sr@m$Op$&JtrAtm*6%=<;Tc!T->hf6^(pl0r9ksY8`^^TTFpY*B z?u;N$m#|J5(A^yS{Yp(>dV>`i>263?qT#2yNLG$;5-A{vTeh)L6|X7XgA2y)k%*o? zovfrvy@t~4BisKZg_-Q;cF5w^&vll1v#(R?Zcy|HbMULIDHJ`*T1DB2>{958AsU@7 zyLorUUbDTy+KItg=$>nRUZEGHh_XuSiuH}#I_RikglE)ifxVlwVJJd44=YQK)X~Q!$(CuIAE=Z<+p(;s0l`A;r$8F5RKE{oc^2B zBK5JajMIjQqYWlIBm?jLAkRR82aU}?gWft9F~Cd2u{ICv4H?<#5AXjb3I7uOdStI4 z{eqKD8TN}%B1MH5TkrU*b;zMH99bq@ln;c9>V_58Ap(A0ClDcWA$JrAf*ewXi%OM86!kCb5`uUDEaYqe zzJt+MU|r-B3eeaF;StgS$H=V&Mqz<cov!B~(xSP&2bIq`rQRA5}rT}7eX zhns`A(MH5XIyx9~Yyd-)z_^^9N{D*?^hh;2uJ|G|C;k_Uw43ywDiYj?koQb*OBEQG zvlYHgh`LaIp+5kpNCtu{s=#1+z)q126mcgO(+>nq4tb3Oeub01fPs@1ag+N~Nh_)f bCoRIi$fU=?JsyIv@V_H+5Y!8MfuMf^Q4+f+ From b297da5ea467fcb9b3636291a7b04cecd22cc2bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 17:14:43 -0600 Subject: [PATCH 745/774] Add files via upload --- .../PacSatGround_0.46o/PacSatGroundLoop.zip | Bin 0 -> 2665 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip b/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip new file mode 100644 index 0000000000000000000000000000000000000000..7efc92a7260ad971f464ccc8a8c604e5704661a8 GIT binary patch literal 2665 zcmWIWW@h1H00GOwk{B=pO0YA?Fcg;*=%pls(HxqU^1iCa^Fthy$GvkeD2tSmIuk zUz(SqS5TB+kXlrdnOY2X(i@<2?qfPBHRyESVgr%8zqNHrZ8cSv=%3^k@>o7=&y))@ zOHwTh7`6L)b1pCY{53gg)w1ADR=XM1a^GXtM(#@$v(LJEiYZ@rbByPnYpWP@EhS1! zFU#o9IChw!{i3skP0z6(>2p%}B;=5aS>waA`odAd!vfu-Z+o@eVF zxYuzSDR5_rnl6ZUoIHt>StHsnbK7E1tN!>CZ!H|0LRH28O@AFF`*7F8>v1ctTZXT4 zY^p8bVJdlW?84vOtj;r+9y7}IG&y+DR<3{7@y`A<3$MZn4?YUGKQ@+osPU%novKH` z$|b+2{$~~93(RitI{skF{H;&62Kkw8+{Ky_8fv*l`K!apts6tOZ`#iC?$^!bx*^%s z2A=BY`%NPMMxL8LZGY8;riSGC?71Q8);x2jWb?)hiV z1>ZSKpZq%(`!Q>Cto@}QX&0Du9v_Xwm z+!yrKR6`)CJvcKLJ*k5X24S?^7dz3{o7qsH?fp+t?s>nrCQWtX z3%ae;)p50Xx#Db}-3NU)o%6Z!uX=H`W7XX6CqGY`x!FB=yW1+>r82QwMV0N2zM2@+ zuOb&YckRjW?3`7Vrn{rAhY z%_uv1eu9#PzrwPM)|UM=Ifqj zv0m--x!vD*E!gd5**5zs&Un$#zFX#L1}E#i4-4cc^{lvaK-j9Z5LOa83Mc+ndF#p)pQc@XkXF@V#4b^R!F^v=4N!mP-{Ji zVW9lIq|p&%7_1J&XBZ+#Q7b@X!sC6LI%%$LZn{ts*=z)c3`EueW=(in1lVdha}^PE|c z&4cAwps84MD Date: Fri, 20 Mar 2026 19:17:20 -0400 Subject: [PATCH 746/774] Update pacsat.sh add back download loopback zip file --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index ed80ba01..b3db66ad 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -99,12 +99,12 @@ elif [ "$loopback" = "1" ] ; then /home/pi/CubeSatSim/config -G n fi -# if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then - if [ ! "$loopback" = "1" ] ; then # don't do this for now. + if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then +# if [ ! "$loopback" = "1" ] ; then # don't do this for now. cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGroundLoop.zip -d PacSatGroundLoop sudo rm PacSatGroundLoop.zip From 87c5cef72cef074cc74b303b088f4d58f8bc4a06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 19:20:28 -0400 Subject: [PATCH 747/774] Update pacsat.sh fix loop zip file --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b3db66ad..c7e04794 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -104,7 +104,7 @@ elif [ "$loopback" = "1" ] ; then cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip unzip PacSatGroundLoop.zip -d PacSatGroundLoop sudo rm PacSatGroundLoop.zip From a8bf6372b9ee995e78c2008c7ead89739b2f6077 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Mar 2026 00:18:51 -0400 Subject: [PATCH 748/774] Update pacsat.sh always restart pacsat for loopback --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index c7e04794..e0445e34 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -92,12 +92,12 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then elif [ "$loopback" = "1" ] ; then - if [ ! "$MODE" = "p" ] ; then +# if [ ! "$MODE" = "p" ] ; then echo echo "Switching to PacSat mode for the Simulated PacSat Satellite" echo /home/pi/CubeSatSim/config -G n - fi +# fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then # if [ ! "$loopback" = "1" ] ; then # don't do this for now. From a895127d82e0eea7e93244f1e15098e55cb975c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 11:29:49 -0400 Subject: [PATCH 749/774] Update transmit.py print txc for debug --- transmit.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index cfaa2730..32521d29 100644 --- a/transmit.py +++ b/transmit.py @@ -254,11 +254,11 @@ output(ptt, 1) txc = False if input(txc_pin) == False: print("TXC is present") - txc = True; + txc = True else: print("TXC not present") -# txc = False # forcing it off +# False # forcing it off output(txLed, 1) sleep(1) output(txLed, 0) @@ -561,9 +561,11 @@ if __name__ == "__main__": rpitx = "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 " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" if not txc: + print("txc is:") + print(txc) system(stop_rpitx) system(rpitx) - print("Safe Mode!") + print("Safe Mode!!") while (True): if (txc): sleep(0.1) From b09c852a0703eb37dee1c34e085ae20f8f8a8cae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 11:33:48 -0400 Subject: [PATCH 750/774] Update transmit.py remove C2C squelch check since it won't work in PacSat mode --- transmit.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/transmit.py b/transmit.py index 32521d29..75f59de0 100644 --- a/transmit.py +++ b/transmit.py @@ -436,18 +436,19 @@ if __name__ == "__main__": no_command = True try: f = open("/home/pi/CubeSatSim/command_control", "r") + no_command = False f.close() - setup(squelch, "up") ## pull up in case pin is not connected - if input(squelch) == False: - print("squelch not set correctly, no command input!") - else: - 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") - txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated +# setup(squelch, "up") ## pull up in case pin is not connected +# if input(squelch) == False: +# print("squelch not set correctly, no command input!") +# else: +# 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") +# txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated except: print("command and control not activated") From b5f9494e12739ce6b935ba02df3d701cd8fbfe74 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:02:50 -0400 Subject: [PATCH 751/774] Update config print squelch is off in PacSat or Ground modes --- config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config b/config index 9c01db76..25540102 100755 --- a/config +++ b/config @@ -279,8 +279,12 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo - echo -n "Squelch level is: " - echo $6 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + echo "Squelch is off since PacSat or PacSat Ground Station mode" + else + echo -n "Squelch level is: " + echo $6 + fi # echo FILE=/home/pi/CubeSatSim/command_control From 303ea59836d7a2d3f2c2592c821678cdfd858582 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:04:43 -0400 Subject: [PATCH 752/774] Update config print $1 --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 25540102..4adf0d35 100755 --- a/config +++ b/config @@ -279,6 +279,7 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo + echo $1 if [ "$1" = "p" ] || [ "$1" = "P" ] ; then echo "Squelch is off since PacSat or PacSat Ground Station mode" else From 02dd72841a2b586a66b515c4a70917ca61c8fc1d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:06:36 -0400 Subject: [PATCH 753/774] Update config set MODE variable --- config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config b/config index 4adf0d35..392536db 100755 --- a/config +++ b/config @@ -144,6 +144,7 @@ if [ "$1" = "" ]; then value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value + MODE=$1 if [ "$1" = "a" ]; then echo "Mode is APRS" @@ -279,8 +280,8 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo - echo $1 - if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + echo $MODE + if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then echo "Squelch is off since PacSat or PacSat Ground Station mode" else echo -n "Squelch level is: " From ca798d39960cecaf17ae610b1e017966dc47412b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:08:02 -0400 Subject: [PATCH 754/774] Update config remove MODE print --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 392536db..a5314504 100755 --- a/config +++ b/config @@ -280,7 +280,7 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo - echo $MODE +# echo $MODE if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then echo "Squelch is off since PacSat or PacSat Ground Station mode" else From 8f5399786155120309597b35dc5588b54ba8f240 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:15:23 -0400 Subject: [PATCH 755/774] Update command don't start carrier C2C if PacSat or Ground mode --- command | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/command b/command index 2356a1ff..e1a31d63 100755 --- a/command +++ b/command @@ -6,6 +6,12 @@ sudo modprobe snd-aloop sudo modprobe snd-aloop +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value + +MODE=$1 + FILE=/home/pi/CubeSatSim/command_control if [ -f "$FILE" ]; then echo "Radio command and control is ON" @@ -126,17 +132,32 @@ else fi - if [ "$1" = "d" ]; then - - echo "debug mode" - - /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py d + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + MODE=$1 + + if [ ! "$MODE" = "P" ] && [ ! "$MODE" = "P" ] ; then + + if [ "$1" = "d" ]; then + + echo "debug mode" + + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py d + + else + + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py + + fi + else - - /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py - - fi + + echo "Not running Carrier (squelch) Command and Control since PacSat or PacSat Ground Station mode!") + sleep 60 + + fi fi sudo killall -9 direwolf &>/dev/null From 17cdbb43ded102e2065abed23a22f74e4e306214 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:17:25 -0400 Subject: [PATCH 756/774] Update command remove typo ) --- command | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command b/command index e1a31d63..73839a05 100755 --- a/command +++ b/command @@ -154,7 +154,7 @@ else else - echo "Not running Carrier (squelch) Command and Control since PacSat or PacSat Ground Station mode!") + echo "Not running Carrier (squelch) Command and Control since PacSat or PacSat Ground Station mode!" sleep 60 fi From 5b8f35a9f284f03b5e73c5e1eb69168ce4b1466b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:22:42 -0400 Subject: [PATCH 757/774] Update config indicate carrier C2C is off if PacSat or PacSat Ground mode --- config | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config b/config index a5314504..d2106a8f 100755 --- a/config +++ b/config @@ -297,10 +297,18 @@ if [ "$1" = "" ]; then if [ -f "$FILE" ]; then echo "Radio DTMF/APRS command and control is ON" else - echo "Radio carrier command and control is ON" + if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then + echo "Radio carrier command and control is off since PacSat or PacSat Ground Station mode" + else + echo "Radio carrier command and control is ON" + fi fi else - echo "Radio carrier command and control is ON" + if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then + echo "Radio carrier command and control is off since PacSat or PacSat Ground Station mode" + else + echo "Radio carrier command and control is ON" + fi fi else echo "Radio command and control is OFF" From b0937a109d7be2e1bf8b1485ee7b004c3c47ac49 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 13:49:16 -0400 Subject: [PATCH 758/774] Update pacsat-run.sh popup bigger --- groundstation/pacsat-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 37704d0f..c4cbc2d8 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -16,7 +16,7 @@ sudo killall -9 direwolf &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=170 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") + profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=200 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") echo $profile From 5eea4237f7e00d2d8401438bbd98729e138f80ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 13:51:40 -0400 Subject: [PATCH 759/774] Update pacsat.sh add rx frequency print --- groundstation/pacsat.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e0445e34..53e3b3b0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -141,12 +141,15 @@ echo "$value" > /dev/null set -- $value callsign="$1" -frequency="$7e3" +txfrequency="$7e3" +rxfrequency="$8e3" echo -n "Callsign is " echo $callsign echo -n "Transmit Frequency is " -echo $frequency +echo $txfrequency +echo -n "Receive Frequency is " +echo $rxfrequency echo sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties From bc0692f56275d367f94af4efbadca299c8262623 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 14:03:53 -0400 Subject: [PATCH 760/774] Update pacsat-run.sh larger popup window --- groundstation/pacsat-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index c4cbc2d8..c090bd2b 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -16,7 +16,7 @@ sudo killall -9 direwolf &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=200 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") + profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=220 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") echo $profile From 172d35e02d88f646004a343cc91c81d963014ba6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 14:06:13 -0400 Subject: [PATCH 761/774] Update pacsatsim.sh print callsign and frequencies in log --- pacsatsim.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 04d861b6..c5ebcf43 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -59,6 +59,24 @@ else rtl=1 fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" +txfrequency="$7e3" +rxfrequency="$8e3" + +echo -n "PacSat allsign is " +echo $callsign +echo -n "Transmit Frequency is " +echo $txfrequency +echo -n "Receive Frequency is " +echo $rxfrequency +echo + +sleep 2 + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" From 153b6fa5ae82a5b00ec2077f952d8050621e5540 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 14:10:43 -0400 Subject: [PATCH 762/774] Update pacsat.sh add sleep 2 after print of frequency --- groundstation/pacsat.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 53e3b3b0..23f115e1 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -151,6 +151,7 @@ echo $txfrequency echo -n "Receive Frequency is " echo $rxfrequency echo +sleep 2 sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties From 42935da64a6b06eac648d8078d4269734470ef40 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 20:35:22 -0400 Subject: [PATCH 763/774] Update pacsat-config.sh switch to non Desktop properties file --- groundstation/pacsat-config.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 275128bc..fa64ddc5 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -114,11 +114,14 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo + + PROPERTIES=/home/pi/PacSatGround/spacecraft/PacSatSim.properties + PROPERTIES_L=/home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties if [ "$ANS" = "1" ] ; then - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' $PROPERTIES ) else - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' $PROPERTIES_L ) fi echo "Current value of remote PacSat callsign is" echo $oldcallsign @@ -135,9 +138,9 @@ sudo killall -9 direwolf &>/dev/null else if [ "$ANS" = "1" ] ; then - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" $PROPERTIES else - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" $PROPERTIES_L fi echo echo "Changing callsign to " From ef1493a7d446cac3b556e6f658f23f1680512fba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 20:37:40 -0400 Subject: [PATCH 764/774] Update pacsat-config.sh print you can close window --- groundstation/pacsat-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index fa64ddc5..24604fad 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -147,7 +147,7 @@ sudo killall -9 direwolf &>/dev/null echo $callsign echo echo "You will see the change next time you run the PacSat Ground Station" - echo + echo "You can close this window" fi elif [ "$CH" = "3" ] ; then From 029ca465c4a62ed85414aa1c145422494d2f966a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 20:42:38 -0400 Subject: [PATCH 765/774] Update pacsat-config.sh print you can close the window --- groundstation/pacsat-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 24604fad..f5b64ff3 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -172,6 +172,7 @@ sudo killall -9 direwolf &>/dev/null # unzip PacSatGround.zip -d PacSatGroundLoop # sudo rm PacSatGround.zip fi + echo "You can close this window now" else echo "Please choose an option 1-3" From 30ea3a40f981772fbe7b7a7bb6f7487fff8f3e61 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 21:03:43 -0400 Subject: [PATCH 766/774] Update pacsatsim.sh if loopback, change to PacSat mode --- pacsatsim.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index c5ebcf43..b796d07c 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -226,7 +226,19 @@ if [ "$loopback" = "1" ] ; then echo "Using audio loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + MODE=$1 + if [ ! "$MODE" = "p" ] ; then + + /home/pi/CubeSatSim/config -G n + + fi + # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & From cf1491ecef060537a372c03a16135245dd8eb428 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 21:32:38 -0400 Subject: [PATCH 767/774] Update pacsatsim.sh 15 second delay at end --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index b796d07c..cad550a3 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -319,4 +319,4 @@ cd /home/pi/pi_pacsat/Debug ./pi_pacsat -c pacsat.config -d /home/pi/PacSat -sleep 5 +sleep 15 From e0cbdfcc3abeb3570f3580eb9fceb7e2f251209b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 11:42:20 -0400 Subject: [PATCH 768/774] Update pacsat-run.sh --- groundstation/pacsat-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index c090bd2b..7c8d709a 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -60,7 +60,7 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "3" ] || [ "$profile" = "Simulate" ] ; then - echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" + echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" sleep 1 @@ -68,7 +68,7 @@ sudo killall -9 direwolf &>/dev/null sleep 1 - /home/pi/CubeSatSim/groundstation/pacsat.sh l + /home/pi/CubeSatSim/groundstation/pacsat.sh l else From 30fd1b350667565fdc3fc55d8312b5fdb58d968a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 11:43:53 -0400 Subject: [PATCH 769/774] Update pacsatsim.sh 60 seconds delay at end --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index cad550a3..804fc4c4 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -319,4 +319,4 @@ cd /home/pi/pi_pacsat/Debug ./pi_pacsat -c pacsat.config -d /home/pi/PacSat -sleep 15 +sleep 60 From bf323b449d96d1c68298712ca6960c34593af9b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 12:15:59 -0400 Subject: [PATCH 770/774] Update pacsat-run.sh stop transmit if loopback --- groundstation/pacsat-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 7c8d709a..d19b9dba 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -60,6 +60,8 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "3" ] || [ "$profile" = "Simulate" ] ; then + sudo systemctl stop transmit + echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" sleep 1 From 4a67af2d0174a9fdf02335fdc546663c8119f658 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:06:06 -0400 Subject: [PATCH 771/774] Update install --- install | 1 - 1 file changed, 1 deletion(-) diff --git a/install b/install index 8a7d2c45..3ee85b0f 100755 --- a/install +++ b/install @@ -696,7 +696,6 @@ if [ -f "$FILE" ]; then else echo "creating pacsatsim.service." sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service - sudo systemctl enable command FLAG=1 fi From e299ab6ef8d2c8c1cbff366ca3ac12939fe25a45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:14:34 -0400 Subject: [PATCH 772/774] Update pacsatsim.sh add stop pacsatsim.service --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 804fc4c4..968d2f9d 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -238,7 +238,9 @@ if [ "$loopback" = "1" ] ; then /home/pi/CubeSatSim/config -G n fi - + + sudo systemctl stop pacsatsim + # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & From 9c868bd059395504127e08dc801a24b334ee545b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:26:30 -0400 Subject: [PATCH 773/774] Update main.c add or pacsatground --- main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index 2f1954a6..3152e021 100644 --- a/main.c +++ b/main.c @@ -520,7 +520,7 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); - } else if ((mode == BPSK) || (mode == PACSAT)) { + } else if ((mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) { //// } else { bitRate = 1200; @@ -601,7 +601,7 @@ int main(int argc, char * argv[]) { memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); - if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) + if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored else if (mode == FC) // && !sim_mode) get_tlm_fc(); // fill transmit buffer with reset count 0 packets that will be ignored @@ -1292,7 +1292,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) {// FSK or BPSK get_tlm_fox(); } else if ((mode == FC)) { get_tlm_fc(); @@ -2019,7 +2019,7 @@ void get_tlm_fox() { encodeB(b, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); encodeA(b, 53 + head_offset, groundCommandCount); - if ((mode == BPSK) || (mode == PACSAT)) { + if ((mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) { encodeA(b_max, 51 + head_offset, status); encodeA(b_min, 51 + head_offset, status); encodeB(b_max, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); @@ -2044,7 +2044,7 @@ void get_tlm_fox() { encodeB(b, 74 + head_offset, 0xfff); } - if (mode == PACSAT) + if ((mode == PACSAT) || (mode == PACSATGND)) { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { @@ -2719,7 +2719,7 @@ if (setting == ON) { pclose(command); fprintf(stderr,"Turning Safe Mode ON\n"); fprintf(stderr,"Turning Battery saver mode ON\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT) || (mode == PACSATGND)) { command = popen("echo 'reboot due to turning ON Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); @@ -2736,7 +2736,7 @@ if (setting == ON) { pclose(command); fprintf(stderr,"Turning Battery saver mode OFF\n"); battery_saver_mode = OFF; - if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT) || (mode == PACSATGND)) { command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); From c0a679009da5469d183ac53fb75eb1c4cecac995 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:28:05 -0400 Subject: [PATCH 774/774] Update pacsatsim.sh use PacSat Ground mode for loopback --- pacsatsim.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 968d2f9d..9a4f787a 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -233,14 +233,12 @@ if [ "$loopback" = "1" ] ; then MODE=$1 - if [ ! "$MODE" = "p" ] ; then + if [ ! "$MODE" = "P" ] ; then - /home/pi/CubeSatSim/config -G n + /home/pi/CubeSatSim/config -I n fi - sudo systemctl stop pacsatsim - # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 &