[Discuss-gnuradio] Problems regarding using UHD Digital-bert codes
From:
Bonee Soibam
Subject:
[Discuss-gnuradio] Problems regarding using UHD Digital-bert codes
Date:
Sat, 10 Sep 2011 17:16:35 -0400
Hi , I have been trying to use the examples given in /home/aravind/gnuradio/gnuradio-examples/python/digital-bert . esp the uhd_benchmark_tx.py . here are a few changes that i made to the existing code .. __________________________________________________________________________________________________________________________________-
#setup usrp self._setup_usrp(options.ip, interp, options.gain, options.freq)
self.connect(self._transmitter, self._usrp)
def _setup_usrp(self, ip, interp, gain, freq): # Setup single usrp sink self._uhd = uhd.single_usrp_sink(device_addr="", io_type=uhd.io_type.COMPLEX_FLOAT32,
num_channels=1 )
# Tune to center frequency tr = self._usrp.set_center_freq(freq,0)
if not (tr): print "Failed to tune to center frequency!" else: print "Actual Intermediate frequency:", n2s(self._usrp.get_center_freq())
# Set Tx Gain
self._uhd.set_gain(gain,1) print "Gain d'board: ",n2s(self._usrp.get_gain()), "dB" ____________________________________________________________________________________________________________________________
but i am getting error as mentioned : -
Traceback (most recent call last): File "./uhd_benchmark_tx.py", line 113, in <module> tb = tx_bpsk_block(options) File "./uhd_benchmark_tx.py", line 56, in __init__
options.freq) File "./uhd_benchmark_tx.py", line 70, in _setup_usrp tr = self._usrp.set_center_freq(freq,0) File "/usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py", line 94, in __getattr__
return getattr(self._tb, name) AttributeError: 'gr_top_block_sptr' object has no attribute '_usrp' address@hidden:~/gnuradio/gnuradio-examples/python/uhd-digital-bert$ _______________________________________________________________________________________________________________________
i included an From gnuradio import uhd statement to top_block.py also . but i am still getting getting the same error . I waould like your guidance , because i have been trying to make this example work for weeks .
Yours sincerely Bonee Soibam