[Discuss-gnuradio] uhd digital-bert script !
Hello everyone I am working on USRPN200 with RFX2400. I am trying to make digital-bert scripts to work for uhd devices. I have modified them a bit but i am getting some errors which am unable to debug. If anyone can help me out. Attached are my benchmark_tx and transmit_path scripts. while running the script, it shows me : aravind@COE-CW85V91:~/gnuradio/gnuradio-examples/python/digital-bert$ ./uhd_benchmark_tx.py -f 2500M -g 16 linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-5239879 gr_fir_ccf: using SSE Modulation: 250k bits/sec TX IF rate: 500k samples/sec USRP interpolation: 256 DAC amplitude: 2000 -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes -- mboard0 is MIMO master UHD Warning: Unable to set the thread priority. Performance may be negatively affected. Please see the general application notes in the manual for instructions. EnvironmentError: OSError: error in pthread_setschedparam Gain d'board: 16 dB Actual center frequency 2.5G Traceback (most recent call last): File ./uhd_benchmark_tx.py, line 109, in module tb = tx_bpsk_block(options) File ./uhd_benchmark_tx.py, line 56, in __init__ self.connect(self._transmitter, self._usrp) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 124, in connect self._connect(points[i-1], points[i]) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 130, in _connect dst_block.to_basic_block(), dst_port) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/gnuradio_core_runtime.py, line 1504, in primitive_connect return _gnuradio_core_runtime.gr_top_block_sptr_primitive_connect(self, *args) ValueError: port number 0 exceeds max of (none) -- Saketh Kumar #!/usr/bin/env python # # Copyright 2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # GNU Radio is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Radio; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. # from gnuradio import gr, eng_notation, uhd from gnuradio.eng_option import eng_option from optparse import OptionParser from transmit_path import transmit_path import sys _dac_rate = 128e6 n2s = eng_notation.num_to_str class tx_bpsk_block(gr.top_block): def __init__(self,options): gr.top_block.__init__(self) self._transmitter = transmit_path(options.sps, options.excess_bw, options.amplitude) if_rate = options.rate*options.sps interp = int(_dac_rate/if_rate) print Modulation:, n2s(options.rate), bits/sec print TX IF rate:, n2s(if_rate), samples/sec print USRP interpolation:, interp print DAC amplitude:, options.amplitude self._setup_usrp(options.ip, interp, options.gain, options.tx_freq) self.connect(self._transmitter, self._usrp) def _setup_usrp(self,ip,interp, gain, tx_freq): self._usrp = uhd.usrp_source(device_addr=, io_type=uhd.io_type.COMPLEX_FLOAT32, num_channels=1, ) #set Tx Gain self._usrp.set_gain(gain,0) print Gain d'board:,(n2s(gain)),dB #Tune to center frequency tr = self._usrp.set_center_freq(options.tx_freq, 0) if not (tr): print Failed to tune to Tx frequency to %s % (n2s(options.tx_freq)) else: print Actual center frequency,n2s(options.tx_freq) def get_options(): parser = OptionParser(option_class=eng_option) parser.add_option(--ip, --device_addr,type=string,default=addr=192.168.10.2, help=device address[default=%default]) parser.add_option(-g, --gain, type=eng_float, default=None, help=set TX gain (default is midpoint)) parser.add_option(-f, --tx-freq, type=eng_float, default=None, help=set Tx frequency to FREQ, metavar=FREQ) parser.add_option(-a, --amplitude, type=eng_float, default=2000, help=set Tx amplitude (0-32767) (default=%default)) parser.add_option(-r, --rate, type=eng_float, default=250e3,
Re: [Discuss-gnuradio] uhd digital-bert script !
On Mon, 2011-08-08 at 12:16 -0400, saketh kumar wrote: Hello everyone I am working on USRPN200 with RFX2400. I am trying to make digital-bert scripts to work for uhd devices. I have modified them a bit but i am getting some errors which am unable to debug. If anyone can help me out. Attached are my benchmark_tx and transmit_path scripts. while running the script, it shows me : aravind@COE-CW85V91:~/gnuradio/gnuradio-examples/python/digital-bert $ ./uhd_benchmark_tx.py -f 2500M -g 16 linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-5239879 gr_fir_ccf: using SSE Modulation: 250k bits/sec TX IF rate: 500k samples/sec USRP interpolation: 256 DAC amplitude: 2000 -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes -- mboard0 is MIMO master UHD Warning: Unable to set the thread priority. Performance may be negatively affected. Please see the general application notes in the manual for instructions. EnvironmentError: OSError: error in pthread_setschedparam Gain d'board: 16 dB Actual center frequency 2.5G Traceback (most recent call last): File ./uhd_benchmark_tx.py, line 109, in module tb = tx_bpsk_block(options) File ./uhd_benchmark_tx.py, line 56, in __init__ self.connect(self._transmitter, self._usrp) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 124, in connect self._connect(points[i-1], points[i]) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 130, in _connect dst_block.to_basic_block(), dst_port) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/gnuradio_core_runtime.py, line 1504, in primitive_connect return _gnuradio_core_runtime.gr_top_block_sptr_primitive_connect(self, *args) ValueError: port number 0 exceeds max of (none) You're connecting a signal source to a USRP source. The source block is the receiver block; it produces samples. The sink block is the transmitter block; it consumes samples. --n -- Saketh Kumar ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] uhd digital-bert script !
I have made that change. After doing that when i run my script it pops up the error aravind@COE-2X85V91:~/gnuradio/gnuradio-examples/python/digital-bert$ ./uhd_benchmark_tx.py -f 2500M -g 32 linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-ba0e3c8 gr_fir_ccf: using SSE Modulation: 500k bits/sec TX IF rate: 1M samples/sec USRP interpolation: 128 DAC amplitude: 500 -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes UHD Warning: The recv buffer could not be resized sufficiently. Target sock buff size: 5000 bytes. Actual sock buff size: 131071 bytes. See the transport application notes on buffer resizing. Please run: sudo sysctl -w net.core.rmem_max=5000 UHD Warning: The recv buffer could not be resized sufficiently. Target sock buff size: 5000 bytes. Actual sock buff size: 131071 bytes. See the transport application notes on buffer resizing. Please run: sudo sysctl -w net.core.rmem_max=5000 -- mboard0 is MIMO master UHD Warning: Unable to set the thread priority. Performance may be negatively affected. Please see the general application notes in the manual for instructions. EnvironmentError: OSError: error in pthread_setschedparam Center frequency: 2.5G Gain d'board:32 Uterminate called after throwing an instance of 'boost::exception_detail::clone_implboost::exception_detail::error_info_injectorboost::math::rounding_error ' what(): Error in function boost::math::roundd(d): Value inf can not be represented in the target integer type. Aborted what does actually the error means? what else changes should i be doing in the transmit_path.py script ? Regards Saketh On Mon, Aug 8, 2011 at 12:16 PM, saketh kumar m.sakethku...@gmail.comwrote: Hello everyone I am working on USRPN200 with RFX2400. I am trying to make digital-bert scripts to work for uhd devices. I have modified them a bit but i am getting some errors which am unable to debug. If anyone can help me out. Attached are my benchmark_tx and transmit_path scripts. while running the script, it shows me : aravind@COE-CW85V91:~/gnuradio/gnuradio-examples/python/digital-bert$ ./uhd_benchmark_tx.py -f 2500M -g 16 linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-5239879 gr_fir_ccf: using SSE Modulation: 250k bits/sec TX IF rate: 500k samples/sec USRP interpolation: 256 DAC amplitude: 2000 -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes -- mboard0 is MIMO master UHD Warning: Unable to set the thread priority. Performance may be negatively affected. Please see the general application notes in the manual for instructions. EnvironmentError: OSError: error in pthread_setschedparam Gain d'board: 16 dB Actual center frequency 2.5G Traceback (most recent call last): File ./uhd_benchmark_tx.py, line 109, in module tb = tx_bpsk_block(options) File ./uhd_benchmark_tx.py, line 56, in __init__ self.connect(self._transmitter, self._usrp) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 124, in connect self._connect(points[i-1], points[i]) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 130, in _connect dst_block.to_basic_block(), dst_port) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/gnuradio_core_runtime.py, line 1504, in primitive_connect return _gnuradio_core_runtime.gr_top_block_sptr_primitive_connect(self, *args) ValueError: port number 0 exceeds max of (none) -- Saketh Kumar -- Saketh Kumar ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] uhd digital-bert script !
On 08/08/2011 2:04 PM, saketh kumar wrote: I have made that change. After doing that when i run my script it pops up the error aravind@COE-2X85V91:~/gnuradio/gnuradio-examples/python/digital-bert$ ./uhd_benchmark_tx.py -f 2500M -g 32 linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-ba0e3c8 gr_fir_ccf: using SSE Modulation: 500k bits/sec TX IF rate: 1M samples/sec USRP interpolation: 128 DAC amplitude: 500 -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes UHD Warning: The recv buffer could not be resized sufficiently. Target sock buff size: 5000 bytes. Actual sock buff size: 131071 bytes. See the transport application notes on buffer resizing. Please run: sudo sysctl -w net.core.rmem_max=5000 UHD Warning: The recv buffer could not be resized sufficiently. Target sock buff size: 5000 bytes. Actual sock buff size: 131071 bytes. See the transport application notes on buffer resizing. Please run: sudo sysctl -w net.core.rmem_max=5000 -- mboard0 is MIMO master UHD Warning: Unable to set the thread priority. Performance may be negatively affected. Please see the general application notes in the manual for instructions. EnvironmentError: OSError: error in pthread_setschedparam Center frequency: 2.5G Gain d'board:32 Uterminate called after throwing an instance of 'boost::exception_detail::clone_implboost::exception_detail::error_info_injectorboost::math::rounding_error ' what(): Error in function boost::math::roundd(d): Value inf can not be represented in the target integer type. Aborted Some part of the block chain setup by transmit_path.py is producing floating-point values that cannot be easily scaled into the range required by the (I'm assuming) UHD sink block. The value inf is usually due to a divide-by-zero error somewhere in the chain. what does actually the error means? what else changes should i be doing in the transmit_path.py script ? Regards Saketh On Mon, Aug 8, 2011 at 12:16 PM, saketh kumar m.sakethku...@gmail.com mailto:m.sakethku...@gmail.com wrote: Hello everyone I am working on USRPN200 with RFX2400. I am trying to make digital-bert scripts to work for uhd devices. I have modified them a bit but i am getting some errors which am unable to debug. If anyone can help me out. Attached are my benchmark_tx and transmit_path scripts. while running the script, it shows me : aravind@COE-CW85V91:~/gnuradio/gnuradio-examples/python/digital-bert$ ./uhd_benchmark_tx.py -f 2500M -g 16 linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-5239879 gr_fir_ccf: using SSE Modulation: 250k bits/sec TX IF rate: 500k samples/sec USRP interpolation: 256 DAC amplitude: 2000 -- Opening a USRP2/N-Series device... -- Current recv frame size: 1472 bytes -- Current send frame size: 1472 bytes -- mboard0 is MIMO master UHD Warning: Unable to set the thread priority. Performance may be negatively affected. Please see the general application notes in the manual for instructions. EnvironmentError: OSError: error in pthread_setschedparam Gain d'board: 16 dB Actual center frequency 2.5G Traceback (most recent call last): File ./uhd_benchmark_tx.py, line 109, in module tb = tx_bpsk_block(options) File ./uhd_benchmark_tx.py, line 56, in __init__ self.connect(self._transmitter, self._usrp) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 124, in connect self._connect(points[i-1], points[i]) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py, line 130, in _connect dst_block.to_basic_block(), dst_port) File /usr/local/lib/python2.6/dist-packages/gnuradio/gr/gnuradio_core_runtime.py, line 1504, in primitive_connect return _gnuradio_core_runtime.gr_top_block_sptr_primitive_connect(self, *args) ValueError: port number 0 exceeds max of (none) -- Saketh Kumar -- Saketh Kumar ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio