discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Unable to find USRP


From: Berndt Josef Wulf
Subject: Re: [Discuss-gnuradio] Unable to find USRP
Date: Mon, 10 Oct 2005 08:36:29 +0930
User-agent: KMail/1.8.2

The following patch was applied to /sys/dev/usb/ugen.c in order to enable 
multiple access to the control port:

--- ugen.c.orig 2005-05-16 02:46:59.000000000 +0930
+++ ugen.c      2005-05-16 03:18:59.000000000 +0930
@@ -333,14 +333,14 @@
        if (sc == NULL || sc->sc_dying)
                return (ENXIO);

-       if (sc->sc_is_open[endpt])
-               return (EBUSY);
-
        if (endpt == USB_CONTROL_ENDPOINT) {
                sc->sc_is_open[USB_CONTROL_ENDPOINT] = 1;
                return (0);
        }

+       if (sc->sc_is_open[endpt])
+               return (EBUSY);
+
        /* Make sure there are pipes for all directions. */
        for (dir = OUT; dir <= IN; dir++) {
                if (flag & (dir == OUT ? FWRITE : FREAD)) {

Hope this helps.

cheerio Berndt

On Mon, 10 Oct 2005 00:52, LRK wrote:
> On Sun, May 15, 2005 at 10:13:03AM +0930, Berndt Josef Wulf wrote:
> > > This is similar to the problem I had with the audio device that doesn't
> > > permit it to be opened by two or more processes, see the lines
> > > containing EBUSY. I will try to figure out which part of
> > > benchmark_usb.py doesn't close the ugen device.
> >
> > The problem is that benchmark_usb.py opens usrp.sink() and usrp.source(),
> > both which use the open() calls to access the device. On *BSD this is not
> > possible and is exactly the some problem as seen with the audio.sink()
> > and audio.source() function that I hacked around.
>
> I'm trying to bring up GnuRadio under FreeBSD. I have not seen the problem
> with the audio device so maybe that has been fixed or FreeBSD does not see
> it.
>
> The USRP does the firmware loads using interface zero but fails after that.
> Have you run into this problem with NetBSD?
>
> Here is the error from benchmark_usb.py:
>
> Testing 2MB/sec...
> usrp_open_interface:usb_set_alt_interface: failed
> could not set alt intf 1/0: Invalid argument
> 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/gr/local/lib/python2.4/site-packages/gnuradio/usrp.py", line
> 200, in sink_s return ((_usrp0_sink_s_stub,
> _usrp1_sink_s)[_look_for_usrp(which)])(which, *args, **kwargs) File
> "/usr/gr/local/lib/python2.4/site-packages/gnuradio/usrp.py", line 170, in
> _usrp1_sink_s u = usrp1.sink_s(which, *args, **kwargs)
>   File "/usr/gr/local/lib/python2.4/site-packages/gnuradio/usrp1.py", line
> 1088, in sink_s return _usrp1.sink_s(*args)
> RuntimeError: std::runtime_error
>
>
> It appears to me to open the interface 1 or 2 but then fails to set the
> altinterface. I'm not up to speed on all this so any pointers to better
> docs might help. I don't have a tx board so most of my tests are with
> receive code but the only difference is it fails to open alt intf 2/0:
> rather than alt intf 1/0.
>
> Some of the usb man pages seem to say there will be devices like ugen0.1
> but I find nothing that would actually do that. I have the permissions
> set and the GR code opens and closes the /dev/ugen0 (0/0) device properly.
> It must be able to read and write the control endpoint in order to load
> the firmware. And since it has closed that, one would think it could open
> another endpoint as necessary. Needless to say, I'm a bit confused about
> endpoints/interfaces/altinterfaces/etc.
>
> I am gradually working thru the GR->libusb->ugen code but any help would
> be greatly appreciated.

Attachment: pgp8ifmDDuQKF.pgp
Description: PGP signature


reply via email to

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