Here's a patch to make usrp_multi.py work with hier_block2 (and thus work with the latest release). I also corrected what I believe to be a bug with the default selection of which USRP as master, and added the ability to set the rbf filename to load in the fpga. If you want those broken out into separate patches let me know - but I figured this was small enough as it was.
I also have locally change the BBN 802.11b demodulator to use hier_block2, I'm going to try to organize those edits together to post a patch somewhere (Someone on the list had asked for them?). I expect to send them back to the BBN folks, but if anyone else wants it, let me know. Doug Index: gr-usrp/src/usrp_multi.py =================================================================== --- gr-usrp/src/usrp_multi.py (revision 9002) +++ gr-usrp/src/usrp_multi.py (working copy) @@ -21,16 +21,16 @@ import math from gnuradio import gr, gru -from gnuradio.gr import hier_block_base +from gnuradio.gr import hier_block2 from gnuradio import usrp -from gnuradio import usrp1 # usrp Rev 1 and later -from gnuradio import blks +#from gnuradio import usrp1 # usrp Rev 1 and later +#from gnuradio import blks2 from usrpm import usrp_prims import sys class multi_source_align(object): - def __init__(self, fg, master_serialno,decim,nchan=2,pga_gain=0.0,cordic_freq=0.0,mux=None,align_interval=-1): + def __init__(self, fg, master_serialno,decim,nchan=2,pga_gain=0.0,cordic_freq=0.0,mux=None,align_interval=-1,fpga_filename="multi_2rxhb_2tx.rbf"): """ Align multiple sources (usrps) using samplenumbers in the first channel. @@ -59,8 +59,8 @@ if mux is None: mux=self.get_default_mux() #Note that all channels have shifted left because of the added 32 bit counter channel - u1 = usrp.source_s (1, decim, nchan, gru.hexint(mux), mode,fpga_filename="multi_2rxhb_2tx.rbf" ) - u0 = usrp.source_s (0, decim, nchan, gru.hexint(mux), mode,fpga_filename="multi_2rxhb_2tx.rbf" ) + u1 = usrp.source_s (1, decim, nchan, gru.hexint(mux), mode,fpga_filename=fpga_filename ) + u0 = usrp.source_s (0, decim, nchan, gru.hexint(mux), mode,fpga_filename=fpga_filename ) print 'usrp[0] serial',u0.serial_number() print 'usrp[1] serial',u1.serial_number() #default, choose the second found usrp as master (which is usually the usrp which was first plugged in) @@ -82,10 +82,10 @@ print errorstring raise ValueError, errorstring else: #default, just choose the first found usrp as master - um_index=0 - um=u0 - us_index=1 - us=u1 + um_index=1 + um=u1 + us_index=0 + us=u0 self.usrp_master=um self.usrp_slave=us -- Doug Geiger Research Assistant Communications and Signal Processing Lab Oklahoma State University http://cspl.okstate.edu [EMAIL PROTECTED] [EMAIL PROTECTED] _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio