Building a Ham Transceiver with an RTL-SDR, Raspberry Pi and Rpitx

A few days ago we posted about RpiTx, a piece of software that allows you to turn your Raspberry Pi into a multi purpose transmitter by modulating the output on one of the GPIO pins.

Now over on YouTube user HA7ILM has uploaded a video showing his related software qtcsdr. Qtcsdr runs on the Raspberry Pi and interfaces with an RTL-SDR dongle and RpiTx to create a simple transceiver radio. In the video HA7ILM shows the software in action by using a microphone and RTL-SDR plugged into the Raspberry Pi, and showing the microphone transmitting via RpiTx and being received via the RTL-SDR.

Qtcsdr can be downloaded from https://github.com/ha7ilm/qtcsdr.

As always with this type of thing only transmit if you are licensed and take care with the transmitted distance and filter the antenna output when transmitting over a distance that is further than your room. Also regarding this, on the qtcsdr GitHub page the author mentions that a Raspberry Pi shield called the QRPi filter + amplifier is currently in development (white paper).

QTCSDR Control GUI
QTCSDR Control GUI

21 comments

  1. Robert Lang

    Hi Tim.
    Thanks for the comment.
    Yes I’ve already tried all you have suggested, but I get the same issue Tx greyed out. It’s like RPiTx isnt communicating with the rest of the software. Not sure why, It’s possible I’ve done something wrong in the software set up…. I’m not a Linux guru unfortunately.
    Thanks anyway.
    Rob. (0FJV)

    • Tim

      try typing rpitx on any cmd line and directory. I get a text response… How about you. My rpitx directory is up in my home dir.

  2. Robert Lang

    hi I’ve installed qtcsdr on my pi2. The software reports as OK but the TX key is not accessible It’s there,but in light grey characters so i assume the software is missing something? The audio test works fine. programme starts fine. RX works fine, just cant switch to TXmode.I’ve infact loaded the software on to a second pi with the same results. I’m using a CM108 based stick.
    Any Suggestions?
    Many thanks.
    RobLang (GW0FJV)

    • Tim

      I don’t have the unit in front of me but I recall this maybe like a half duplex thing. You have to stop receiving by hitting the button then the XMit button will ungrey…

  3. Steve Gladden N8LBV

    I see lots of hype about making sure you have a filter on the GPIO output.
    I’ve been running a beacon on 2M FM 145.150 on A Raspberry Pi Zero running RPITX with a “properly matched” antenna
    cut to length and the whole thing is sitting in the front window.
    I am 100% sure I’m on the proper output pin the Antenna wire is soldered on nicely and the range on the fundamental output barely makes it to the end of the front yard 50 feet away line of sight.
    There’s not enough power here to be worried about even on the fundamental output let alone anywhere else.
    Can’t hear it at all down the road 150FT away and the 2nd and 3rd harmonics are way down from the fundamental.
    I guess if an amp were applied it would be a concern.
    But directly on the pin?
    hardly anything to worry about.

  4. David

    Hi,
    i am just trying to start the rpi-test.sh on my raspberry pi 3
    The 820T2 usb device is well detected.
    For the audio device i installed an external usb sound card (as suggested)
    I can see it in the list of device, but when i select it it doesn’t work.

    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM 0
    arecord: main:722: audio open error: File o directory non esistente

    The device is detected it has DEV=0.
    But also bcm2835 ALSA, bcm2835 IEC958/HDMI has DEV=0

    Here is what i get:

    Do you have your RTL-SDR and an USB audio card connected? [y/n] y
    Installing deps…
    Found 1 device(s):
    0: Realtek, RTL2838UHIDIR, SN: 00000001

    Using device 0: Generic RTL2832U OEM
    Found Rafael Micro R820T tuner
    Sampling at 2048000 S/s.
    Tuned to 100000000 Hz.
    Tuner gain set to automatic.
    Reading samples in async mode…
    0000000: aa83 7a6f 8f9b 7968 7f67 afab 647c 443e ..zo..yh.g..d|D>
    0000010: 508d 7d96 617c 8674 887f 73a8 685a 6bad P.}.a|.t..s.hZk.
    0000020: 3ea0 985e a05d 5a79 6085 6c7e 8583 a66c >..^.]Zy`.l~…l
    0000030: 6535 6d77 7c60 6a23 8c7f 48ab 589f 7aa5 e5mw|`j#..H.X.z.
    0000040: 8386 8a80 7481 829d 7a95 645e 9178 5657 ….t…z.d^.xVW
    0000050: 675d bb5a 697c 929e 626d 4c74 8380 a253 g].Zi|..bmLt…S
    0000060: 6d96 9890 6468 6e8b 71a1 8283 5672 7799 m…dhn.q…Vrw.
    0000070: ac86 5f5e 8a66 7b64 67b2 5f44 6288 3fa8 .._^.f{dg._Db.?.
    0000080: 777e d59c 76ac 9e71 af73 8053 7d84 863e w~..v..q.s.S}..>
    0000090: 8154 58a3 784f 9e8b 8987 5553 908d 6ca4 .TX.xO….US..l.
    Signal caught, exiting!
    Signal caught, exiting!
    Short write, samples lost, exiting!

    User cancel, exiting…

    RTL-SDR is okay!
    Press any key to continue.

    Now I will list all the ALSA devices on your system.
    You will have to choose one USB audio device ID.

    Entries will look something like this:

    hw:CARD=Device,DEV=0 <==== This is the device ID of the entry; you will need this.
    USB PnP Sound Device, USB Audio
    Direct hardware device without any conversions

    Press any key to list the devices.
    null
    Discard all samples (playback) or generate zero samples (capture)
    pulse
    PulseAudio Sound Server
    sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
    dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
    dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
    dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
    dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
    hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
    hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
    plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
    plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions
    sysdefault:CARD=Device
    USB PnP Sound Device, USB Audio
    Default Audio Device
    front:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Front speakers
    surround21:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
    surround40:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    iec958:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
    dmix:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Direct sample mixing device
    dsnoop:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Direct sample snooping device
    hw:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Direct hardware device without any conversions
    plughw:CARD=Device,DEV=0
    USB PnP Sound Device, USB Audio
    Hardware device with all software conversions

    Please enter the chosen device ID: 0

    Now we will try to record 15 seconds of audio from the microphone input.
    Press any key to continue.
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM 0
    arecord: main:722: audio open error: File o directory non esistente

    Now we will play back the recorded audio on the headphones output.
    Press any key to continue.
    ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM 0
    aplay: main:722: audio open error: File o directory non esistente
    Was the playback okay? [y/n]

    What shell I do ? Disable all sound cards?
    How can i get that?

  5. Todd

    Just a heads up about the transmitters output, it;s a square wave and will cause insane amounts of harmonic imaging up and down the spectrum. That will get you busted right quick.
    In order to correct this before the signal is amplified you need to convert the square wave into a sine wave and then run that through a band pass filter to kill any harmonics. Only after that is it safe to amplify.
    Also, a word of warning: ONLY TRANSMIT IN BANDS YOU ARE LICENSED TO TRANSMIT IN!
    In most places (NOT all) you can run an FM broadcast as long as it is under 100mW ERP, that doesn’t mean at the antenna jack, that means WITH antenna gain included.
    Know the laws in your country before trying this, and know that people like me, licensed radio amateurs and other band users, WILL turn you in if you stomp all over our bands. You will also be turned in if you don’t take the above suggestion and clean up the tx signal before amplifying, but likely it will be several band user across the spectrum doing it instead of just one or two in a specific band.
    Just a friendly little heads up.

  6. Paul Danilchik NT7U

    Kudos to those who are coming up with these very creative solutions. I’ve been trying to mangle (massage) a RPi into being the core of a SoftRock based SDR transceiver. To me that would be a solid path for using a Pi as a reliable HF rig or Panadapter (SoftRock Lite II IF). In that type of setup, the biggest obstacle seems to be how to get the I/Q channels into (and out of) the RPi with minimal latency and without the burdens and performance issues of a USB Soundcard. USB Soundcards that are going to perform well cost more than the RPi itself. That normally leads me to thinking that it is wiser to put Linux on an old Intel Mac Mini as they have great stereo in/out built in and are often had on the cheap. All that said, I just found this which seems to be a significant building block for the RPi-SoftRock solution:
    There is a KickStarter campaign running now that will put 96KHz 32bit stereo audio in and out onto the RPi via the i2s interface using the existing, built-in kernel drivers of Raspbian. So I’ve pledged for three of them and fingers crossed that others do similar and make this project a reality. If you are interested, just do a search on KickStarter.com for either “audio injector” or “flatmax”.
    Maybe this forum will let me put a link…
    https://www.kickstarter.com/projects/1250664710/audio-injector-sound-card-for-the-raspberry-pi
    Hopefully this project works well and spawns the advancement of Raspberry Pi SDR HF Transceivers.
    73, Paul NT7U

  7. Tim Urberg

    Any progress in adding an offset for upconverters? This would be great as I have a nice setup for this. Thanks!

  8. Larry Dighera

    Thank you for qtcsdr. Very much appreciated.

    Does anyone have diffs for compiling qtcsdr on the new Raspberry Pi 3 under Raspberrian Jessie (NOOBS release)? Please reply here, as well as e-mail to: [email protected]

    ADVthanksANCE
    Larry
    WB6BBB

    • Larry Dighera

      Correction: qtcsdr appears to run just fine on the RPi3 despite compile time errors. No external USB sound card required. I’ve only tested reception at this time.

      • James J

        Hello, I’m very new to using the Raspberry Pi with SDR radio, I’m interested in using the Pi3 for radio reception only and wanted to know is the QTCSDR software available in a binary format or do I need to compile it myself if I need to compile what is the syntax for doing so? Any and all help regarding this project will be greatly appreciated.

        • Larry Dighera

          You have to compile qtcsdr. Under Debian Jessie it compiled on the first try. Just follow the instructions in the README file. There are scripts included to build it. The author, András Retzler, is responsive to polite inquiries.

  9. Be Zijlstra

    Hallo I just a beginner with PI B2 so don’t now verry much about this.
    Since 1973 working on Ham Radio freqence with license.
    Now i am very interresting about receiving and transmitting on hamradio bands with my PI.
    I build my own SDR TRX but i want to build a PI inside my SDR-TRX and also want to use a LCD TFT
    with it.

    Be Zijlstra Holland (PA0BZC on QRZ.COM)

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>