paulh002 / sdrberry

Raspberry pi SDR tranceiver using lvgl gui
GNU General Public License v3.0
53 stars 6 forks source link

ok new day new string #24

Closed RichNeese closed 1 year ago

RichNeese commented 1 year ago

so going back to questions.

1 ) using pkgs where possible. I honestly would like to try and get this working based on pkgs .

what part of soapysdr are you using ? is it just the libs and modules ?

2) what part of liquid-dsp are you using ? do I can match pkgs to see what is out there.

Dont take it wrong its just if we make this more mainline on bookworm and get higns going I can then work on getting sdrberry made into a deb that would make a quicker install. As most users want something more out of the box then have to build and wait..

I plan to make the script cover both when the time comes. just learning how your doing things. I see this as a great projct .

On par wit what the hfsignals bitx is.

I also want to make it work on other arm boards because there are boards lower in price then what the pi4 is right now that have better cpu's and performance.

But there is also the Tinker Boards that alot of people also use. intel based that this would be good on.

just asking feedback to work with you ....

RichNeese commented 1 year ago

also was lookign at do te other soapy modules work if they wanted to make a standalown reciever out of this.

paulh002 commented 1 year ago

Hi Richard,

I know the installation experience is important, I did not focus so much on it. Lately I was quite busy with hardware, have a look at the hifiberry repo which is a low cost SDR based on Tayloe (like sbitx hardware) and works quite well. I can check the use of packages, SoapySDR is not so critical; they did not change a lot over the years. Liquid dsp is different. The version is very important because there is a lot of development on the package. Another option is to move liquid dsp to cmake, I have done that with lvgl library. I can also do that with SoapySDR. In cmake you can manage the version of packages you include, and is a better way to manage the build. The software should run on different linux installations, i don't use specific raspberry pi software components. But the pi is well documented and supported that is really an advantage.

Op di 29 aug 2023 om 17:38 schreef Richard Neese @.***>:

so going back to questions.

1 ) using pkgs where possible. I honestly would like to try and get this working based on pkgs .

what part of soapysdr are you using ? is it just the libs and modules ?

  1. what part of liquid-dsp are you using ? do I can match pkgs to see what is out there.

Dont take it wrong its just if we make this more mainline on bookworm and get higns going I can then work on getting sdrberry made into a deb that would make a quicker install. As most users want something more out of the box then have to build and wait..

I plan to make the script cover both when the time comes. just learning how your doing things. I see this as a great projct .

On par wit what the hfsignals bitx is.

I also want to make it work on other arm boards because there are boards lower in price then what the pi4 is right now that have better cpu's and performance.

But there is also the Tinker Boards that alot of people also use. intel based that this would be good on.

just asking feedback to work with you ....

— Reply to this email directly, view it on GitHub https://github.com/paulh002/sdrberry/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOBYUGRGDVARDFRM6SFQ4TXXYEI3ANCNFSM6AAAAAA4DE7CA4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

RichNeese commented 1 year ago

there is libliquid1 libliquid-dev 1.5.0-2 [Debian/bookworm main] └── signal processing library for software defined radio (development files)

libliquid1 1.5.0-2 [Debian/bookworm main] └── signal processing library for software defined radio

this is liqquid-dsp libs

RichNeese commented 1 year ago

libvolk2-dev 2.5.2-3 [Debian/bookworm main] └── vector optimized function headers

not shure if viable . but alot of the sdr sodtware use it.

paulh002 commented 1 year ago

Audio tuning?

Op di 29 aug 2023 om 18:01 schreef Richard Neese @.***>:

you should also look at volk for better audio tuning.

— Reply to this email directly, view it on GitHub https://github.com/paulh002/sdrberry/issues/24#issuecomment-1697737680, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOBYUGM3OY56WUUZZUDHA3XXYG5ZANCNFSM6AAAAAA4DE7CA4 . You are receiving this because you commented.Message ID: @.***>

paulh002 commented 1 year ago

Thats an older version, currently I use v1.6.0 Unfortunately liquid-dsp does not have cmake, But SoapySDR works fine in cmake. I will change that

Op di 29 aug 2023 om 17:58 schreef Richard Neese @.***>:

there is libliquid1 libliquid-dev 1.5.0-2 [Debian/bookworm main] └── signal processing library for software defined radio (development files)

libliquid1 1.5.0-2 [Debian/bookworm main] └── signal processing library for software defined radio

this is liqquid-dsp libs

— Reply to this email directly, view it on GitHub https://github.com/paulh002/sdrberry/issues/24#issuecomment-1697733345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOBYUE43QW65PBMI24W4WTXXYGT7ANCNFSM6AAAAAA4DE7CA4 . You are receiving this because you commented.Message ID: @.***>

RichNeese commented 1 year ago

I have 1 small shell check error to fix but my script to help is about done and it makes things alot easier in the longrun

RichNeese commented 1 year ago

what is tinyb I find no referance to it when I search

RichNeese commented 1 year ago

ok its for bluetooth ok

RichNeese commented 1 year ago

down to 1 error and then I will post what I did

paulh002 commented 1 year ago

can be removed, this is a bluetooth library, It is bluetooth BLE. I had a rotary encoder connected through bluetooth, For now I removed it, need more development to make it useful

Op di 29 aug 2023 om 18:28 schreef Richard Neese @.***>:

what is tinyb I find no referance to it when I search

— Reply to this email directly, view it on GitHub https://github.com/paulh002/sdrberry/issues/24#issuecomment-1697780225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOBYUHOI5L7FIT7JUREN5LXXYKBPANCNFSM6AAAAAA4DE7CA4 . You are receiving this because you commented.Message ID: @.***>

RichNeese commented 1 year ago

!/bin/bash

wrkdir='/usr/src' usrdir='/home/sdrberry'

Set SDR Unit being used Supported: hackfr = HRF / pluto = PLT / HifiBerry = HFB / sdrberry = SDRB

sdrboard='HRF'

Enable BlueTooth

BlueZ='YES'

enable LCD 5 / 7 / 7b / 7c

LCD="7c"

opt to use pre built pkgs

PACKAGES='YES'

if false; then

sudo apt update sudo apt install -y build-essential git cmake g++ libpython3-dev python3-numpy swig \ libdw-dev fortran g++ swig hackrf libhackrf-dev libfftw3-dev nala \ ninja-build libiio-dev libiio-dev libiio-utils libasound-dev \ libboost-all-dev python3 librtaudio-dev soapysdr-tools libfftw3-dev \ libglfw3-dev sudo ldconfig

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $BlueZ == 'YES' ]]; then if [[ $PACKAGES == 'YES' ]]; then sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev \ libdbus-1-dev libical-dev docutils-common bluez bluez-asla-utils bluez-test-scripts \ bluez-tools else wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.60.tar.xz tar xvf bluez-5.60.tar.xz sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev libdbus-1-dev libical-dev sudo apt-get install -y ap cd bluez-5.60 || exit ./configure --enable-library make -j4 sudo make install fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libsoapysdr-dev else git clone https://github.com/pothosware/SoapySDR.git cd SoapySDR || exit git pull origin master mkdir build cd build || exit cmake .. make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HRF ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install soapysdr0.8-module-hackrf else git clone https://github.com/pothosware/SoapyHackRF cd SoapyHackRF || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HFB ]] ; then git clone https://github.com/paulh002/SoapyHifiBerry cd SoapyHifiBerry || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

if [[ $sdrboard == PLT ]] ; then git clone https://github.com/pothosware/SoapyPlutoSDR cd SoapyPlutoSDR || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

build Liquid-dsp

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libliquid-dev libliquid1 1.5.0-2 else git clone https://github.com/jgaeddert/liquid-dsp sudo apt-get install -y automake autoconf cd liquid-dsp || exit git checkout v1.6.0 ./bootstrap.sh ./configure make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install librtaudio-dev librtaudio6 else git clone https://github.com/paulh002/rtaudio cd rtaudio || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == PLT ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install libad9361-dev libad9361-0 python3-ad9361 else git clone https://github.com/analogdevicesinc/libad9361-iio cd libad9361-iio || exit cmake ./CMakeLists.txt mkdir build make -j4 sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

Remove if not planning to use bluetooth.

sudo apt-get remove -y pulseaudio

if [[ $sdrboard == 'HRF' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_hackrf.cfg
mv sdrberry_settings_hackrf.cfg $usrdir/sdrberry_settings.cfg

elif [[ $sdrboard == 'PLT' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_pluto.cfg
mv sdrberry_settings_pluto.cfg $usrdir/sdrberry_settings.cfg

elif [[ $sdrboard == 'SDRB' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings.cfg
mv sdrberry_settings.cfg $usrdir/sdrberry_settings.cfg  

fi

build sdrberry

git clone -b updates --depth 1 https://github.com/richneese/sdrberry cd sdrberry || exit git checkout Dev mkdir build cd build && cmake .. && make sudo make install

cd to work dir . If does not exist exit script

cd $wrkdir || exit

cp ./sdrberry/install/sdrstart.sh $usrdir chmod +x $usrdir/sdrstart.sh

Do LCD Screen Setup

if [[ $LCD == '5' || $LCD == '7' || $LCD == '7b' ]]; then

Enable Waveshare 7inch_DSILCD(5/7/7B) 800x480

echo dtoverlay=vc4-kms-v3d >> /boot/config.txt
echo dtoverlay=vc4-kms-dsi-7inch >> /boot/config.txt

fi

if [[ $LCD == '7c' ]]; then

Enable Waveshare 7inch DSI LCD (C) 1024×600 driver:

git clone https://github.com/waveshare/Waveshare-DSI-LCD
cd Waveshare-DSI-LCD/6.1.21/64 || exit
sudo bash ./WS_xinchDSI_MAIN.sh 70C I2C1

fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

enable I2C

sudo sed -i 's/$/ vt.global_cursor_default=0 usbhid.mousepoll=2/' /boot/cmdline.txt sudo sed -i '/dtparam=i2c_arm=on/s/^#//g' /boot/config.txt

Do Cleanup

rm -rf sdrberry rtaudio liquid-dsp SoapyHifiBerry SoapyHackRF SoapySDR sdrberrysettings*

sudo reboot

RichNeese commented 1 year ago

I still hav to work on the radio berry part but this is whats done. let me finish the radio berry pert

RichNeese commented 1 year ago

!/bin/bash

wrkdir='/usr/src' usrdir='/home/sdrberry'

Set SDR Unit being used Supported: hackfr = HRF / pluto = PLT / HifiBerry = HFB / RadioBerry = RDB

sdrboard='HRF'

Enable BlueTooth

BlueZ='YES'

enable LCD 5 / 7 / 7b / 7c

LCD="7c"

opt to use pre built pkgs

PACKAGES='YES'

if false; then

sudo apt update sudo apt install -y build-essential git cmake g++ libpython3-dev python3-numpy swig \ libdw-dev fortran g++ swig hackrf libhackrf-dev libfftw3-dev nala \ ninja-build libiio-dev libiio-dev libiio-utils libasound-dev \ libboost-all-dev python3 librtaudio-dev soapysdr-tools libfftw3-dev \ libglfw3-dev sudo ldconfig

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $BlueZ == 'YES' ]]; then if [[ $PACKAGES == 'YES' ]]; then sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev \ libdbus-1-dev libical-dev docutils-common bluez bluez-asla-utils bluez-test-scripts \ bluez-tools else wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.60.tar.xz tar xvf bluez-5.60.tar.xz sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev libdbus-1-dev libical-dev sudo apt-get install -y ap cd bluez-5.60 || exit ./configure --enable-library make -j4 sudo make install fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libsoapysdr-dev else git clone https://github.com/pothosware/SoapySDR.git cd SoapySDR || exit git pull origin master mkdir build cd build || exit cmake .. make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HRF ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install soapysdr0.8-module-hackrf else git clone https://github.com/pothosware/SoapyHackRF cd SoapyHackRF || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HFB ]] ; then git clone https://github.com/paulh002/SoapyHifiBerry cd SoapyHifiBerry || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

if [[ $sdrboard == PLT ]] ; then git clone https://github.com/pothosware/SoapyPlutoSDR cd SoapyPlutoSDR || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

if [[ $sdrboard == SDRB ]] ; then

-----------------------------------------------------------------------------

echo "Installing Radioberry driver..."
git clone  --depth=1 https://github.com/pa3gsb/Radioberry-2.x

sudo apt-get -y install raspberrypi-kernel-headers
sudo apt-get -y install linux-headers-rpi
sudo apt-get -y install device-tree-compiler
sudo apt-get -y install pigpio

#unregister radioberry driver
sudo modprobe -r radioberry

if [ ! -d "/lib/modules/$(uname -r)/kernel/drivers/sdr" ]; then
    sudo mkdir /lib/modules/$(uname -r)/kernel/drivers/sdr
fi

#cd Radioberry-2.x/SBC/rpi-4/device_driver/driver
cd SoapyRadioberry/driver || exit
make

sudo cp radioberry.ko /lib/modules/$(uname -r)/kernel/drivers/sdr
sudo dtc -@ -I dts -O dtb -o radioberry.dtbo radioberry.dts
sudo cp radioberry.dtbo /boot/overlays
#add driver to config.txt
sudo grep -Fxq "dtoverlay=radioberry" /boot/config.txt || sudo sed -i '$ a dtoverlay=radioberry' /boot/config.txt
sudo cp ./radioberry.rbf /lib/firmware/.

#cd to work dir . If does not exist exit script 
cd  $wrkdir || exit

sudo depmod 
#register radioberry driver
sudo modprobe radioberry
sudo chmod 666 /dev/radioberry
#show radioberry driver info.
sudo modinfo radioberry

echo ""
echo "Radioberry driver installed."
#-----------------------------------------------------------------------------

fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

build Liquid-dsp

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libliquid-dev libliquid1 1.5.0-2 else git clone https://github.com/jgaeddert/liquid-dsp sudo apt-get install -y automake autoconf cd liquid-dsp || exit git checkout v1.6.0 ./bootstrap.sh ./configure make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install librtaudio-dev librtaudio6 else git clone https://github.com/paulh002/rtaudio cd rtaudio || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == PLT ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install libad9361-dev libad9361-0 python3-ad9361 else git clone https://github.com/analogdevicesinc/libad9361-iio cd libad9361-iio || exit cmake ./CMakeLists.txt mkdir build make -j4 sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

Remove if not planning to use bluetooth.

sudo apt-get remove -y pulseaudio

if [[ $sdrboard == 'HRF' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_hackrf.cfg
mv sdrberry_settings_hackrf.cfg $usrdir/sdrberry_settings.cfg

elif [[ $sdrboard == 'PLT' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_pluto.cfg
mv sdrberry_settings_pluto.cfg $usrdir/sdrberry_settings.cfg

elif [[ $sdrboard == 'RDB' ]]; then wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_radioberry.cfg mv sdrberry_settings_radioberry.cfg $usrdir/sdrberry_settings.cfg elif [[ $sdrboard == 'SDRB' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings.cfg
mv sdrberry_settings.cfg $usrdir/sdrberry_settings.cfg

fi

build sdrberry

git clone -b updates --depth 1 https://github.com/richneese/sdrberry cd sdrberry || exit git checkout Dev mkdir build cd build && cmake .. && make sudo make install

cd to work dir . If does not exist exit script

cd $wrkdir || exit

cp ./sdrberry/install/sdrstart.sh $usrdir chmod +x $usrdir/sdrstart.sh

Do LCD Screen Setup

if [[ $LCD == '5' || $LCD == '7' || $LCD == '7b' ]]; then

Enable Waveshare 7inch_DSILCD(5/7/7B) 800x480

echo dtoverlay=vc4-kms-v3d >> /boot/config.txt
echo dtoverlay=vc4-kms-dsi-7inch >> /boot/config.txt

fi

if [[ $LCD == '7c' ]]; then

Enable Waveshare 7inch DSI LCD (C) 1024×600 driver:

git clone https://github.com/waveshare/Waveshare-DSI-LCD
cd Waveshare-DSI-LCD/6.1.21/64 || exit
sudo bash ./WS_xinchDSI_MAIN.sh 70C I2C1

fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

enable I2C

sudo sed -i 's/$/ vt.global_cursor_default=0 usbhid.mousepoll=2/' /boot/cmdline.txt sudo sed -i '/dtparam=i2c_arm=on/s/^#//g' /boot/config.txt

Do Cleanup

rm -rf sdrberry rtaudio liquid-dsp SoapyHifiBerry SoapyHackRF SoapySDR sdrberrysettings*

sudo reboot

RichNeese commented 1 year ago

this should cover all 4 install scripts now into 1

paulh002 commented 1 year ago

Thanks, I will test it. I made a branch in github for installation improvement. We can first put it there and test.

Op di 29 aug 2023 om 19:25 schreef Richard Neese @.***>:

this should cover all 4 install scripts now into 1

— Reply to this email directly, view it on GitHub https://github.com/paulh002/sdrberry/issues/24#issuecomment-1697856407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOBYUH6LXINLGN4UY5RZN3XXYQY5ANCNFSM6AAAAAA4DE7CA4 . You are receiving this because you commented.Message ID: @.***>

RichNeese commented 1 year ago

i found a typo

RichNeese commented 1 year ago

!/bin/bash

wrkdir='/usr/src' usrdir='/home/sdrberry'

Set SDR Unit being used Supported: hackfr = HRF / pluto = PLT / HifiBerry = HFB / RadioBerry = RDB

sdrboard='HRF'

Enable BlueTooth

BlueZ='YES'

enable LCD 5 / 7 / 7b / 7c

LCD="7c"

opt to use pre built pkgs

PACKAGES='YES'

if false; then

sudo apt update sudo apt install -y build-essential git cmake g++ libpython3-dev python3-numpy swig \ libdw-dev fortran g++ swig hackrf libhackrf-dev libfftw3-dev nala \ ninja-build libiio-dev libiio-dev libiio-utils libasound-dev \ libboost-all-dev python3 librtaudio-dev soapysdr-tools libfftw3-dev \ libglfw3-dev sudo ldconfig

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $BlueZ == 'YES' ]]; then if [[ $PACKAGES == 'YES' ]]; then sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev \ libdbus-1-dev libical-dev docutils-common bluez bluez-asla-utils bluez-test-scripts \ bluez-tools else wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.60.tar.xz tar xvf bluez-5.60.tar.xz sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev libdbus-1-dev libical-dev sudo apt-get install -y ap cd bluez-5.60 || exit ./configure --enable-library make -j4 sudo make install fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libsoapysdr-dev else git clone https://github.com/pothosware/SoapySDR.git cd SoapySDR || exit git pull origin master mkdir build cd build || exit cmake .. make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HRF ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install soapysdr0.8-module-hackrf else git clone https://github.com/pothosware/SoapyHackRF cd SoapyHackRF || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HFB ]] ; then git clone https://github.com/paulh002/SoapyHifiBerry cd SoapyHifiBerry || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

if [[ $sdrboard == PLT ]] ; then git clone https://github.com/pothosware/SoapyPlutoSDR cd SoapyPlutoSDR || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

if [[ $sdrboard == RDB ]] ; then

-----------------------------------------------------------------------------

echo "Installing Radioberry driver..."
git clone  --depth=1 https://github.com/pa3gsb/Radioberry-2.x

sudo apt-get -y install raspberrypi-kernel-headers
sudo apt-get -y install linux-headers-rpi
sudo apt-get -y install device-tree-compiler
sudo apt-get -y install pigpio

#unregister radioberry driver
sudo modprobe -r radioberry

if [ ! -d "/lib/modules/$(uname -r)/kernel/drivers/sdr" ]; then
    sudo mkdir /lib/modules/$(uname -r)/kernel/drivers/sdr
fi

#cd Radioberry-2.x/SBC/rpi-4/device_driver/driver
cd SoapyRadioberry/driver || exit
make

sudo cp radioberry.ko /lib/modules/$(uname -r)/kernel/drivers/sdr
sudo dtc -@ -I dts -O dtb -o radioberry.dtbo radioberry.dts
sudo cp radioberry.dtbo /boot/overlays
#add driver to config.txt
sudo grep -Fxq "dtoverlay=radioberry" /boot/config.txt || sudo sed -i '$ a dtoverlay=radioberry' /boot/config.txt
sudo cp ./radioberry.rbf /lib/firmware/.

#cd to work dir . If does not exist exit script 
cd  $wrkdir || exit

sudo depmod 
#register radioberry driver
sudo modprobe radioberry
sudo chmod 666 /dev/radioberry
#show radioberry driver info.
sudo modinfo radioberry

echo ""
echo "Radioberry driver installed."
#-----------------------------------------------------------------------------

fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

build Liquid-dsp

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libliquid-dev libliquid1 1.5.0-2 else git clone https://github.com/jgaeddert/liquid-dsp sudo apt-get install -y automake autoconf cd liquid-dsp || exit git checkout v1.6.0 ./bootstrap.sh ./configure make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install librtaudio-dev librtaudio6 else git clone https://github.com/paulh002/rtaudio cd rtaudio || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == PLT ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install libad9361-dev libad9361-0 python3-ad9361 else git clone https://github.com/analogdevicesinc/libad9361-iio cd libad9361-iio || exit cmake ./CMakeLists.txt mkdir build make -j4 sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

Remove if not planning to use bluetooth.

sudo apt-get remove -y pulseaudio

if [[ $sdrboard == 'HRF' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_hackrf.cfg
mv sdrberry_settings_hackrf.cfg $usrdir/sdrberry_settings.cfg

elif [[ $sdrboard == 'PLT' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_pluto.cfg
mv sdrberry_settings_pluto.cfg $usrdir/sdrberry_settings.cfg

elif [[ $sdrboard == 'RDB' ]]; then wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_radioberry.cfg mv sdrberry_settings_radioberry.cfg $usrdir/sdrberry_settings.cfg elif [[ $sdrboard == 'RDB' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings.cfg
mv sdrberry_settings.cfg $usrdir/sdrberry_settings.cfg

fi

build sdrberry

git clone -b updates --depth 1 https://github.com/richneese/sdrberry cd sdrberry || exit git checkout Dev mkdir build cd build && cmake .. && make sudo make install

cd to work dir . If does not exist exit script

cd $wrkdir || exit

cp ./sdrberry/install/sdrstart.sh $usrdir chmod +x $usrdir/sdrstart.sh

Do LCD Screen Setup

if [[ $LCD == '5' || $LCD == '7' || $LCD == '7b' ]]; then

Enable Waveshare 7inch_DSILCD(5/7/7B) 800x480

echo dtoverlay=vc4-kms-v3d >> /boot/config.txt
echo dtoverlay=vc4-kms-dsi-7inch >> /boot/config.txt

fi

if [[ $LCD == '7c' ]]; then

Enable Waveshare 7inch DSI LCD (C) 1024×600 driver:

git clone https://github.com/waveshare/Waveshare-DSI-LCD
cd Waveshare-DSI-LCD/6.1.21/64 || exit
sudo bash ./WS_xinchDSI_MAIN.sh 70C I2C1

fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

enable I2C

sudo sed -i 's/$/ vt.global_cursor_default=0 usbhid.mousepoll=2/' /boot/cmdline.txt sudo sed -i '/dtparam=i2c_arm=on/s/^#//g' /boot/config.txt

Do Cleanup

rm -rf sdrberry rtaudio liquid-dsp SoapyHifiBerry SoapyHackRF SoapySDR sdrberrysettings*

sudo reboot

paulh002 commented 1 year ago

Maybe add a help message to explain the option.

Op di 29 aug 2023 om 19:25 schreef Richard Neese @.***>:

!/bin/bash

wrkdir='/usr/src' usrdir='/home/sdrberry'

Set SDR Unit being used Supported: hackfr = HRF / pluto = PLT / HifiBerry

= HFB / RadioBerry = RDB sdrboard='HRF'

Enable BlueTooth

BlueZ='YES' enable LCD 5 / 7 / 7b / 7c

LCD="7c" opt to use pre built pkgs

PACKAGES='YES'

if false; then

sudo apt update sudo apt install -y build-essential git cmake g++ libpython3-dev python3-numpy swig libdw-dev fortran g++ swig hackrf libhackrf-dev libfftw3-dev nala ninja-build libiio-dev libiio-dev libiio-utils libasound-dev libboost-all-dev python3 librtaudio-dev soapysdr-tools libfftw3-dev libglfw3-dev sudo ldconfig

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $BlueZ == 'YES' ]]; then if [[ $PACKAGES == 'YES' ]]; then sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev libdbus-1-dev libical-dev docutils-common bluez bluez-asla-utils bluez-test-scripts bluez-tools else wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.60.tar.xz tar xvf bluez-5.60.tar.xz sudo apt-get install -y libusb-dev libreadline-dev libglib2.0-dev libudev-dev libdbus-1-dev libical-dev sudo apt-get install -y ap cd bluez-5.60 || exit ./configure --enable-library make -j4 sudo make install fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libsoapysdr-dev else git clone https://github.com/pothosware/SoapySDR.git cd SoapySDR || exit git pull origin master mkdir build cd build || exit cmake .. make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HRF ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install soapysdr0.8-module-hackrf else git clone https://github.com/pothosware/SoapyHackRF cd SoapyHackRF || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == HFB ]] ; then git clone https://github.com/paulh002/SoapyHifiBerry cd SoapyHifiBerry || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

if [[ $sdrboard == PLT ]] ; then git clone https://github.com/pothosware/SoapyPlutoSDR cd SoapyPlutoSDR || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

if [[ $sdrboard == SDRB ]] ; then

-----------------------------------------------------------------------------

echo "Installing Radioberry driver..." git clone --depth=1 https://github.com/pa3gsb/Radioberry-2.x

sudo apt-get -y install raspberrypi-kernel-headers sudo apt-get -y install linux-headers-rpi sudo apt-get -y install device-tree-compiler sudo apt-get -y install pigpio

unregister radioberry driver

sudo modprobe -r radioberry

if [ ! -d "/lib/modules/$(uname -r)/kernel/drivers/sdr" ]; then sudo mkdir /lib/modules/$(uname -r)/kernel/drivers/sdr fi

cd Radioberry-2.x/SBC/rpi-4/device_driver/driver

cd SoapyRadioberry/driver || exit make

sudo cp radioberry.ko /lib/modules/$(uname -r)/kernel/drivers/sdr sudo dtc -@ -I dts -O dtb -o radioberry.dtbo radioberry.dts sudo cp radioberry.dtbo /boot/overlays

add driver to config.txt

sudo grep -Fxq "dtoverlay=radioberry" /boot/config.txt || sudo sed -i '$ a dtoverlay=radioberry' /boot/config.txt sudo cp ./radioberry.rbf /lib/firmware/.

cd to work dir . If does not exist exit script

cd $wrkdir || exit

sudo depmod

register radioberry driver

sudo modprobe radioberry sudo chmod 666 /dev/radioberry

show radioberry driver info.

sudo modinfo radioberry

echo "" echo "Radioberry driver installed."

-----------------------------------------------------------------------------

fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

build Liquid-dsp

if [[ $PACKAGES == 'YES' ]]; then sudo apt install libliquid-dev libliquid1 1.5.0-2 else git clone https://github.com/jgaeddert/liquid-dsp sudo apt-get install -y automake autoconf cd liquid-dsp || exit git checkout v1.6.0 ./bootstrap.sh ./configure make -j4 sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $PACKAGES == 'YES' ]]; then sudo apt install librtaudio-dev librtaudio6 else git clone https://github.com/paulh002/rtaudio cd rtaudio || exit mkdir build cd build || exit cmake .. make sudo make install sudo ldconfig fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

if [[ $sdrboard == PLT ]] ; then if [[ $PACKAGES == 'YES' ]]; then sudo apt install libad9361-dev libad9361-0 python3-ad9361 else git clone https://github.com/analogdevicesinc/libad9361-iio cd libad9361-iio || exit cmake ./CMakeLists.txt mkdir build make -j4 sudo make install sudo ldconfig fi fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

Remove if not planning to use bluetooth.

sudo apt-get remove -y pulseaudio

if [[ $sdrboard == 'HRF' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_hackrf.cfg mv sdrberry_settings_hackrf.cfg $usrdir/sdrberry_settings.cfg elif [[ $sdrboard == 'PLT' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_pluto.cfg mv sdrberry_settings_pluto.cfg $usrdir/sdrberry_settings.cfg elif [[ $sdrboard == 'RDB' ]]; then wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings_radioberry.cfg mv sdrberry_settings_radioberry.cfg $usrdir/sdrberry_settings.cfg elif [[ $sdrboard == 'SDRB' ]]; then

put sdrberry config in users home dir

wget https://raw.githubusercontent.com/paulh002/sdrberry/master/install/sdrberry_settings.cfg mv sdrberry_settings.cfg $usrdir/sdrberry_settings.cfg fi

build sdrberry

git clone -b updates --depth 1 https://github.com/richneese/sdrberry cd sdrberry || exit git checkout Dev mkdir build cd build && cmake .. && make sudo make install

cd to work dir . If does not exist exit script

cd $wrkdir || exit

cp ./sdrberry/install/sdrstart.sh $usrdir chmod +x $usrdir/sdrstart.sh

Do LCD Screen Setup

if [[ $LCD == '5' || $LCD == '7' || $LCD == '7b' ]]; then

Enable Waveshare 7inch_DSILCD(5/7/7B) 800x480

echo dtoverlay=vc4-kms-v3d >> /boot/config.txt echo dtoverlay=vc4-kms-dsi-7inch >> /boot/config.txt

fi

if [[ $LCD == '7c' ]]; then

Enable Waveshare 7inch DSI LCD (C) 1024×600 driver:

git clone https://github.com/waveshare/Waveshare-DSI-LCD cd Waveshare-DSI-LCD/6.1.21/64 || exit sudo bash ./WS_xinchDSI_MAIN.sh 70C I2C1 fi

cd to work dir . If does not exist exit script

cd $wrkdir || exit

enable I2C

sudo sed -i 's/$/ vt.global_cursor_default=0 usbhid.mousepoll=2/' /boot/cmdline.txt sudo sed -i '/dtparam=i2c_arm=on/s/^#//g' /boot/config.txt

Do Cleanup

rm -rf sdrberry rtaudio liquid-dsp SoapyHifiBerry SoapyHackRF SoapySDR sdrberrysettings*

sudo reboot

— Reply to this email directly, view it on GitHub https://github.com/paulh002/sdrberry/issues/24#issuecomment-1697855975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOBYUG2XZF454D6LIG3WTTXXYQXVANCNFSM6AAAAAA4DE7CA4 . You are receiving this because you commented.Message ID: @.***>

RichNeese commented 1 year ago

1 min kill this and I wil post new