Multiple antennas and multiple usrps

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Two not-that-related questions… but here goes.

  1. I notice that multi-antenna.py claims to only work with the BasicRX
    boards. Any reason I can’t use the 2 RX paths on each of 2 RFX2400s
    assuming the d’board is powered up and configured correctly?

  2. I have a transmitter USRP and a receiver USRP attached to the same
    machine. I use usrp.serial_number() as suggested by Eric in many
    previous mails to distinguish between them. I have a code loop like
    this:

which = 0
self.u = usrp.source_c(which, )
while self.u.serial_number() != “RX Serial”:
del self.u
which += 1
self.u = usrp.source_c(which, )

and the analogous loop in the transmitter code. If I start the program
that runs USRP #1 first, then this works fine; if I start the program
that runs USRP #0 first, then when the other gnu radio script opens
USRP #0 again, finds the wrong SN, and then opens #1, the
functionality of USRP #0 breaks. (I think). For instance, I can’t Ctrl-
C out of usrp_siggen.py any more if it’s the transmitter running on
USRP #0.

Any suggestions?

Thanks,

Dan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkhiuqwACgkQy9GYuuMoUJ5JgACggRcBQBHwJfTO6rGXR0wVcO6i
MWAAoIYELnUj1Ivo840cPX6tul9J/DpN
=hSaq
-----END PGP SIGNATURE-----

On Wed, Jun 25, 2008 at 02:37:48PM -0700, Dan H. wrote:

Two not-that-related questions… but here goes.

  1. I notice that multi-antenna.py claims to only work with the BasicRX
    boards. Any reason I can’t use the 2 RX paths on each of 2 RFX2400s
    assuming the d’board is powered up and configured correctly?

The RFX boards don’t actually have two receive paths. They have two
antenna ports. The boards output analog I & Q to the usrp
motherboard, and thus two A/D’s are required to handle each
daughterboard. With a single USRP and two RFX2400s you can handle two
inputs and two outputs.

  1. I have a transmitter USRP and a receiver USRP attached to the same
    machine. I use usrp.serial_number() as suggested by Eric in many
    previous mails to distinguish between them. I have a code loop like
    this:

Are you loading a different fpga image into the different USRPs?

You can get the serial numbers without actually opening them by using
the low level usrp prims. Take a look at usrp/host/swig/prims.i

from usrpm import usrp_prims

def get_serial_number(which):
d = usrp_prims.usrp_find_device(which)
if not d:
raise RuntimeError, “Unable to find USRP #%d” % (which,)
if usrp_prims.usrp_unconfigured_usrp_p(d): # no firmware
loaded yet
usrp_prims.usrp_load_standard_bits(which, False) # load the
firmware
return usrp_prims.usrp_usrp_serial_number(d)

Eric

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jun 25, 2008, at 3:20 PM, Eric B. wrote:

inputs and two outputs.
So what you’re saying is you can’t use the TX/RX and the RX2 both for
receive at the same time? I guess that jives with the figure here:

http://gnuradio.org/trac/wiki/UsrpRfxDiagrams

Instead, that’s only to enable concurrent transmit on TX and receive
on RX2… that doesn’t exactly seem that useful.

  1. I have a transmitter USRP and a receiver USRP attached to the same
    machine. I use usrp.serial_number() as suggested by Eric in many
    previous mails to distinguish between them. I have a code loop like
    this:

Are you loading a different fpga image into the different USRPs?

Yes, one is (was, I guess?) using std_4rx_0tx.rbf (see 1) and the
other was using the default.
Thanks,

Dan

if usrp_prims.usrp_unconfigured_usrp_p(d): # no
firmware loaded yet
usrp_prims.usrp_load_standard_bits(which, False) # load the
firmware
return usrp_prims.usrp_usrp_serial_number(d)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkhiyFIACgkQy9GYuuMoUJ6h5QCghGbyreXs4bMYFmHtOt9fLvmw
wPIAn3sHnuUyCzKQhvuVRIfaowzz8/Dz
=GMAx
-----END PGP SIGNATURE-----

On Wed, Jun 25, 2008 at 03:36:02PM -0700, Dan H. wrote:

motherboard, and thus two A/D’s are required to handle each
daughterboard. With a single USRP and two RFX2400s you can handle two
inputs and two outputs.

So what you’re saying is you can’t use the TX/RX and the RX2 both for
receive at the same time? I guess that jives with the figure here:

http://gnuradio.org/trac/wiki/UsrpRfxDiagrams

Instead, that’s only to enable concurrent transmit on TX and receive
on RX2… that doesn’t exactly seem that useful.

Actually, on a system with a LNA on the input and a power amp on the
output, it makes great sense in the typical half-duplex case.

Dan

That would do it :slight_smile:

Please let me know if the (untested) code fragment I sent works out.

Eric

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jun 25, 2008, at 4:28 PM, Eric B. wrote:

Thanks,

Dan

That would do it :slight_smile:

Please let me know if the (untested) code fragment I sent works out.

I ended up using the following code:

from usrpm import usrp_prims

def find_serial_number(serial):
which = 0
d = usrp_prims.usrp_find_device(which)
while True:
if not d: # No USRP connected
raise RuntimeError, “Unable to find USRP with Serial #
%s” %(serial)
if usrp_prims.usrp_unconfigured_usrp_p(d): # Needs firmware/
FPGA image
usrp_prims.usrp_load_standard_bits(which, False)
# Turn the usb_device into a usb_device_handle
handle = usrp_prims.usrp_open_cmd_interface(d)
# Get the Serial # (SN) out, then close device handle
SN = usrp_prims.usrp_serial_number(handle)
usrp_prims.usrp_close_interface(handle)
# Compare to desired
if SN == serial:
return which
# Next USRP
which += 1
d = usrp_prims.usrp_find_device(which)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkhkCTEACgkQy9GYuuMoUJ64sgCeJXZQqCWsG5lJQNSWkL6KnWw0
6k8AoIf++crasusKNHC0BPlq2l9OjZBC
=SSyF
-----END PGP SIGNATURE-----