Update packet.sh if no RTL-SDR, try TXC

fiabv4-auto-tune-fm
Alan Johnston 1 month ago committed by GitHub
parent 40a0b3f28d
commit 047ae0de51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -157,14 +157,46 @@ echo
echo -e "Auto decoding APRS packets on $frequency Hz" echo -e "Auto decoding APRS packets on $frequency Hz"
timeout 1 rtl_test &> out.txt
if [[ $(grep "No supported" out.txt) ]] ; then
echo "No RTL-SDR detected. Trying FM TXC"
gpio -g mode 7 up
gpio -g read 7 > out.txt
if [[ $(grep "0" out.txt) ]] ; then
echo "FM TXC detected"
if [[ $(arecord -l | grep "USB Audio Device") ]] ; then
gpio -g mode 20 out # set PTT high
gpio -g write 20 1
gpio -g mode 21 out # set PD high
gpio -g write 21 1
setsid direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf &
else
echo "No USB Sound Card present - need to plug it in."
fi
else
echo "FM TXC not detected"
fi
else
# 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 &
setsid direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf & setsid direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf &
#fi #fi
#sleep 5 #sleep 5
if [ "$autotune" = "1" ]; then if [ "$autotune" = "1" ]; then
threshold=1 threshold=1
delay=1 delay=1
retries=30 retries=30
@ -175,7 +207,7 @@ if [ "$autotune" = "1" ]; then
confidence=0 confidence=0
while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do
# sleep $delay # sleep $delay
source /home/pi/venv/bin/activate source /home/pi/venv/bin/activate
python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt
# echo "auto-tune.txt" # echo "auto-tune.txt"
@ -192,6 +224,8 @@ if [ "$autotune" = "1" ]; then
else else
echo "Auto tune failed, frequency unchanged" echo "Auto tune failed, frequency unchanged"
fi fi
fi
echo echo
echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets."
echo echo

Loading…
Cancel
Save

Powered by TurnKey Linux.