Problem with USB on OSX?

Hi, this is my first time using software radio, and I’m having some
problems. When I try to run one of the programs in
/…/gnuradio-examples/python/usrp, here is what happens:

% pythonw ./usrp_wfm_rcv.py --freq=102M
usb_control_msg failed: usb_control_msg(DeviceRequestTO): pipe is
stalled
Using RX d’board A: Flex 400 Rx

gr_fir_ccf: using SSE
gr_fir_fff: using SSE
FYI: No Powermate or Contour Knob found
usrp_basic_rx: failed to start end point streaming

The gui opens, but is blank, and just hangs there
I’m using OS X, version 4.4 on a G5 iMac, and installed gnuradio by
the light of M. Dickens’ guide at
http://www.nd.edu/~mdickens/GNURadio/GNURadio_Install_using_DarwinPorts_on_10.4.X.txt
Some more pieces (irrelevant?) of information: The led seems to be
blinking once per second. When I do “% usrper led1 on”, it turns it
on, but I get the message “usrper: found unconfigured usrp; needs
firmware.” The contents of my /usr/local/share/usrp/rev4 folder are:
multi_2rxhb_2tx.rbf std_2rxhb_2tx.rbf std.ihx std_4rx_0tx.rbf
Thanks for your time
Sam

On Mon, Jul 24, 2006 at 04:03:45PM -0700, Sam Ross wrote:

Hi, this is my first time using software radio, and I’m having some
problems. When I try to run one of the programs in
/…/gnuradio-examples/python/usrp, here is what happens:

Hi Sam,

I believe Michael is on vacation for a bit.
I’m basically clueless re OS/X. Perhaps some of the other OS/X users
can provide guidance.

Eric

I’m using OS X. I’ve never seen this “failed to start end point
streaming” message. I’ve not used the flex 400 boards, only the Basic
RX/TX and LFRX/TX. Are you sure your Mac has USB 2.0 ports? Until
fairly recently (late 2003 or early 2004), Macs came with USB 1.1 ports.

There is more information about this 1.1 vs 2.0 business, and how to use
the Mac System Profiler to check that OS X recognizes the USRP, at

http://staff.washington.edu/~jon/gr-osx/gr-osx-usrp.html#using

Jon Jacky

Thanks for the reply Jon. I’m quite sure that it has USB 2.0 ports,
though.

Forgot to mention (and might be relevant), I am using libusb 0.1.12
from darwinports.

Thomas

I just installed gnuradio on my macbook and I wanted to test the usrp
but got the same error as Sam:

@ enter_search
802_15_4_pkt: waiting for packet
usrp_basic_rx: failed to start end point streaming

Next I tried to use the benchmark_usb.py file and I got this error:
Testing 2MB/sec… usrp_open_interface:usb_claim_interface: failed
interface 1
usb_claim_interface: couldn’t claim interface
usrp_basic_tx: can’t open tx interface
Traceback (most recent call last):
File “./benchmark_usb.py”, line 106, in ?
main ()
File “./benchmark_usb.py”, line 96, in main
ok = run_test (rate, verbose)
File “./benchmark_usb.py”, line 63, in run_test
usrp_tx = usrp.sink_s (0, tx_interp)
File “/usr/local/lib/python2.4/site-packages/gnuradio/usrp.py”, line
230, in init
fpga_filename, firmware_filename)
File “/usr/local/lib/python2.4/site-packages/gnuradio/usrp1.py”,
line 932, in sink_s
return _usrp1.sink_s(*args)
RuntimeError: can’t open usrp1

Interestingly, the firmware is uploaded successfully, i.e., the led
first blinks fast, then slower, and then I get the error.

Any ideas on what might be wrong?

Thomas

Hi Thomas,

I am using gnuradio+USRP on a MacBook Pro under 10.4.7, this setup
should be very similar to yours.I have a version 3b USRP, with a BasicRX
and a BasicTX board.

Have you checked out http://comsec.com/wiki?UsrpInstall ?

When I plug the USRP in my system, before it loads any firmware (i.e.
before I run any usrp-related program), I see the following in the
System profiler (Apple logo/About This Mac, click More Info… ,
Hardware/USB, USB High-Speed Bus/Vendor-specific
Version 0.02, etc etc Product ID 0x0002, Vendor ID 0xfffe.

After running test_usrp_standard_tx, this information changes
From “Vendor-specific” to “USRP Rev 2”, the version changes to 1.02 and
there is a “serial number” string of all zeroes.

Does yours show the same information in the System Profiler? Also, what
does it say if you go to the usrp directory and run a “svn up”? Mine
says “At revision 832.”

Cheers,
Jan

I forgot to mention that I have the RFX400 and RFX2400 daughterboards.
I also tried the same thing with both daughterboards removed with the
same result. Unfortunately I don’t have the BasicRX/TX with me and can
not test it. Do you have one of the RFX400 or 2400 with which you
could test?

Thomas

Hi Jan,

I have two USRPs to test with, one a Rev 3 and one a Rev 4.1. Both
have the same behavior, except that one shows version 0.04 and the
other 0.02 when I first plug them in (in the system profiler). Then, I
run test_usrp_standard_tx, the firmware uploads, i.e. the LEDs start
to blink slower, but the system profiler still shows the old values,
i.e., they stay at “Vendor-specific”.

I will try to see if I can enable some more debug information.

Thomas

Playing catch up … some quick observations:

  • You say a G5 iMac on (I assume 10.)4.4, but the script says that
    it’s using SSE. These are contradictory. Could it possibly be an
    Intel iMac? This probably won’t make a difference, but you never know.

  • You’re using a Flex 400 board, and trying to receive at 102 MHz -
    which won’t work. Try using a frequency in the range of the board.
    I think that’s what the USRP’s message is trying to convey. Could
    someone with a ‘400’ board try out receiving 102 FM & see what it does?

  • The “pipe is stalled”, in case you’re wondering, is normal for most
    desktop Macs, but not as much so for laptop Macs. Desktops Macs have
    multiple hardware devices between the OS and USB, which invariably
    results in both odd errors and slower throughput. Laptops Macs use
    less and different hardware than desktops, which makes the USB
    throughput faster overall. Interestingly (from Apple’s USB list),
    PPC Macs have the USB hardware do most of the work while Intel Macs
    force the OS to do most of the work … lesson: use bigger requests
    on Intel and smaller on PPC.

  • for anything not requiring the wx GUI, you can just run the script
    as usual (“./usrp_wfm_rcv.py --freq=102M”) assuming that it’s
    executable and has the correct #! notation. IIRC “pythonw” is needed
    for GUI stuff only. I’ll add this comment to my install guide one of
    these days.

Everything else looks correct, and sounds reasonable. Let the list
know if you have any success. - MLD

Begin forwarded message:
From: “Sam Ross” [email protected]
Date: July 24, 2006 7:03:45 PM EDT
To: [email protected]
Subject: [Discuss-gnuradio] Problem with USB on OSX?

Hi, this is my first time using software radio, and I’m having some
problems. When I try to run one of the programs in
/…/gnuradio-examples/python/usrp, here is what happens:

% pythonw ./usrp_wfm_rcv.py --freq=102M
usb_control_msg failed: usb_control_msg(DeviceRequestTO): pipe is
stalled
Using RX d’board A: Flex 400 Rx

gr_fir_ccf: using SSE
gr_fir_fff: using SSE
FYI: No Powermate or Contour Knob found
usrp_basic_rx: failed to start end point streaming

The gui opens, but is blank, and just hangs there
I’m using OS X, version 4.4 on a G5 iMac, and installed gnuradio by
the light of M. Dickens’ guide at
http://www.nd.edu/~mdickens/GNURadio/
GNURadio_Install_using_DarwinPorts_on_10.4.X.txt
Some more pieces (irrelevant?) of information: The led seems to be
blinking once per second. When I do “% usrper led1 on”, it turns it
on, but I get the message “usrper: found unconfigured usrp; needs
firmware.” The contents of my /usr/local/share/usrp/rev4 folder are:
multi_2rxhb_2tx.rbf std_2rxhb_2tx.rbf std.ihx std_4rx_0tx.rbf
Thanks for your time
Sam

Hi Michael,

I installed the latest CVS version of LibUSB, but no difference. So, I
enabled the debu mode and I can see that there are a lot of:

usb_os_open(USBDeviceOpenSeize): another process has device opened for
exclusive access

But I am almost sure that there is nothing else using the USRP.

I attached the full output for test_usrp_standard_tx

Thomas

I can tell you from the print-out that the issue is part of LIBUSB
(“usb_claim_interface”) which is used by the USRP, and not the USRP’s
FUSB code for Darwin. Maybe there are patches for 0.1.12 for Intel
which are needed? Any other Intel-mac users see this?

As a side-related note (I use a PPC desktop w/o USB 2.0 PCI card):
The benchmark_usb script sometimes works and sometimes does not
work. When it doesn’t work I generally revert back to the previous
known-working version (if possible), or try downloading and
installing everything from scratch. While I shouldn’t have to do
this, it usually fixes the issue - at least on a PPC Desktop Mac.
Maybe an Intel-Mac needs this cleansing too every so often?

On Jul 29, 2006, at 2:20 PM, Thomas S. wrote:

I just installed gnuradio on my macbook and I wanted to test the usrp
but got the same error as Sam:

@ enter_search
802_15_4_pkt: waiting for packet
usrp_basic_rx: failed to start end point streaming

Next I tried to use the benchmark_usb.py file and I got this error:
Testing 2MB/sec… usrp_open_interface:usb_claim_interface: failed
interface 1
usb_claim_interface: couldn’t claim interface
usrp_basic_tx: can’t open tx interface
Traceback (most recent call last):
File “./benchmark_usb.py”, line 106, in ?
main ()
File “./benchmark_usb.py”, line 96, in main
ok = run_test (rate, verbose)
File “./benchmark_usb.py”, line 63, in run_test
usrp_tx = usrp.sink_s (0, tx_interp)
File “/usr/local/lib/python2.4/site-packages/gnuradio/usrp.py”, line
230, in init
fpga_filename, firmware_filename)
File “/usr/local/lib/python2.4/site-packages/gnuradio/usrp1.py”,
line 932, in sink_s
return _usrp1.sink_s(*args)
RuntimeError: can’t open usrp1

Interestingly, the firmware is uploaded successfully, i.e., the led
first blinks fast, then slower, and then I get the error.

Any ideas on what might be wrong?

Michael D. wrote:

I can tell you from the print-out that the issue is part of LIBUSB
(“usb_claim_interface”) which is used by the USRP, and not the USRP’s
FUSB code for Darwin. Maybe there are patches for 0.1.12 for Intel
which are needed? Any other Intel-mac users see this?
Works fine here (on MacBook Pro). I am also using libusb 0.1.12.

Is there any other debug/syslog output that would be useful to debug
this? I don’t have the same TX/RX boards as Thomas, but if we both pull
those boards and compare debug output, this should be easy to figure
out. Just need to know where to look.

Cheers,
Jan

Isn’t the way this works that the USRP disconnects/reconnects after the
firmware download? Maybe the Mac misses that somehow? What happens if
after loading the firmware you unplug and reconnect the USB?

Cheers,
Jan