discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] General question concerning usrp & audio


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] General question concerning usrp & audio
Date: Wed, 22 Sep 2010 09:20:20 -0400

On Tue, Sep 21, 2010 at 5:36 PM, Thomas Seidel <address@hidden> wrote:
> Thanks a lot for your help!
>
> file2.py now looks like this:
>
> class soundcheck(gr.top_block):
>
>    def __init__(self):
>      gr.top_block.__init__(self)
>
>      self.decim_rate = 256
>      self.u = usrp.source_c(0, self.decim_rate)
>
>      self.rx_subdev_spec = usrp.pick_rx_subdevice(self.u)
>      self.subdev = usrp.selected_subdev(self.u, self.rx_subdev_spec)
>      self.input_rate = self.u.adc_freq() / self.decim_rate
>
>     res = self.u.tune(0, self.subdev, 13.56e6)
>     if res:
>        print 'frequency successfully changed to 13.56Mhz'
>     else:
>       print 'tuning failed'
>      sys.exit(1)
>
>
>     interp = gru.lcm(self.input_rate, 48000) / self.input_rate
>     decim = gru.lcm(self.input_rate, 48000) / 48000
>     interp = int(interp)
>    decim = int(decim)
>
>    print 'interp = %d, decim = %d' % (interp, decim)
>    rr = blks2.rational_resampler_ccc(interp, decim)
>
>
>    self.sndsink = audio.sink(48000, 'plughw:0,0')
>    self.magblk = gr.complex_to_mag()
>    self.connect(self.u, rr, self.magblk, (self.sndsink, 0))
>
>
> As one can see I added the reational_resampler_ccc(), hoping that it does the 
> magic work needed that I can hear a nice sine wave, but still there is only 
> noise. On the transmitting side a gr.sig_source_c(48000, gr.GR_SIN_WAVE, 
> 4000, 1000) is used with the interpolation of the USRP set to a factor of 32. 
> Maybe I still lack of a proper understanding of the whole issue so that I 
> would really appreciate your help.
>
> Tom


I always find it useful to test a new transmitter by looking at the
received signal coming from the USRP. You can use usrp_fft.py to see
what's happening in the spectrum. You should be seeing a clean tone at
the frequency you're transmitting at. If the one isn't clean or isn't
there, you're still doing something wrong (probably be with the sample
rates).

When you're comfortable with the transmitter, then you can work on the
receiver (and Alexandru Csete's follow-up has good suggestions).

Tom



reply via email to

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