hi,
I wrote the code below to transmit a file. although i don’t receive any
error but I don’t see any thing on the spectrum analyzer around 2.4G. it
looks that it doesn’t transmit any thing. can some one tell me what is
the
problem
#!/usr/bin/env python
from gnuradio import gr, gru, modulation_utils
from gnuradio import usrp
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser
from gnuradio import blks2impl
from gnuradio import blks2
import random, time, struct, sys
from current dir
from transmit_path import transmit_path
import fusb_options
def build_graph():
payload_bytesize = 1024
mysamples_per_symbol = 3
myexcess_bw = 0.35
mygray_code = True
myverbose= False
mylog= False
txfreq = 2400000000
interpolation = 256
chan = 1
gain = 10
fg = gr.top_block ()
#in this step we need to define the file we want to transmit
Bsrc = gr.file_source (gr.sizeof_char,
“/home/usrp2user/PDF/payload.pdf”, False)
Bframing = gr.simple_framer ( payload_bytesize )
Bdbpsk = blks2.dbpsk_mod(mysamples_per_symbol, myexcess_bw,
mygray_code, myverbose, mylog)
Busrptx = usrp.sink_c(0)
Busrptx.set_interp_rate(interpolation)
subdev_spec = usrp.pick_tx_subdevice(Busrptx) # choose daughterboard
Busrptx.set_mux(usrp.determine_tx_mux_value(Busrptx, subdev_spec))
subdev = usrp.selected_subdev(Busrptx,subdev_spec) # now we got the
chosen(last line) daughterboard
subdev.set_enable(True) #enabling transmit :just in flex boards
subdev.set_gain(gain)
Busrptx.tune(subdev._which, subdev, txfreq)
#usrp.sink_c.tune(Busrptx, chan, subdev, txfreq)
#usrp.sink_c.set_pga(0,pga_gain_in_db)
fg.connect(Bsrc, (Bframing, 0))
fg.connect(Bframing, Bdbpsk)
fg.connect(Bdbpsk, Busrptx)
return fg
if name == ‘main’:
fg = build_graph ()
fg.run()
–
View this message in context:
http://www.nabble.com/question-about-Simple-Transmitter-tp17825212p17825212.html
Sent from the GnuRadio mailing list archive at Nabble.com.