Friday, January 8, 2016

RTL/SDR Radio project 

 

This is my first blog post about amateur radio. I received my FCC technician license only a couple of weeks ago. I know, I am turning 50 this year...where have I been? There is so much to write about. There is so much more going on in this field than I ever thought. The application of maker activities and the convergence of computer automation, digital signal processing, digital transmission and receive modes, and analog radio technologies is mind boggling.

For an engineer with a science background, it is very encouraging to realize this is all going on in an era when young people are gifted with so many conveniences, and so little motivation to invent or creatively think about anything. When I was first exposed to the IT field, in the late 1970's, there was so much to do, and the possibilities for application to science, engineering, and everyday life were seemingly endless. Given the current proliferation of wireless devices, and the advancing of IoT (Internet of Things) applications, amateur radio has possibilities beyond point-to-point phone comms, contesting, nets, and digital modes and CW keying. There is nothing wrong with any of those things, for the record.

Enough philosophical drivel. As part of my ongoing efforts to both learn about amateur radio, and combine that with my knowledge and experience with Linux and computing technologies, I am putting together a digital radio project that makes use of open source amateur radio projects, software-defined radio, and the Raspberry Pi. The RPi DSP and TX projects are forthcoming in later posts.

As a first step, I am learning about the spectrum, modes, and general parameter twiddling, using a 24MHz - 1.7GHz USB 2.0 RTL-SDR radio receiver (www.nooelec.com/store/sdr/sdr-receivers/nesdr-mini-rtl2832-r820t.html). This is a very cool device, when combined with the wealth of software available from the open source amateur radio community. Using Ubuntu linux (www.ubuntu.com), gnuradio (gnuradio.org/redmine/projects/gnuradio/wiki), libusb (libusb.org), and gqrx (gqrx.dk), I am able to program the dongle, scan frequency bands, pick up HF (down to 12m), commercial FM, VHF, and UHF stations. It only took a few minutes to install and configure the software.

Here are the gory details:

Install Ubuntu (or the Linux distro you love and understand)
I installed all the ham and amateur radio specific packages
 sudo apt-get install -y `sudo apt-cache search 'amateur|ham' \

| grep radio |awk '{printf $1" "}'`
 
 For just the RTL-SDR portion, install the rtl_sdr package, libusb, libusb-dev, gnuradio, and gqrx. You will need to unload and black list the rtl28xx kernel module since it does not play well with the SDR executables:

 rmmod dvb_usb_rtl28xxu && echo blacklist dvb_usb_rtl28xxu > /etc/modprobe.d/rtlsdr.conf

Additionally, the rtl_sdr package will require libusb-dev for the version you have installed, for instance:

root@ham-ubuntu:~# dpkg -l |grep libusb
...
ii  libusb-1.0-0:amd64                                    2:1.0.17-1ubuntu2                                   amd64        userspace USB programming library
...
so...
aptitude install -y libusb-1.0-0-dev

...makes rtl_sdr happy.

There are other UI packages as well, and you can do this all via command line, if desired. I personally like the ability to see the frequency counter, the spectrum analyzer, and the parameters on one screen. It is so 1980's.

The sampling and digital signal processing functions are pretty resource intensive, so an old dusty single-core laptop with 2GB of memory (which is what I am using), is probably a little on the low side of requirements.

This is a great entry into amateur radio, however, and with a bit of heavy lifting in Linux, you can get on the air listening to AM, FM, and SSB phone pretty quickly.

Cheers!
KG5KXO

No comments:

Post a Comment