Categories
Raspberry Pi Други Упътвания

Gqrx SDR for the Raspberry Pi

sudo apt-get update
sudo apt-get install -y cmake gnuradio-dev gr-osmosdr qt5-default libqt5svg5-dev libpulse-dev
git clone https://github.com/gqrx-sdr/gqrx.git
cd gqrx
mkdir build
cd build
cmake ..
make -j4
sudo make install
gqrx
Categories
Raspberry Pi Други Линукс Упътвания

Инсталиране на Samba сървър / Raspberry Pi

Обновяване на инсталираните приложения

sudo apt-get update
sudo apt-get upgrade

Инсталиране на Samba

sudo apt-get install samba samba-common-bin

Създаване на споделена директория

mkdir /home/pi/shared

Конфигуриране на Samba

sudo nano /etc/samba/smb.conf
[share]
path = /home/pi/shared
writeable=Yes
create mask=0777
directory mask=0777
public=no

Създаване на потребител за Samba

sudo smbpasswd -a pi

Рестартиране на Samba

sudo systemctl restart smbd

Източник:

https://pimylifeup.com/raspberry-pi-samba/

Categories
Raspberry Pi Други Упътвания

Install OpenCV 4.5 on Raspberry Pi 4 / Zero 2 W

Swap memory

OpenCV needs a lot of memory to compile. The latest versions want to see a minimum of 6.5 GB of memory before building. Your swap space is limited to 2048 MByte by default. To exceed this 2048 MByte limit, you will need to increase this maximum in the /sbin/dphys-swapfile.

https://www.qengineering.eu/install-opencv-4.5-on-raspberry-pi-4.html
sudo nano /sbin/dphys-swapfile
sudo nano /etc/dphys-swapfile
sudo reboot

Installation script

#!/bin/bash
set -e
echo "Installing OpenCV 4.5.0 on your Raspberry Pi 32-bit OS"
echo "It will take minimal 1.5 hour !"
cd ~
if [ -f /etc/os-release ]; then
    # freedesktop.org and systemd
    . /etc/os-release
    VER=$VERSION_ID
fi
# install the dependencies
sudo apt-get install -y build-essential cmake git unzip pkg-config
sudo apt-get install -y libjpeg-dev libtiff-dev libpng-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libgtk2.0-dev libcanberra-gtk* libgtk-3-dev
sudo apt-get install -y libgstreamer1.0-dev gstreamer1.0-gtk3
sudo apt-get install -y libgstreamer-plugins-base1.0-dev gstreamer1.0-gl
sudo apt-get install -y libxvidcore-dev libx264-dev
if [ $VER == '11' ]; then
   echo "Detected Bullseye OS"
else
   sudo apt-get install -y python-dev python-numpy python-pip
fi
sudo apt-get install -y python3-dev python3-numpy python3-pip
sudo apt-get install -y libtbb2 libtbb-dev libdc1394-22-dev
sudo apt-get install -y libv4l-dev v4l-utils
sudo apt-get install -y libopenblas-dev libatlas-base-dev libblas-dev
sudo apt-get install -y liblapack-dev gfortran libhdf5-dev
sudo apt-get install -y libprotobuf-dev libgoogle-glog-dev libgflags-dev
sudo apt-get install -y protobuf-compiler

# remove old versions
cd ~ 
sudo rm -rf opencv*
# download OpenCV
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.5.0.zip 
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.5.0.zip 
# unpack
unzip opencv.zip 
unzip opencv_contrib.zip 
# some administration to make live easier later on
mv opencv-4.5.0 opencv
mv opencv_contrib-4.5.0 opencv_contrib
# clean up the zip files
rm opencv.zip
rm opencv_contrib.zip

# set install dir
cd ~/opencv
mkdir build
cd build

# run cmake
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D ENABLE_NEON=ON \
-D ENABLE_VFPV3=ON \
-D WITH_OPENMP=ON \
-D BUILD_ZLIB=ON \
-D BUILD_TIFF=ON \
-D WITH_FFMPEG=ON \
-D WITH_TBB=ON \
-D BUILD_TBB=ON \
-D BUILD_TESTS=OFF \
-D WITH_EIGEN=OFF \
-D WITH_GSTREAMER=ON \
-D WITH_V4L=ON \
-D WITH_LIBV4L=ON \
-D WITH_VTK=OFF \
-D WITH_QT=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D BUILD_opencv_python3=TRUE \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D BUILD_EXAMPLES=OFF ..

# run make
make -j4
sudo make install
sudo ldconfig

# cleaning (frees 300 MB)
make clean
sudo apt-get update

echo "Congratulations!"
echo "You've successfully installed OpenCV 4.5.0 on your Raspberry Pi 32-bit OS"

$ wget https://github.com/Qengineering/Install-OpenCV-Raspberry-Pi-32-bits/raw/main/OpenCV-4-5-0.sh
$ sudo chmod 755 ./OpenCV-4-5-0.sh
$ ./OpenCV-4-5-0.sh

https://www.qengineering.eu/install-opencv-4.5-on-raspberry-pi-4.html

Source:

https://www.qengineering.eu/install-opencv-4.5-on-raspberry-pi-4.html

Categories
Raspberry Pi Други Линукс Упътвания

Log2Ram за Raspberry Pi

Описание

Log2Ram намалява постоянното писане върху MicroSD картата в Raspbery Pi.

Инсталация

echo "deb http://packages.azlux.fr/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/azlux.list

wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -

sudo apt update

sudo apt install log2ram

Източник

https://github.com/azlux/log2ram

Categories
Raspberry Pi Други Интернет на нещата Линукс Упътвания

Копиране файловете на потребител pi в Raspberry OS с rsync

Копиране на директорията на потребител pi в Raspberry OS с rsync отдалечено:

rsync -chavzP --stats pi@remote.host:/home/pi /path/to/local/storage

където remote.host е IP адресът на Raspberry Pi, а /path/to/local/storage локалната директория, където ще бъдат копирани данните.

Categories
Raspberry Pi Линукс Упътвания

Компилиране на RTKLIB в Raspbian OS

1. Сваляне на изходния код (версията на RTKLIB Explorer)

git clone https://github.com/rtklibexplorer/RTKLIB.git
cd RTKLIB
cd app
cd consapp

2. Инсталиране на необходимите инструменти и програми за изграждане (компилиране) на RTKLIB

sudo apt-get install build-essential
sudo apt-get install automake
sudo apt-get install checkinstall
sudo apt-get install liblapack3
sudo apt-get install libblas3
sudo apt-get install gfortran

3. Изграждане и инсталиране

sudo make
sudo make install

4. Обновяване

cd RTKLIB
git pull

При обновяване се повтаря точка 3.