hi,
i have made this simple program, it spouse to send tx signals one to
each tx board.
#!/usr/bin/env python
from gnuradio import gr
from gnuradio.eng_notation import num_to_str, str_to_num
from gnuradio import usrp
from gnuradio import audio
from gnuradio import blks
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import usrp_dbid
import math
import sys
def build_graph ():
fg = gr.flow_graph ()
u = usrp.sink_c(nchan=2, interp_rate=128)
sampling_freq = 128e6
src0 = gr.sig_source_f ( sampling_freq, gr.GR_SIN_WAVE, 30e4, 1.0, 1
)
src1 = gr.sig_source_f ( sampling_freq, gr.GR_SIN_WAVE, 10e4, 0.5, 1
)
#this was an am_tx script
#mixer = gr.multiply_ff ()
#dst = usrp.sink_c(0, 128)
#f2c = gr.float_to_complex()
interleaver = gr.interleave(gr.sizeof_gr_complex)
fg.connect(src0, (interleaver, 0))
fg.connect(src1, (interleaver, 1))
fg.connect(interleaver, u)
r0 = u.tune(0, u.db[0][0], 10e6) # set center freq on side A
d’board
r1 = u.tune(1, u.db[1][0], 5e6)
return fg
if name == ‘main’:
fg = build_graph ()
fg.start ()
raw_input ('Press Enter to quit: ')
fg.stop ()
when i run that code i get this error:
python am_tx_two_sig.py
Traceback (most recent call last):
File “am_tx_two_sig.py”, line 41, in ?
fg = build_graph ()
File “am_tx_two_sig.py”, line 32, in build_graph
fg.connect(src0, (interleaver, 0))
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 115, in connect
self._connect (points[i-1], points[i])
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 120, in _connect
self._connect_prim (s, d)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 128, in _connect_prim
self._check_type_match (src_endpoint, dst_endpoint)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 242, in _check_type_match
raise ValueError, (
ValueError: source and destination data sizes are different:
sig_source_f interleave
what is going wrong this is not much different of the
fm_tx_2_daughterboard.py.
Thanks
anmar