Suffix

Receiving APRS Packets with a Baofeng Radio

Receiving APRS and running an IGate with a Baofeng UV-5R, a Digirig and Linux.

APRS setup with Baofeng and Digirig

APRS is a distributed digital communication system used by radio amateurs. It can be used to send your position, share telemetry (a weather station, for example), and even send text messages to other hams. Some APRS stations are connected to the internet (called an IGate), meaning you can track APRS data without the need of a radio (visit aprs.fi to get an idea). Some transceivers have APRS built-in, like the Yaesu FT5DR, but most entry level radios, like the Baofeng UV-5R, do not.

I don’t own a fancy APRS capable radio, so I need a cheaper way to play with APRS: a computer, a Baofeng (€50) and a Digirig ($50).

Receiving APRS data

Baofeng UV-5R

Let’s start with the radio. Turn off squelch (SQL) in the Baofeng menu. We want to forward all incoming audio to the computer and squelch might block weaker signals. Also, turn off dual watch (called ‘TDR’ in the Baofeng menu) since an incoming signal on the other channel could interrupt the APRS packet if both arrive at the same time. Set the Baofeng to listen to 144.8 MHz for Europe (or find the APRS frequency for your region). Turn the volume of the radio halfway, we will fine tune this later.

Digirig

Connect the black Baofeng cable (the green one is for programming the radio) that came with the Digirig with the radio and the audio port on the Digirig. Make sure the Baofeng connection is snug. Connect the USB-C cable to the other side of the Digirig and the computer.

Computer

After connecting the Digirig to the computer, check the number assigned to the Digirig’s sound card with arecord --list-devices. In the example below, “card 0” is my internal sound card (ignore this one) and the Digirig is “card 1” (the one with “USB PnP Sound Device”).

$ arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3246 Analog [ALC3246 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
↑ The Digirig is “card 1” here

Turn the microphone input of the Digirig on via amixer, we don’t want to mute the incoming audio (you can also use alsamixer if you prefer a TUI). The card number should match the number you found above.

I don’t know about automatic gain control and am not sure what this does.

$ amixer --card 1 set 'Speaker' unmute
$ amixer --card 1 set 'Speaker' 100%
$ amixer --card 1 set 'Mic' unmute
$ amixer --card 1 set 'Mic' 100%
$ amixer --card 1 set 'Auto Gain Control' mute
↑ Set the Digirig speaker and microphone to max and mute the automatic gain control

Install Dire Wolf and edit the configuration file (copy the example config from ‘/etc/direwolf.conf’ to the home directory). In the config file, look for and uncomment the line with ‘ADEVICE’ (line 77) and make sure it matches the card number from above.

ADEVICE  plughw:1,0
↑ ~/direwolf.config at line 77

Start Dire Wolf. The -t flag disables the Dire Wolf colors since it turns my black terminal white, but that’s optional.

$ direwolf -t 0
Dire Wolf version 1.6
Includes optional support for:  gpsd hamlib cm108-ptt

Reading config file direwolf.conf
Audio device for both receive and transmit: plughw:1,0  (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate.
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 TCP client application 0 on port 8001 ...

ON6SX audio level = 198(133/124)   [NONE]   _|||||___
Audio input level is too high.  Reduce so most stations are around 50.
[0.3] ON6SX>APMI06,WIDE2-2:@132016z5054.40N/00437.53E-WX3in1Plus2.0 U=12.4V,T=21.6C/70.8F
Position with time, House, SQ3PLX http://microsat.com.pl/
N 50 54.4000, E 004 37.5300
WX3in1Plus2.0 U=12.4V,T=21.6C/70.8F
↑ Dire Wolf captured a first packet from ON6SX while the Baofeng volume is set too loud

Dire Wolf will now listen for APRS packets and decode them as they come in. Note that there won’t be any audible sound since the audio is piped directly to the computer. If you don’t see packets come in from time to time, you might be in a region with low APRS activity, check the aprs.fi website to make sure.

Note the warning about the audio level in the APRS packet above. This means the volume knob on the Baofeng is set too loud. Turn it down a notch, so the first number (198 in the example) is around 50 to make it easier for Dire Wolf to decode the packets.

Forwarding APRS data to the internet

Now that we can receive packets on a computer, we can also forward the packets to the internet. This turns our little listening station into an IGate.

Back to the Dire Wolf configuration file. Find the “INTERNET GATEWAY” section starting around line 337 and change the following two lines:

This is the minimum we need to forward packets we receive on the radio to the APRS-IS network. Don’t forget to restart Dire Wolf.

$ direwolf -t 0
Dire Wolf version 1.6
Includes optional support for:  gpsd hamlib cm108-ptt

Reading config file ~/direwolf.conf
Audio device for both receive and transmit: plughw:1,0  (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate.
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 TCP client application 0 on port 8001 ...

Now connected to IGate server euro.aprs2.net (78.47.200.124)
Check server status here http://78.47.200.124:14501

[ig] # aprsc 2.1.11-g80df3b4
[ig] # logresp ON3CIM verified, server T2NUERNBG
↑ Dire Wolf connected to a server in Germany

Checking the IGate server (http://78.47.200.124:14501 in the example above) should list your call sign if the connection succeeded. It counts the forwarded and duplicated (already reported by another station) packets.

This will not show the station’s symbol on the aprs.fi website yet. We need to enable two more options in the Dire Wolf config file first:

Restart Dire Wolf once again and it will send an APRS packet over the internet with the IGate’s position.

$ direwolf -t 0
Dire Wolf version 1.6
-- snip 8< --
[ig] # logresp ON3CIM verified, server T2LEIPZIG
[ig] ON3CIM>APDW16:!5052.12NR00442.00E&
ON3FR-7 audio level = 90(56/32)   [NONE]   __|||||||
[0.5] ON3FR-7>UP5RQ7,WIDE1-1,WIDE2-1:`zFTlzN[/`"4<}_0<0x0d>
MIC-E, Human, Yaesu FT3D, En Route
N 50 52.1700, E 004 42.5600, 10 MPH, course 50, alt 121 ft
↑ Dire Wolf reporting my IGate’s position to the APRS-IS network

A little black diamond symbol with an ‘R’ will now show on the map with your call sign.

IGate reporting ON3FR on a map
↑ My IGate reporting ON3FR on a map

We went from receiving and decoding APRS packets to sharing the packets with the wider ham community by running our own IGate. We haven’t transmitted anything with our radio yet… stay tuned.

73 de ON3CIM