Nick Foster-4 wrote:
>
> On Wed, Sep 7, 2011 at 3:27 AM, Lebowski80 <
address@hidden>
> wrote:
>
>>
>> Hello everyone,
>>
>> Before to explain my problem I give some technical information about my
>> hardaware. I'm using USRPs v1 and the boards integrated are XCVR2450
>> Transceivers.
>>
>> I'm using the script usrp_spectrum_sense.py in a USRP (called USRP1) to
>> make
>> sensing in the ISM band, after a few seconds it sends to another USRP
>> (Called USRP2) a free sensed channel on the central frequency 2484 MHz.
>> USRP2 listens to the channel 2484 MHz through the script benchmark_rx.py
>> and
>> it can properly receive the free ISM channel sent by USRP1. Then, I want
>> to
>> use the USRP2 to receive data from another USRP (called USRP3) that uses
>> the
>> script benchmark_tx.py.
>>
>> In the script benchmark_rx.py (used by USRP2) that listens to channel
>> 2484
>> MHz I want to run another script that I called benchmark_rxr.py that
>> waits
>> for data sent by USRP3 to be received in the free ISM channel sent by
>> USRP1.
>>
>> Relevant line of the code in the script benchmark_rx.py is attached
>> below:
>>
>> p = Popen('python benchmark_rxr.py', shell = True)
>>
>> While this is the error that I get:
>>
>> usrp_open_interface:usb_claim_interface: failed interface 2
>> could not claim interface 2: Device or resource busy
>> usrp_basic_rx: can't open rx interface
>> Traceback (most recent call last):
>> File "benchmark_rxr.py", line 153, in <module>
>> main()
>> File "benchmark_rxr.py", line 138, in main
>> tb = my_top_block(demods[options.modulation],
>> mods[options.modulation],
>> rx_callback, options)
>> File "benchmark_rxr.py", line 46, in __init__
>> self.rxpath = usrp_receive_path.usrp_receive_path(demodulator,
>> rx_callback, options)
>> File "/opt/gnuradio/gnuradio-examples/python/usrp/usrp_receive_path.py",
>> line 65, in __init__
>> self._setup_usrp_source(options)
>> File "/opt/gnuradio/gnuradio-examples/python/usrp/usrp_receive_path.py",
>> line 78, in _setup_usrp_source
>> self.u = usrp_options.create_usrp_source(options)
>> File "/usr/local/lib/python2.6/dist-packages/gnuradio/usrp_options.py",
>> line 88, in create_usrp_source
>> gain=options.rx_gain,
>> File
>>
>> "/usr/local/lib/python2.6/dist-packages/gnuradio/blks2impl/generic_usrp.py",
>> line 138, in __init__
>> _generic_usrp_base.__init__(self, **kwargs)
>> File
>>
>> "/usr/local/lib/python2.6/dist-packages/gnuradio/blks2impl/generic_usrp.py",
>> line 63, in __init__
>> except: raise Exception, 'Failed to automatically setup a usrp
>> device.'
>> Exception: Failed to automatically setup a usrp device.
>>
>> I read different post with this problem such as "Full duplex and half
>> duplex
>> does not work" and "help: cannot send after transport endpoint shutdown"
>> but
>> I could not solve the problem yet. I need to close the reception in 2484
>> MHz
>> channel for a new reception in another channel in USRP2. The only way to
>> do
>> that seems to close the port manually (i.e. pressing ctrl+c) but I want
>> to
>> do that by code. I tried different things before the line "p =
>> Popen('python
>> benchmark_rxr.py', shell = True)" such as "id_process = os.getpid()" and
>> "os.killpg(id_process, 2)", or by "tb.lock()" and "tb.unlock" and so on,
>> but
>> nothing helped me, I keep obtaining the same error. I don't know what to
>> do
>> else, can I change by code reception frequency in USRP2? Any advice will
>> be
>> welcome, thanks a lot!
>>
>
> You need to run both RX and TX in the same flowgraph. You can't open them
> in
> separate flowgraphs.
>
> --n
>
>
>
>>
>> Regards
>>
>>
>> --
>> View this message in context:
>>
http://old.nabble.com/How-to-reconfigure-automatically-the-channel-used-to-received-data-in-USRPs-tp32414957p32414957.html
>> Sent from the GnuRadio mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>>
address@hidden
>>
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>
> _______________________________________________
> Discuss-gnuradio mailing list
>
address@hidden
>
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>