[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] How to reconfigure automatically the channel used
Re: [Discuss-gnuradio] How to reconfigure automatically the channel used to received data in USRPs
Wed, 7 Sep 2011 08:31:19 -0700
On Wed, Sep 7, 2011 at 3:27 AM, Lebowski80 <address@hidden>
Before to explain my problem I give some technical information about my
hardaware. I'm using USRPs v1 and the boards integrated are XCVR2450
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
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>
File "benchmark_rxr.py", line 138, in main
tb = my_top_block(demods[options.modulation], mods[options.modulation],
File "benchmark_rxr.py", line 46, in __init__
self.rxpath = usrp_receive_path.usrp_receive_path(demodulator,
line 65, in __init__
line 78, in _setup_usrp_source
self.u = usrp_options.create_usrp_source(options)
line 88, in create_usrp_source
line 138, in __init__
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.
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