Automatic Packet Reporting System (APRS) with Android
March 27, 2018
Disclosure: Some of the links below are affiliate links – at no cost to you, I will earn commission if you click and purchase. I do not allow this to taint my evaluation of those products. I greatly appreciate this means of supporting my blog!
Brief intro to APRS and the setup
APRS is "Automated Packet Reporting System". A long-used, reliable way to track your position using ham radio. Before widespread smartphones atop cellphone technology, APRS was quite valuable. Even now, APRS can give you access to digipeaters in areas with bad cell reception.
It's often used to track objects by broadcasting their GPS position. Though APRS can operate exclusively over RF, it is linked to the Internet via APRS-IS. This gives rise to sites like APRS.fi that allow you to peer into what's going on. Dig in more, and you can find ways to send messages to other ham operators, send SMS, send telemetry data (weather), etc.
I'm a software developer by trade, with a basic level of experience with digital circuits. Though the Baofeng and APRSdroid setup is very popular and carries the implication of being easy to setup, the reality is somewhat to the contrary. It's somewhat imperfect and does require tuning.
In my article, I'll do my best to explain how I set myself up, and precisely what is happening under the hood. Understanding how APRSdroid works with the radio will save a lot of headache insofar as "tuning" your configuration and being able to effectively diagnose problems / debug it.
What you need:
- ~$65 - BaoFeng BF-F8HP - Baofeng radios are regarded as the cheapest way to get into amateur radio
and have transmit ability. Not too highly regarded depending on who you talk to,
but are nonetheless a decent starter radio.
- OR, ~$25 - In retrospect, the BaoFeng UV-5R is a better deal – the F8HP has 8 watts max transmit power, while the UV5R has 5 watts. This is not really a significant difference, and the UV5R costs much less. For a radio you may want to leave in your car, take hiking, etc., paying less makes sense in the case that you must worry it is taken/lost/destroyed/etc.
- ~$20 - BTECH APRS-K1 Cable is necessary for interfacing with your radio from a PC / tablet / etc.
- Android device - You can just use your existing Android device, but I highly recommend buying a cheap (used or entry-level) Android device to dedicate to the purpose of APRS if you plan to use it often. One of the gotchas here is that when using APRS, your phone's audio output needs to be used, so you can't have background notifications triggering noises and whatnot during operations! More on this later. I'm using an old Nexus 4.
- APRSdroid - A very popular app for APRS applications. If you're like me and use Mac OS X and an iPhone, I think you'll find that Android is the path of least resistance to getting up and running.
I'll assume you've already become FCC licensed, so you know the basics of antenna selection, transmitting rules, etc.
How it works
APRS is a protocol that sits atop AX.25. The physical layer implementation you find with amateur radio is 1200 baud AFSK.
A series of FM tones (AFSK) are used to communicate digital information packets. This transmission supports 1,200 bits per second (baud), ignoring overhead of protocols running atop things (APRS over AX.25).
These packets can be listened to, if you'd like. Dial in to 144.390 MHz
to listen in the US. It will help to be near APRS activity (e.g. a
digipeater or remote weather stations) – see APRS.fi.
Packets are sent on the order of minutes apart, so you may need to listen
for a little while if you're not in a populated area.
To enable APRS, APRSdroid uses your Android device's mic/speaker lines via the APRS cable plugged into the radio's mic/speaker lines. The Android device can send audio to transmit packets, and likewise uses microphone monitoring to listen for packets. You can even confirm this yourself by plugging in headphones and listening for APRSdroid sending packets over the audio line while you have tracking turned on.
Setting up APRSdroid
Setup is fairly easy. You do need to go through extra steps to get a passcode for APRS-IS (Internet) access on the APRS network, but you can get started without it while you wait to be approved.
I'd suggest navigating the APRSdroid screens to become familiar with the app. I'll go over more detailed setup ahead.
The details / gotchas
APRSdroid
APRSdroid will play the packet over your phone speaker even if you have the radio cables plugged in. This is normal – don't worry that you have a bad cable connection unless you don't see your radio transmitting when this happens. The downside is that you should also have your Android volume turned up fairly loud to ensure the radio receives the audio, and this means that the packets APRSdroid decides to play over your speaker can loudly – and alarmingly – screech at you periodically as you transmit.
APRSdroid will transmit as little as is possible
In the early stages of setup, you may want to leave the radio disconnect from the Android device to test transmissions. You will find that one-off sending a location via APRSdroid often doesn't do anything. This is because APRSdroid is trying to throttle the packets you send out – i.e. it should not be easy to repeatedly hit the ping location button and spam APRS packets over your radio. However, this does make it harder to test your setup to start.
The simple way to reliably transmit something is to send messages to your own callsign. This may require that you turn on tracking (APRSdroid will warn you), but is a good way to reliably generate packets on demand.
Please be respectful of others while tuning your setup and keep the Android device disconnected from the radio, or attach a dummy load to the radio while tuning your setup.
VOX to transmit
Your Baofeng is probably in push-to-talk mode. That's a problem, because APRSdroid can send APRS packets all day, but if the Baofeng isn't transmitting them, that's no good.
You will need to go into the Baofeng's menu, find the VOX option, and set it to 10 to start. VOX is voice-activated transmission, where 0 is "off", 1 is "very sensitive", and 10 is "least sensitive". Be sure to turn this off as soon as you're done with APRS and the phone is no longer connected via the cable – it would be easy to accidentally transmit if VOX is left on!
Worst-case – e.g. VOX is not even activating – you can just hold down PTT just before you tap the APRSdroid button to transmit location (or send a message). This is a bad habit, but if you really had to get a message out in the field, it works!
Squelch to receive
This is where things get a little dicey. Your Baofeng's squelch is somewhat an enemy to APRS: if the Baofeng is not quick enough to open up the squelch, you may end up missing the start of the APRS packet. APRS packets are "all or nothing", so missing part of the packet means you basically don't receive anything.
One advised solution is to turn off squelch. This is similar to just holding down the MON (Monitor) button on the radio, but you can do it without a button press by going into your menu, finding SQL (squelch), and setting it to 0 for "disabled". Supposedly SQL value 1 is "very sensitive" and 10 is "least sensitive", but it appears that there is practically no differentiation in these SQL values. When I want the squelch to go back to normal, I set SQL back to 3.
Now you have a new problem, though. It is unclear if it differs by radio model or firmware version, but my Baofeng F8HP will not let me transmit while the squelch is open "receiving." This means you can listen for APRS packets, but not you cannot send them. If you're in this boat, I think your unfortunate options are:
- Leave the squelch on and accept that you may lose some packets. At least this way, you can transmit your location, etc. without issue.
- Disable squelch to read-only packets
- Use a hybrid of the above to just decide what you need to do at any given moment.
This is an area where the Mobilinkd TNC2 is superior (read the conclusion for more detail) – you don't have to use VOX with it because it can activate push-to-talk from the modem. This means you can leave the squelch open, and the modem will trigger PTT when it is time to transmit, which the Baofeng DOES respect, and it will switch to transmitting. With the VOX activation and squelch off, it will NOT respect your voice – this sort of makes sense, because if it did, it'd probably pick up its own speaker output and create feedback!
"Tuning" your setup
I'll let you handle your antenna tuning / SWR configuration, and focus on making you a good APRS citizen, and making your setup as reliable as possible.
Disable Android notifications
Turn off your Android notifications. Because your radio is triggered by audio from the Android phone, any noises you make there will end up being transmitted! Keep an eye on your radio to catch it transmitting when it should not be, and diagnose/fix as soon as possible to avoid disturbing others. Remember, your radio is interfering with other APRS transmissions during the duration of these seemingly short instances, and you're jamming others with non-APRS traffic!
Set Android volume correctly
If your Android volume is too low, it will not trigger the radio's transmit (VOX). I am not sure what happens if you set the volume "too high" – assume there is a risk of distortion, much like talking too loudly and too close to your mic.
I had no issue running with 80-100% volume.
Set radio volume correctly
As far as I can tell, it is fine to set the Baofeng volume to max. I am sure there is some ideal threshold here, but if it exists, you'll have to find it via experimentation.
Tune the APRSdroid pre-transmit tone length
Your Baofeng might have a slight delay before it actually transmits when it "hears" the mic audio. APRSdroid gets around this by prefixing the APRS packet transmission with a 200ms garbage-sound that is probably long enough for the Baofeng to activate.
The downside is that as soon as your Baofeng activates, you're transmitting that garbage tone for the remaining duration. If the Baofeng were activating reliably at 50ms, then you're wasting 150ms of radio time (not quite jamming, but getting there) with non-data transmission, assuming the activation sound is 200ms long.
Granted, APRS is already very slow (1200 baud, and packets transmitted on the order of minutes apart), so this is not too terrible a thing, but it'd be nice to ensure that your setup is as efficient as possible. This matters a lot more in high-density areas (e.g. LA) where APRS traffic is so dense that some people cannot even reliably transmit out, giving rise to cool projects like FaradayRF
To do this, you'll need a way to monitor when the radio is transmitting. If you can figure out how long the activation tone runs for, you can listen for it via another radio (I'd highly recommend a ~$20 NooElec NESDR SMArt) and record it, then measure the duration of the tone. If you consistently hear a 120ms tone but APRSdroid is configured to use a 200ms tone, then you know that the radio triggers at 80ms and you can lower your APRSdroid configuration to 100ms (to leave some safety room) relatively easily, getting you down to a more moderate 20ms unnecessary transmission.
Respect others
Please be respectful of others while tuning your setup and keep the Android device disconnected from the radio, or attach a dummy load to the radio while tuning your setup. Only once you are sure that you have your APRS rig dialed in as described above should you begin real transmissions.
Final considerations
Hoping you could just plug in the Baofeng and APRSdroid and get to it? We've certainly dispelled that idea!
I'd suggest taking note of all your settings here and that you write up instructions for volume levels, radio settings, etc. and keep them with your mobile rig. Get a case to keep your radio and Android device in, and keep it there. Even better, if you're only using the radio/Android device for APRS, you can just leave it configured as-is and never touch it again!
I think that given the cost, it's still a good way to get into APRS, and it's valuable to learn everything necessary to get the Baofeng working properly. This is the kind of knowledge that will help inform you on future decisions – e.g. buying a radio with APRS features built in, or with better support for packet radio.
You can do better
If you're looking to clean up this setup a little bit, you can look into buying a TNC like the Mobilinkd TNC2. This basically replaces your audio cable with a device that runs off a battery, connects to the phone via Bluetooth, and connects to the radio via its own special cable to access the mic/speaker. The benefit to this setup is that you don't have to police your Android's output audio as much, since the link is Bluetooth. It also means you can untether the Android device from the radio/TNC, which could be helpful if it's your primary phone, you're hiking, etc. But, the biggest advantage is that the Mobilinkd can key the PTT from the cable, which APRSdroid cannot do. Read the squelch/SQL section from earlier to understand why this is a significant advantage! The Mobilinkd totally removes the need to setup VOX, and allows you to run the squelch open all the time and you can still transmit.
UPDATE: I've been using the Mobilinkd TNC2 and it performs flawlessly. Much recommended!
A note on safety
APRS is sometimes touted or used as a way to track your location in the case of needing emergency rescue, or as a means to send out messages in remote areas. This is a reasonable use for it, but be aware of the limitations – you need to understand how APRS works quite well, whether you're within digipeater/i-gate range of APRS-IS to transmit your location to the Internet, topography, and other factors. Researching APRS coverage before you go somewhere particularly remote is necessary.
If you need a better subscription-free personal emergency option, look into an ACR ResQLink
I personally use APRS for safety reasons for some of my trips, but do keep the ResQLink as a bulletproof backup.
Disclaimer: I am not providing any warranty here for your safety. Take my advice with a grain of salt.