From c6b3a5cc217fe65d8d2d4560076caae316feb917 Mon Sep 17 00:00:00 2001 From: Jono Targett Date: Wed, 10 May 2023 17:03:49 +0930 Subject: [PATCH] Project cleanup --- .gitignore | 1 + .../SDRplay_RSP_API-Linux-3.07.1.run | 0 .../build_dependencies | 37 ------------------- play.sh | 3 -- setup | 15 +++++++- utilities/play.sh | 4 ++ record.sh => utilities/record.sh | 0 stream => utilities/stream.sh | 1 - 8 files changed, 18 insertions(+), 43 deletions(-) rename SDRplay_RSP_API-Linux-3.07.1.run => dependencies/SDRplay_RSP_API-Linux-3.07.1.run (100%) rename build_dependencies => dependencies/build_dependencies (60%) delete mode 100755 play.sh create mode 100755 utilities/play.sh rename record.sh => utilities/record.sh (100%) rename stream => utilities/stream.sh (99%) diff --git a/.gitignore b/.gitignore index 6d15ebd..1d7f079 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dependencies/ *.log *.wav *.raw +*.iq diff --git a/SDRplay_RSP_API-Linux-3.07.1.run b/dependencies/SDRplay_RSP_API-Linux-3.07.1.run similarity index 100% rename from SDRplay_RSP_API-Linux-3.07.1.run rename to dependencies/SDRplay_RSP_API-Linux-3.07.1.run diff --git a/build_dependencies b/dependencies/build_dependencies similarity index 60% rename from build_dependencies rename to dependencies/build_dependencies index 0cb98b2..6984893 100755 --- a/build_dependencies +++ b/dependencies/build_dependencies @@ -4,11 +4,9 @@ set -eux echo "Beginning project setup for SDRPlay interface." > build.log date >> build.log -mkdir -p dependencies && pushd dependencies # Install build dependencies # Debian: -sudo apt-get update sudo apt-get install -y \ git build-essential automake cmake \ libpulse-dev libgtk-3-dev \ @@ -71,41 +69,6 @@ pushd liquid-dsp popd fi -popd #dependencies echo "Setup completed." >> build.log date >> build.log exit 0 - - -########################### DONT NEED THIS STUFF ################################### -## Build wxWidgets -#if ! [ -d wxWidgets-3.2.1 ]; then -#wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.tar.bz2 -#tar -xvjf wxWidgets-3.2.1.tar.bz2 -#rm wxWidgets-3.2.1.tar.bz2 -#pushd wxWidgets-3.2.1 -# ./autogen.sh -# ./configure \ -# --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic \ -# --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest \ -# --enable-unicode --enable-display --enable-propgrid --disable-webview \ -# --disable-webviewwebkit CXXFLAGS="-std=c++0x" -# -# make -j -# sudo make install -#popd -#fi -# -## Build CubicSDR -#if ! [ -d CubicSDR ]; then -#git clone https://github.com/cjcliffe/CubicSDR.git -#pushd CubicSDR -# mkdir build -# pushd build -# cmake ../ -DCMAKE_BUILD_TYPE=Release \ -# -DwxWidgets_CONFIG_EXECUTABLE=/usr/local/bin/wx-config -# make -j -# sudo make install -# popd -#popd -#fi diff --git a/play.sh b/play.sh deleted file mode 100755 index 81cba2a..0000000 --- a/play.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash - -sox -t raw -r 50000 -b 16 -c 2 -L -e signed-integer - -d \ No newline at end of file diff --git a/setup b/setup index f533e01..348f0c4 100755 --- a/setup +++ b/setup @@ -1,5 +1,16 @@ #! /bin/bash -sudo apt install rtl-sdr sox portaudio19-dev python3-all-dev +sudo apt-get update -pip install pyaudio filters +sudo apt install -y \ + rtl-sdr \ + sox \ + portaudio19-dev \ + python3-all-dev \ + ffmpeg + +pip install -r requirements.txt + +pushd dependencies + ./build_dependencies +popd \ No newline at end of file diff --git a/utilities/play.sh b/utilities/play.sh new file mode 100755 index 0000000..3042cc2 --- /dev/null +++ b/utilities/play.sh @@ -0,0 +1,4 @@ +#! /bin/bash + +O="${1:=-}" +sox -t raw -r 32000 -b 16 -c 2 -L -e signed-integer $O -d \ No newline at end of file diff --git a/record.sh b/utilities/record.sh similarity index 100% rename from record.sh rename to utilities/record.sh diff --git a/stream b/utilities/stream.sh similarity index 99% rename from stream rename to utilities/stream.sh index 06507d3..946f393 100755 --- a/stream +++ b/utilities/stream.sh @@ -1,5 +1,4 @@ #! /bin/bash - #rtl_sdr -f 105.5M -s 1M - | ./fm1s.py | ffmpeg -f s16le -ar 50k -ac 2 -i - -f rtp rtp://localhost:1234 ./demo.py | ./fm1s_int16.py | ffmpeg -f s16le -ar 50k -ac 2 -i - -f rtp rtp://localhost:1234