Update FPV-orange-pi-5-groundstation.md

markup
pull/324/head
JohnDGodwin 2024-02-13 03:18:05 -05:00 committed by GitHub
parent c71b4c8cf6
commit 8a28d3b7f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 84 additions and 69 deletions

View File

@ -1,40 +1,40 @@
Download Ubuntu Server ISO and flash to device -- https://github.com/Joshua-Riek/ubuntu-rockchip Download Ubuntu Server ISO and flash to device -- https://github.com/Joshua-Riek/ubuntu-rockchip
sudo apt update `sudo apt update`
sudo apt upgrade
`sudo apt upgrade`
Go ahead and pull some packages we will need, too. Go ahead and pull some packages we will need, too.
sudo apt install dkms python3-all-dev fakeroot network-manager `sudo apt install dkms python3-all-dev fakeroot network-manager`
------------------------------------------------------------------------------------------- ***
Gsteamer setup with MPP Gsteamer setup with MPP
Download and install gstreamer Download and install gstreamer
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 `sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5`
Download and install rockchip mpp, rga, and gstreamer plugin from an included custom PPA, for hardware accelerated decoding. Download and install rockchip mpp, rga, and gstreamer plugin from an included custom PPA, for hardware accelerated decoding.
sudo apt install gstreamer1.0-rockchip1 librga-dev librga2 librockchip-mpp-dev librockchip-mpp1 librockchip-vpu0 libv4l-rkmpp rockchip-multimedia-config libgl4es libgl4es-dev libdri2to3 `sudo apt install gstreamer1.0-rockchip1 librga-dev librga2 librockchip-mpp-dev librockchip-mpp1 librockchip-vpu0 libv4l-rkmpp rockchip-multimedia-config libgl4es libgl4es-dev libdri2to3`
test with: test with:
gst-inspect-1.0 | grep 265 `gst-inspect-1.0 | grep 265`
gst-inspect-1.0 | grep mpp `gst-inspect-1.0 | grep mpp`
***
-----------------------------------------------------------------------
rtl8812au drivers installation rtl8812au drivers installation
@ -50,38 +50,47 @@ enter the following line-by-line
EOF" EOF"
git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git
cd rtl8812au/ `git clone -b v5.2.20 https://github.com/svpcom/rtl8812au.git`
sudo ./dkms-install.sh
``cd rtl8812au/``
`sudo ./dkms-install.sh`
--------------------------------------------------------------------- ***
reboot device reboot device
TODO: or figure out how to load the driver without a full reboot. Try "modprobe rtl8812au" TODO: or figure out how to load the driver without a full reboot. Try "modprobe 88xxau"
---------------------------------------------------------------------- ***
WFB-ng installation WFB-ng installation
find wifi device name using iwconfig and substitute it for $WLAN in the script install find wifi device name using iwconfig and substitute it for $WLAN in the script install
git clone -b stable https://github.com/svpcom/wfb-ng.git `git clone -b stable https://github.com/svpcom/wfb-ng.git`
cd wfb-ng
sudo ./scripts/install_gs.sh $WLAN `cd wfb-ng`
`sudo ./scripts/install_gs.sh $WLAN`
after install: after install:
sudo systemctl enable wifibroadcast
`sudo systemctl enable wifibroadcast`
then then
sudo nano /etc/wifibroadcast.cfg
`sudo nano /etc/wifibroadcast.cfg`
change the channel to match the vtx change the channel to match the vtx
@ -94,101 +103,105 @@ Copy drone.key from the wfb-ng directory to the vtx's /etc directory
example using scp, replace x.x.x.x with the camera's ip address example using scp, replace x.x.x.x with the camera's ip address
scp drone.key root@x.x.x.x:/etc `scp drone.key root@x.x.x.x:/etc`
Make sure gs.key was automatically put in /etc on the VRX side Make sure gs.key was automatically put in /etc on the VRX side
ls /etc/gs.key `ls /etc/gs.key`
--------------------------------------------------------------------- ***
reboot device again reboot device again
---------------------------------------------------------------------- ***
test the connection: test the connection:
on the groundstation run on the groundstation run
sudo systemctl enable wifibroadcast@gs `sudo systemctl enable wifibroadcast@gs`
sudo systemctl start wifibroadcast@gs
wfb-cli gs `sudo systemctl start wifibroadcast@gs`
`wfb-cli gs`
Plug in the camera and watch the packets come in, xlost should stay near zero while xrecv should go up Plug in the camera and watch the packets come in, xlost should stay near zero while xrecv should go up
----------------------------------------------------------------- ***
graphical environment for gstreamer playback graphical environment for gstreamer playback
sudo apt install xorg `sudo apt install xorg`
sudo apt install --no-install-recommends lightdm-gtk-greeter
sudo apt install --no-install-recommends lightdm
sudo apt install --no-install-recommends openbox
sudo nano /etc/lightdm/lightdm.conf `sudo apt install --no-install-recommends lightdm-gtk-greeter lightdm openbox`
Then edit
`sudo nano /etc/lightdm/lightdm.conf`
insert: insert:
[Seat:*] [Seat:*]
autologin-user=ubuntu autologin-user=ubuntu
xserver-command = X -nocursor xserver-command = X -nocursor
------------------------------------------------------------------------------------------------------------------------------------ ***
TODO: TODO:
At this point, reboot and you will have to login with a keyboard at least once, but after it will auto login the ubuntu user to an openbox session with no cursor At this point, reboot and you will have to login with a keyboard at least once, but after it will auto login the ubuntu user to an openbox session with no cursor
----------------------------------------------------------------------------------------------------------------------------------- ***
let's set the desktop wallpaper and write some startup scripts let's set the desktop wallpaper and write some startup scripts
sudo apt install libimlib2-dev libx11-dev libxinerama-dev pkg-config make `sudo apt install libimlib2-dev libx11-dev libxinerama-dev pkg-config make`
git clone https://github.com/himdel/hsetroot.git
cd hsetroot `git clone https://github.com/himdel/hsetroot.git`
make
sudo make install `cd hsetroot`
`make`
`sudo make install`
Save your desired background image to /home/ubuntu/desktop.png Save your desired background image to /home/ubuntu/desktop.png
a script to set the display resolution to 1280x720 a script to set the display resolution to 1280x720
sudo nano /home/ubuntu/setdisplay.sh `sudo nano /home/ubuntu/setdisplay.sh`
insert: insert:
#/bin/bash #/bin/bash
export DISPLAY=:0 export DISPLAY=:0
if [[ $(xrandr | awk '/HDMI-1/ {print $2}') == "connected" ]]; then if [[ $(xrandr | awk '/HDMI-1/ {print $2}') == "connected" ]]; then
xrandr --output HDMI-1 --mode 1280x720 xrandr --output HDMI-1 --mode 1280x720
fi fi
if [[ $(xrandr | awk '/HDMI-2/ {print $2}') == "connected" ]]; then if [[ $(xrandr | awk '/HDMI-2/ {print $2}') == "connected" ]]; then
xrandr --output HDMI-2 --mode 1280x720 xrandr --output HDMI-2 --mode 1280x720
fi fi
exit 0 exit 0
@ -199,9 +212,13 @@ a script to start/stop the video stream and save DVR to the ~/Videos directory
note: This script relies on a push button connected between pin 5 and GND. You will have to install one for this to work. note: This script relies on a push button connected between pin 5 and GND. You will have to install one for this to work.
Make Videos directory
sudo nano /home/ubuntu/dvr.sh `sudo mkdir /home/ubuntu/Videos`
Make the script
`sudo nano /home/ubuntu/dvr.sh`
insert: insert:
@ -246,10 +263,11 @@ note: This script relies on a push button connected between pin 5 and GND. You w
done done
Make the scripts executable with chmod +x.
Finally: Finally:
sudo nano /etc/xdg/openbox/autostart `sudo nano /etc/xdg/openbox/autostart`
add: add:
@ -261,47 +279,44 @@ add:
------------------------------------------------------------------------------------------- ***
Pulling the DVR over IP -- a basic media server using nginx Pulling the DVR over IP -- a basic media server using nginx
sudo apt install nginx-light `sudo apt install nginx-light`
give permissions up the file tree to our video directory give permissions up the file tree to our video directory
sudo chmod o+x /home /home/ubuntu /home/ubuntu/Videos `sudo chmod o+x /home /home/ubuntu /home/ubuntu/Videos`
backup the default loading page and replace it with our own backup the default loading page and replace it with our own
sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.old `sudo mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default.old`
sudo nano /etc/nginx/sites-available/default `sudo nano /etc/nginx/sites-available/default`
Add the following, but replace x.x.x.x with your system's network IP address: Add the following, but replace x.x.x.x with your system's network IP address:
server { server {
listen 8080; listen 8080;
listen [::]:8080; listen [::]:8080;
server_name x.x.x.x; server_name x.x.x.x;
root /home/ubuntu/Videos;
autoindex on;
root /home/ubuntu/Videos;
autoindex on;
} }
restart nginx to initate the changes restart nginx to initate the changes
sudo systemctl restart nginx `sudo systemctl restart nginx`