APRS with an RTL-SDR – Part 2

In part 2 of my RTL-SDR powered APRS series I’m going to discuss how I configured an IGate using aprx. The first order of business however is getting the RTL-SDR to receive, and decode APRS traffic. The software I used is called multimonNG the installation of this package is pretty straight forward.

# git clone https://github.com/EliasOenal/multimon-ng.git
# cd multimon-ng
# mkdir build
# cd build
# qmake ../multimon-ng.pro
# make
# sudo make install

Once this is complete, we can fire up rtl_fm which we built in the part 1 and by using the Unix Pipe we are going to send the output of the receiver through multimon-ng and then onto the network. The command I’m using to start the receiver is as follows:

# rtl_fm -g 80 -f 144.390M -s 22050|multimon-ng -t raw -a AFSK1200 -f alpha -A /dev/stdin| netcat -l 6666

This opens the receiver and sets the gain to 80, on the North America APRS calling frequency of 144.390mhz, with a sample rate of 22050hz. The output of the reciever is then sent into multimon-ng which uses the AFSK1200 decoder and the -A flag tells it specifically to use the APRS format. Due to some limitations in how multimon-ng works getting the output into something usable requires interacgint with /dev/stdin. If we ended the command there, the decoded APRS packets would be displayed on the terminal for you like the following entries:

lars@bmc ~ $ rtl_fm -g 80 -f 144.390M -s 22050|multimon-ng -t raw -a AFSK1200 -f alpha -A /dev/stdin
multimon-ng  (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA
             (C) 2012-2014 by Elias Oenal
available demodulators: POCSAG512 POCSAG1200 POCSAG2400Found 1 device(s):
Enabled demodulators: AFSK1200
  0:  Generic, RTL2832U, SN: 77771111153705700

Using device 0: Generic RTL2832U
Found Rafael Micro R820T tuner
Tuner gain set to 49.60 dB.
Tuned to 144643575 Hz.
Oversampling input by: 46x.
Oversampling output by: 1x.
Buffer size: 8.08ms
Exact sample rate is: 1014300.020041 Hz
Sampling at 1014300 S/s.
Output at 22050 Hz.
APRS: W2MN-9>S0RY7V,W5OEM-12*,WD5IYT-2*,WIDE2-1:`}Nbl7'v/"77}
APRS: WD5IYT-2>APNU19:!3019.41NS09748.12W#PHG9550 APRS DIGI UIDIGI 1.9b3 Austin b1
APRS: KF5DMO>SPQU6V,WD5IYT-2*,WIDE1*,WIDE2-1:`}JWl //"5]}/TinyTrak4 Alpha

The last three lines in the above block are actual APRS packets received by the RTL-SDR, decoded by multimon-ng, and displayed on the terminal. This is fun but ultimately I want to push those messages into the APRS network. For this I need to add an IGate like aprx. Installing aprx is much like everything else we’ve done so far.

# git clone https://github.com/PhirePhly/aprx.git
# cd aprx
# ./configure
# make clean
# make
# sudo make install

Next we need to configure aprx. For this edit /etc/aprx.conf. The file is well commented, and should be pretty straight forward. In my case, I set the following fields:

  • mycall
  • myloc
  • passcode
  • server
  • filter

Then in the section I set aprx up to use a TCP socket.

tcp-device      localhost 6666 TNC2

From this point we need to adjust the line we used to start the receiver, as aprx is listening to a network socket, and not looking at a terminal for packets. So we go back to our initial command and pipe the output from /dev/stdin into netcat and are left with the following:

# rtl_fm -g 80 -f 144.390M -s 22050|multimon-ng -t raw -a AFSK1200 -f alpha -A /dev/stdin| netcat -l 6666

Finally we start aprx

# aprx

And if we want to see the packets as they come in we can tail the aprx-rf.log

lars@bmc ~ $ tail -f /var/log/aprx/aprx-rf.log
2014-12-11 03:59:48.152 APRSIS    R W5ROX-3>APOT30,WIDE1-1,WIDE2-1,qAR,W5ROX:!3034.44N/09724.99W_081/001g002t060p000h78b10196T2WX
2014-12-11 04:00:04.576 APRSIS    R KF5RLL-2>APRX28,TCPIP*,qAC,T2TAS:!3032.53N/09735.37WxPHG0000 Hutto,TX - TX/RX-IGate - Linux/Aprx-2.08 - Uptime 108(hrs)
2014-12-11 04:00:05.848 APRSIS    R kc5wxt>APRS,TCPIP*,qAC,THIRD:@110400z3006.00N/09718.00W_163/001g006t061r000P002h87b10202
2014-12-11 04:00:20.635 APRSIS    R KC5AFM-1>APZAFM,TCPIP*,qAC,FIRST:!3031.57NI09747.27W#Cedar Park Digi Tx-iGate
2014-12-11 04:00:23.406 APRSIS    R KC5AFM-9>APOTU0,WIDE1-1,WIDE2-1,qAR,AE5UM:!3032.07N/09749.74W>070/029/A=000966 13.6V
2014-12-11 04:00:23.624 APRSIS    R KC5AFM-9>APOTU0,WIDE1-1,WIDE2-1,qAR,KF5RLL-2:!3032.07N/09749.74W>070/029/A=000966 13.6V
2014-12-11 04:00:26.710 APRSIS    R KE5RCS-A>APJI23,TCPIP*,qAC,KE5RCS-AS:!3044.65ND09736.13W&RNG0010 1.2 Voice 1293.2000 -20 MHz
2014-12-11 04:00:26.824 APRSIS    R KE5RCS-C>APJI23,TCPIP*,qAC,KE5RCS-CS:!3044.65ND09736.13W&RNG0035 2m Voice 145.130 -0.600 MHz
2014-12-11 04:00:26.824 APRSIS    R KE5RCS-B>APJI23,TCPIP*,qAC,KE5RCS-BS:!3044.65ND09736.13W&RNG0035 440 Voice 440.575 +5.00 MHz
2014-12-11 04:00:30.812 APRSIS    R WB5FMZ-1>APRS,WIDE2-2,qAR,KC5AFM-1:@000001z3032.06N/09745.43W_110/000g000t056r000P001h93b10212/ 15171,12.1V73F45%,F=0,V053105 LOC

That’s it for now.


APRS with an RTL-SDR – Part1

Recently I purchased a RTL-SDR to play with. These are dirt cheap on Amazon or Ebay usually to the tune of $10 or less shipped to your door. I had a few different ideas of how I would use this, but first on my list was to build an APRS receiver & decoder.

First I had to figure out how to get my RTL-SDR working on Linux. First we need to install a bunch of pre-requisite packages on our Debian/Ubuntu system.

# sudo apt-get install doxygen doxygen-gui doxygen-latex doxygen-dbg doxygen-doc gnuradio-dev gnuradio libgnuradio* libboost-all-dev libusb-1.0-0-dev libusb-1.0-0 gnuradio build-essential cmake mono-complete monodevelop libportaudio2 fftw3-dev

Next we need to download and install the rtl-sdr drivers. Please follow This Link for more information.

After installing the drivers, we need to patch gnu-radio. Please follow This Link for more information.

Next we need to blacklist the standard dvb_usb_rtl28xxu kernel module. Run the following command:

# sudo echo "blacklist dvb_usb_rtl28xxu" >> /etc/modprobe.d/blacklist.conf

Next we need to install kalibrate. Kalibrate is a tool used to calibrate the RTL-SDR using GSM towers in the 900mhz band.

# git clone https://github.com/steve-m/kalibrate-rtl cd kalibrate-rtl
# ./bootstrap && CXXFLAGS='-W -Wall -O3'
# ./configure
# make
# sudo make install

Finally, I installed SDR # which isn’t technically necessary for APRS decoding, but it is a fun way to play with the RTL-SDR that doesn’t requiring doing a lot of hacking in Gnu-Radio.

I’m going to wrap up Part 1 here. This should get you to a working state with your RTL-SDR. In Part 2 I’ll go into getting the Ham Radio side of the software configured.

That’s all for now.


APRS – Ham Radio and Mapping

APRS – Ham Radio Special Modes:

One of the great strengths of Amateur Radio is how flexible the hobby is. One type of operation that is very interesting for the Overlander is called APRS. (Amateur Position Reporting System) APRS takes raw NEMA2 data from a GPS, encodes it, and transmits it over the amateur bands. A simple APRS Transmitter/Receiver can be built by connecting an inexpensive handheld transceiver (around $35 on Amazon) to an Android Phone or Tablet with a GPS, and then installing a $4.95 piece of software called APRSdroid. This APRS site can then simultaneously transmit your coordinates, as well as display the near real-time locations of every other APRS station within receiving distance. Imagine a caravan of five vehicles, each with an small APRSdroid powered APRS system in their vehicles, with the map display turned on.

Android Phone, and Baofeng UV-3R
APRS Portable

Map Display
Map Display

Overland Mapping & Ham Radio

It’s no big secret I have a bunch of radios in my truck. In fact one of my next posts will highlight what I have installed in my Mobile Antenna Farm.

Mobile Antenna Farm

One of the radios installed though is a 10w Byonics Microtrak-RTG APRS Transmitter. If you’re not familiar with APRS take a second to read a little about it.

While driving through the mountains on the Rimrocker Trail my APRS transmitter was happily sending out telemetry data every 5 minutes (because I was traveling less than 60 miles per hour) or every time I had a more than a 14 degree change in direction. Because of the range 2m has while in the mountains (Line of sight from 9,000 feet is a long way.) I actually have a pretty complete picture of where we traveled.

RimRocker APRS Tracks

APRS isn’t as perfect as plotting your own maps with an onboard GPS and Tracking software, but it’s kind of neat to know that the family of one of the guys with us could fairly reliably track our progress through the Rocky Mountains.