[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory
From: |
Johannes Schmitz |
Subject: |
Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory |
Date: |
Mon, 30 May 2011 14:13:06 +0200 |
In your gnuradio generated code you use run() instead of start()
method and you forgot to put unlock().
After changing this it crashes with fusb error.
2011/5/27 Brett L. Trotter <address@hidden>:
> Does this crash you?
>
> from gnuradio import eng_notation
> from gnuradio import gr
> from gnuradio.eng_option import eng_option
> from gnuradio.gr import firdes
> from grc_gnuradio import usrp as grc_usrp
> from optparse import OptionParser
>
> class crashme(gr.top_block):
>
> def __init__(self):
> gr.top_block.__init__(self, "Crashme")
>
> ##################################################
> # Variables
> ##################################################
> self.interp = interp = 64
> self.decim = decim = 32
> self.tx_rate = tx_rate = 128e6/interp
> self.rx_rate = rx_rate = 64e6/decim
> self.center_freq = center_freq = 1e6
>
> ##################################################
> # Blocks
> ##################################################
> self.usrp_simple_source_x_0 =
> grc_usrp.simple_source_c(which=0, side="A", rx_ant="RXAB")
> self.usrp_simple_source_x_0.set_decim_rate(decim)
> self.usrp_simple_source_x_0.set_frequency(center_freq,
> verbose=True)
> self.usrp_simple_source_x_0.set_gain(0)
> self.usrp_simple_sink_x_0 =
> grc_usrp.simple_sink_c(which=0, side="A")
> self.usrp_simple_sink_x_0.set_interp_rate(interp)
> self.usrp_simple_sink_x_0.set_frequency(center_freq,
> verbose=True)
> self.usrp_simple_sink_x_0.set_gain(0)
> self.gr_sig_source_x_0 = gr.sig_source_c(tx_rate,
> gr.GR_SIN_WAVE, 1000, 4000, 0)
> self.gr_null_sink_0 = gr.null_sink(gr.sizeof_gr_complex*1)
> self.gr_head_0_0 = gr.head(gr.sizeof_gr_complex*1, 3000000)
> self.gr_head_0 = gr.head(gr.sizeof_gr_complex*1, 3000000)
>
> ##################################################
> # Connections
> ##################################################
> self.connect((self.gr_sig_source_x_0, 0),
> (self.gr_head_0, 0))
> self.connect((self.gr_head_0, 0),
> (self.usrp_simple_sink_x_0, 0))
> self.connect((self.usrp_simple_source_x_0, 0),
> (self.gr_head_0_0, 0))
> self.connect((self.gr_head_0_0, 0),
> (self.gr_null_sink_0, 0))
>
> if __name__ == '__main__':
> parser = OptionParser(option_class=eng_option, usage="%prog:
> [options]")
> (options, args) = parser.parse_args()
> tb = crashme()
> tb.run()
> print "Flowgraph finished, calling lock"
> tb.lock()
> print "Calling stop"
> tb.stop()
>
>
>
Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory, Thomas Tsou, 2011/05/27
Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory, Thomas Tsou, 2011/05/30
Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory, Marcus D. Leech, 2011/05/30
Re: [Discuss-gnuradio] fusb: (rd status -2) No such file or directory, Johannes Schmitz, 2011/05/31