Monday, September 27, 2021

Radiosonde auto rx setup : raspberry pi4

 Pertama sekali update system anda, jika V3 maka

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install python3 python3-numpy python3-setuptools python3-crcmod python3-requests python3-dateutil python3-pip python3-flask sox git build-essential libtool cmake usbutils libusb-1.0-0-dev rng-tools libsamplerate-dev libatlas3-base libgfortran5

kemudian install dongle anda.

git clone https://github.com/osmocom/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON ../
sudo make install
sudo ldconfig
kemudian....
sudo nano /etc/modprobe.d/rtlsdr-blacklist.conf
tambah list ini,
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
blacklist dvb_usb_rtl2832u
blacklist dvb_usb_v2
blacklist dvb_core
kemudian periksa samada dongle anda sukses atau tidak install
$ rtl_test

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000002

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...
jika V4 maka

  1. Purge the previous driver:
    sudo apt purge ^librtlsdr
    sudo rm -rvf /usr/lib/librtlsdr* /usr/include/rtl-sdr* /usr/local/lib/librtlsdr* /usr/local/include/rtl-sdr* /usr/local/include/rtl_* /usr/local/bin/rtl_*
  2. Install the RTL-SDR Blog drivers:
    sudo apt-get install libusb-1.0-0-dev git cmake pkg-config
    git clone https://github.com/rtlsdrblog/rtl-sdr-blog
    cd rtl-sdr-blog
    mkdir build
    cd build
    cmake ../ -DINSTALL_UDEV_RULES=ON
    make
    sudo make install
    sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
    sudo ldconfig
  3. Blacklist the DVB-T TV drivers.
    echo 'blacklist dvb_usb_rtl28xxu' | sudo tee --append /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
  4. Reboot
kemudian install radiosonde auto rx anda melalui Docker.

curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
sudo usermod -aG docker $(whoami)
echo 'blacklist dvb_usb_rtl28xxu' | sudo tee /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf sudo modprobe -r dvb_usb_rtl28xxu
mkdir -p ~/radiosonde_auto_rx/log curl -o ~/radiosonde_auto_rx/station.cfg https://raw.githubusercontent.com/projecthorus/radiosonde_auto_rx/master/auto_rx/station.cfg.example

kemudian edit file station.cfg,

nano ~/radiosonde_auto_rx/station.cfg
didalam file station.cfg - sila masukkan 3 perkara penting dalam section berikut.
 # - [habitat] -> uploader_callsign - Your station callsign!
 # - [location] -> station_lat, station_lon, station_alt - Your station location! 
 # - [search_params] -> min_freq, max_freq - Set these suitable for your location!
 (saya masukkan max freq 406) 

 perkara-perkara lain tu optional, terpulang kepada anda untuk aktifkan atau tidak. 
 kemudian save dan exit.

kemudian, mari kita run container ini.
docker run \
  -d \
  --name radiosonde_auto_rx \
  --restart="always" \
  --device=/dev/bus/usb \
  --network=host \
  -v ~/radiosonde_auto_rx/station.cfg:/opt/auto_rx/station.cfg:ro \
  -v ~/radiosonde_auto_rx/log/:/opt/auto_rx/log/ \
  ghcr.io/projecthorus/radiosonde_auto_rx:latest
jika keluar 

docker: unknown server OS:


buka terminal baru dan:

sudo chmod 666 /var/run/docker.sock

kemudian ulang semula : 

docker run \
  -d \
  --name radiosonde_auto_rx \
  --restart="always" \
  --device=/dev/bus/usb \
  --network=host \
  -v ~/radiosonde_auto_rx/station.cfg:/opt/auto_rx/station.cfg:ro \
  -v ~/radiosonde_auto_rx/log/:/opt/auto_rx/log/ \
  ghcr.io/projecthorus/radiosonde_auto_rx:latest
ianya akan jadi auto run, dimana radiosonde auto rx ini akan sentiasa run di background dan auto run semasa kita on raspi, untuk melihatnya, pada terminal,

docker logs --tail 50 --follow radiosonde_auto_rx
Jika ada masalah dan keluar error seperti di bawah :
Fatal Python error: init_interp_main: can't initialize time
Python runtime state: core initialized
PermissionError: [Errno 1] Operation not permitted
Sila buat ini pada terminal anda.
wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1~bpo10+1_armhf.deb
sudo dpkg -i libseccomp2_2.5.1-1~bpo10+1_armhf.deb
ada dua cara untuk monitor belon ini, cara yang pertama adalah dengan melihat
pada browser anda dengan taip, http://localhost:5000 cara yang kedua adalah
dengan melihat pada website sondehub.org

sondehub.org

Auto open chromium full screen on start up
untuk  jadikan dia semua auto dan apabila reboot dia akan paparkan terus map, sila ikuti langkah berikut:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
tambah line ini dibawah
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --kiosk http://localhost:5000/
save dan reboot, selepas reboot....monitor akan terus papar mcm ni, begitu juga jika lihat melalui vnc.


selamat mencuba, ikhlas dari saya Zaki 9M2ZAK.

sumber : https://github.com/projecthorus/radiosonde_auto_rx/wiki

Connect a GPS module to a Raspberry Pi 4

  To connect a GPS module with four wires (RST, TX, VCC, and GND) to a Raspberry Pi 4, follow these steps:  Materials Needed: 1. GPS module ...