Greetings,

Using the latest gnuradio/next v3.3.1git-865-gd429522b and UHD from
yesterday (commit c14bbffbebb817fc1c622785094268fe68164c60) I get
thread[thread-per-block[0]: <gr_block uhd single_usrp source (1)>]:
caught unrecognized exception
whenever I call the gr.top_block.unlock(), stop() and maybe also
wait() functions.

I have attached a simple Python script which triggers this exception.
I am using USRP1 and the exception occurs with both WBX and RFX2400
daughterboards

I didn't notice any side effects. The receiver code where I discovered
this performs some reconfiguration of the flow graph between lock()
and unlock() and it continues to function after the exception.

My previous reference is v3.3.1git-832-ga2262b6b from Jan 11 and UHD
b4d58f3501596fdddf240d576d0b1b2cb5862892 where this issue did not
occur.

Alex
#!/usr/bin/env python
#

from gnuradio import gr
from gnuradio import uhd
import time



class my_top_block(gr.top_block):
    def __init__(self):
        gr.top_block.__init__(self)

        self.u = uhd.single_usrp_source(device_addr="",
                                        io_type=uhd.io_type_t.COMPLEX_FLOAT32,
                                        num_channels=1,
                                       )

        self.u.set_subdev_spec("A:")
        self.u.set_samp_rate(250000)
        self.freq_range = { "start" : self.u.get_freq_range(0).start(),
                             "stop"  : self.u.get_freq_range(0).stop(),
                             "step"  : self.u.get_freq_range(0).step()
                            }
        r = self.u.set_center_freq(float(self.freq_range["start"] + self.freq_range["stop"])/2, 0)
        if r:
            print "TIF:", r.target_inter_freq, " AIF:", r.actual_inter_freq, " TDF:", r.target_dsp_freq, "ADF:", r.actual_dsp_freq
        else:
            print "Failed to set frequency to ", self._freq


        self.u.set_antenna("RX2", 0)

        self.sink = gr.null_sink(gr.sizeof_gr_complex)
        
        self.connect(self.u, self.sink)



if __name__ == "__main__":
    tb = my_top_block();
    
    print "Start"
    tb.start()
    
    print "Sleep 2 sec"
    time.sleep(2)
    
    print "Lock"
    tb.lock()

    print "Sleep 2 sec"
    time.sleep(2)

    print "Unlock"
    tb.unlock()

    print "Sleep 3 sec"
    time.sleep(3)
    
    print "Stop"
    tb.stop()
    
    print "Wait"
    tb.wait()

    print "Sleep 3 sec"
    time.sleep(3)

    print "Start"
    tb.start()

    print "Sleep 3 sec"
    time.sleep(3)
    
    print "Stop"
    tb.stop()
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to