So, you want to set up a RX/TX I-Gate and Digipeter to send and receive packets on your Raspberry Pi over the APRS network? No problem. I was pleasantly surprised to learn that getting started is not only relatively straight forward, but also easy on the wallet. Many of the items listed below you may already have, however, assuming you have nothing at all, you can get started for just about $100.
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 (This is the cheapest offered)
- 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 (I prefer Terminator) 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 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 N1AAE-1. 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
As of right now, we’re setup for a receive only I-Gate. But what if we want to relay information from the internet to our radio, and transmit them? No problem.
#IGTXVIA 0 WIDE1-1
Uncomment the above line, and this will allow you to transmit data received from the internet gateway from your radio.
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. 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
This is completely optional, but I use Xastir to have a visual reference of packets heard, to view weather data from nearby weather stations, and to view message traffic over the APRS network. There are other Linux based APRS programs that can use the KISS TNC setup in the direwolf.conf file, some folks prefer YAAC (Yet Another APRS Client). I’ve never used it, so Xastir is all I know.
If you made it this far without errors or burning your hamshack down, installing Xastir is a breeze.
sudo apt-get install xastir
After the package installs, you will be met by a couple on screen prompts. Go ahead and select ‘OK’ for the first one, and I selected, “Yes” for the second prompt regarding non-superusers having access to AX.25 interfaces.
sudo usermod -a -G xastir-ax25 pi
The above will add the system user ‘pi’ to run the xastir program. You will likely need to log out and log back in for this change to take effect. If your username is anything other than the default ‘pi’, change the above to reflect your actual system username. Once the above command is issued and you have logged out and back in, you can now run Xastir as your local user.
This will start the xastir program. On first one you will see “Configure Station” dialog box, proceed to enter the information that is relevant to your station. This includes your callsign (with SSID, if you wish), station location (you can use this latitude and longitude finder) and other details about your station (power, height of antenna above average terrain, antenna gain, and directivity of antenna)
I blurred out the latitude and longitude, only so that you will not copy my settings and instead enter your own.
Next, you will go to the Interface menu option and select, “Interface Control”. You will see a dialog box with several options below the empty list, select, “Add”.
Here you can choose what type of interface device you wish to use. Direwolf is already configured for use as a Serial Kiss TNC so that is what we will select. Select, “Serial KISS TNC” and click “Add”.
Click “OK” to save and start the TNC from selecting it from the Interface Control menu and clicking, “Start”.
You should start seeing stations pop up on the map.
As you let Direwolf and Xastir run, you will (or should) begin to see stations pop up on your map.
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.