discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Reg : Simultaneous execution of two scripts


From: sumitstop
Subject: [Discuss-gnuradio] Reg : Simultaneous execution of two scripts
Date: Thu, 7 Mar 2013 10:56:39 -0800 (PST)

I have created two copies of the usrp_spectrum_sense.py for wideband spectrum
sensing. Each one of them collects data from a different frequency band and
then finally fusion takes place. 
I am invoking both the scripts from bash with a timer which make them
execute at the same instance of time.
Content of both the bash scripts are below (activate_usrp_1.sh &
activate_usrp_2.sh)

While most of the time it is working fine but sometimes following error
comes with either activate_usrp_1.sh or activate_usrp_2.sh :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
address@hidden:~/finals/multi_usrp_same_system_different_range$
./activate_usrp_1.sh 
will start at 40
linux; GNU C++ version 4.4.3; Boost_104000; UHD_003.005.000-26-gb65a3924

Warning: this may have issues on some machines+Python version combinations
to seg fault due to the callback in bin_statitics.

-- Opening a USRP1 device...
Traceback (most recent call last):
  File "./usrp_spectrum_sense_1.py", line 341, in <module>
    tb = my_top_block()
  File "./usrp_spectrum_sense_1.py", line 147, in __init__
    stream_args=uhd.stream_args('fc32'))
  File "/usr/local/lib/python2.6/dist-packages/gnuradio/uhd/__init__.py",
line 116, in constructor_interceptor
    return old_constructor(*args)
  File "/usr/local/lib/python2.6/dist-packages/gnuradio/uhd/uhd_swig.py",
line 2875, in usrp_source
    return _uhd_swig.usrp_source(*args)
RuntimeError: AssertionError: libusb_claim_interface(this->get(), interface)
== 0
  in virtual void libusb_device_handle_impl::claim_interface(int)
  at /home/sumit/Downloads/uhd/host/lib/transport/libusb1_base.cpp:188
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#activate_usrp_1.sh
# this is a template script to start a process with respect to network time 
cd /home/sumit/finals/multi_usrp_same_system_different_range
s1=40
echo "will start at $s1"
st=0
tk=0
while [ "$st" = "$tk" ]
do
s=`date +%S`
s1=40
if [ "$s1" = "$s" ]; then
st=1                            
else
st=0
fi
done
m=1
if [ $m=$st ] ; then
     ./usrp_spectrum_sense_1.py 2.45G 2.456G -s 8e6 --itt-time=2
--fft-size=16 --args "name=lab_4"   
fi

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#activate_usrp_2.sh
# this is a template script to start a process with respect to network time 
cd /home/sumit/finals/multi_usrp_same_system_different_range
s1=40
echo "will start at $s1"
st=0
tk=0
while [ "$st" = "$tk" ]
do
s=`date +%S`
s1=40
if [ "$s1" = "$s" ]; then
st=1                            
else
st=0
fi
done
m=1
if [ $m=$st ] ; then
     ./usrp_spectrum_sense_2.py 2.456G 2.462G -s 8e6 --itt-time=2
--fft-size=16 --args "name=lab_2"   
fi





--
View this message in context: 
http://gnuradio.4.n7.nabble.com/Reg-Simultaneous-execution-of-two-scripts-tp40038.html
Sent from the GnuRadio mailing list archive at Nabble.com.



reply via email to

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