Skip to content

Commit

Permalink
Merge pull request #344 from alanbjohnston/release-3
Browse files Browse the repository at this point in the history
Beta v1.3.2 into master
  • Loading branch information
alanbjohnston authored Oct 22, 2024
2 parents da69157 + ce4e06a commit 5050749
Show file tree
Hide file tree
Showing 133 changed files with 8,840 additions and 1,266 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,23 @@ telem.wav
cw.txt
cwready
logr.txt
command_control
command_control_direwolf
command_count.txt
command_tx
cw0.txt
cw1.txt
cw2.txt
cw3.txt
cw4.txt
cw5.txt
cw6.txt
logc.txt
telem.txt
telem_string.txt
test
transmit_dtmf
uptime
beacon_off
battery_saver

22 changes: 4 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# CubeSatSim

There is beta release for the new CubeSatSim hardware and software in the beta branch.

### The beta hardware files are here:
https://CubeSatSim.org/hardware-beta

### The beta wiki instructions are here:
https://github.com/alanbjohnston/CubeSatSim/wiki/v1.3.2-0.-Home.

### The beta Bill of Materials (BOM) is here:
https://CubeSatSim.org/bom-beta.

### Information about the latest beta software release is here:
https://github.com/alanbjohnston/CubeSatSim/releases

The CubeSat Simulator https://github.com/alanbjohnston/CubeSatSim/wiki is a low cost satellite emulator that runs on solar panels and batteries, transmits UHF radio telemetry, has a 3D printed frame, and can be extended by additional sensors and modules. This project is sponsored by the not-for-profit [Radio Amateur Satellite Corporation, AMSAT®](https://amsat.org).

There are several hardware versions and software branches to go with them - see below for information.
Expand All @@ -36,7 +22,7 @@ The other option is to start with a Raspberry Pi OS (Rasbian) image (Bullseye or

## Disk Image Option Steps

See the Wiki Software Install page for details: https://github.com/alanbjohnston/CubeSatSim/wiki/2.-Software-Install.
See the Wiki Software Install page for details: [https://github.com/alanbjohnston/CubeSatSim/wiki/V1.3.2-2.-Software-Install](https://github.com/alanbjohnston/CubeSatSim/wiki/V1.3.2-2.-Software-Install#disk-image-option-steps).

## Installation Script Option Steps

Expand All @@ -52,15 +38,15 @@ To get the software follow these steps:

`cd CubeSatSim`

`git checkout master`
`git checkout beta`

You are now ready to install the software using this script in the CubeSatSim directory:
`# You are now ready to install the software using this script in the CubeSatSim directory:`

`./install`

The installation script will run for quite a while. You will get prompted for your amateur radio callsign in all capitals, if you have one. If you don't you can put some other word which will be transmitted as a CW ID. You will also be prompted for your latitude and longitude for APRS packets. The script will prompt you if you want to modify /boot/config.txt file. Type a `y` and the script will complete. You will need to reboot.

See the Wiki for more details about the CubeSatSim https://github.com/alanbjohnston/CubeSatSim/wiki
See the Wiki for more details about the CubeSatSim [https://github.com/alanbjohnston/CubeSatSim/wiki](https://github.com/alanbjohnston/CubeSatSim/wiki/v1.3.2-0.-Home)

Older Versions

Expand Down
132 changes: 132 additions & 0 deletions command
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#!/bin/bash

echo -e "\nCommand and Control script for CubeSatSim v2.0\n"

FILE=/home/pi/CubeSatSim/command_control
if [ -f "$FILE" ]; then
echo "Radio command and control is ON"
# echo "Turning Command and control to OFF"
# sudo rm /home/pi/CubeSatSim/command_control
# echo "rebooting"
# sudo systemctl stop rpitx
# sudo reboot now
# fi

else
echo "Radio command and control is OFF"

while true
do
sleep 60
done

# exit 1
fi

if [ "$1" = "d" ]; then

echo "debug mode"

debug=1

else

debug=0

fi

echo "Waiting 20 seconds for USB"

sleep 20

FILE=/home/pi/CubeSatSim/command_control_direwolf
if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then

echo "Starting Direwolf DTMF and APRS Command and Control"

if [ "$debug" = "1" ]; then

echo "debug mode"

direwolf -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

fi
else

if [ -f "$FILE" ]; then

echo "Direwolf mode set but no USB soundcard detected!"

# echo "Trying RTL-FM"

timeout 1 rtl_test &> out.txt
if [[ $(grep "No supported" out.txt) ]] ; then

echo "No RTL-SDR detected. Command and control is OFF"
# sleep 60
exit

else

echo "RTL-SDR detected."
echo "Command and control is OFF"
# sudo modprobe snd-aloop

# value=`aplay -l | grep "Loopback"`
# echo "$value" > /dev/null
# set -- $value

# card=${2:0:1}

# value=`cat /home/pi/CubeSatSim/sim.cfg`
# echo "$value" > /dev/null
# set -- $value

# freq=$8

# echo "Current value of rx is"
# echo $freq

# rtl_fm -M fm -f ${freq}M -s 48k | aplay -D plughw:${card},0,0 -r 48000 -t raw -f S16_LE -c 1 &

# if [ "$debug" = "1" ]; then

# echo "debug mode"

# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | 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

# fi

sleep 5
fi
rm out.txt
else

echo "Starting Carrier (squelch) Command and Control"

fi

if [ "$1" = "d" ]; then

echo "debug mode"

python3 /home/pi/CubeSatSim/squelch_cc.py d

else

python3 /home/pi/CubeSatSim/squelch_cc.py

fi
fi

sudo killall -9 direwolf &>/dev/null
sudo killall -9 rtl_fm &>/dev/null

Loading

0 comments on commit 5050749

Please sign in to comment.