[Top][All Lists]

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

[Discuss-gnuradio] question about Simple Transmitter

From: mehdimolu
Subject: [Discuss-gnuradio] question about Simple Transmitter
Date: Fri, 13 Jun 2008 07:50:45 -0700 (PDT)


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

#!/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)
        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
        Busrptx.tune(subdev._which, subdev, txfreq)
        #usrp.sink_c.tune(Busrptx, chan, subdev, txfreq)

        fg.connect(Bsrc, (Bframing, 0))
        fg.connect(Bframing, Bdbpsk)
        fg.connect(Bdbpsk, Busrptx)
        return fg

if __name__ == '__main__': 
        fg = build_graph ()


View this message in context: 
Sent from the GnuRadio mailing list archive at Nabble.com.

reply via email to

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