discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Fwd: Fwd: Problems regarding using UHD Digital-bert c


From: Bonee Soibam
Subject: [Discuss-gnuradio] Fwd: Fwd: Problems regarding using UHD Digital-bert codes
Date: Wed, 14 Sep 2011 15:54:16 -0400

Can someone please clarify my doubt for the given error . I am new to gnuradio .
thanks

---------- Forwarded message ----------
From: Bonee Soibam <address@hidden>
Date: Mon, Sep 12, 2011 at 11:10 PM
Subject: Re: [Discuss-gnuradio] Fwd: Problems regarding using UHD Digital-bert codes
To: "Marcus D. Leech" <address@hidden>


Hi Marcus ,
I have been trying to make this code work . since your last suggestion i made some changes to my code and i am coming up with a new  error .Its given as follows : -
__________________________________________________________________________________
Uterminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::math::rounding_error> >'
  what():  Error in function boost::math::iround<d>(d): Value -2.371723596288619e+52 can not be represented in the target integer type.
____________________________________________________________________________________
Steps i took to correct the current error :
1.i thought this was a boost library error , so i updated my boost library but this could not solve my error .
2. i read up on a blog so i tried to check in with the variable type for io_type . it turned out as int type so , i tried to change the io_type from COMPLEX_FLOAT32 to COMPLEX_INT8 in my uhd_benchmark_tx.py and uhd_options.py  . and then it gave me a totally strange error .
3 . last option i tried was i experimented with a number of input parameters like sps , bit rate , excess bandwidth  and gain ..
______________________________________________________________________________________________
But it looks like i am not able to pin-point what exactly the Value parametr is .. sometimes i  gave some other numbers and the Value turnedout as INF ..

if this is a concept of Communications or something . can you please tell me what exactly the Value is ..i tried really hard to figure out where this calculation is going on , but i cant really find out 
Is it because of addressing issues ?
I am currently working on USRP N200 , so its a RISC 32 bit microprocessor and my ubuntu system is i686 , is it due to this reason or ?

Thank you again Marcus .
Yours sincerely \
Bonee Soibam
~~~
``The awful thing about getting it right the first time is that nobody realizes how hard it was.''

 
n Sun, Sep 11, 2011 at 11:16 AM, Marcus D. Leech <address@hidden> wrote:
On 11/09/11 10:46 AM, Bonee Soibam wrote:
Can someone help me out on this error .. Appreciate your help.

---------- Forwarded message ----------
From: Bonee Soibam <address@hidden>
Date: Sat, Sep 10, 2011 at 5:16 PM
Subject: Problems regarding using UHD Digital-bert codes
To: address@hidden


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

So, generally, the error messages produced by a programming language are intended to give you a
  clue as to what's wrong.  Granted, you kind of have to understand the programming language
  to some extent to make sense of them.

In line 94, you call self._usrp.set_center_freq(....)

But in fact, there is no object "_usrp" defined in your code, although there is a "_uhd" defined that is
  probably what was intended.

In line 94, I'd change self._usrp.set_center_freq(....)  to self._uhd.set_center_freq(....)


-- 
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



Attachment: uhd_benchmark_tx.py
Description: Text Data

Attachment: transmit_path.py
Description: Text Data

Attachment: uhd_options.py
Description: Text Data


reply via email to

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