Hi, Josh,
Thanks a lot! Yes, after reading the rx_multi_samples.cpp, I understand that
each channel has a buffer and they are placed in a vector buff_ptrs.
For people who may want to use this example in the future, you need to add
codes for setting frequency, gain, and antenna. Current example only sets
sampling rate for ALL channels. If you want to tune the channel to a certain
frequency, you need set_rx_freq(freq, chan) for EACH channel; otherwise you
cannot receive what you want as I was stumped.
Pei
------------------------------
>
>Message: 2
>Date: Wed, 07 Nov 2012 09:55:34 -0800
>From: Josh Blum <j...@ettus.com>
>To: discuss-gnuradio@gnu.org
>Subject: Re: [Discuss-gnuradio] Separate samples from 2 receive
> channels
>Message-ID: <509aa096.7090...@ettus.com>
>Content-Type: text/plain; charset=ISO-8859-1
>
>
>
>On 11/06/2012 11:15 PM, Dekst wrote:
>> Hi, All,
>>
>> Can I use one USRP1 and two WBX daughterboards to create 2 concurrent
>> complex receive channels so that I can compare them?
>> If I use the rx_multi_samples.cpp example in uhd to receive samples from 2
>> channels (--subdev="A:0 B:0"), and add several lines from
>> rx_samples_to_file.cpp like
>>
>> outfile.write((const char*)&buff.front(), num_rx_samps*sizeof(samp_type));
>> to record samples in a file, how can I tell which channel a sample is from?
>> Because we have 2 complex receive channels, so the sample order is I_0, Q_0,
>> I_1, Q_1, I_0, Q_0, I_1, Q_1 .... Is this correct?
>> If I read the binary file as complex numbers, then odd complex samples are
>> from channel 0 and even complex samples are from channel 1.
>> Is my assumption correct?
>>
>>
>
>You might want to look at rx_multi_samples.cpp as an example of a
>streamer w/ multiple channels. Basically, the recv() call will fill 2
>buffers in this case, not one. In other words, the data is not interleaved.
>
>I also recommend using the gnuradio companion. You can make a simple
>flow graph with a USRP source with two output stream and simply connect
>2 file sinks.
>
>-josh
>
>> Thanks,
>> Pei
>>
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> Discuss-gnuradio@gnu.org
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>
>
>
>------------------------------
>
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio