TCP/UDP Input stream

379 views
Skip to first unread message

monkeyBreaker

unread,
Jan 7, 2021, 3:42:27 AM1/7/21
to Gqrx SDR
Hello everyone,

I'm currently using gqrx with uhd devices and it works like a charm.
I have now  a new project and in this one I have as input an I/Q stream via TCP or UDP.
Currently in order to view the spectral signal, I use gnuradio-companion with the following blocs:

* TCP or UDP Source
* QT GUI Frequency Sink

My question is that right now I didn't find if it's possible to have this kind of input with gqrx. I would like to not use gnuradio-companion if possible.

Looking into the different drivers currently supported, the one that seemed to me to allow me to support this is: "osmo-sdr:rtl-tcp".

I tried this, I thought it worked, but after a couple of seconds the display freezes. I don't know if I made something wrong. But a concern I have with this, is that it seems I cannot configure the type of message (complex float, complex double).

Anyway, summary:
* Is it possible with gqrx to have an IQ input stream using UDP/TCP
* If not possible out of the box, does any of the current drivers in gqrx support TCP/UDP streams ?

Thank you for any help/suggestion you can provide me with.

Best regards,
Julián

Roger David Powers

unread,
Jan 7, 2021, 11:22:19 AM1/7/21
to gq...@googlegroups.com
Hi, Julian.

In this situation I have used SoapyRemote which provides the SoapySDRServer program to read data from the radio and make it available as IQ samples on a TCP/IP stream.  One nice thing about Soapy is uses a discovery protocol (Rendezvous I think) so it's easy for GQRX to find radios anywhere on your local area network.  It seems Soapy does support UHD ( https://github.com/pothosware/SoapyUHD ) but I do not have a UHD radio so I have never tried it.

What I have tried is running the pisdr image on a Raspberry Pi 3b connected to an airspyhf+ radio via USB.  The RPi is directly connected to the WiFi router in my house using wired ethernet because it's more reliable that way.  Then I can use my laptop anywhere in the house to run gqrx which can discover the radio via WiFi and connect to it just by using the drop down menu.  Or, if I want, I can just connect a monitor to the RPi and run gqrx on the RPi which also works well.

Here are some of my notes on that configuration: https://github.com/RDPowerz/SdrAdvice/blob/main/sdr-pisdr-remote-advice.txt

HTH,
RDP.


monkeyBreaker

unread,
Jan 8, 2021, 3:05:19 AM1/8/21
to Gqrx SDR
Hi RDP,

Thank you for your answer.

Sorry if my message was misleading, I do not use for this new project a UHD device. I have a device that just sends me raw I/Q data through TCP or UDP. I can choose the format of the data and the protocol used.
If I go with your SoapySDR solution, I need to implement a SoapySDRServer between my raw I/Q stream and gqrx, is that right ?

Well I was hoping to have a solution without the need to implement anything specific but to just support a stream like I currently achieve with gnuradio-companion.

Could a driver that support this kind of trivial stream be implemented for gqrx ? I could have a look if this could be possible. Or is there any technical issue I'm not aware of to support this kind of streams ?

Have a nice day,
Julián

Roger David Powers

unread,
Jan 8, 2021, 10:44:01 AM1/8/21
to gq...@googlegroups.com
Hi!

Ahh, I see what you are trying to do.

In gqrx you can read IQ from a file:

Inline image


So the problem is: how to I get a TCP/IP stream to look like a file?

In the past I have used the 'ncat' program on Linux to read from a TCP/IP stream and write to a "named pipe" or "UNIX domain socket" I made in /tmp., then have "gqrx" read from the named pipe.

Sorry, I don't have time to provide more details now, but maybe this and some googling for ncat examples can help you.

Regards,
RDP

--
You received this message because you are subscribed to the Google Groups "Gqrx SDR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gqrx+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gqrx/6d285b0e-11fd-422a-b422-c18ba1f05620n%40googlegroups.com.

righthal...@gmail.com

unread,
Jan 9, 2021, 4:31:57 PM1/9/21
to Gqrx SDR
SdrGlut has a utility program call Listen that captures the TCP/IP I/Q data send to it by SdrGlut. Changing a few lines of code in the Listen program would permit it to save your data to disk or play any AM ,FM, NBFM, USB or LSB that in the I/O data.

monkeyBreaker

unread,
Jan 10, 2021, 2:47:50 PM1/10/21
to Gqrx SDR
Hi!

Thank you for the answers !

@RDP, thank you for the suggestion about using a named pipe, I didn't think about that. I can look how to do it, hope it does work without to much trouble :).
@righthalfplane I didn't know about SdrGlut, I'll try your suggestion if the named pipe suggestion doesn't work.

I'll let you know if any suggestion produced something that satisfies my needs !

Best,
Julián

monkeyBreaker

unread,
Jan 18, 2021, 2:45:27 AM1/18/21
to Gqrx SDR
[Update]

Thank you again for the help.
The named pipe solution worked well. Thank you @RDP :) ! Also, thank you @righthal for your suggestion.

Last question, would it make sense to have this directly integrated in gqrx (TCP/UDP driver) ?


Have a nice day,
Julián

Reply all
Reply to author
Forward
0 new messages