Le 08/10/14 20:30, Andreas Hornig a écrit :
> But for me it is not yet clear, what both software do. Because we have
> set both to 16bit and 2MHz sampling. But rtlsdr is half the size of that
> from sdr#. So either 16bit for rtlsdr means, it is two channels with 8
> bit each and two channels with 16 bit each for sdr#, or there is
> something else.

I don't know for SDR# but the rtl_sdr version I use outputs 8 bits I/Q's
straight from the dongle.  The code looks like this :

> while read(buf)
>        write(buf);

So, you get 16 bits per sample : 8 'I' bits and 8 'Q' bits (I am not
sure which comes first...).  You can check this by recording one (or
ten) second(s) @ 2 MHz.  You'll get a 4 (40) megabytes file.

Now, there is the question of what's in those 8 bits...

It seems that the rtl_sdr/dongle's output *is not* (signed char)
https://en.wikipedia.org/wiki/Two%27s_complement
but a 'shifted' unsigned char value (x+127 or 128).

You can see the twist in an old (?) GNU_Radio module
  http://sdr.osmocom.org/trac/attachment/wiki/rtl-sdr/rtl2832-cfile.png
        (in http://sdr.osmocom.org/trac/wiki/rtl-sdr)
(I think that there is a single module that inputs rtl_sdr I/Q's and
outputs floats now (or that GNURadio rtl_sdr driver outputs complex floats)

It is probably not easy to spot it in the raw output but if you
transform I/Q in phase/magnitude you'll be able to plot the wave and
check it is ok.

I don't know if there is something in GNU Octave to read rtl_sdr format
but it would be usefull.  (Octave has a wavread() function; it would be
nice to have a tutorial on how to read rtl_sdr I/Q's (from .wav or raw),
transform the I/Q stream in phase/magnitude, filter,...; in one word,
make something usefull with the data)


xof

Reply via email to