This is copied and adapted from https://n1aae.com/raspberry-pi-aprs-direwolf-linux-igate-digipeater/ who did a great job of putting this together.
What hardware you will need:
- Raspberry Pi computer (Older models also work well)
- A MicroSD card (Any Class10 card should work)
- This Raspberry Pi kit (Includes power supply, case, heatsinks, fan)
- Cheap USB soundcard
- Baofeng handheld transceiver (I used an Yaesu Ft-7800 with a Signalink SL-1+)
- APRS Interface Cable for Baofengs
- 3.5mm Female to 2 Male Headphone / Mic audio Y Splitter
The above setup is not going to be the most optimal setup available, however it is cheap, quick, and easy.
Due to the less than desirable receiving and transmitting qualities of a Baofeng, especially with the stock antenna, your range and APRS usefulness will be limited.
In my own personal RX/TX I-Gate and Digipeter, I use an outdoor, external antenna connected to my Baofeng. This dramatically increases the quality of the overall setup, however, I am still limited by the low overall power of the Baofeng radio. With that said, I’ve still had my own APRS packets heard at 100+ miles away.
For a permanent, 24/7 running installation you will need to purchase a cheap Baofeng battery eliminator kit and wire it to a 12V power supply or rotate between batteries to keep your setup online.
I’m assuming you are somewhat comfortable using the Linux terminal and that you already have your RaspberryPi setup with Raspian.
Installing Direwolf on Linux
Open up your Linux terminal of choice and let’s get started! If you are not working directly on your RaspberryPi and instead need to SSH into it over your at home network, go ahead and do that. By default the default user is “pi” and the default password is “raspberry”.
Let’s make sure your RaspberryPi system is up to date with the latest software and firmware updates. Run the following commands:
sudo apt-get update sudo apt-get dist-upgrade sudo rpi-update sudo reboot
After your RaspberryPi has rebooted and you’re back in, let’s proceed.
Lets remove pulseaudio from the system if its installed by default. Although it works fine on most systems, it does not play well with ARM based devices such as the RaspberryPi. Let’s see if it’s installed, and if it is, remove it.
dpkg-query -l 'pulseaudio*'
Your terminal output will appear as below if pulseaudio is missing:
||/ Name Version Architecture Description +++-============================-========-=============-========================= un pulseaudio <none> <none> (no description available) un pulseaudio-esound-compat <none> <none> (no description available) un pulseaudio-module-bluetooth <none> <none> (no description available) ii pulseaudio-utils <none> <none> (no description available)
It should show as <none> under the version column. If pulseaudio is in fact installed, no worries. We’ll uninstall it with the following commands:
sudo apt-get remove --purge pulseaudio sudo apt-get autoremove rm -rf /home/pi/.pulse sudo reboot
You’ll need to install Git on your RaspberryPi in order to download Direwolf in the next step and libasound as another dependency. To do so, simply issue the following command:
sudo apt-get install git-all libasound2-dev -y
The above will install what you need to move forward to the next step(s).
Visiting the Direwolf GitHub page, we can begin following the published instructions. This is the easy, copy/paste initial setup phase. Let’s go….
cd ~ git clone https://www.github.com/wb2osz/direwolf (You can transfer to the beta channels here by follwing the instruction at the GitHub page. I used 1.5-beta-3) cd direwolf make sudo make install make install-conf make install-rpi
Direwolf is now ‘installed’, but not quite ready for use. We’ll get there soon. Hang tight.
Playback and Capture Devices for APRS
We must now determine what your audio playback devices are for the Direwolf configuration. With your USB sound card plugged in, you can now issue the following command:
The output of this command should appear as shown below:
**** List of PLAYBACK Hardware Devices **** card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] Subdevices: 8/8 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0
You can see that the USB soundcard is recognized as “card 1” in the above output.
To view your audio capture devices, which will be on the same USB soundcard, issue the following command:
Your output in the terminal should show the following. Since the RaspberryPi does not have a built-in capture device, the only device shown should be your USB soundcard.
**** List of CAPTURE Hardware Devices **** card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0
Take note of these.
Now for the fun part, actually configuring Direwolf! We’re almost there.
Let’s enter the directory in which Direwolf is now installed.
cd cd ./direwolf
Now open up direwolf.conf in nano (if not already installed, do so by simply issuing, “sudo apt-get install nano”)
The direwolf.conf file in your terminal is now displayed and ready for editing. We must edit a few items in this configuration file for our use.
First, locate (Line 69):
You will need to uncomment this line and enter the correct hardware device values that we found in the previous steps, which was card 1, device 0. Change this line in direwolf.conf to:
Scroll down until you see the following, and change N0CALL to your call sign.
“N0CALL” should be changed to your callsign, with the SSID of your APRS station after it. For me, I use K5CVD-5. You may wish to use the SSID -0 after your call.
TIP: Choosing an APRS SSID to add after your callsign:-0 Your primary station usually fixed and message capable -1 generic additional station, digi, mobile, wx, etc -2 generic additional station, digi, mobile, wx, etc -3 generic additional station, digi, mobile, wx, etc -4 generic additional station, digi, mobile, wx, etc -5 Other networks (Dstar, Iphones, Androids, Blackberry's etc) -6 Special activity, Satellite ops, camping or 6 meters, etc -7 walkie talkies, HT's or other human portable -8 boats, sailboats, RV's or second main mobile -9 Primary Mobile (usually message capable) -10 internet, Igates, echolink, winlink, AVRS, APRN, etc -11 balloons, aircraft, spacecraft, etc -12 APRStt, DTMF, RFID, devices, one-way trackers*, etc -13 Weather stations -14 Truckers or generally full time drivers -15 generic additional station, digi, mobile, wx, etc
If your callsign was K1ABC and this is your primary APRS station, this line in the configuration file will show as:
If you wish to broadcast your APRS station on a map with a position beacon, you can do so by finding, uncommenting, and adjusting the following line for your individual location and setup:
#PBEACON delay=1 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA" via=WIDE1-1,WIDE2-1
Uncomment the line, so Direwolf will not ignore it while running. Change the latitude and longitude settings to match the location of your location. The power, refers to the output power of your radio, height refers to the height of your antenna above your average terrain, and gain would be the gain of the antenna. The comment variable is for what you want the world to see when your beacon packets are received or when your station is shown on maps like at https://aprs.fi
You can easily find your latitude and longitude using an online tool such as this which is what I used.
Assuming you live in the middle of New York City’s Central Park, are using a Baofeng radio and your antenna is located ontop of a 20m mast, and you want your beacon comment to be, “New York City Central Park APRS” your PBEACON setting should look like this:
PBEACON delay=1 every=30 overlay=S symbol="digi" lat=40^46.3143N long=073^58.4963W power=5 height=20 gain=4 comment="New York City Central Park APRS" via=WIDE1-1,WIDE2-1
I see people using beacon comments advertising club information, APRS setup details, scheduled nets, etc. Mine shows up on APRS.FI as seen below:
If you wish to digipeat packets, you can do so by uncommenting the line shown below. Keep in mind that not all areas need another digipeater and if you live anywhere populated you may be doing more harm than good by operating a digipeater if it’s not needed. Being in a relatively rural area, I have a digipeater enabled.
#DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE-$ TRACE
Now, let’s setup the Internet Gateway (I-Gate). Scroll down until you find the Internet Gateway section of direwolf.conf
If you live in North America, all you must do is uncomment the above line. If you do not live in North America, change the value of IGSERVER to the appropriate server.
noam.aprs2.net – for North America
soam.aprs2.net – for South America
euro.aprs2.net – for Europe and Africa
asia.aprs2.net – for Asia
aunz.aprs2.net – for Oceania
In the lines below you will enter your login and passcode for the APRS network. You can generate a passcode for your APRS callsign with SSID instantly at this website.
IGLOGIN K1ABC-0 41325
Assuming your callsign with SSID was K1ABC-0 and the website linked above generated the passcode “41325” the line in direwolf.conf would look like the above. Change this to match your details.
Find the following line and uncomment it, make sure that you also adjust the latitude and longitude used as we did above.
#PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=T lat=42^37.14N long=071^20.83W
Setting Up Your Baofeng for RX/TX
If you followed everything above, you should now be (almost) ready to go. Before we run Direwolf for the first time, let’s go ahead and make sure our radio is turned on, connected to the APRS interface cable, which should be connected to the headphone/mic audio Y splitter, connected to your USB soundcard to your RaspberryPi.
- Tune your Baofeng to the appropriate APRS frequency. In North America this is 144.390
- Adjust your Baofeng’s squelch setting to “1”, I find this is what works best for me.
- Adjust your Baofeng’s VOX setting to ‘on’ with setting “1”.
It’s a horrible photo but it should give you an idea of how things get connected if you somehow were unable to figure it out on your own.
If you’re not already in the Direwolf folder, go ahead and move to it.
cd cd ./direwolf
Now, you can run Direwolf.
You’ll should see something similar to the above. This shows that direwolf started, read the configuration file, PTT is not enabled because we are using VOX, ready to accept KISS TNC client on port 8001 which we’ll use later for Xastir, and it shows that direwolf connected to one of the North American APRS IGate servers.
The first packets shown are my own, being transmitted directly to the internet via the gateway.
The packet shown starting with [0L] is my own beacon being transmitted on channel 0 with low priority. (Transmitted packets are shown in magenta)
Shortly after running Direwolf, I heard the station K14BGI which is about 15 miles away from me. (Received packets are shown in green)
If you are seeing red errors regarding volume, adjust this in alsamixer:
Hit F6 to select the soundcard the RaspberryPi is using, and then hit F5. Very important that you hit F5 because it only shows you the transmit volumes first. Spent an hour trying to figure that out. You will need to lower the mic input volume until these error messages disappear or when the general average of received audio level is around 50.
At this point, you should also be able to see your own station on https://aprs.fi
I worked for hours to figure out how to make autostarting work. No matter what I did, I could not get dw-start.sh to work properly. Yes, everything was installed right. It just would not work.
So I ended up doing this:
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart @lxterminal -e /usr/local/bin/direwolf -c /home/pi/direwolf/direwolf.conf
Make sure the -e is the right path to your Direwolf binary and the -c is to your config file from above.
Then whenever the Pi reboots and loads the GUI, it will automatically load Direwolf.
This is by no means a perfect setup. I’m leaving comments open on this one to gain feedback as this is very much a learning process for myself as well and I by no means claim to be an expert.
If you’re using Baofeng’s stock antenna, you likely will not receive much (if anything) or transmit far. If you are limited to a whip antenna only, I highly suggest using a SignalStuff Antenna, made and sold by the gentleman who has brought the amateur radio world HamStudy.org, otherwise look into connecting your radio to an outdoor base station antenna. On my setup I’m using a Diamond x200A and it greatly extends the usefulness of such a cheap radio, however I will likely build a dedicated 2M antenna for APRS use so my desktop 2M/70cm rig can have it’s Diamond antenna back.
I’m also unclear if it is counterproductive having both Direwolf and Xastir set to transmit and digipeat, or if Direwolf must be configured that way to grant Xastir that capability.
Please leave a comment with any questions you may have, advice or tips on how to improve this as I’ll change this article as new information is received.
I like give credit where credit is due, as most of these installation instructions are from a great YouTube video I have found which helped me with my original install on my desktop PC before setting up a RaspberryPi for APRS use. You can watch the video here, which is made by Retro Tech & Electronics. This is a great video that will go more in depth of the how and why. My guide is simply a quickstart guide to get you going and skips some of the steps in the linked video as I found they were not needed for my particular use. Subscribe to his channel for other great amateur radio and related videos. Additional guidance was provided by the official Direwolf documentation for Raspberry Pi.