Very cheap and simple RX-only APRS IGate

This is a quick post describing my recent efforts to establish a very minimal receive-only IGate at IO91lk. I’m hoping that this post will make it very easy for anyone to replicate the entire setup – so I’ll include hardware purchase and software download links later on.

tl;dr Raspberry Pi 2, RTL TV stick, 5/8 whip on a SO239, Direwolf.

First off, here’s a terrible photo.

You’re looking at MB7UUU – maybe the only RTL dongle with a callsign?

Hardware

Grab a Raspberry Pi – I used a Pi 2, but you could you a zero for this to keep costs really low, assuming my SD card image works on the zero – not tried. (£6)

Grab a USB Wi-Fi dongle – mine is just a very cheap one off eBay. Hopefully this image will boot and work on the Pis with Wi-Fi built in – will test soon. (£2)

Grab a 4GB SD card. (£2)

Grab an RTL2832U USB TV dongle, I use this one. (£10)

Build or buy an antenna – I made a 5/8 whip on an SO239 socket, didn’t bother with the loading coil, hung from the rafters by the top, works great. (£2 tops for socket, £1 tops for wire, could be done for free)

Devise a way to connect your RTL dongle to your antenna – I had a pigtail floating around, so I did it properly, but you could probably do fine just bodging the antenna element on to the coax from the antenna the dongle came with.

I make that approx. £20 all-in, £25 if you need a USB power supply as well.

Software

You have two options here, easy mode or hard mode.

Easy mode:

  1. grab this SD card image*
  2. unzip it
  3. burn it on to a micro-sd card using Win32diskimager or dd as appropriate
  4. Eject the SD card, stick it in the Pi, boot the Pi
  5. Run rtl_test as per this page, and get the PPM value for your stick (may take some time to warm up / get stable)
  6. Shut down the Pi, put the SD card in your PC, edit aprsconfig.json on the drive mounted from the SD card (or you can do this directly on the Pi if you want – /boot/aprsconfig.json)
  7. Minimally, fill in Mycall, Lat, Lon, Wifis (SSID/key, and only if you aren’t using wired Ethernet), RTLPPM from rtl_test
  8. Boot the Pi with the SD card, give it a minute and you should see your callsign appear on APRS.fi as soon as it hears traffic – example for my case http://aprs.fi/info/a/MB7UUU

*full disclosure, I just realised I left my ssh key in authorized_keys- remove if you’re bothered- can’t do anything with it unless I’m on your LAN

That’s it. There’s a utility I wrote on the SD card which runs at every boot, takes whatever is configured in /boot/aprsconfig.json and sets everything up. Should be pretty flexible. If you need to reconfigure the IGate, just pull the SD card, edit that file, then boot it again. Likewise if your SD card fails, just burn it again from the link above and drop your aprsconfig.json file on to the card.

The login credentials for the image are: hostname rtlpi, user root, password raspberry.

Here in Tilehurst / Calcot with a 5/8 whip at ~70m ASL / ~5m AGL in an attic, I routinely receive several packets per minute, mainly from the local digipeaters.

The Pi image is theoretically set up with an Icecast server so you can listen to what Direwolf hears on 144.800 through a web browser, to get an indication that things are working, however I think I broke this somehow just before I took the image, while minimising filesystem writes to maximise SD card lifetime. I might do an updated image shortly.

If you’re using Wi-Fi, and your dongle doesn’t register as wlan0, you might have to do some fiddling.

Hard mode

Not going to write this up fully right now, but the secret sauce is the following command line:

ppm=37 # your PPM value here

rtl_fm -f 144800000 -p $ppm - | direwolf -t 0 -c direwolf.conf -r 24000 -D 1 -q d > dw.log

or if you want to include streaming to Icecast:

rtl_fm -f 144800000 -p $ppm - | tee >(direwolf -t 0 -c direwolf.conf -r 24000 -D 1 -q d > dw.log 2>&1) | ices2 /tmp/ices-conf.xml

where direwolf.conf is:

ADEVICE stdin null
ACHANNELS 1
CHANNEL 0
MYCALL [your callsign here]
MODEM 1200
AGWPORT 8000
KISSPORT 8001
IGSERVER euro.aprs2.net
IGLOGIN [your callsign here] [your APRS passcode here]
PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R lat=50^12.34N long=1^1.23W [update with your own position]

and ices-conf.xml is:

<?xml version="1.0"?>
<ices>
 <background>0</background>
 <logpath>/var/log/ices</logpath>
 <logfile>ices.log</logfile>
 <logsize>2048</logsize>
 <loglevel>4</loglevel>
 <consolelog>1</consolelog>
 <stream>
 <metadata>
 <name>APRS frequency audio stream</name>
 <genre></genre>
 <description></description>
 <url></url>
 </metadata>
 <input>
 <module>stdinpcm</module>
 <param name="rate">24000</param>
 <param name="channels">1</param>
 <param name="metadatafilename">test</param>-->
 </input>
 <instance>
 <hostname>localhost</hostname>
 <port>8000</port>
 <password>raspberry</password>
 <mount>/stream.ogg</mount>
 <yp>1</yp> <!-- allow stream to be advertised on YP, default 0 -->
 <encode>
 <quality>0</quality>
 <samplerate>24000</samplerate>
 <channels>1</channels>
 </encode>
 <downmix>0</downmix>
 </instance>
 </stream>
 <limits>
 <burst-on-connect>0</burst-on-connect>
 </limits>
</ices>

I’ve bundled some software into the SD card image which automates the configuration stuff – source code to go up on Github soon.

Disclaimer

In the UK, a pedantic reading of the licence terms suggests, in my opinion, that an APRS IGate falls under Unattended and/or Remote Operation (section 2 part 10(3)), and the licence (section 1) also pedantically defines Radio Equipment as transmitting and receiving equipment. So while the regulator is highly likely to not give a damn, filing for an NoV (Notice of Variation) was straightforward and came back extremely quickly – about 40 hours from initial application with RSGB ETCC to having the NoV returned from Ofcom. Superb service, and my thanks to Steve G8SFR at ETCC in particular – so now by any possible reading I’m covered. Steve advised that closedown operators are not required to be named for a receive-only application, and a max transmit power of -60dBW (1 μW) was specified on the application – way above the -80dBm (10pW) local oscillator leakage measured at the RF input connector by G8JNJ – technically required since the LO will leak out of the antenna, even if to an indetectably small degree. If you choose not to go down the NoV route, and clearly this won’t be possible for all, I’m not about to judge, but it’s not on me.

Enjoy!

Proper standalone RF/GPS APRS tracker – mk1

APRS is something I’d heard about but not really ever grasped. With a couple of events coming up where APRS would be helpful, I decided to put the effort in.

Here’s my recipe for a standalone APRS tracker. Note there are tons of different ways to accomplish the same – this is just one way – and my first spin at it too. I’ve got plans to refine this into future iterations.

Equipment

Easy Digi interface

This interface, from a guy in the states, is brilliant. But it’s very expensive to ship to the UK. However, it’s pretty easy to replicate.


(ignore the bit crossed out in red, you’re not using it)

In words:

For PTT:

  1. Raspberry Pi GPIO pin -> (anode) 1N414BA diode (cathode) -> 4N25 opto-isolator pin 1 -> 430R resistor -> Raspberry Pi gnd
  2. Radio gnd -> (anode) 1N4004 diode and opto-isolator pin 4
  3. Opto-isolator pin 5 to 1N4004 cathode and radio PTT pin

For audio:

  1. USB sound card headphone jack -> 600:600 audio transformer (across one set of windings, connect the tip and ring together)
  2. 2k resistor across the second set of windings
  3. One side of the second set of windings to radio mic gnd
  4. Other side of the second set of windings to 0.1uF cap then to radio mic input
  5. Then exactly the same again in reverse between the radio headphone/speaker jack and the USB sound card mic jack

The Radio

My old FT-470, which I’m very proud of, has 1x 3.5mm jack, 1x 2.5mm jack, both mono. I had to go back to an old Gopher(!) post to find the details on hooking this up. Fortunately it’s pretty easy.

TX audio comes from the Easy Digi board, through a 0.1uF cap to the mic tip. PTT comes from the Easy Digi PTT pin, through a 2k resistor, also to the mic tip. RX audio comes straight from the rig’s headphone jack to the Easy Digi RX audio in.

Software

OS is Raspbian minimal.

Software is Dire Wolf which is fairly easy to install and configure. More on this in due course. I’ll also put up a script that preps an install with the hardware above.

Display

I had a 4×20 dot matrix LCD display kicking around, so I ended up building this in too – this has ended up more as an APRS “terminal” than a pure tracker. I wrote a basic framebuffer-esque application which handles writes to the screen, and takes updates from other applications via (of all things) local HTTP. All the custom software in this tracker is C# on Mono. I’ve  implemented two screens – one with last RX and TX times (for debugging), and another with current position, speed, GPS time, national grid ref, Maidenhead square, and positional accuracy. A closest recent stations screen is an obvious addition.

The Result

Here’s Mk 1.

I’m probably going to leave this intact, then for Mk 2, start afresh and iterate a few times as I refine the design.

Plans:

  • Finish writing up more of the above – particularly around the box, hardware integration and software integration
  • Try out 2m modules like Dorji DRA818V instead of a discrete radio – should be easy to drive from the Pi
  • Maybe with a small linear amplifier!
  • Switch out the full Raspberry Pi 2 to a Raspberry Pi Zero, or today’s newly announced Raspberry Pi Zero W
  • Build in a battery
  • Get the software published – both as a guide for installation from scratch, and as an SD card image – burn and go. I plan to put all my home-grown code up on github.
  • Look at putting together some kits for audio and PTT isolation, similar to above, but reasonable cost in the UK

Exam success

I’m pleased to say I got word today that I successfully passed the UK Advanced amateur radio examination.

So, formerly 2E1EPQ, and now M0LTE.

Seems as good a time as any to start this new blog.

Thanks particularly to Alison G8ROG, Harry G3NGX, Ray G3SCZ and the guest lecturers, for delivering a really engaging course.

And congratulations, so far at least, to Barry M0SQZ and Dorian M0SLG on their passes – it was a hard exam. Best of luck to those we haven’t heard from yet.

If you’re out there, G0PMF, GOPMG, G1BSN plus others long since out of touch – e.g. Dick and son Richard, thanks for everything in 1995. Little did I know I’d be taking this back up again all these years later. I’ve got a lot to thank you all for – quite probably including at least in part my career. If Google ever brings you to this page, do drop me a line. Best wishes to you all.

Now for that first QSO…