discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Couple USRP code questions


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Couple USRP code questions
Date: Fri, 6 Aug 2004 00:11:02 -0700
User-agent: Mutt/1.4.1i

On Thu, Aug 05, 2004 at 11:11:03PM -0500, David Carr wrote:
> I've just ported quite a bit of the USRP code to the SSRP.  Its gone 
> remarkably well thus far thanks to Matt and Eric's well written and 
> portable code.  Way to go guys.

Thanks!

> I have two current issues however and I 
> was wondering if anyone could shed some light on them.
> 
> I ported over test_fusb and its dependencies (usrp_prims.*,etc) however 
> the call to usb_claim_interface in ssrp_open_rx_interface always fails.  
> I have the FX2 loaded with firmware that has EP6 set as an IN BULK 512 
> byte endpoint.  I can read data from it using fx2_programmer 
> successfully.  This call seems fairly straightforward to me, what might 
> I be doing wrong?

Our firmware defines three interfaces:

    0: control and status
    1: tx data
    2: rx data

We do it this way so that two different programs/processes can open the tx
and rx sides simultaneously.  I'd guess that the interfaces that we're
using don't match the default interfaces defined for the FX2.

Take a look at usrp/firmware/include/usrp_interfaces.h
You'll need to define them to match your firmware (or the FX2 default,
if you're not handling the renumeration yourself).

> [My current development tarball is at 
> http://oscar.dcarr.org/ssrp/software/firmware/ssrp-0.2.0.tar.gz for more 
> details]. Is the interface argument anything more than a unique number?  
> I clearly need to read up on libusb...

It's a unique number, but it needs to correspond to the firmware
running on the FX2.  The firmware returns the usb descriptors that say
what interfaces exist and their characteristics.  You can see a
representation of the descriptors by using usbview or 
cat /proc/bus/usb/devices

> Secondly,
> When I try to build my configure.in, which uses the USRP macro 
> USRP_LIBUSB, autoconf barfs this up:
> autoconf: Undefined macros:
> ***BUG in Autoconf--please report*** AC_LANG_PUSH
> ***BUG in Autoconf--please report*** AC_LANG_POP
> 
> here's a copy of my configure.in
> AC_INIT

AC_PREREQ(2.50)         << -------  add this

> AM_CONFIG_HEADER(config.h)
> AM_INIT_AUTOMAKE(ssrp,0.2.0)
> AC_PATH_PROGS(FX2P,fx2_programmer)
> AC_PROG_CC
> AC_PROG_CXX
> AC_PROG_INSTALL
> AC_PROG_MAKE_SET
> AC_PROG_LIBTOOL
> 
> #USRP_LIBUSBDAVID //FIXME dirty hack
> USRP_LIBUSB
> USRP_SET_FUSB_TECHNIQUE
> 
> # Define where to look for USRP includes
> USRP_INCLUDES='-I$(top_srcdir)/host/lib -I$(top_srcdir)/firmware/include'
> AC_SUBST(USRP_INCLUDES)
> 
> #
> USRP_DEFINES=''
> AC_SUBST(USRP_DEFINES)
> 
> STD_DEFINES_AND_INCLUDES="$DEFINES $USRP_INCLUDES"
> AC_SUBST(STD_DEFINES_AND_INCLUDES)
> 
> 
> AC_OUTPUT(Makefile            \
>      config/Makefile        \
>      firmware/Makefile        \
>      firmware/include/Makefile    \
>      firmware/src/Makefile        \
>      firmware/src/ioA/Makefile    \
>      host/Makefile            \
>      host/apps/Makefile        \
>      host/lib/Makefile
>      )

Then be sure that you're using these tool versions or later:

       autoconf 2.57    or later
       automake 1.7.4   or later
       libtool  1.5     or later


> Thanks for the help,
> David Carr

Eric




reply via email to

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