discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Problem with a busy USRP-device


From: Holger von Malm
Subject: [Discuss-gnuradio] Problem with a busy USRP-device
Date: Sun, 16 Oct 2005 23:11:30 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

Hi.

I worte a function in python to send signals to a receiver. This function works fine, but when I call this function in a loop or twice in a programm I get following error:


usrp_open_interface:usb_claim_interface: failed interface 1
could not claim interface 1: Device or resource busy
usrp_basic_tx: can't open tx interface


My function looks like this:

def sender()
             ....

        u = usrp.sink_c (0, usrp_interp)
        u.set_tx_freq (0, cordic_freq)
        
       ...
fg = gr.flow_graph ()

        /# Connect/
       fg.connect(src,fmmod, u)
return fg

The main programm should call this function when a special event happens:

*if* __name__ == '__main__':
        ...
        while (running):
           if (event):
              fg = sender()
              fg.start()
              wait(50) #waits a few ms
              fg.stop()

             ....

When the first time an event happens the sender function works fine like it should. But the second time the programm stops with the error message above. I think the graph doesn't really get stopped or the device doesn't get free again. I have proven that the graph is still running afer the stop() function with a simple fg.is_running()-check after fg.stop(). Why doesn't the graph stop? I think this is the problem why the device is still busy when I call the sender-function the second time. I also tried to delete the fg-object with "del fg". But this doesn't work.
What is my mistake?
What must I do to get my programm running?

I hope someone can help me.

Holger




reply via email to

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