Only zeros in dual-channel-mode

I am trying to build a network analyzer using usrp and LF RX/TX- so i
need
one TX and two RX-channels. However I only get noise lcose to zero on
the
secon channel:

Here is what I am doing in the RX_path (in brief). Maybe somebody can
spot
the mistake:

    self.rx = usrp.source_c(0,decim_rate=128,

fpga_filename=“std_2rxhb_2tx.rbf”)
self.rx.set_nchannels(2)
self.di=gr.deinterleave(gr.sizeof_gr_complex)
self.dst_r = gr.file_sink(gr.sizeof_gr_complex, “test_r.dat”)
self.dst_t = gr.file_sink(gr.sizeof_gr_complex, “test_t.dat”)

    self.rx_r_subdev = usrp.selected_subdev(self.rx, (0,0))
    self.rx_r_subdev = usrp.selected_subdev(self.rx, (1,0))

    self.rx.set_mux(gru.hexint(0xf0f0f0f0)) # expecting to get port 

A of
side A on both channels

    rrx_r = self.rx.tune(0, self.rx_r_subdev, 10e6+1e3)
    rrx_t = self.rx.tune(0, self.rx_t_subdev,  10e6+1e3)

    self.head_r = gr.head(gr.sizeof_gr_complex, 1000)
    self.head_t = gr.head(gr.sizeof_gr_complex, 1000)
    self.connect(self.rx,self.di)
    self.connect((self.di,0),self.head_r, self.dst_r)
    self.connect((self.di,1),self.head_t, self.dst_t)
    self.connect (self.siggen, self.tx)

I get nice data in test_r.dat but only noise close to zero in test_t.dat

View this message in context:
http://www.nabble.com/only-zeros-in-dual-channel-mode-tp14525372p14525372.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Eric B. wrote:

    self.rx_r_subdev = usrp.selected_subdev(self.rx, (0,0))
    self.rx_r_subdev = usrp.selected_subdev(self.rx, (1,0))

Looks like a typo here ^ you’re setting rx_r_subdev twice

Correct. This is not as in the code I tested.!

Also, how many LF_RX’s do you have? Two? or are you using one, and
treating the two inputs as separate channels. If you’re using two,
then the lines above are OK, otherwise they should be
(0, 0)
(0, 1)

I do have 2 LF_RX

    self.rx.set_mux(gru.hexint(0xf0f0f0f0)) # expecting to get port A

of
side A on both channels

OK, but I’m not sure I see why you’d want to feed the same A/D to both
DDCs…

Just for testing. I have tried settings like 0xf3f2f1f0 as well.

    rrx_r = self.rx.tune(0, self.rx_r_subdev, 10e6+1e3) 
    rrx_t = self.rx.tune(0, self.rx_t_subdev,  10e6+1e3) 

One of these should be tune(1, …)

O.k.! I fixed that, but with no success.

Note that in general tune won’t work correctly for more than one
channel. Since you’re using LF_RX, you’re probably OK.

As I am setting both DDCs to the same freq anyway - should I skip on eof
the
tune-statements?

Here is the entire code:
http://www.nabble.com/file/p14532952/my_both.py my_both.py

Wolfgang

View this message in context:
http://www.nabble.com/only-zeros-in-dual-channel-mode-tp14525372p14532952.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Fri, Dec 28, 2007 at 04:50:36AM -0800, wolfgang buesser wrote:

    self.rx.set_nchannels(2)  
    self.di=gr.deinterleave(gr.sizeof_gr_complex) 
    self.dst_r = gr.file_sink(gr.sizeof_gr_complex, "test_r.dat") 
    self.dst_t = gr.file_sink(gr.sizeof_gr_complex, "test_t.dat") 

    self.rx_r_subdev = usrp.selected_subdev(self.rx, (0,0))
    self.rx_r_subdev = usrp.selected_subdev(self.rx, (1,0))

Looks like a typo here ^ you’re setting rx_r_subdev twice

Also, how many LF_RX’s do you have? Two? or are you using one, and
treating the two inputs as separate channels. If you’re using two,
then the lines above are OK, otherwise they should be

(0, 0)
(0, 1)

    self.rx.set_mux(gru.hexint(0xf0f0f0f0)) # expecting to get port A of

side A on both channels

OK, but I’m not sure I see why you’d want to feed the same A/D to both
DDCs…

    rrx_r = self.rx.tune(0, self.rx_r_subdev, 10e6+1e3) 
    rrx_t = self.rx.tune(0, self.rx_t_subdev,  10e6+1e3) 

One of these should be tune(1, …)

Note that in general tune won’t work correctly for more than one
channel. Since you’re using LF_RX, you’re probably OK.

    self.head_r = gr.head(gr.sizeof_gr_complex, 1000) 
    self.head_t = gr.head(gr.sizeof_gr_complex, 1000) 
    self.connect(self.rx,self.di) 
    self.connect((self.di,0),self.head_r, self.dst_r) 
    self.connect((self.di,1),self.head_t, self.dst_t) 
    self.connect (self.siggen, self.tx)

I get nice data in test_r.dat but only noise close to zero in test_t.dat

Eric

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs