discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Resource busy error:


From: Martin DvH
Subject: Re: [Discuss-gnuradio] Resource busy error:
Date: Thu, 23 Apr 2009 02:54:30 +0200

On Wed, 2009-04-22 at 18:47 -0500, kollimarla bhargav wrote:
> 
> Thanks a lot Martin, that solved our problem, now we are able to call
> another reciever code in benchmark_rx.py .One last question we tried
> to call benchmark_rx.py from usrp_spectrum_sense.py, but still we get
> the same error "Resource busy"  
> It seems that another top block other than tb is running in
> usrp_spectrum_sense.py
This might have to do with:

self._tune_callback = tune(self)        # hang on to this to keep it
from being GC'd

GCing (Garbage collecting) is exactly what we want here.
There is a kind of circular reference here so the tb keeps existing

I would try:
tb._tune_callback.tb=None
tb._tune_callback=None
tb.u=None
tb=None

Good luck,
Martin
> 
> thanks
> bhargav
> 
> 
> 
> On Wed, Apr 22, 2009 at 5:54 PM, Martin DvH
> <address@hidden> wrote:
>         
>         On Wed, 2009-04-22 at 17:41 -0500, kollimarla bhargav wrote:
>         >  Hi all,
>         >          We are trying to run a simple receiver program
>         using
>         > benchmark_rx.py. The problem we are facing is when we try to
>         run
>         > another receiver program like usrp_spectrum_sense.py inside
>         the
>         > benchmark_rx.py using os.system() command , the error is "
>         Device or
>         > Resource busy". We get a feeling that the thread from
>         benchmark_rx.py
>         > is still running. We even used thread.stop before calling
>         > usrp_spectrum_sense.py, but this did not work, the same
>         error message
>         > popped up. Is there any other way of exclusively kill the
>         thread and
>         > call another receiver program.???
>         > We are able to call a benchmark_tx.py transmitter code in
>         > benchmark_rx.py receiver code,
>         
>         This is logical.
>         The TX part of the USRP can be used seperately from the RX
>         part.
>         The RX part is still in use so it can't be used for a new
>         receiver.
>         >  but the combination of calling any program with a reciever
>         block from
>         > benchmark_rx.py  was not successful and we got a error
>         message
>         > "Resource busy ". Is this a thread issue??
>         > Appreciate any help!!
>         >
>         
>         Your receiver chain still exists, even if it is not running.
>         This keeps the RX part of the USRP in use.
>         
>         Did you instruct the topblock to stop and wait for it to
>         finish.
>         
>         If you did, you could try after stopping the topblock.
>         
>         tb.rxpath=None
>         
>         or even
>         tb = None
>         
>         This throws away the reference to the receive_path (which
>         keeps the RX
>         part of the USRP in use and thus 'Resource Busy'.)
>         
>         Martin
>         
>         > Thanking you
>         > bhargav
>         >
>         >
>         > _______________________________________________
>         > Discuss-gnuradio mailing list
>         > address@hidden
>         > http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>         
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio





reply via email to

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