kopia lustrzana https://github.com/F5OEO/rpitx
Fix shellcheck issues
- Added shebang to all the scripts - Adjusted all the scripts to make them compatible with a POSIX shellpull/128/head
rodzic
5a65fec32f
commit
2a2cb7272e
|
@ -1,12 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
status="0"
|
||||
OUTPUT_FREQ=434.0
|
||||
LAST_ITEM="0 Tune"
|
||||
do_freq_setup()
|
||||
{
|
||||
|
||||
FREQ=$(whiptail --inputbox "Choose output Frequency (in MHZ) Default is 434MHZ" 8 78 $OUTPUT_FREQ --title "Rpitx transmit Frequency" 3>&1 1>&2 2>&3)
|
||||
if [ $? -eq 0 ]; then
|
||||
if FREQ=$(whiptail --inputbox "Choose output Frequency (in MHZ) Default is 434MHZ" 8 78 $OUTPUT_FREQ --title "Rpitx transmit Frequency" 3>&1 1>&2 2>&3); then
|
||||
OUTPUT_FREQ=$FREQ
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
echo fm2ssb.sh freq gain
|
||||
rtl_fm -f $1 -s 250k -r 48k -g $2 - | 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 | buffer | sudo ./sendiq -i /dev/stdin -s 96000 -f $3 -t float
|
||||
#!/bin/sh
|
||||
|
||||
echo "FREQ_IN=value-in_MHz GAIN=value-0_to_45 FREQ_OUT=value-in_MHz fm2ssb"
|
||||
rtl_fm -f "$FREQ_IN" -s 250k -r 48k -g "$GAIN" - | 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 | buffer \
|
||||
| sudo ./sendiq -i /dev/stdin -s 96000 -f "FREQ_OUT" -t float
|
||||
# | sox -traw -r48k -es -b16 - -c1 -r 48k -traw -
|
19
install.sh
19
install.sh
|
@ -1,3 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo Install rpitx - some package need internet connection -
|
||||
|
||||
sudo apt-get update
|
||||
|
@ -8,21 +10,22 @@ sudo apt-get install -y rtl-sdr buffer
|
|||
# We use CSDR as a dsp for analogs modes thanks to HA7ILM
|
||||
git clone https://github.com/simonyiszk/csdr
|
||||
patch -i csdrpizero.diff csdr/Makefile
|
||||
cd csdr
|
||||
cd csdr || exit
|
||||
make && sudo make install
|
||||
cd ../
|
||||
cd ../ || exit
|
||||
|
||||
cd src
|
||||
cd src || exit
|
||||
git clone https://github.com/F5OEO/librpitx
|
||||
cd librpitx/src
|
||||
cd librpitx/src || exit
|
||||
make
|
||||
cd ../../
|
||||
cd ../../ || exit
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
cd .. || exit
|
||||
|
||||
echo "\n\n"
|
||||
read -p "In order to run properly, rpitx need to modify /boot/config.txt. Are you sure (y/n) " CONT
|
||||
printf "\n\n"
|
||||
printf "In order to run properly, rpitx need to modify /boot/config.txt. Are you sure (y/n) "
|
||||
read -r CONT
|
||||
|
||||
if [ "$CONT" = "y" ]; then
|
||||
echo "Set GPU to 250Mhz in order to be stable"
|
||||
|
|
22
rtlmenu.sh
22
rtlmenu.sh
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
status="0"
|
||||
INPUT_RTLSDR=434.0
|
||||
INPUT_GAIN=35
|
||||
|
@ -8,18 +9,15 @@ LAST_ITEM="0 Record"
|
|||
do_freq_setup()
|
||||
{
|
||||
|
||||
FREQ=$(whiptail --inputbox "Choose input Frequency (in MHZ) Default is 434MHZ" 8 78 $INPUT_RTLSDR --title "RTL-SDR Receive Frequency" 3>&1 1>&2 2>&3)
|
||||
if [ $? -eq 0 ]; then
|
||||
if FREQ=$(whiptail --inputbox "Choose input Frequency (in MHZ) Default is 434MHZ" 8 78 $INPUT_RTLSDR --title "RTL-SDR Receive Frequency" 3>&1 1>&2 2>&3); then
|
||||
INPUT_RTLSDR=$FREQ
|
||||
fi
|
||||
|
||||
GAIN=$(whiptail --inputbox "Choose input Gain (0(AGC) or 1-45)" 8 78 $INPUT_GAIN --title "RTL-SDR Receive Frequency" 3>&1 1>&2 2>&3)
|
||||
if [ $? -eq 0 ]; then
|
||||
if GAIN=$(whiptail --inputbox "Choose input Gain (0(AGC) or 1-45)" 8 78 $INPUT_GAIN --title "RTL-SDR Receive Frequency" 3>&1 1>&2 2>&3); then
|
||||
INPUT_GAIN=$GAIN
|
||||
fi
|
||||
|
||||
FREQ=$(whiptail --inputbox "Choose output Frequency (in MHZ) Default is 434MHZ" 8 78 $OUTPUT_FREQ --title "Transmit Frequency" 3>&1 1>&2 2>&3)
|
||||
if [ $? -eq 0 ]; then
|
||||
if FREQ=$(whiptail --inputbox "Choose output Frequency (in MHZ) Default is 434MHZ" 8 78 $OUTPUT_FREQ --title "Transmit Frequency" 3>&1 1>&2 2>&3); then
|
||||
OUTPUT_FREQ=$FREQ
|
||||
fi
|
||||
|
||||
|
@ -54,18 +52,16 @@ do_freq_setup
|
|||
case "$menuchoice" in
|
||||
0\ *) rtl_sdr -s 250000 -g "$INPUT_GAIN" -f "$INPUT_RTLSDR"e6 record.iq >/dev/null 2>/dev/null &
|
||||
do_status;;
|
||||
1\ *) sudo ./sendiq -s 250000 -f "$OUTPUT_FREQ"e6 -t u8 -i record.iq >/dev/null 2>/dev/null &
|
||||
1\ *) sudo ./sendiq -s 250000 -f "$OUTPUT_FREQ"e6 -t u8 -i record.iq >/dev/null 2>/dev/null &
|
||||
do_status;;
|
||||
2\ *) source $"$PWD/transponder.sh" "$INPUT_RTLSDR"M $INPUT_GAIN $OUTPUT_FREQ"e6" >/dev/null 2>/dev/null &
|
||||
2\ *) FREQ_IN="$INPUT_RTLSDR"M GAIN="$INPUT_GAIN" FREQ_OUT="$OUTPUT_FREQ"e6 . "$PWD/transponder.sh" >/dev/null 2>/dev/null &
|
||||
do_status;;
|
||||
3\ *) source $"$PWD/fm2ssb.sh" "$INPUT_RTLSDR"M $INPUT_GAIN $OUTPUT_FREQ"e6" >/dev/null 2>/dev/null &
|
||||
3\ *) FREQ_IN="$INPUT_RTLSDR"M GAIN="$INPUT_GAIN" FREQ_OUT="$OUTPUT_FREQ"e6 . "$PWD/fm2ssb.sh" >/dev/null 2>/dev/null &
|
||||
do_status;;
|
||||
4\ *)
|
||||
do_freq_setup;;
|
||||
*) status=1
|
||||
whiptail --title "Bye bye" --msgbox "Thx for using rpitx" 8 78
|
||||
whiptail --title "Bye bye" --msgbox "Thanks for using rpitx!" 8 78
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
raspistill -w 320 -h 256 -o picture.jpg -t 1
|
||||
#convert picture.jpg -flip -colors 16 -colorspace gray -dither -colorspace YUV picture.yuv
|
||||
#convert picture.jpg -flip -colors 16 -colorspace gray -colorspace YUV picture.yuv
|
||||
#convert BBC-Test-Card-F320x256.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 -interlace partition picture.yuv
|
||||
convert picture.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 -interlace partition picture.yuv
|
||||
sudo ./spectrumpaint picture.Y $1 100000
|
||||
convert picture.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 \
|
||||
-interlace partition picture.yuv
|
||||
sudo ./spectrumpaint picture.Y "$1" 100000
|
||||
|
||||
#convert -depth 8 picture.jpg picture.rgb
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
raspistill -w 320 -h 256 -o picture.jpg -t 1
|
||||
convert -depth 8 picture.jpg picture.rgb
|
||||
|
||||
sudo ./pisstv picture.rgb $1
|
||||
sudo ./pisstv picture.rgb "$1"
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
#COMMAND A BANDPATH FILTER FROM SV1AFN
|
||||
|
||||
#GPIO Declaration
|
||||
|
@ -24,7 +26,6 @@ fi
|
|||
#Initialization : All at zero (disable filter)
|
||||
reset_all()
|
||||
{
|
||||
|
||||
echo 0 > /sys/class/gpio/gpio26/value
|
||||
echo 0 > /sys/class/gpio/gpio19/value
|
||||
echo 0 > /sys/class/gpio/gpio13/value
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
#TODO using the AM mode from librpitx
|
||||
echo Need to implement
|
||||
(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f | csdr gain_ff 4.0 | csdr dsb_fc | sudo ./rpitx -i - -m IQFLOAT -f $1 -s 48000
|
||||
(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f \
|
||||
| csdr gain_ff 4.0 | csdr dsb_fc \
|
||||
| sudo ./rpitx -i - -m IQFLOAT -f "$1" -s 48000
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
sudo ./pichirp $1 100000 5
|
||||
#!/bin/sh
|
||||
|
||||
sudo ./pichirp "$1" 100000 5
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
sudo ./pifmrds -freq $1 -audio src/pifmrds/stereo_44100.wav
|
||||
#!/bin/sh
|
||||
|
||||
sudo ./pifmrds -freq "$1" -audio src/pifmrds/stereo_44100.wav
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
sudo ./freedv src/freedv/VCO800XA.rf $1 400
|
||||
#!/bin/sh
|
||||
|
||||
sudo ./freedv src/freedv/VCO800XA.rf "$1" 400
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
sudo ./pifsq "Test" $1
|
||||
#!/bin/sh
|
||||
|
||||
sudo ./pifsq "Test" "$1"
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
#This is only a Narraw Band FM modulator, for FM broadcast modulation , use PiFMRDS
|
||||
# Need to use a direct FM modulation with librpitx and not using IQ : TODO
|
||||
echo "If you need to test broadcast FM , use PiFMRDS"
|
||||
echo "If you need to test broadcast FM, use PiFMRDS"
|
||||
#(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f | csdr gain_ff 2500 | sudo ./sendiq -i /dev/stdin -s 24000 -f 434e6 -t float 1
|
||||
(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo ./rpitx -i- -m RF -f $1
|
||||
(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f \
|
||||
| csdr gain_ff 7000 | csdr convert_f_samplerf 20833 \
|
||||
| sudo ./rpitx -i- -m RF -f "$1"
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
sudo ./piopera F5OEO 0.5 $1
|
||||
#!/bin/sh
|
||||
|
||||
sudo ./piopera F5OEO 0.5 "$1"
|
||||
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
echo -e "1:YOURCALL\n2: Hello world" | sudo ./pocsag -f $1
|
||||
#!/bin/sh
|
||||
|
||||
printf "1:YOURCALL\n2: Hello world" | sudo ./pocsag -f "$1"
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
convert BBC.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 -interlace partition picture.yuv
|
||||
sudo ./spectrumpaint picture.Y $1 100000
|
||||
#!/bin/sh
|
||||
|
||||
convert BBC.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 \
|
||||
-interlace partition picture.yuv
|
||||
sudo ./spectrumpaint picture.Y "$1" 100000
|
||||
|
|
|
@ -1,2 +1,7 @@
|
|||
(while true; do cat sampleaudio.wav; done) | 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 ./sendiq -i /dev/stdin -s 96000 -f $1 -t float
|
||||
#!/bin/sh
|
||||
|
||||
(while true; do cat sampleaudio.wav; done) | 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 ./sendiq -i /dev/stdin -s 96000 -f "$1" -t float
|
||||
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
convert -depth 8 BBC.jpg picture.rgb
|
||||
sudo ./pisstv picture.rgb $1
|
||||
sudo ./pisstv picture.rgb "$1"
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
sudo tune -f $1
|
||||
#!/bin/sh
|
||||
|
||||
sudo tune -f "$1"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#You need a rtl-sdr dongle in order to run this
|
||||
echo "transponder FreqIn(Mhz) Gain(0-45)"
|
||||
rtl_sdr -s 250000 -g "$2" -f "$1" - | buffer | sudo ./sendiq -s 250000 -f $3 -t u8 -i -
|
||||
#!/bin/sh
|
||||
|
||||
#You need a rtl-sdr dongle in order to run this
|
||||
echo "FREQ_IN=value-in_MHz GAIN=value-0_to_45 FREQ_OUT=value-in_MHz transponder"
|
||||
rtl_sdr -s 250000 -g "$GAIN" -f "$FREQ_IN" - | buffer \
|
||||
| sudo ./sendiq -s 250000 -f "FREQ_OUT" -t u8 -i -
|
||||
|
|
Ładowanie…
Reference in New Issue