3

I'm starting my project which is simply about reading the I/Q data from SDR Radio software like GNU Radio as an input for my own application. I thought about using the pipe command to do so, but don't really know how to use it in this case. Another idea is to get I/Q data directly from sound card.

I would like to ask you what is the most effective way to get these data. Thanks.

Jonas
  • 121,568
  • 97
  • 310
  • 388
r.a.m-
  • 499
  • 5
  • 12
  • If you are using the inexpensive RTL dongles, You can use rtl_sdr to record, copy the file using any means (ftp, ssh, etc.), and either read the file directly or transform it for use with gnu radio, gqrx, etc. See http://stackoverflow.com/questions/25587959/bin-to-cfile-flowgraph-for-grc-3-7-2-1/26356074#26356074 --- Also http://ham.stackexchange.com/questions/2113/how-to-play-spectrum-recordings-made-with-rtl-sdr-in-gqrx/2227#2227 – Paul Oct 28 '14 at 11:18
  • If you need to move I/Q data over a network, I'd recommend a wired connection. Also, though it will be more work, using UDP could be more elegant and faster than current TCP-based solution. The reason being that if you want to listen real time, and you miss some I/Q samples, it is better to play a little noise or garbage than to fall behind on data rate. UDP is packetized, either arrives or doesn't. TCP creates well ordered streams, and retries missing packets, at a cost of delay. But TCP is highly reliable and so most transfer is based on that. – Paul Oct 28 '14 at 11:31
  • I dont really need to transfer it via network by TCP/UDP. What i need is to read I/Q on the same machine by my app which will be designed to decide what kind of modulation is used on the chosen frequency. For example i want to know what modulation is used on 98,5 MHz. – r.a.m- Oct 28 '14 at 18:03

1 Answers1

3

Named pipes are a very common way to do this. The concept is simple. First, you create a named pipe using the mkfifo command:

$ mkfifo my_named_pipe
$ ls -l
prw-rw-r-- 1 user user    0 Dec 16 10:04 my_named_pipe

As you can see, there's a new file-like thing with a 'p' flag.

Next, configure your GNU Radio app to write to this pipe (i.e. by using a file sink or file descriptor sink). Then, all you need to do is configure your app to read from this file. Note that the GNU Radio app and your app need to run at the same time.

Of course, you could consider simply writing your app in GNU Radio. Using Python blocks, it's very easy to get started.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
mbr0wn
  • 1,339
  • 1
  • 10
  • 12