User Tools

Site Tools


pi_aprs

APRS iGate

  • Raspberry Pi Zero
  • NooElec NESDR Nano 2+ Tiny RTL-SDR

Setup

  • Burn the latest Raspbian Lite image to an SD card & boot up the Pi
  • Login using “pi” with password “raspberry”
 > sudo raspi-config
    Expand filesystem
    Set locale                        "en_US,UTF-8 UTF-8"
    Set timezone                      "US, Central"
    Set keyboard layout               "Generic 101-key PC, English (US)"
    Set Wi-Fi country                 "US United States"
    Enable SSH

Patches

 > sudo apt-get update
 > sudo apt-get upgrade

Change default pi password ("raspberry") & set the root password

 > passwd
 > sudo passwd root
 > sudo nano /etc/ssh/sshd_config
    change "PermitRootLogin without-password" to "PermitRootLogin yes"

firewalld

 > sudo apt-get install firewalld

gpsd

 > sudo apt-get install gpsd gpsd-clients python-gps libgps-dev
 > sudo nano /lib/systemd/system/gpsd.socket
    change "ListenStream=127.0.0.1:2947" to "ListenStream=0.0.0.0:2947"
 > sudo nano /etc/default/gpsd
    START_DAEMON="true"
    USBAUTO="false"
    DEVICES="/dev/ttyUSB0"
    GPSD_OPTIONS="-n"
    GPSD_SOCET="/var/run/gpsd.sock"
 > sudo /etc/init.d/gpsd restart
 > cgps -s

Create firewall service for gpsd

 > sudo nano /etc/firewalld/services/gpsd.xml
    <?xml version="1.0" encoding="utf-8"?>
    <service>  
       <short>gpds</short>  
       <description>gpsd</description>  
       <port protocol="tcp" port="2947"/>  
    </service>
 > sudo chmod 640 /etc/firewalld/services/gpsd.xml 
 > sudo firewall-cmd --permanent --add-service=gpsd

rtl-sdr

 > sudo apt-get install -y  cmake pkg-config libusb-1.0
 > sudo apt-get install git
 > 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

Edit /etc/modprobe.d/raspi-blacklist.conf

   blacklist dvb_usb_rtl28xxu
   blacklist rtl2832
   blacklist rtl2830

Create firewall service for rtl_tcp

 > sudo nano /etc/firewalld/services/rtl_tcp.xml
    <?xml version="1.0" encoding="utf-8"?>
    <service>  
       <short>rtl_tcp</short>  
       <description>rtl_tcp</description>  
       <port protocol="tcp" port="1234"/>  
       <port protocol="udp" port="7355"/>  
   </service>
 > sudo chmod 640 /etc/firewalld/services/rtl_tcp.xml 
 > sudo firewall-cmd --permanent --add-service=rtl_tcp

Direwolf

 > sudo apt install git gcc g++ make cmake libasound2-dev libudev-dev gpsd libgps-dev
 > cd ~
 > git clone https://www.github.com/wb2osz/direwolf
 > cd direwolf
 > git checkout dev
 > mkdir build && cd build
 > cmake ..
 > make -j4
 > sudo make install
 > make install-conf
 > cd ~
 > sudo nano direwolf.conf (Place your settings here)
 > sudo rtl_fm -f 144.39M - | direwolf -c direwolf.conf -r 24000 -D 1 -
 

Create firewall service for Direwolf

 > sudo nano /etc/firewalld/services/direwolf.xml
    <?xml version="1.0" encoding="utf-8"?>
    <service>  
       <short>Direwolf</short>  
       <description>Direwolf</description>  
       <port protocol="tcp" port="8000"/>  
       <port protocol="tcp" port="8001"/>  
    </service>
 > sudo chmod 640 /etc/firewalld/services/direwolf.xml 
 > sudo firewall-cmd --permanent --add-service=direwolf

Make it a service

Source: F4FXL

 > sudo apt install netcat
 > sudo apt install tmux
 > sudo nano /etc/systemd/system/direwolf.service
    [Unit]
    Description=Direwolf
    After=network.target
    [Service]
    Type=forking
    ExecStart=/usr/bin/tmux new-session -d -s direwolf '/usr/local/bin/rtl_fm -f 144.39M - | 
   /usr/local/bin/direwolf -c /home/w5ged/direwolf.conf -t 0 -r 24000 -D 1 -'
    Restart=always
    [Install]
    WantedBy=default.target
 > sudo systemctl enable direwolf.service
 > sudo systemctl start direwolf.service
 > sudo tmux attach -t direwolf (To view the output from Direwolf)
pi_aprs.txt · Last modified: 2023/03/04 17:39 by w5ged