Re: howto to set the mux in usrp1

Hm,

with this

self.u_rx.set_subdev_spec(“A:A A:B”,0)

I get a segfault:

#!/usr/bin/python

from gnuradio import gr
from gnuradio import uhd
from gnuradio.eng_option import eng_option

class build_block(gr.top_block):
def init(self):
gr.top_block.init(self)

    self.u_tx = 

uhd.usrp_sink(“serial=47432785”,uhd.stream_args(‘fc32’))
self.siggen_tx =
gr.sig_source_c(self.u_tx.get_samp_rate(),gr.GR_CONST_WAVE,0, 1.0, 0)

self.head_tx = gr.head(gr.sizeof_gr_complex, 1000000)

    self.head_tx   = gr.head(gr.sizeof_gr_complex, 1000)
    self.u_tx.set_subdev_spec("A:AB",0)
    self.u_tx.set_center_freq(10e6)
    self.u_tx.set_samp_rate(1e6)
    self.u_tx.get_samp_rate()


    self.u_rx = 

uhd.usrp_source(“serial=47432785”,uhd.stream_args(‘fc32’))

self.u_rx.set_subdev_spec(“A:A B:A”,0)

    self.u_rx.set_subdev_spec("A:A A:B",0)
    self.u_rx.set_center_freq(10e6+1e3)

self.u_rx.set_samp_rate(250e3)

    self.head_rx_0 = gr.head(gr.sizeof_gr_complex, 1000)
    self.dst0 = gr.file_sink(gr.sizeof_gr_complex, "r.dat")

self.di = gr.deinterleave(gr.sizeof_gr_complex)

    self.connect (self.siggen_tx,self.head_tx, self.u_tx)
    self.connect (self.u_rx,self.head_rx_0,self.dst0)

tb = build_block ()
tb.run ()

Wolfgang