Quick and dirty NFM transmitter in GNU Radio

Since getting my amateur radio license a while back I haven't made much use of it, so yesterday I decided to try and do something about that. Unfortunately the handheld Yaesu VX-6E I ordered four weeks ago hasn't arrived yet, so I decided to go an alternate route: figure out how to transmit narrowband FM using the HackRF One. The goal of the evening would be to get a conversation (QSO) going via the local VHF repeater on 145.650 MHz.

Some digging around on the Web showed that this is possible, but only as a transmit-only thing. Two-way communication is still tricky. GRC might not be a good enough tool for switching between TX and RX on a simplex device like the HackRF.

I eventually managed to cobble together a reasonable GNU Radio flow graph. After some poking around, with SA2KNG listening for my attempts at reaching the outside world, we figured the transmit power was too low, since even something very narrow like CW (Morse) was barely making it through the \~5 km distance from my location to Umedalen.

More digging around revealed that the RF amplifier on the HackRF may have some issues, and that there is an IF amplifier as well. Changing the IF amplifier setting from the default of +20 dB to the maximum of +47 dB made my signals go through quite well. It was time for the next part of my plan: activating the local repeater.

Activating the repeater simply means transmitting a 1750 Hz tone, which was relatively simple to extend the flow graph to do. The result was people on IRC noting that there's a hell of a lot of beeping going on on the repeater. But I wasn't hearing it. Why?

The answer turned out to be that the RTLSDR USB stick I was using for listening (via gqrx) was not picking up the repeater, but only my outgoing signal. A quickly constructed antenna (from a piece of TV coax) fixed that problem, and I was now able to repeat the experiment. I also added some courtesy features to the flow graph (push-to-talk, tone generator on/off). The end result was a successful (if noisy) QSO with SA2KNG. Success!

Picture time:

Transmitting antenna: 2 m/70 cm dipole

Transmitting antenna: 2 m/70 cm dipole

Receiving antenna: a 2 m dipole made from a piece of TV

Receiving antenna: 2 m dipole made from a piece of TV coax

HackRF One and ezcap DVB-T FM DAB

SDRs. HackRF One and ezcap DVB-T FM DAB (RTLSDR)

GNU Radio notes

Some random notes about GNU Radio while I'm at it:

There doesn't seem to be an easy way to implement a push-to-talk feature. For now I have hacked one together using a GUI slider that controls a "multiply const" box. The slider can only have the values "0" or "1", so it can be moved by tabbing to it in the UI and pressing the left/right arrow keys. I implemented a similar slider hack for enabling the 1750 Hz tone generator. Another problem is having to use an RTLSDR dongle for RX. I suspect this may be possible to fix by setting up a flow graph with both an RX and TX part, then enabling/disabling the relevant parts using some python code. The same python code could also read the keyboard, and maybe switch channels.

Here's my code here in case someone else finds this interesting: nbfm-tx.grc. I've also attached a picture of the flow graph below:

flow graph in picture

GRC flow graph in picture form


Juan Antonio, June 8, 2016 at 4:52 pm

Hi, i have been studyinmg your flowgraph and experimenting, but when i laucnh it, it begins to tx(red led in hackrf is lit) and when clicking on the slider to kick off the ptt, it stays on all the time. Is neccesary to get the slider connected to another block somehow? Thanks in advance!!!

tomas, September 3, 2016 at 2:09 am

This one is TX only (no RX in the flowgraph). I have other experiments which are able to switch between TX and RX, but it is very awkward. I brought this up in #gnuradio a while back, but there was no good way to fix it. What I’d like is a bidirectional block in GNU Radio Companion with a PTT input..

RX is done with RTL-SDR, if that wasn’t apparent.