Board: OrangePi 5 (RS3588S), 8GB, NVMe 256GB Author: DroZDi Date: 16.04.2023 OS: Armbian 23.02 Jammy (Ubuntu) Document Version: 2.0 -----------------OPEN PLOTTER COMPONENTS------------------ OpenPlotter Settings 3.5 Openplotter I2C 3.3.12 Openplotter Pypilot 3.2.11 Pypilot 0.36 ---------------------------------------------------------- !!! All commands executed from orangepi user (local user) Needed package files.tar.gz which contents needed files to copy Files copied from files.tar.gz should have the same rights (chmod) and the same user (chown) as those marekd for replace Content of files.tar.gz: files/ ├── boot │   └── armbianEnv.txt ├── etc │   ├── default │   │   └── gpsd │   ├── modprobe.d │   │   ├── no-rtl.conf │   │   └── no-sdr.conf │   ├── systemd │   │   └── system │   │   ├── aiscatcher.service │   │   └── openplotter-i2c-read.service │   └── udev │   └── rules.d │   └── 99-gps.rules ├── usr │   └── lib │   └── python3 │   └── dist-packages │   ├── openplotterI2c │   │   ├── gpio.py │   │   ├── openplotterI2c.py │   │   ├── openplotterI2cRead.py │   │   └── startup.py │   ├── openplotterPypilot │   │   ├── gpio.py │   │   └── openplotterPypilot.py │   ├── openplotterSdrVhf │   │   ├── openplotterSdrVhf.py │   │   ├── service.py │   │   └── startup.py │   └── openplotterSettings │   └── openplotterSettings.py └── work ├── aiscatcher.conf ├── blinka_test.py ├── i2c_read.sh ├── start-ais.sh └── vnc_start.sh !!! ======================================== Content: 1. OS install 2. NVMe (optional) 3. Update/Upgrade OS 4. VNC 5. GPS (UART0_M2) 6. I2C (I2C5_M3) 7. RTL SDR 8. SDR PLAY 9. SDR++ 10. GQRX 11. AIS catcher 12. FLDIGI 13. ADAFRUIT BLINKA 14. OPENPLOTTER SETTINGS 15. OPENPLOTTER I2C 16. OPENPLOTTER PYPILOT 17. OPENPLOTTER SDR VHF 18. OTHER ======================================== 1. OS install Download Armbian image from https://www.armbian.com/orangepi-5/ -> Armbian 23.02 Jammy Gnome burn microSD card with (RasberryImager or other tool) root password, local user (orangepi), wifi connection 2. NVMe If you dont have NVMe disk installed in OrangePI 5 please go to the point 3 sudo fdisk -l to see: Disk /dev/nvme0n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors Disk model: PC SN740 NVMe WD 256GB Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 877C362B-7F67-BD44-88B5-32E58EE7FCC7 Device Start End Sectors Size Type /dev/nvme0n1p1 32768 557055 524288 256M Linux extended boot /dev/nvme0n1p2 557056 14991326 14434271 6.9G Linux filesystem sudo gdisk /dev/nvme0n1 p (print) d 1 w Y sudo gdisk /dev/mtdblock0 p (print) if empty nothing if partitions exist: d 1, d 2, etc to delete all of them w Y sudo nand-sata-install -> Install/Update the bootloader on SPI Flash (MTD flash) sudo fdisk -l /dev/mtdblock0 Disk /dev/mtdblock0: 16 MiB, 16777216 bytes, 32768 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: D4DE76D7-0655-45E6-A437-6DDE355CD733 Device Start End Sectors Size Type /dev/mtdblock0p1 64 7167 7104 3.5M Linux filesystem /dev/mtdblock0p2 7168 7679 512 256K Linux filesystem /dev/mtdblock0p3 7680 8063 384 192K Linux filesystem /dev/mtdblock0p4 8064 8127 64 32K Linux filesystem /dev/mtdblock0p5 8128 8191 64 32K Linux filesystem /dev/mtdblock0p6 8192 16383 8192 4M Linux filesystem /dev/mtdblock0p7 16384 32734 16351 8M Linux filesystem copy Armbian image to for exmaple /home/orangepi/work (scp/ftp) cd /home/orangepi/work sudo dd bs=1M if=Armbian_23.02.2_Orangepi5_jammy_legacy_5.10.110_gnome_desktop.img of=/dev/nvme0n1 status=progress sudo shutdown -h now remove microSD card reboot once system starts insert microSD card perform initial setup as in point 1 sudo tune2fs -U random /dev/mmcblk1p2 remove microSD card 3. Update/Upgrade OS sudo add-apt-repository ppa:liujianfeng1994/panfork-mesa sudo add-apt-repository ppa:liujianfeng1994/rockchip-multimedia sudo apt update sudo apt dist-upgrade sudo apt install mali-g610-firmware rockchip-multimedia-config sudo apt-get install armbian-firmware-full armbian-firmware sudo apt update && sudo apt upgrade -y sudo apt-get autoremove sudo apt clean sudo apt-get autoclean sudo apt-get full-upgrade sudo apt-get dist-upgrade reboot sudo apt-get install build-essential sudo apt-get autoremove sudo apt clean sudo apt-get autoclean reboot NVMe disk speed test -> if NVMe not installed please skip this step sudo curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash Category Test Result HDParm Disk Read 318.26 MB/s HDParm Cached Disk Read 359.68 MB/s DD Disk Write 227 MB/s FIO 4k random read 86779 IOPS (347118 KB/s) FIO 4k random write 31950 IOPS (127800 KB/s) IOZone 4k read 71866 KB/s IOZone 4k write 97505 KB/s IOZone 4k random read 47349 KB/s IOZone 4k random write 75171 KB/s Score: 20095 4. VNC sudo apt-get -y install xorg lightdm xfce4 tango-icon-theme gnome-icon-theme dbus-x11 xfce4-goodies sudo apt-get install xfonts-base sudo apt-get install tightvncserver sudo apt-get install tigervnc-tools sudo apt install tigervnc-standalone-server sudo apt-get install xterm touch ~/.Xresources run vncserver to setup vnc password create start vnc script vnc_start.sh: #!/usr/bin/bash vncserver -localhost no :1 or vncserver :1 -localhost=no -geometry 1280x800 chmod 755 vnc_start.sh in /home/orangepi/.vnc adjust script xstartup: #!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS /usr/bin/startxfce4 [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources x-window-manager & chmod 755 xstartup start vnc -> ./vnc_start.sh vncviewer adres_ip:5901 to connect remotely 5. GPS (UART0_M2) GPIO pinout -> http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5.html enabling /boot/armbianEnv.txt add/change line: overlays=opi5-uart0-m2 (as root) Pins: 2,8,10,14 Pins 4 and 6 used by Cooler/Fan GPS BN-880Q pins in face, starting from left to right: SDA GND TX RX 5V SCL and as above SDA -> 3 not used SCL -> 5 not used 5V -> 4/2 GND -> 6/14 RX -> 8 TX -> 10 X 14 10 8 2 X sudo apt-get install gpsd gpsd-clients minicom sudo adduser orangepi dialout Create a new file in /etc/udev/rules.d called 99-gps.rules with the following: KERNEL=="ttyS0", SYMLINK+="gps0",GROUP="dialout", MODE="0660" sudo reboot sudo systemctl stop serial-getty@ttyS0.service sudo systemctl disable serial-getty@ttyS0.service $ sudo vi /etc/default/gpsd START_DAEMON="true" USBAUTO="false" DEVICES="/dev/gps0" GPSD_OPTIONS="-n" GPSD_SOCKET="/var/run/gpsd.sock" chmod 444 /etc/default/gpsd sudo gpsmon sudo cgps -s sudo cgps -um 6. I2C (I2C5_M3) GPIO pinout -> http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5.html enabling in /boot/armbianEnv.txt add: overlays=opi5-i2c5-m3 (as root) Pins: 1,3,5,9 sudo apt install i2c-tools -y root@orangepi5:~# ls -ltr /dev/i2* crw-rw---- 1 root i2c 89, 0 Mar 25 21:55 /dev/i2c-0 crw-rw---- 1 root i2c 89, 9 Mar 25 21:55 /dev/i2c-9 crw-rw---- 1 root i2c 89, 10 Mar 25 21:55 /dev/i2c-10 crw-rw---- 1 root i2c 89, 5 Mar 25 21:55 /dev/i2c-5 crw-rw---- 1 root i2c 89, 2 Mar 25 21:55 /dev/i2c-2 crw-rw---- 1 root i2c 89, 7 Mar 25 21:55 /dev/i2c-7 crw-rw---- 1 root i2c 89, 6 Mar 25 21:55 /dev/i2c-6 root@orangepi5:~# i2cdetect -l i2c-0 i2c rk3x-i2c I2C adapter i2c-2 i2c rk3x-i2c I2C adapter i2c-5 i2c rk3x-i2c I2C adapter i2c-6 i2c rk3x-i2c I2C adapter i2c-7 i2c rk3x-i2c I2C adapter i2c-9 i2c fde50000.dp I2C adapter i2c-10 i2c ddc I2C adapter root@orangepi5:~# i2cdetect -y 5 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- 77 root@orangepi5:~# IMU: ICM-20948 (address 0x68, pypilot 3.2.6, SEN-15335) BMP280 - 0x77 AHT20 - 0x38 To be used later in points: 13. ADAFRUIT BLINKA and 15. OPENPLOTTER I2C /usr/local/lib/python3.9/dist-packages sudo pip3 install adafruit-circuitpython-ahtx0 sudo pip3 install adafruit-circuitpython-htu21d 7. RTL SDR sudo apt-get update sudo apt-get upgrade cat <no-rtl.conf blacklist dvb_usb_rtl28xxu blacklist rtl2832 blacklist rtl2830 EOF sudo mv no-rtl.conf /etc/modprobe.d/ sudo apt-get install git-core sudo apt-get install git sudo apt-get install cmake sudo apt-get install libusb-1.0-0-dev sudo apt-get install build-essential cd work git clone git://git.osmocom.org/rtl-sdr.git cd rtl-sdr/ mkdir build cd build cmake ../ -DINSTALL_UDEV_RULES=ON make sudo make install sudo ldconfig sudo cp ../../rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/ sudo reboot connect RTL-SDR dongle and perform test: orangepi@orangepi5:~/work$ rtl_test Found 1 device(s): 0: Realtek, RTL2838UHIDIR, SN: 00000001 Using device 0: Generic RTL2832U OEM Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 [R82XX] PLL not locked! Sampling at 2048000 S/s. Info: This tool will continuously read from the device, and report if samples get lost. If you observe no further output, everything is fine. Reading samples in async mode... ^CSignal caught, exiting! User cancel, exiting... Samples per million lost (minimum): 0 8. SDR PLAY sudo apt-get update sudo apt-get upgrade -y sudo apt install -y cmake Needed file SDRplay_RPi_Scripts_v0.3.zip --download and for 64bit installation change name in the script 1installationAPI.sh with SDRplay_RSP_API-ARM64-3.07.1.run (arm 64bit) (instead of SDRplay_RSP_API-ARM32-3.07.2.run) next execute: ./1installationAPI.sh (reboot) ./2buildSoapy.sh ./4buildWidgets.sh sudo ldconfig ./4buildWidgets_3.1.5.sh sudo ldconfig in /etc/modprobe.d/no-sdr.conf put blacklist sdr_msi3101 blacklist msi001 blacklist msi2500 and reboot connect SDRPLAY device and check: orangepi@orangepi5:~$ SoapySDRUtil --probe ###################################################### ## Soapy SDR -- the SDR abstraction library ## ###################################################### Probe device [INFO] devIdx: 0 [INFO] SerNo: B0002P0001 [INFO] hwVer: 1 [INFO] rspDuoMode: 0 [INFO] tuner: 1 [INFO] rspDuoSampleFreq: 0.000000 ---------------------------------------------------- -- Device identification ---------------------------------------------------- driver=SDRplay hardware=RSP1 sdrplay_api_api_version=3.070000 sdrplay_api_hw_version=1 ---------------------------------------------------- -- Peripheral summary ---------------------------------------------------- Channels: 1 Rx, 0 Tx Timestamps: NO Other Settings: * RF Gain Select - RF Gain Select [key=rfgain_sel, default=1, type=string, options=(0, 1, 2, 3)] * IQ Correction - IQ Correction Control [key=iqcorr_ctrl, default=true, type=bool] * AGC Setpoint - AGC Setpoint (dBfs) [key=agc_setpoint, default=-30, type=int, range=[-60, 0]] ---------------------------------------------------- -- RX Channel 0 ---------------------------------------------------- Full-duplex: NO Supports AGC: YES Stream formats: CS16, CF32 Native format: CS16 [full-scale=32767] Antennas: RX Corrections: DC removal Full gain range: [0, 42] dB IFGR gain range: [20, 59] dB RFGR gain range: [0, 3] dB Full freq range: [0.01, 2000] MHz RF freq range: [0.01, 2000] MHz CORR freq range: MHz Sample rates: 0.0625, 0.096, 0.125, 0.192, 0.25, ..., 6, 7, 8, 9, 10 MSps Filter bandwidths: 0.2, 0.3, 0.6, 1.536, 5, 6, 7, 8 MHz orangepi@orangepi5:~$ SoapySDRUtil --probe="driver=sdrplay" ###################################################### ## Soapy SDR -- the SDR abstraction library ## ###################################################### Probe device driver=sdrplay [INFO] devIdx: 0 [INFO] SerNo: 1804066095 [INFO] hwVer: 255 [INFO] rspDuoMode: 0 [INFO] tuner: 1 [INFO] rspDuoSampleFreq: 0.000000 ---------------------------------------------------- -- Device identification ---------------------------------------------------- driver=SDRplay hardware=RSP1A sdrplay_api_api_version=3.070000 sdrplay_api_hw_version=255 ---------------------------------------------------- -- Peripheral summary ---------------------------------------------------- Channels: 1 Rx, 0 Tx Timestamps: NO Other Settings: * RF Gain Select - RF Gain Select [key=rfgain_sel, default=4, type=string, options=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)] * IQ Correction - IQ Correction Control [key=iqcorr_ctrl, default=true, type=bool] * AGC Setpoint - AGC Setpoint (dBfs) [key=agc_setpoint, default=-30, type=int, range=[-60, 0]] * BiasT Enable - BiasT Control [key=biasT_ctrl, default=true, type=bool] * RfNotch Enable - RF Notch Filter Control [key=rfnotch_ctrl, default=true, type=bool] * DabNotch Enable - DAB Notch Filter Control [key=dabnotch_ctrl, default=true, type=bool] ---------------------------------------------------- -- RX Channel 0 ---------------------------------------------------- Full-duplex: NO Supports AGC: YES Stream formats: CS16, CF32 Native format: CS16 [full-scale=32767] Antennas: RX Corrections: DC removal Full gain range: [0, 48] dB IFGR gain range: [20, 59] dB RFGR gain range: [0, 9] dB Full freq range: [0.001, 2000] MHz RF freq range: [0.001, 2000] MHz CORR freq range: MHz Sample rates: 0.0625, 0.096, 0.125, 0.192, 0.25, ..., 6, 7, 8, 9, 10 MSps Filter bandwidths: 0.2, 0.3, 0.6, 1.536, 5, 6, 7, 8 MHz SoapySDRUtil --check=sdrplay SoapySDRUtil --probe="driver=sdrplay" !!!! checks: sudo systemctl status/start/stop/enable/disable sdrplay 9. SDR++ sudo apt install libfftw3-dev libglfw3-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libiio-dev libad9361-dev librtaudio-dev libhackrf-dev sudo apt install libglew-dev libglu-dev libglu1-mesa-dev sudo apt install libglfw3-dev libglew-dev libairspyhf-dev libiio-dev libad9361-dev libairspy-dev librtlsdr-dev portaudio19-dev libzstd1 libzstd-dev limesuite gcc cd ~/work git clone https://github.com/drowe67/codec2.git cd codec2 mkdir build cd build cmake ../ make -j4 sudo make install sudo ldconfig cd ~/work git clone https://github.com/AlexandreRouma/SDRPlusPlus.git cd SDRPlusPlus mkdir build cd build cmake .. -DOPT_BUILD_SOAPY_SOURCE=ON -DOPT_BUILD_BLADERF_SOURCE=OFF -DOPT_BUILD_NEW_PORTAUDIO_SINK:BOOL=ON -DOPT_BUILD_M17_DECODER:BOOL=ON make -j4 sudo make install sudo ldconfig SDR++ might not work under VNC only on HDMI cable connection to monitor Fix: sudo apt-get install libgl1-mesa-glx libegl1-mesa libgles2-mesa libgles2-mesa-dev sudo apt-get install mesa-utils libgl1-mesa-glx sudo apt-get install llvm llvm-dev download virtualgl debian package fromfrom https://sourceforge.net/projects/virtualgl/ sudo dpkg -i virtualgl_3.1_arm64.deb reboot sudo /opt/VirtualGL/bin/vglserver_config reboot as root: touch /root/.Xauthority # xauth merge /etc/opt/VirtualGL/vgl_xauth_key # xdpyinfo -display :0 # /opt/VirtualGL/bin/glxinfo -display :0 -c # cd /etc/opt # chmod 755 VirtualGL as orangepi: xauth merge /etc/opt/VirtualGL/vgl_xauth_key run: vglrun sdrpp 10. GQRX sudo apt-get update sudo apt-get install -y cmake gnuradio-dev gr-osmosdr libqt5svg5-dev libpulse-dev sudo apt-get install qtbase5-dev sudo apt-get install qtdeclarative5-dev sudo apt-get install libqt5svg5-dev sudo apt-get install libsndfile1 libsndfile1-dev cd ~/work git clone https://github.com/gqrx-sdr/gqrx.git cd gqrx mkdir build cd build export CXXFLAGS=-O2 cmake .. make -j4 sudo make install sudo ldconfig cd ~/work git clone git://git.osmocom.org/gr-osmosdr cd gr-osmosdr/ mkdir build cd build/ cmake ../ make -j4 sudo make install sudo ldconfig For SDRPlay devices please put under Other input device window: soapy=0,driver=sdrplay 11. AIS catcher cd ~/work git clone https://github.com/jvde-github/AIS-catcher.git cd AIS-catcher mkdir build cd build cmake .. make -j4 sudo make install sudo ldconfig orangepi@orangepi5:~/work/AIS-catcher/build$ sudo ldconfig orangepi@orangepi5:~/work/AIS-catcher/build$ AIS-catcher -l AIS-catcher (build Apr 16 2023) v0.45e-10-g0b57d43 (C) Copyright 2021-2023 jvde-github and other contributors This is free software; see the source for copying conditions.There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Found 2 device(s): 0: Realtek, RTL2838UHIDIR, SN: 00000001 1: SDRPLAY, RSP1, SN: B0002P0001 orangepi@orangepi5:~/work$ more aiscatcher.conf -d B0002P0001 -v 10 -M DT -gs LNASTATE 3 AGC on -s 2304k -u 127.0.0.1 10110 -a 192K chmod 644 aiscatcher.conf orangepi@orangepi5:~/work$ more start-ais.sh #!/bin/bash cd /home/orangepi/work CONFIG="" while read -r line; do CONFIG="${CONFIG} $line"; done < aiscatcher.conf /usr/local/bin/AIS-catcher ${CONFIG} chmod 755 start-ais.conf service (as root): cd /etc/systemd/system aiscatcher.service: # AIS-catcher service for systemd [Unit] Description=AIS-catcher Wants=network.target After=network.target [Service] User=orangepi RuntimeDirectory=/home/orangepi/work RuntimeDirectoryMode=0755 ExecStart=/bin/bash /home/orangepi/work/start-ais.sh SyslogIdentifier=aiscatcher Type=simple Restart=on-failure RestartSec=30 RestartPreventExitStatus=64 Nice=-5 [Install] WantedBy=default.target sudo systemctl daemon-reload sudo systemctl enable aiscatcher.service sudo systemctl start aiscatcher.service root@orangepi5:/etc/systemd/system# sudo systemctl status aiscatcher.service ● aiscatcher.service - AIS-catcher Loaded: loaded (/etc/systemd/system/aiscatcher.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2023-04-01 12:56:10 CEST; 5s ago Main PID: 2187 (bash) Tasks: 7 (limit: 9191) Memory: 3.9M CPU: 984ms CGroup: /system.slice/aiscatcher.service ├─2187 /bin/bash /home/orangepi/work/start-ais.sh └─2188 /usr/local/bin/AIS-catcher -d B0007P0003 -v 10 -M DT -gs LNASTATE 3 AGC on -s 2304k -u 127.0.0.1 10110 -a 192K Apr 01 12:56:10 orangepi5 aiscatcher[2188]: This is free software; see the source for copying conditions.There is NO Apr 01 12:56:10 orangepi5 aiscatcher[2188]: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Apr 01 12:56:10 orangepi5 aiscatcher[2188]: Searching for device with SN B0007P0003. Apr 01 12:56:10 orangepi5 AIS-catcher[2188]: [2193]: sdrplay_api_device: strmHandlerThread: Entry Apr 01 12:56:10 orangepi5 aiscatcher[2188]: UDP: open socket for host: 127.0.0.1, port: 10110, filter: OFF, JSON: OFF Apr 01 12:56:10 orangepi5 AIS-catcher[2188]: [2195]: sdrplay_api_device: heartBeatThread: Entry Apr 01 12:56:10 orangepi5 AIS-catcher[2188]: [2194]: sdrplay_api_device: eventHandlerThread: Entry Apr 01 12:56:11 orangepi5 aiscatcher[2188]: Device : RSP1 Apr 01 12:56:11 orangepi5 aiscatcher[2188]: Settings : rate 2304K bw 192K format CF32 agc ON lnastate 3 grdb 40 Apr 01 12:56:11 orangepi5 aiscatcher[2188]: Model #0 : [AIS engine v0.44] ps_ema ON afc_wide OFF droop ON fp_ds OFF root@orangepi5:/etc/systemd/system# ps -ef|grep -i ais orangepi 2187 1 0 12:56 ? 00:00:00 /bin/bash /home/orangepi/work/start-ais.sh orangepi 2188 2187 18 12:56 ? 00:00:02 /usr/local/bin/AIS-catcher -d B0007P0003 -v 10 -M DT -gs LNASTATE 3 AGC on -s 2304k -u 127.0.0.1 10110 -a 192K root 2205 2098 0 12:56 pts/1 00:00:00 grep -i ais Add to signalK as data source: UDP, 10110, NMEA0183, Validate Checksum, Id ais 12. FLDIGI sudo apt-get update sudo apt-get install fldigi 13. ADAFRUIT BLINKA sudo apt-get install -y python3 git python3-pip sudo apt-get install libgpiod2 python3-libgpiod sudo pip3 install gpiod sudo python3 Python 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import gpiod >>> sudo apt-get update sudo apt-get upgrade sudo pip3 install --upgrade setuptools sudo apt-get install -y python3-smbus python3-dev i2c-tools sudo adduser orangepi i2c cd ~/work git clone https://github.com/orangepi-xunlong/wiringOP.git -b next cd wiringOP sudo ./build clean sudo ./build orangepi@orangepi5:~/work/wiringOP$ gpio readall +------+-----+----------+--------+---+ OPI5 +---+--------+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+--------+---+----++----+---+--------+----------+-----+------+ | | | 3.3V | | | 1 || 2 | | | 5V | | | | 47 | 0 | SDA.5 | ALT9 | 1 | 3 || 4 | | | 5V | | | | 46 | 1 | SCL.5 | ALT9 | 1 | 5 || 6 | | | GND | | | | 54 | 2 | PWM15 | IN | 1 | 7 || 8 | 1 | ALT10 | RXD.0 | 3 | 131 | | | | GND | | | 9 || 10 | 1 | ALT10 | TXD.0 | 4 | 132 | | 138 | 5 | CAN1_RX | IN | 1 | 11 || 12 | 1 | IN | CAN2_TX | 6 | 29 | | 139 | 7 | CAN1_TX | IN | 1 | 13 || 14 | | | GND | | | | 28 | 8 | CAN2_RX | IN | 1 | 15 || 16 | 1 | IN | SDA.1 | 9 | 59 | | | | 3.3V | | | 17 || 18 | 1 | IN | SCL.1 | 10 | 58 | | 49 | 11 | SPI4_TXD | IN | 1 | 19 || 20 | | | GND | | | | 48 | 12 | SPI4_RXD | IN | 1 | 21 || 22 | 1 | IN | GPIO2_D4 | 13 | 92 | | 50 | 14 | SPI4_CLK | IN | 1 | 23 || 24 | 1 | IN | SPI4_CS1 | 15 | 52 | | | | GND | | | 25 || 26 | 1 | IN | PWM1 | 16 | 35 | +------+-----+----------+--------+---+----++----+---+--------+----------+-----+------+ | GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO | +------+-----+----------+--------+---+ OPI5 +---+--------+----------+-----+------+ sudo pip3 install adafruit-blinka sudo pip3 install --upgrade adafruit-blinka adafruit-platformdetect create file blinka_test.py: import board import digitalio import busio print("Hello blinka!") # Try to great a Digital input #pin = digitalio.DigitalInOut(board.PA6) --not needed now print("Digital IO ok!") # Try to create an I2C device i2c = busio.I2C(board.SCL, board.SDA) print("I2C ok!") # Try to create an SPI device #spi = busio.SPI(board.SCLK, board.MOSI, board.MISO) --not needed now print("SPI ok!") print("done!") sudo python3 blinka_test.py should see I2C OK add I2sensore from point 6 sudo pip3 install adafruit-circuitpython-ahtx0 sudo pip3 install adafruit-circuitpython-htu21d 14. OPENPLOTTER SETTINGS sudo apt-get update sudo apt-get upgrade sudo apt install python3-wxgtk4.0 python3-ujson python3-pyudev vlc matchbox-keyboard dh-python python3-all sudo apt-get install debhelper dh-virtualenv cd ~/work git clone https://github.com/openplotter/openplotter-settings.git cd openplotter-settings sudo dpkg-buildpackage -b -j4 cd .. sudo dpkg -i openplotter-settings_3.5.0-stable_all.deb open openplotter-settings from Menu click Add Source click Get Candidates From openplotter-settings menu install: signalK-installer opencpn-installer 3.2.6 -> open and install opencpn 5.6.2 (first click on Check Versions and next Install ) XyGrib sdr-vhf Dasboards Serial CanBus Notifications Add a new entry in /etc/udev/rules.d called 99-gps.rules with the following: KERNEL=="ttyS0", SYMLINK+="ttyOP_gps",GROUP="dialout", MODE="0660" reboot This is needed for SignalK/OpenCPN as GPS source cd /usr/lib/python3/dist-packages/openplotterSettings as root: mv openplotterSettings.py openplotterSettings.py.ORIG and copy openplotterSettings.py into this folder from attched package files.tar.gz 15. OPENPLOTTER I2C sudo apt install hostapd dnsmasq bridge-utils dialog usbmuxd libnss-mdns avahi-utils libavahi-compat-libdnssd-dev rfkill python3-pip chrony sudo apt-get install libi2c-dev sudo apt-get install i2c-tools python3-pip python3-dev python3-pil sudo apt install python3-smbus sudo apt install i2c-tools python3-rpi.gpio cd ~/work git clone https://github.com/openplotter/openplotter-i2c cd openplotter-i2c sudo dpkg-buildpackage -b -j4 cd .. sudo dpkg -i openplotter-i2c_3.3.12-stable_all.deb sudo i2cPostInstall cd /usr/lib/python3/dist-packages/openplotterI2c root@orangepi5:/usr/lib/python3/dist-packages/openplotterI2c# mv gpio.py gpio.py.ORIG root@orangepi5:/usr/lib/python3/dist-packages/openplotterI2c# mv openplotterI2c.py openplotterI2c.py.ORIG root@orangepi5:/usr/lib/python3/dist-packages/openplotterI2c# mv openplotterI2cRead.py openplotterI2cRead.py.ORIG root@orangepi5:/usr/lib/python3/dist-packages/openplotterI2c# mv startup.py startup.py.ORIG copy gpio.py,openplotterI2c.py,openplotterI2cRead.py, startup.py from files.tar.gz into /usr/lib/python3/dist-packages/openplotterI2c orangepi@orangepi5:~/work$ more i2c_read.sh #!/usr/bin/bash /usr/bin/sudo /usr/bin/python3 /usr/lib/python3/dist-packages/openplotterI2c/openplotterI2cRead.py !!! 1. Connect I2c sensors opemplotter module and discover item there plus configure to send info to SignalK 2. as orangepi user run script i2c_read.sh -> it must not return prompt as running in loop :) 3. create service as root: root@orangepi5:~# cd /etc/systemd/system root@orangepi5:/etc/systemd/system# more openplotter-i2c-read.service [Unit] Description=OpenplotterI2CRead Wants=network.target After=network.target [Service] User=orangepi StandardOutput=journal StandardError=journal ExecStart=/home/orangepi/work/i2c_read.sh Restart=on-failure [Install] WantedBy=multi-user.target sudo systemctl daemon-reload sudo systemctl enable openplotter-i2c-read.service sudo systemctl start openplotter-i2c-read.service orangepi@orangepi5:~/work$ sudo systemctl status openplotter-i2c-read.service ● i2c_read.service - OpenplotterI2CRead Loaded: loaded (/etc/systemd/system/i2c_read.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2023-03-26 22:12:59 CEST; 2min 36s ago Main PID: 2356 (i2c_read.sh) Tasks: 3 (limit: 9191) Memory: 15.4M CPU: 2.445s CGroup: /system.slice/i2c_read.service ├─2356 /usr/bin/bash /home/orangepi/work/i2c_read.sh ├─2357 /usr/bin/sudo /usr/bin/python3 /usr/lib/python3/dist-packages/openplotterI2c/openplotterI2cRead.py └─2358 /usr/bin/python3 /usr/lib/python3/dist-packages/openplotterI2c/openplotterI2cRead.py mar 26 22:12:59 orangepi5 systemd[1]: Started OpenplotterI2CRead. mar 26 22:12:59 orangepi5 sudo[2357]: orangepi : PWD=/ ; USER=root ; COMMAND=/usr/bin/python3 /usr/lib/python3/dist-packages/openplotterI2c/openplotterI2cRead.py mar 26 22:12:59 orangepi5 sudo[2357]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000) mar 26 22:12:59 orangepi5 sudo[2360]: root : PWD=/ ; USER=root ; COMMAND=/usr/bin/echo x mar 26 22:12:59 orangepi5 sudo[2360]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0) mar 26 22:12:59 orangepi5 sudo[2360]: pam_unix(sudo:session): session closed for user root 16. OPENPLOTTER PYPILOT cd ~/work git clone https://github.com/openplotter/openplotter-pypilot cd openplotter-pypilot sudo dpkg-buildpackage -b -j4 cd .. sudo dpkg -i openplotter-pypilot_3.2.11-stable_all.deb Run post-installation script: sudo pypilotPostInstall go to /usr/lib/python3/dist-packages/openplotterPypilot/ as root: mv gpio.py gpio.py.ORIG mv openplotterPypilot.py openplotterPypilot.py.ORIG copy gpio.py,openplotterPypilot.py from files.tar.gz Enable serial port pins: 16 RX/18 TX of UART4 as UART0 is used by GPS module enabling /boot/armbianEnv.txt add/change line: overlays=opi5-uart4-m0 (as root) This is to motor controller for Pypilot via ttyS4 reboot open serial application highligth /dev/ttyS4 create alias /dev/ttyOP_pypilot NMEA0183 after restart add to signalK we also have to add this device (/dev/ttyOP_pypilot) in pypilot under serial tab in /usr/local/lib/python3.10/dist-packages/pypilot/ sudo pip3 install adafruit-circuitpython-icm20x and change adress to 0x68 in adafruit_icm20x.py for ICM-20948 sudo apt-get install python3-rtimulib cd ~/work git clone https://github.com/seandepagnier/RTIMULib2 cd RTIMULib2/Linux/python sudo python3 setup.py install cd ~/work mkdir pypilot-update cd pypilot-update/ git clone https://github.com/pypilot/pypilot git clone https://github.com/pypilot/pypilot_data cp -rv pypilot_data/* pypilot orangepi@orangepi5:~/work/pypilot-update$ find . -type f -exec grep -H 'ttyAMA0' {} \; ./pypilot/pypilot/serialprobe.py: if device == '/dev/ttyAMA0' and name != 'servo': ./pypilot/pypilot/arduino_servo/test.cpp: const char device[] = "/dev/ttyAMA0"; ./pypilot/arduino/motor/Makefile-arduino-1.8:#DEVICE = /dev/ttyAMA0 ./pypilot/arduino/motor/Makefile:#DEVICE = /dev/ttyAMA0 ./pypilot/arduino/hat/Makefile-old:#DEVICE = /dev/ttyAMA0 ./pypilot/arduino/hat/Makefile:#DEVICE = /dev/ttyAMA0 ./pypilot/arduino/rudderfeedback/Makefile:#DEVICE = /dev/ttyAMA0 change everywhere ttyAMA0 -> ttyS4 and change in ./pypilot/pypilot/boatimu.py 55 SETTINGS_FILE = "/usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib" cd pypilot sudo python3 setup.py install cd /usr/local/lib/python3.10/dist-packages/pypilot/ and check in boatimu.py: 55 SETTINGS_FILE = "/usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib" sudo reboot as root user run: pypilot_boatimu and close it in /usr/local/lib/python3.10/dist-packages/pypilot/RTIMULib.ini set: I2CBus=5 open pupilot appllication and approve access to SignalK, ICM module should be dteceted 17. OPENPLOTTER SDR VHF GQRX is installed (point 10) AIS catcher installed (point 11) -> we will use the service aiscatcher SDP++ installed (point 9) cd /usr/lib/python3/dist-packages/openplotterSdrVhf as root: mv service.py service.py.ORIG mv startup.py startup.py.ORIG mv openplotterSdrVhf.py openplotterSdrVhf.py.ORIG copy openplotterSdrVhf.py,service.py,startup.py from files.tar.gz (the same user and rights as files above) 18. OTHER !!!! login without password sudo visudo orangepi ALL=(ALL) NOPASSWD: ALL !!! issue with CMA extraargs=cma=... sunxi_ve_mem_reserve=... in ArmbianEnv.txt extraargs=cma=32M or higher 64M !!! bluetooth device armbian--config -> install BT support enable firmware and kernel upgrdes hciconfig -a systemctl status bluetooth rfkill unblock bluetooth rfkill list all sudo systemctl status bluetooth.service !!! music player sudo add-apt-repository ppa:ubuntuhandbook1/apps sudo apt-get update sudo apt-get install rhythmbox