Decoding NRSC5 HD Radio with GNU Radio and a HackRF

Thank you to "LikWidChz" for submitting his tutorial on receiving and decoding multiple NRSC5 (HD Radio) channels with the help of GNU Radio, a HackRF and the NRSC5 decoder. He writes:

I wanted a way to utilize GnuRadio for working with HD radio. There are no decoder blocks from within GnuRadio to perform this decoding without an external application. This write up is how I was able to split up some signal and supply NRSC5 what it requires to perform the decode.

My goal was to capture some slice of spectrum and "channelize it" so I can perform multiple HD radio decodes at once.

In this linked zip file we have uploaded his GRC file, and his tutorial PDF, which fully explains each GNU Radio block used, and how to use the NRCS5 decoder along with the flowgraph. He also notes that if anyone wants to get in touch with him he is idling on IRC in #gnuradio and ##rtlsdr on freenode under the nickname "LikWidChz".

Channelizing NRSC5 in GNU Radio
Subscribe
Notify of
guest

6 Comments
Inline Feedbacks
View all comments
Steven Sostrom

I am using a Rasperry Pi 4 and SDRplay RSP1A. Gnuradio_NRSC5 does basically work with it through osmosdr. It defaults to my RSP1A and does not use my HackRF.

My RF gain control does not work. I did get if_gain to work, but I had to change the values to negative numbers (start -59 stop -20 step 1)
RF gain does not work with the default values or with negative numbers.

This message appears only when changing rf_gain,
[WARNING] set_gain() is deprecated – please use set_gain(name) instead
This does not appear for if_gain or bb_gain.

I changed the path of the File sink, as the user in that path did not exist on my system.
When I run nrsc5 -r sink 0 it does play after a few seconds, but it will sometimes play the sound faster than normal and will exit, apparently when it reaches the end of the file. It does eventually play at the normal speed.
The pdf document says that the graph should only run once something tries to access that sink file. However, I get a window with controls and a couple of displays that show what is tuned at the moment, live.
The file “sink” will continue to grow in size until the Gnu Radio application is closed and will be overwritten when it runs again.

Occasionally, everything will freeze and it will print a series of these messages:
[WARNING] _buf_ready.wait() timeout in _buf_transfer()
Maybe I need to reduce the sample rate below 10 MHz.

The SDRplay Gnu Radio blocks mentioned in these comments are old.
There are new ones, but they are only for Gnu Radio 3.9, and that is another project for me.

I am able to use nrsc5 with the rsp_tcp server, but there are issues with choppy audio. I don’t know if it is caused by the rsp_tcp server or something else.

I’m new to GNU Radio Companion, so any help will be appreciated.

—-Steve

Robert Swirskyu

Thanks! I had no problem making this work with a BladeRF as well.

DarkStar

So are there plugis for SDR that can be used to lock in and listen to these?

Jon hudson

SDRplay GNU radio source locks are available: https://www.sdrplay.com/docs/gr-sdrplay-workflow.pdf

Nate

Oooo, an automated way to trawl the FM broadcast band, and update all the HD metadata (and maybe also log the RBDS info) would be pretty cool.

Günter Lorenz

Excellent work! I would be interested in data output, like channel labels, identifiers, call signs, whatever is there, plus some metadata. It would be a great input for the radio station database at fmlist.org which already now is the most up-to-date database also of HD radio subchannels-