discuss-gnuradio
[Top][All Lists]
Advanced

[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: Fri, 27 May 2011 19:05:01 +0200

I made a simple example to show how it happens.
It is a problem of lock/unlock in combination with usrp.

Like this the lock unlock disconnect seems to absolutely unusable :(

-------------------------------------

#!/usr/bin/env python

from gnuradio import gr
from gnuradio import usrp

from time import sleep

class top_block(gr.top_block):
    def __init__(self):
        gr.top_block.__init__(self, "fusb error")

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

    def reconfigure(self):
        self.lock()
        print 'lock'
        self.unlock()
        print 'unlock'

if __name__ == '__main__':
    app = top_block()
    app.start()
    #sleep(1)
    print 'start'
    app.reconfigure()
    print "reconfigured"
    sleep(1)
    print 'now stopping'
    app.stop()
    print 'stopped'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]