Sat Gate

Raspberry Pi SATGATE install - Andrew Rich VK4TEC Nov 2017

Sunday 19/11/2017 21:00 AEST

---------------------------------------------------------------------------------

#!/bin/sh
#
# A shell install script for installing rtl-sdr and direwolf for a raspberry pi based APRS SATGATE
# Andrew Rich VK4TEC Nov 2017
# Create the initial directory /satgate "sudo mkdir /satgate" "sudo chmod 777 /satgate
# Copy this file into /satgate and run it "./build_satgate.sh"

# LINUX experience required : Connect Pi to Internet and edit files 
clear
echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories <-"
echo "Progress: Update repos"
echo "Progress: Install Essentials"
echo "Progress: Install rtl-sdr"
echo "Progress: Install direwolf"
echo "Progress: Blacklist drivers"
echo "Progress: Create direwolf config file"
echo "Progress: Run the satgate"
echo " "

sudo rm -rf /satgate/rtl-sdr
sudo rm -rf /satgate/direwolf
sudo mkdir /satgate/rtl-sdr
sudo mkdir /satgate/direwolf
sudo mkdir /satgate/rtl-sdr/build
sudo chmod 777 /satgate/rtl-sdr
sudo chmod 777 /satgate/direwolf
sudo chmod 777 /satgate/rtl-sdr/build
sudo rm -rf /satgate/rtl-sdr
echo "Removed any old directories"
echo " "
echo "Making new directories"
echo " "
echo "/satgate/rtl-sdr"
echo "/satgate/direwolf"
echo "/satgate/rtl-sdr/build"
echo "---------------------------------------------------------------------------------------------------"

echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories"
echo "Progress: Update repos <-"
echo "Progress: Install Essentials"
echo "Progress: Install rtl-sdr"
echo "Progress: Install direwolf"
echo "Progress: Blacklist drivers"
echo "Progress: Create direwolf config file"
echo "Progress: Run the satgate"

echo " "
sudo apt-get update
echo "---------------------------------------------------------------------------------------------------"

echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories"
echo "Progress: Update repos"
echo "Progress: Install Essentials <-"
echo "Progress: Install rtl-sdr"
echo "Progress: Install direwolf"
echo "Progress: Blacklist drivers"
echo "Progress: Create direwolf config file"
echo "Progress: Run the satgate"

echo " "
sudo apt-get install cmake build-essential libusb-1.0-0-dev
echo "---------------------------------------------------------------------------------------------------"

echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories"
echo "Progress: Update repos"
echo "Progress: Install Essentials"
echo "Progress: Install rtl-sdr <-"
echo "Progress: Install direwolf"
echo "Progress: Blacklist drivers"
echo "Progress: Create direwolf config file"
echo "Progress: Run the satgate"

echo " "
cd /satgate
pwd
sudo git clone https://github.com/niofis/rtl-sdr.git

cd rtl-sdr
sudo mkdir build
cd build
sudo cmake ../
sudo make
sudo make install
sudo ldconfig
echo "---------------------------------------------------------------------------------------------------"

echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories"
echo "Progress: Update repos"
echo "Progress: Install Essentials"
echo "Progress: Install rtl-sdr"
echo "Progress: Install direwolf <-"
echo "Progress: Blacklist drivers"
echo "Progress: Create direwolf config file"
echo "Progress: Run the satgate"

echo " "
cd /satgate/
pwd
sudo git clone https://www.github.com/wb2osz/direwolf
cd direwolf
sudo make
sudo make install
cd ~
sudo rm sdr.conf
sudo cp /satgate/direwolf/sdr.conf .
cd ~
echo "---------------------------------------------------------------------------------------------------"

echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories"
echo "Progress: Update repos"
echo "Progress: Install Essentials"
echo "Progress: Install rtl-sdr"
echo "Progress: Install direwolf"
echo "Progress: Blacklist drivers <-"
echo "Progress: Create direwolf config file"
echo "Progress: Run the satgate"

echo " "
sudo rm /etc/modprobe.d/raspi-blacklist.conf
sudo echo "blacklist dvb_usb_rtl28xxu" >> /etc/modprobe.d/raspi-blacklist.conf
sudo echo "blacklist dvb_usb_v2" >> /etc/modprobe.d/raspi-blacklist.conf
sudo echo "blacklist rtl_2830" >> /etc/modprobe.d/raspi-blacklist.conf
sudo echo "blacklist rtl_2832" >> /etc/modprobe.d/raspi-blacklist.conf
sudo echo "blacklist r820t" >> /etc/modprobe.d/raspi-blacklist.conf
sudo cat /etc/modprobe.d/raspi-blacklist.conf
echo "---------------------------------------------------------------------------------------------------"

echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories"
echo "Progress: Update repos"
echo "Progress: Install Essentials"
echo "Progress: Install rtl-sdr"
echo "Progress: Install direwolf"
echo "Progress: Blacklist drivers"
echo "Progress: Create direwolf config file <-"
echo "Progress: Run the satgate"

echo " "
sudo rm /home/pi/sdr.conf
#sudo echo "ADEVICE  0 0" > /home/pi/sdr.conf
sudo echo "ACHANNELS 1" > /home/pi/sdr.conf
sudo echo "CHANNEL 0" >> /home/pi/sdr.conf
sudo echo "MYCALL MYCALL" >> /home/pi/sdr.conf
sudo echo "MODEM 1200" >> /home/pi/sdr.conf0
sudo echo "AGWPORT 8000" >> /home/pi/sdr.conf
sudo echo "KISSPORT 8001" >> /home/pi/sdr.conf
sudo echo "IGSERVER rotate.aprs.net" >> /home/pi/sdr.conf
sudo echo "IGLOGIN USER PASS" >> /home/pi/sdr.conf >> /home/pi/sdr.conf
sudo echo "IGTXLIMIT 6 10" >> /home/pi/sdr.conf
sudo cat /home/pi/sdr.conf
echo "---------------------------------------------------------------------------------------------------"

echo "VK4TEC SATGATE install - Raspberry Pi and rtl-sdr / direwolf - feedback vk4tec@tech-software.net"
echo " "
echo "Progress: Create directories*"
echo "Progress: Update repos"
echo "Progress: Install Essentials"
echo "Progress: Install rtl-sdr"
echo "Progress: Install direwolf"
echo "Progress: Blacklist drivers"
echo "Progress: Create direwolf config file"
echo "Progress: Run the satgate <-"

echo " "
echo "Dont forget to set your CALLSIGN and PASS in /home/pi/sdr.conf"
echo " "
echo "You can break out of this by hitting CONTROL-C"
echo " "
echo "sudo /usr/local/bin/rtl_fm -f 145.825M - | direwolf -t 0 -dii -c /home/pi/sdr.conf -r 24000 -D 1 -"
echo " "
# rtl_fm -f frequency ISS 145.825 MHz APRS 145.175 MHz
# direwolf -t 0 ( mono screen ) -c <config file> -r < > -D < >

sudo /usr/local/bin/rtl_fm -f 145.825M - | direwolf -t 0 -dii -c /home/pi/sdr.conf -r 24000 -D 1 -
#
# Script Ends
#

--------------------------------------------------------------------------------------------------------

Example

Dire Wolf version 1.4

Reading config file /home/pi/sdr.conf
Audio input device for receive: stdin  (channel 0)
Audio out device for transmit: default  (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 24000 sample rate.
Found 1 device(s):
Note: PTT not configured for channel 0. (Ignore this if using VOX.)
Ready to accept AGW client application 0 on port 8000 ...
Ready to accept KISS client application on port 8001 ...
Use -p command line option to enable KISS pseudo terminal.
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain set to automatic.
Tuned to 146077000 Hz.
Oversampling input by: 42x.
Oversampling output by: 1x.
Buffer size: 8.13ms
Exact sample rate is: 1008000.009613 Hz
Sampling at 1008000 S/s.
Output at 24000 Hz.

VK4TEC-2 audio level = 53(16/16)   [NONE]   ||||||||_
[0.3] VK4TEC-2>RWR0R6,WIDE1-1,WIDE2-1:'QZW<0x1c> <0x1c>K\>THD72A_ARROW_YAGI=<0x0d>
MIC-E, Kenwood HT (W), Kenwood TH-D72, Off Duty
S 27 20.2600, E 153 02.5900, 0 MPH
THD72A_ARROW_YAGI