discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Problem with USB on OSX?


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] Problem with USB on OSX?
Date: Tue, 12 Sep 2006 09:44:57 -0400

My lab will hopefully be getting a Mac Pro pretty soon, so I can debug this in person when that happens (if it's still necessary); hopefully the fix will commute to the MacBook as well.

I can tell you up front from the output you provided that it's a LIBUSB issue, since "usb_claim_interface()" is a LIBUSB command. In USRP, the error is found at "..../usrp/host/lib/usrp_prims.cc:265"; here is a rough forward traceback of USRP and LIBUSB calls:

usrp_basic_tx::usrp_basic_tx()
usrp_basic::usrp_basic ()
  usrp_find_device ()  --> must have returned a device, because
                otherwise it would have errorred out differently
open_tx_interface ()
usrp_open_tx_interface ()
usrp_open_interface()
  usb_open()           --> makes it past this, which is good
  usb_claim_interface ()  <-- this is where the error is

There is likely a bug in LIBUSB 0.1.12 under Darwin which is causing the issue, since none of the GNU Radio code seems to have changed significantly w/r.t. this issue. I haven't checked to see what changes have been made to LIBUSB recently, for Darwin or in general, but that might be a good place to look.

In the mean time, here is something you could try:

in your environment, set the environment variable "USB_DEBUG" to 5. THen go and run:

..../usrp/host/apps/test_usrp_standard_rx

and/or

..../usrp/host/apps/test_usrp_standard_tx

and/or

.../gnuradio-examples/python/usrp/benchmark_usb.py

with no options, and with various options. You should see a LOT of text output as LIBUSB does its thing. Maybe some part of the output towards the end will be informative? You can always save the output & send it to me (and/or the list). - MLD

ps> Also note that I already have a branch for working on FUSB darwin or something to do with it, since I and others have recently noticed that USRP transfers work intermittently under OSX (e.g. in the GMSK2 code). This is not yet classified as a bug, but it clearly is inhibiting performance under OSX and thus I'm investigating it as time allows. I've added some better error checking and printing to the async callbacks. You can check out and try that code (though it won't solve this issue; but it might print out more/other info which could be useful):

svn co http://gnuradio.org/svn/gnuradio/branches/developers/michaelld/ test_fusb_darwin
[bootstrap your favorite way]
./configure --disable-all-components --enable-gnuradio-core --enable- usrp --enable-gr-usrp
make

[... you'll probably want to back up /usr/local ... e.g. to run some of the scripts in gnuradio-examples ...]

pushd /usr
sudo mv local local_tmp
popd
sudo make install

[set environment variable USB_DEBUG to 5, specific to your shell]
./gnuradio-examples/python/usrp/benchmark_usb.py

then parse through the printouts to see what's happening. Or redirect the output to a file, then parse through the file, and/or send it to me to parse through.




reply via email to

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