Tag Archives: SDRSharp

APRS RX IGate with RTL-SDR and Raspberry Pi

For sometime I wanted to experiment with an APRS IGate. Coverage was spotty at best in my area. There is an IGate in my city but it doesn’t receive so well. Recently there have been more IGates blanketing the area.

APRS stands for Automatic Packet Reporting System and has been developed since the late 1980s by Bob Bruninga – WB4APR. It’s a digital communication mode amateur radio operators use to primarily broadcast location information, though this wasn’t the intended use. It handles text messages, alerts, announcements, bulletins, and information of interest like weather station reports. APRS operates typically on a single frequency.  A system of relay stations and digipeaters repeat messages over a wide area. APRS Internet System (APRS-IS) are Internet connected receivers (IGates).

Any ham can add an icon or information to the APRS map.  The information is available on the Internet or to users on the local RF network.  Data is automatically tracked over time. APRS is frequently used to track mobile stations in a public service event or volunteers in a search and rescue event to visualize locations and track progress.

This project will utilize the Raspberry Pi and RTL-SDR dongle. The Raspberry Pi is a credit-card sized micro-computer intended for teaching computer science to students but became popular with the makers. RTL-SDR dongles are DVB-T (European standard) TV tuner dongles. It was found the signal data could be accessed directly which allowed them to be converted into wide band software defined radio receivers. The Pi costs about $35 and RTL-SDR about $20.

Since the RTL-SDR dongles are meant to receive high power wide bandwidth TV signals, they are not as as sensitive or frequency stable as a ham radio or scanner. Receiver performance will be a little less than an equivalent radio performing the same task but depends on the usual variables: amount of APRS activity, antenna height, antenna gain, propagation, etc, etc. With my antenna about 15 feet high, I get about 5+ miles of coverage. With band openings I’ve heard stations on the opposite side of town and across Lake Erie into Canada.

Even though this IGate will be non-transmitting (cannot relay packets from the Internet), packets are forwarded to APRS-IS. The higher profile – higher power Digitpeaters in the area will relay packets received by your IGate to the local RF network.

Assumptions

This guide is step-by-step in nature, meant for beginners, with brief explanations of the steps. It will help to have an understanding of Linux commands and scripting. Capitalization is important in Linux!

My setup is on my home LAN. The IGate could be installed at a remote site using a shared Internet connection. Be aware that firewalls that might block connection to the APRS-IS network on a shared connection. You may want to request or have port 22 open on your router for SSH to establish a remote connection.

If all wired options fall through, look for a cellular hotspot device such as a MiFi to install along with the Pi. Use the built in WiFi on the Pi 3 or approved WiFi dongles for earlier Pi devices. Associate the MiFi with your Pi (turning on WPA2 so no one else piggybacks on your connection). Test the setup before installing it. Don’t find out after leaving the site that the MiFi times out after a few hours.

Program versions

Applications and versions used in this writeup:

  • Windows 10 64 bit
  • Raspbian Jessie 2016-05-27
  • Win32 Disk Imager 0.9.5
  • PuTTY 0.67
  • SDR Sharp 1.0.0.1444
  • RTL-SDR 0.5.3
  • Multimon-NG ?
  • Pymultimonaprs 1.3.0

Parts list

Listed below are all the parts needed to get this project working. It is noted when items can be left out or substituted.

That’s all the parts needed for this project. Check out the AdaFruit Raspberry Pi page for other hardware that might be useful, like the USB to PS/2 adapter for example. Many of these parts are included in the Raspberry Pi Starter Pack.

Dongle Bits: ADSB Radar and $60 Police Scanner

This article appeared in the The Lake Erie Amateur Radio Association newsletter The Spirit of ’76 and ’88 February 2015 edition and The Wood County Amateur Radio Club newsletter CQ Chatter March 2015 edition.

Read the rest of the series in the Dongle Bits articles category.


The holidays were a busy time at the K8JTK laboratories with a couple RTL-SDR projects. The RTL-SDR is the European TV tuner dongle that was turned into a software defined radio receiver.

Thanksgiving is one of the busiest travel seasons and I wanted to decode ADS-B data to see how many aircraft were flying around. ADS-B stands for Automatic Dependent Surveillance – Broadcast allowing aircraft to be tracked by ground stations and provide situational awareness to nearby aircraft. This is part of the FAA’s NextGen project and mandated by agencies across the globe.

I saw this project in the January 2014 edition of QST written by Robert – W9RAN. He covered building a Collinear Array for the ADS-B frequency of 1090 MHz. I used one of my ham antennas. The RF signal received by the dongle is turned into data packets by a program called ADSB# (included in the SDR# download). VirtualRadar receives those packets, decodes the data, and plots aircraft on Google Maps. This setup can work with a Raspberry Pi and I hope to try this in the future.

adsb-07_browser-06_thanksgiving_travel_and_take_off
Thanksgiving travel in Cleveland, Ohio.

Over the Thanksgiving holiday, I saw 25 aircraft flying around Cleveland on average. I think the most I saw was 48 at once. Not all aircraft have full ADS-B implementations. For example: I would see a call sign but no position data. My receive range (depending on aircraft altitude) was east of Toledo to the PA border and south to Canton. Visit my write-up on this project: ADS-B Decoding with ADSBSharp and VirtualRadar Server.

The second project is a little more complicated but it helped me understand how trunked radio systems work. With the FCC narrowbanding mandate in certain RF spectrum, many public service agencies have decided to “go digital.” In my area the MARCS-IP system and the Greater Cleveland Radio Communications Network are most popular. Both are P25 trunked digital systems. P25 is a specification for voice and data transmission. Trunked radio systems operate by having a radio send data to the control channel requesting communication on a talkgroup. The control channel directs all users of that talkgroup to a specified channel. When the user is done transmitting, all radios switch back to monitoring the control channel for further instructions. This is done seamlessly and allows many users (agencies) to use a small set of radio frequencies. Users only hear the conversations on their assigned talkgroup and not other users on the same system.

dongle-bits-06-p25_trunked_decoding-single_voice_decoder
P25 trunked decoding with a single voice decoder.

Scanners that receive these systems run $500 and go up from there. Using two RTL-SDR dongles and software (mostly free), I’ve been able to receive P25 trunked systems for about $65. One dongle monitors only the control channel and other dongle(s) jump frequencies to receive the digital voice modulation with a program decoding the audio. I can have as many voice receivers as I want whereas a scanner cannot be expanded. Most I’ve heard of is eight. There are some drawbacks like portability. Find out my experiences in my P25 Trunked Tracking post.

Fresh Baked Pi

Raspberry Pi foundation released new models over the last couple months. The biggest news coming at the beginning of February: the Raspberry Pi 2. This model comes with a quad-core CPU and 1GB RAM offering a six times speed improvement, still at $35. Initial reports are it is a lot faster!

Raspberry Pi 2

Along with the new Pi2 came a new version of the Raspbian operating system with optimizations and a new look. In the near future, Microsoft will be releasing a version of Windows 10 Embedded for the Raspberry Pi 2 FREE OF CHARGE! (see the Raspberry Pi 2 link above.)

That’s A Wrap

A goal behind this series has been to expose many hams to newer technologies and younger people to ham radio. These technologies are getting young people interested in experimenting, programming, and even Ham Radio. On podcasts I watch, I’ve heard “I want to get my Ham Radio license” by 20 and 30 year olds like I’ve never heard before. These are young people interested in experimenting, making things, building things, and hacking things — all of which are the foundation of Amateur Radio. Making has evolved into writing software, sending a chip a set of commands and analyzing what is returned, or analyzing packets. Then figuring out “what can I do with this?”

I saw a great technology round-table over the holidays and they talked about getting kids into technology. Many of the methods apply to Ham Radio. As a builder, you build something and presume what will happen. Then something different happens and now you have a mystery to solve. “Why did X happen and not Y?” A new theory develops and sucks you in. This is exactly how the Raspberry Pi, RTL-SDR, and every project surrounding them came to be. It is my opinion that we, as the Amateur Radio community, need to encourage, capitalize, and focus efforts on younger makers and hackers to get them licensed.

As this is my last planned article, I would like to take time and thank the newsletter editors for thinking this series was worth publishing and recreating all the links I included. Thank you to those who told others about this series. I got a ton of feedback and couldn’t be happier that others have found this interesting and sparked them to start experimenting. Most of all, thank you for reading.

P25 Trunked Tracking and Decoding with RTL-SDR, Unitrunker, and DSDPlus

The project that got me really into experimenting with the RTL-SDR dongles is using them to decode P25 digital trunked public service radio systems.  I have been a casual scanner listener for years and like to listen to emergency calls nearby.  In college it was great to listen in on a party weekend hearing fights, disturbances, or why my street suddenly filled with cars at 3 AM.

Narrowbanding

That was when most agencies were analog.  To get more use out of the radio spectrum, the FCC decreed a narrowbanding mandate requiring a “maximum of 12.5 kHz bandwidth across the private land mobile bands between 150-174 and 421-512 MHz.”  This means going digital for much of that radio spectrum because traditional FM transmissions are 15 KHz.  Ironically they will “go digital” but move to 700/800 MHz.

As a casual listener, I wasn’t exactly thrilled with spending at least $500 for a scanner capable of digital (P25 mostly) and trunked system tracking (also Radio Reference wiki).

$40 RTL-SDR trunked scanner

Lurking around the Radio Reference forums, I saw references to being able to use the RTL-SDR dongles for trunked digital decoding.  I had to try it.  I had played around with these dongles and read about the many projects people were doing with them.  In actuality this project cost me $65.

About the project

You will need at least two RTL-SDR dongles ($20/each) and a copy of Virtual Audio Cable ($26).  I already had a premium Radio Reference account.  You can do the project with one dongle but you loose many features in Unitrunker like talkgroup priority.  Theoretically, the single dongle listens to the system control channel and then tunes to voice calls, then back to the control channel.  You will miss calls because that notification comes across the control channel while the dongle was tuned to a voice transmission.  I will cover a two dongle setup and do not plan to cover a single dongle setup.

This project is still very complicated but it is MUCH easier than it used to be.  This manly thanks to Rick, the developer of Unitrunker who implemented support for the RTL-SDR chipset in his program.  Previously, there needed to be a plug-in for both Unitrunker and SDRSharp, there were all kinds of “moving parts.”  In one respect, being able to see the signal waveform on a spectrum analyzer made it much easier to fine tune the PPM correction on-the-fly as opposed to guessing on a modulation scope.  This setup is much cleaner and the Unitrunker developer has implemented advanced features like drift correction.  It will take some time and patience to understand, research, and know the types of systems and system specifics.

There are some advantages like cost and being software based.  Changing modulation types is often as easy as changing programs.  As an example, DSDPlus will decode MotoTrbo as opposed to no standalone scanner being able to do so currently.  However, portability of this setup is limited as you have to have many pieces of equipment with you.  You’ll need an Internet connection to find sites to program and a PC to tweak settings.

Two very specific and key things to note about trunked radio systems in general:

  • You cannot tell the tower your’re listening to which talkgroup you want to monitor.  Doing so would require the ability to transmit and IS ILLEGAL because you are not authorized to do so.  If the talkgroup is not transmitted by the tower, you’re out of luck.  You can’t be in Dayton and tell the system you want to listen to a talkgroup originating from Cleveland.
  • Nothing here (and no program I know of) will defeat encryption, even if you own the keys.  Decoding encrypted transmissions is not implemented in any of these programs.  On the flip side, be aware that using this tutorial and feeding the audio to Radio Reference and Broadcastify may not make agencies happy.  You could get a take-down notice or even worse, it is trivial to turn on encryption at the system level and you just blocked reception for all scanner listeners.

Thanks to those whose tutorials I first used getting this setup working: $20 trunking police scanner and RTL-SDR Tutorial: Following Trunked Radio With Unitrunker.

Program versions

I used a Windows 7 64 bit PC. Applications and versions used in this writeup:

  • SDRSharp: 1.0.0.1330
  • Virtual Audio Cable: 4.14
  • DSDPlus: 1.51
  • UniTrunker: 1.0.30.10

Parts list

Listed below are all the parts needed to get this project working.

  • Computer with some processing and memory horse power.  It is recommended to have a computer with a recent Intel Core i5 processor and 8GB of RAM, or better.
  • Receive antenna that covers 700 & 800 MHz where P25 trunked usually resides. For an external antenna, splitters and coax runs maybe needed.  The stock RTL-SDR dongle antennas worked fine for me.
  • Two RTL-SDR Dongles.  To decode more than one voice transmission, increase the number of dongles needed.
  • Virtual Audio Cable.  Not free but trial version available.
  • Radio Reference account.  Premium account.  If you don’t want to fork over the money, become an audio feed provider.
  • Recommend a USB hub.  Couple years ago I picked up a Rosewill RHUB-300 USB 2.0 Hub 7-Port HUB.  I recommend this hub because when the dongle is plugged in, the antenna connector is pointed up.  This makes it easier to connect an adapter and a Pryme RD-98.  If available, connect the hub to an Intel USB chipset on your motherboard.  I’ve had far less issues using Intel based hardware.

ADS-B Decoding with RTL-SDR, ADSBSharp, and Virtual Radar Server

Update: ADSBSharp (ADSB#) is no longer available and has been deprecated.  Copies can be found by doing some searching.  It is not available from the authors site as described in this post for the RTL-SDR. A program like RTL1090 or Dump1090 (or any of its forks) can be substituted.  The author is focusing on AirSpy devices and ADSBSpy is available from the same site as SDR#.


An interesting project I came across using the RTL-SDR dongle is to decode ADS-B data.  ADS-B stands for Automatic dependent surveillance – broadcast allowing aircraft to be tracked by ground stations and provide situational awareness to nearby aircraft.  It is part of the FAA’s NextGen project and mandated by agencies across the globe.  ADS-B uses a frequency of 1090 MHz.

Thanks goes out to Robert Nickels – W9RAN and his article in the January 2014 edition of QST which covers this project and how to make a Collinear Array for 1090.  HAK5 also did a couple episodes showing how to make an antenna and configure Virtual Radar Server.

adsb-hub-diagram
Block diagram of the ADS-B Hub setup. From: QST, January 2014.

Program versions

I used a Windows 7 64 bit PC.  Applications and versions used in this writeup…

SDRSharp: 1.0.0.1330
ADSBSharp: 1.0.11.1
Zadig: 2.1.0.658
Virtual Radar Server: 2.0.2
SBS Resources: 6.7

Parts list

Listed below are all the parts needed to get this project working.

Antenna with receive coverage of 1090 MHz.
RTL-SDR dongle.

I had a ham radio antenna that I used.  It is the MP Antenna 08-ANT-0860 Ultra Mobile Antenna if you’re interested.  To build an antenna, see the QST article above.  The one that comes with the dongle will work but at short range.

Dongle Bits: Settings, Programs, & Apps for Software Defined Radio

This article appeared in the The Lake Erie Amateur Radio Association newsletter The Spirit of ’76 and ’88 October 2014 edition and The Wood County Amateur Radio Club newsletter CQ Chatter November 2014 edition.

Read the rest of the series in the Dongle Bits articles category.


Last time on Dongle Bits, I talked about the $20 European TV tuner dongle that was hacked allowing direct access to the signal data. The result is a cheap wideband receiver for your computer. We’re going to take a look at key settings you should know about when using these devices. Then look at some software and projects that transform these into systems that would have cost hundreds or thousands of dollars!

PPM and Settings

An important thing to know about these dongles: they are cheaply made and not tested for accuracy. They are designed to receive DVB-T signals at a bandwidth of 6 – 8 MHz where a few KHz error doesn’t matter. This is obviously not true when you’re dealing with FM signals that are 16 KHz wide or digital at 12.5 where a few KHz will put you on a completely different frequency or channel.

PPM stands for parts per million and is the difference in received frequency vs. frequency shown. To visualize this, use SDRSharp to receive a known FM signal. The center frequency shown will be different from the signal on the scope. Typical PPM offset is anywhere from 45 – 65 and will be in the programs settings. The dongle will drift another 2 – 5 PPM over the next 20 – 45 minutes as it warms up. Gain is obviously another setting that will help you receive signals. The RTL AGC setting works but will err on the side of too much gain. Manually, using more than 32.8 dB will overload and produce duplicate signal spikes. The Correct IQ setting will get rid of phantom spikes at lower gain settings.

PPM at 0
Dongle with no frequency correction. The actual 162.550 frequency is just to the left of the displayed frequency. 162.550 is one of the NOAA Weather Radio frequencies.
RTL-SDR Settings (PPM corrected)
Shows the gain and PPM frequency correction of 55 for the dongle I’m using.
PPM Corrected
Shows 162.550 centered with frequency correction applied.

The crystals on the RTL-SDR dongle can be replaced with higher accuracy temperature controlled crystals (TCXO) that have a variance of 1 ppm! These crystals are $10 but you have to wait for them to ship from China. Pre-modified dongles are available but you will pay three times the price for the dongle.

Android

PCs aren’t the only place these SDRs can be used. They can be plugged into an Android device too. You will need a USB OTG cable (on-the-go) and Android 3.1 or later. Search Amazon or EBay for “USB OTG.” OTG is a standard for plugging in USB keyboards, mice, and thumb drives into mobile devices. Running external USB devices off the internal battery will drain it much faster. A powered USB hub would off-load the dongle power consumption. Apps include SDR Touch (wideband receiver program), ADSB Receiver, and SDRWeather for monitoring NOAA weather alerts on your device.

IMG_0003
This is the RTL-SDR running on my Android Nexus 7 tablet with SDR Touch receiving the 146.880 repeater in Lakewood, Ohio. It is connected with a USB OTG cable to the RTL-SDR dongle, then to an MCX to SMA, and then SMA to PL259 adapter.
Screenshot_2014-09-25-21-24-12
This is a screenshot of the above setup with SDR Touch.

What can I do with this thing?

The definitive source on all things RTL-SDR is at the appropriately named www.rtl-sdr.com website. This site has it all. They regularly post software, updates, projects, and new developments. There is something new just about every week.

Some features of RTL-STR.com are The Big List Of RTL-SDR Supported Software. This is the list of software packages that support RTL-SDR on all platforms. Software ranges from wideband receivers to single purpose programs. This will give you some ideas of things to try with RTL-SDR. SDRSharp was written to have plugins extend the functionality of the program. These include plugins that make SDRSharp scan frequencies, add an audio FFT, scope, level meter, or CTCSS (PL) detector.

There is an extensive list of projects and write-ups including an Amateur Radio category. Some interesting ones are receiving live NOAA satellite imagery, analyze cellular phone GSM signals, radio astronomy, signal strength heat mapping (foxhunting?), and how Brazil uses our military satellites to transmit SSTV images.

With the onset of many digital standards and narrowbanding, there are more digital signals out there you may not be able to identify by hearing them or seeing them on the waterfall. This Signal Identification Guide has known types, frequencies they may be heard on, mode, bandwidth, sample audio, and waterfall image. I find myself using the Radio Reference database search utilities to help identify signals and their owners (a premium account maybe needed for some features).

My first SDR project was to use the Raspberry Pi as a SDR remote network server. The Raspberry Pi could be placed in an attic or basement connected to an antenna and controlled by another computer.

Audio can be piped from one program into another using Virtual Audio Cable (VAC). Some time ago, during one of the digital nets on the .76 repeater in Cleveland, I used SDRSharp and VAC to receive the FLDIGI messages being passed on the net. The signal path looked like this: received RF signal (146.760) -> RTL-SDR (signal data) -> SDRSharp (audio out) -> Virtual Audio Cable -> FLDIGI (audio in) -> message decoded on screen. If I had a HackRF, I probably would have been able to transmit messages without using any “ham” gear.

The next and probably final article, I will demonstrate tracking airplanes equipped with ADS-B transmitters and listening to trunked P25 public service radio systems for under $100.

Dongle Bits: RPi B+ and $20 SDR

This article appeared in the The Lake Erie Amateur Radio Association newsletter The Spirit of ’76 and ’88 August 2014 edition and The Wood County Amateur Radio Club newsletter CQ Chatter September 2014 edition.

Read the rest of the series in the Dongle Bits articles category.


Before we begin talking about the RTL-SDR dongle as promised, some big news broke. The Raspberry Pi Foundation released the Raspberry Pi Model B+. They point out this is not a “Raspberry Pi 2” but an evolution of the model B board. Price is the same at $35. Key improvements are:

  • More GPIO: 40 pins with the first 26 pins the same as the Model B.
  • More USB: 4 USB 2.0 ports with better hotswap and overcurrent behavior.
  • Micro SD: SD card socket has been replaced with a micro SD version.
  • Lower power consumption: Reduced power consumption by 0.5W to 1W.
  • Better audio: The audio circuit incorporates a dedicated low-noise power supply.
  • Neater form factor: Aligned the USB connectors with the board edge, moved composite video onto the 3.5mm jack, and added four squarely-placed mounting holes.
Raspberry Pi Model B+

For more details, diagrams, and videos, please visit Introducing Raspberry Pi Model B+. Because of the new configuration layout many accessories for the B board will not work with the B+ board.

Now, RTL-SDRs: RTL-SDR is a term used describe a very cheap software defined radio. Other names for this device are: RTL2832U, DVB-T SDR, or “$20 Software Defined Radio.” RTL refers to Realtek Semiconductor Corp most widely known for their computer IC network controllers, card readers, and very popular High Definition Audio codec used in many laptop and desktop computers.

SDR refers to “software defined radio.” Typically radio components like mixers, filters, amplifiers, modulators/demodulators, and detectors are implemented in hardware level components. In SDRs these components are implemented by way of software running on a PC or embedded system. The most widely known SDR in ham radio is FlexRadio.

RTL-SDR Dongle

The RTL-SDR is a DVB-T TV tuner dongle based on the RTL2832U chipset. DVB-T stands for Digital Video Broadcasting – Terrestrial used in the eastern hemisphere (Europe, Asia, Africa, and Australia) as their over-the-air broadcast standard. In contrast, North America uses ATSC (Advanced Television Systems Committee) standard for digital television transmission over-the-air, cable, and satellite networks (sources: DVB-T and ATSC).

Antti Palosaari, Eric Fry, and Osmocom were hackers playing around with these receivers and found the signal data could be accessed directly. This allowed a cheap DVB-T TV tuner to be converted into a wideband software defined radio via a new software driver and used as a computer based radio scanner. Add in software packages to expand the capability and you have a system that would cost hundreds or even thousands of dollars.

RTL-SDR Internal Hardware

The current popular dongle is the NooElec NESDR Mini SDR & DVB-T USB Stick (R820T). It comes with an antenna that only works well for very strong signals. Yes, it does come with a Remote but you don’t need it for SDR. They guarantee the NESDR will have an electrostatic discharge diode (ESD) in their dongles. This is useful when handling the dongle or traveling where the possibility of frying it is greater. However, as I found out, if you drop one of them upon returning from Dayton you’re better off getting another because it just won’t work the same!

Let’s dive into some specifics:

  • RTL2832U Chipset close-up

    Frequency range: depends on the device and chipsets used. The NooElec NESDR has a receive range of 24 – 1766 MHz. The previous Elonics E4000 hotness covered 52 – 2200 MHz. However, that company went out of business making the dongle rare and more expensive.

  • Sample rate: maximum theoretical sample rate is 3.2 MS/s (mega samples per second). The optimal sample rate (without any dropped samples) is 2.4 MS/s.
  • Analog-to-digital conversion resolution: 8 bits.
  • Input impedance: 75 Ohms. The mismatch loss when using 50 Ohm cabling is minimal.
  • Connector type: most use an MCX connector. The E4000 uses a
    MCX Connector

    PAL connector.

These $20 dongles only receive. Other dongles offer better performance but come at a higher price. The FunCube Dongle is an example of this. HackRF (10 – 6000 MHz) and BladeRF (300 – 3800 MHz) are SDR radios that will transmit over their given frequency range. That’s right, wideband transmit! These are even more expensive at $300 – $650 (sources: About RTL-SDR and Buy RTL-SDR Dongles).

What about HF? The dongles themselves don’t cover HF. There are two options for reception: use an upconverter to receive the frequency and convert it up to a frequency the RTL-SDR dongle can receive. Make a hardware modification to allow “direct sampling mode.” HF upconverters are anywhere from $50 – $100 (cheaper if you build your own) and offer better performance over the hardware mod. KF7LZE has a round-up of HF upconverters.

This quickstart guide shows how easy it is to setup and start receiving signals. Windows users will probably start out with SDRsharp (also written SDR#) to receive signals. Linux users have a couple options; GNURadio being the best though it is unwieldy because you build out the SDR from scratch.

These make it easy to receive FM broadcast (WFM), NOAA weather radio, amateur radio, or public service frequencies that are still analog. I will show uses and applications of these SDR receivers including a reason you might want to get two (or more) dongles. Hint: it’s not to replace one after Dayton!