GNURadio fresh Linux installation and usrp_benchmark_usb.py error

Hello,
I am new in the GNU Radio community and I am looking for some help to
get started.

I have installed Linux Ubuntu 9.10 (Karmic Koala) as Virtual Box host
in OS X 10.5.8.
following the “Getting Started” indications from:
http://gnuradio.org/redmine/wiki/gnuradio/UbuntuInstall

I successfully installed GNURadio 3.2.2 from the binary of
deb http://gnuradio.org/ubuntu stable main

by issuing ls -lR /dev/bus/usb | grep usrp I get:
crw-rw---- 1 root usrp 189, 2 2010-02-17 09:40 003

Which might mean that all went well. However following up the Ubuntu
Install indications in
http://gnuradio.org/redmine/wiki/gnuradio/UbuntuInstall

if I do:

cd /usr/share/gnuradio/examples/python/usrp
./usrp_benchmark_usb.py

I unfortunately get this:
Testing 2MB/sec… usrp: failed to find usrp[0]
Traceback (most recent call last):
File “./usrp_benchmark_usb.py”, line 106, in
main ()
File “./usrp_benchmark_usb.py”, line 96, in main
ok = run_test (rate, verbose)
File “./usrp_benchmark_usb.py”, line 63, in run_test
usrp_tx = usrp.sink_s (0, tx_interp)
File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py”,
line 2736, in sink_s
return _usrp_swig.sink_s(*args, **kwargs)
RuntimeError: can’t open usrp

Can somebody please help me understand what I did wrong.
Thank you in advance for your help.

Vincent

On Wed, Feb 17, 2010 at 10:04:47AM +0100, Fabrizio T. wrote:

deb http://gnuradio.org/ubuntu stable main
cd /usr/share/gnuradio/examples/python/usrp
./usrp_benchmark_usb.py

I unfortunately get this:
Testing 2MB/sec… usrp: failed to find usrp[0]

Are you in group usrp?

(Use the id or groups command to check.)

Eric

Hello,
I just would like to clarified for others that I figured out what the
problem was but I have no solution for it.
The problem “usrp: failed to find usrp[0]” is (I think) caused by
Virtual Box and the way the control of USB connections is passed (or
not passed) through. I do not know how to tell Virtual Box to pass,
for instance, all USB connections to the guest OS.

If anybody uses Virtual Box and a Linux guest OS with GNURadio please
advise.

Thanks
Fabrizio
PS btw, I installed GNURadio and USRP in a normal Linux machine and
everything works beautifully, well done you all (especially the main
developers) for this incredible tool !

On Thu, Feb 18, 2010 at 12:50 PM, Fabrizio T.

On 19 February 2010 12:05, Fabrizio T. [email protected]
wrote:

Hello,
I just would like to clarified for others that I figured out what the
problem was but I have no solution for it.
The problem “usrp: failed to find usrp[0]” is (I think) caused by
Virtual Box and the way the control of USB connections is passed (or
not passed) through. I do not know how to tell Virtual Box to pass,
for instance, all USB connections to the guest OS.

If anybody uses Virtual Box and a Linux guest OS with GNURadio please advise.

Hi Fabrizio,

I tried this some time ago with Ubuntu 9.04 as guest OS. I remember I
had to explicitly enable USB devices individually. I did that via
Devices->USB Devices in the main menubar after I plugged in the USRP
(I think you can also do that if you click on the small USB connector
icon at the bottom of the VM window).
It was running (GNU Radio on OS X using Virtualbox with Ubuntu 9.04 guest OS. Works OK but no 3D accel.) but performance on my iMac
was very slow. I couldn’t make 3D acceleration work and the VM
couldn’t keep up with USRP data rates except with decimation rates >
250, so I abandoned that experiment.

Alex

Hello,
I believe I am.
fabrizio@ftdev:~$ id fabrizio
uid=1000(fabrizio) gid=1000(fabrizio)
groups=1000(fabrizio),4(adm),20(dialout),24(cdrom),46(plugdev),104(lpadmin),115(admin),120(sambashare),1001(usrp)

Could you please suggest what can be the most basic technique to
understand whether the whole GNU radio installation plus USRP HW is
properly functioning? Right now I am having the basicTx connected to
an oscilloscope and I am trying to generate a simple signal with this
python code:

#!/usr/bin/python

Title : BasicTX.py

Function : Create test signal on the BasicTX / BasicHF Daughter

board

Author : Pascal Schiks (C) 2008 gnu/gpl

explanation : http://www.gnuradio.eu/examples/BasicHF/BasicTx.html

from gnuradio import gr
from gnuradio import usrp
from gnuradio.wxgui import stdgui2, fftsink2

Main Graph

class pmr_graph(stdgui2.std_top_block):

    # Constructor

def init(self, frame, panel, vbox, argv):
stdgui2.std_top_block.init(self, frame, panel, vbox, argv)

tx_frequency = 7050000
usrp_tx_rate = 128000000
usrp_tx_interpolation = 400
tx_side = 1
tx_dev = 1

# Transmitter
usrp_tx_sample_rate = usrp_tx_rate / usrp_tx_interpolation
usrp_tx = usrp.sink_c(which=0, interp_rate=usrp_tx_interpolation)
mux = usrp.determine_tx_mux_value(usrp_tx,(tx_side,tx_dev))
usrp_tx.set_mux(mux)

usrp_tx_subdev = usrp.selected_subdev(usrp_tx,(tx_side,tx_dev))
 usrp_tx.tune(0,usrp_tx_subdev, tx_frequency)

# rf
rf = gr.sig_source_c(usrp_tx_sample_rate, gr.GR_SIN_WAVE,500,16000, 
# Connect all
 self.connect(rf, usrp_tx)

Main caller program

if name == ‘main’:
aplication = stdgui2.stdapp(pmr_graph,“BasicTX”)
aplication.MainLoop()

This is the error I get:

fabrizio@ftdev:~/GNURadio/tmp$ ./BasicTX.py
usrp: failed to find usrp[0]
Traceback (most recent call last):
File “./BasicTX.py”, line 41, in
aplication = stdgui2.stdapp(pmr_graph,“BasicTX”)
File “/usr/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 36, in init
wx.App.init (self, redirect=False)
File
“/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py”,
line 7978, in init
self._BootstrapApp()
File
“/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py”,
line 7552, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “/usr/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 39, in OnInit
frame = stdframe (self.top_block_maker, self.title, self._nstatus)
File “/usr/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 60, in init
self.panel = stdpanel (self, self, top_block_maker)
File “/usr/lib/python2.6/dist-packages/gnuradio/wxgui/stdgui2.py”,
line 81, in init
self.top_block = top_block_maker (frame, self, vbox, sys.argv)
File “./BasicTX.py”, line 26, in init
usrp_tx = usrp.sink_c(which=0, interp_rate=usrp_tx_interpolation)
File “/usr/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py”,
line 2412, in sink_c
return _usrp_swig.sink_c(*args, **kwargs)
RuntimeError: can’t open usrp

Here is what I have noticed:

  1. the green led in the USRP is still blinking fast => proper firmware
    is no properly uploaded. In fact the ID of the USB port is still the
    generic one.
  2. Command ls -lR /dev/bus/usb | grep usrp does not work anymore
  3. unlike what suggested in GNU Radio website installation
    (http://gnuradio.org/redmine/wiki/1/DebianPackages), the command
    usrper seems to be missing in the ubuntu installation (that you get
    using deb http://gnuradio.org/ubuntu stable main)
  4. I tried the command “lsusrp” nd the result is:

usrp_open_interface:usb_set_alt_interface: failed
could not set alt intf 0/0: Connection timed out
open_nth_cmd_interface: open_cmd_interface failed
usrp: failed to load firmware /usr/share/usrp/rev4/std.ihx.
usrp: failed to find usrp[1]
usrp: failed to find usrp[2]
usrp: failed to find usrp[3]
usrp: failed to find usrp[4]
usrp: failed to find usrp[5]
usrp: failed to find usrp[6]
usrp: failed to find usrp[7]

I see to understand that the problem is in the USB connection. Any
suggestion on how to fix it? I am a little lost …

Thank you in advance
Fabrizio

Hello,

I’ve ubuntu 9.10 karmic koala 64bit and the latest gnu radio installed
on a
hp dv7-1020us and I get the same error that Fabrizio was getting.
When I try to run the usrp_benchmark_usb.py I get the “can’t open usrp”
error.

frsn@frsn-nb:/usr/local/share/gnuradio/examples/usrp$
./usrp_benchmark_usb.py
Testing 2MB/sec… usrp_open_interface:usb_set_alt_interface: failed
could not set alt intf 0/0: Connection timed out
open_nth_cmd_interface: open_cmd_interface failed
usrp: failed to load firmware /usr/local/share/usrp/rev2/std.ihx.
Traceback (most recent call last):
File “./usrp_benchmark_usb.py”, line 106, in
main ()
File “./usrp_benchmark_usb.py”, line 96, in main
ok = run_test (rate, verbose)
File “./usrp_benchmark_usb.py”, line 63, in run_test
usrp_tx = usrp.sink_s (0, tx_interp)
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/usrp/usrp_swig.py”,
line 2799, in sink_s
return _usrp_swig.sink_s(*args, **kwargs)
RuntimeError: can’t open usrp

If I try lsusrp I get also something similar to Fabrizio:

frsn@frsn-nb:/usr/local/share/gnuradio/examples/usrp$ lsusrp
usrp_open_interface:usb_set_alt_interface: failed
could not set alt intf 0/0: Connection timed out
open_nth_cmd_interface: open_cmd_interface failed
usrp: failed to load firmware /usr/local/share/usrp/rev2/std.ihx.
usrp: failed to find usrp[1]
usrp: failed to find usrp[2]
usrp: failed to find usrp[3]
usrp: failed to find usrp[4]
usrp: failed to find usrp[5]
usrp: failed to find usrp[6]
usrp: failed to find usrp[7]

I’m in the same group:
frsn@frsn-nb:/usr/local/share/gnuradio/examples/usrp$ id frsn
uid=1000(frsn) gid=1000(frsn)
grupos=1000(frsn),4(adm),20(dialout),24(cdrom),46(plugdev),106(lpadmin),121(admin),122(sambashare),1001(usrp)

And I’ve also done the following:

frsn@frsn-nb:/usr/local/share/gnuradio/examples/usrp$ ls -lR
/dev/bus/usb |
grep usrp
crw-rw---- 1 root usrp 189, 133 2010-04-15 14:39 006

I’m not using a virtual box, it’s pure linux. Can anyone help?

Thanks!

Hallo everyone,

I do have the same problems… all paths are set, I’m in the right groups
… I tried several methods to install usrp now but all end up in the
same problem that usrp doesn’t seem to be installed correctly where I
didn’t get errors before.
I tried all test and advices I could find but I don’t get the problem
and right here the thread dies out.

Does anybody have a good advise to a very unexperienced linux user?
Thanks a lot for all help

xyl

I’m not using a virtual box, it’s pure linux. Can anyone help?

Thanks!

I would think so too (I mean slow response on VM). It was for that
reason I didnt do a virtual machine solution, although after trying
cygwin for 2 days I was highly tempted. If some one has done a VM and
used GNU radio with moderate success, please let me know the
configuration.

Affan.