Question on gr.wavfile_source

Hi All,

I’m trying to transmit a wave file using gr.wavfile_source(). To test my
transmission path, I first transmit a sine wave, and I can receive it
and
sink it to sound card fine. I can hear the sound at the receiver side.
However, if I change the source using gr.wavfile_source(), I can hear
nothing at the receiver side but noise. Here is the my tx_path below.

=======================================================
dac_rate = 128e6
usrp_interp = 500
self.u = usrp.sink_c (0, usrp_interp)
self.u.set_interp_rate(usrp_interp)
usrp_rate = dac_rate / usrp_interp # 256 kS/s

    #src = gr.sig_source_f (32e3, gr.GR_SIN_WAVE, 440, 1)  #--I can 

hear
it at the receiver side
src = gr.wavfile_source(‘test.wav’, False) #–nothing can be
heard
at the receiver side

    interp_taps = optfir.low_pass (8,           # gain
                                        usrp_rate,   # sampling rate
                                        8e3,        # passband 

cutoff
8e3
12e3, # stopband
cutoff
12e3
1.0, # passband
ripple
60) # stopband
attenuation
print ‘len(interp_taps)’,len(interp_taps)
self.interpolator = gr.interp_fir_filter_fff (8, interp_taps)
gain = gr.multiply_const_ff(200)
f2c = gr.float_to_complex()
self.connect (src,self.interpolator,gain, f2c, self.u)

How to solve the problem to hear the wave file at the receiver side?

Thanks in advance,
Brook

View this message in context:
http://www.nabble.com/Question-on-gr.wavfile_source-tp24176428p24176428.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Tue, Jun 23, 2009 at 04:49:10PM -0700, Brook L. wrote:

    self.u.set_interp_rate(usrp_interp)

8e3
12e3, # stopband cutoff
12e3
1.0, # passband ripple
60) # stopband
attenuation
print ‘len(interp_taps)’,len(interp_taps)
self.interpolator = gr.interp_fir_filter_fff (8, interp_taps)
gain = gr.multiply_const_ff(200)

I can’t spot an exact problem, but two things do come to mind:

  1. Your gain is awfully low, you’re hardly using the dynamic range of
    the ADC. Try something like 20000.
  2. Use an analog modulation, such as AM (w/ carrier) or FM.

MB

Thanks Martin for your reply. I gave a larger gain, but still doesn’t
work.
And I think I was using AM modulation in my tx_path, wasn’t it? And I
used
usrp_am_mw_rcv.py to receive my transmitted signal. Should I use
gr.interp_fir_filter_fff() on the transmitter side for am modulation?
Are
the parameters correct in optfir.low_pass()?

    interp_factor = usrp_rate/audio_rate

    interp_taps = optfir.low_pass (interp_factor,           # gain
                                        usrp_rate,   # sampling rate
                                        8e3,        # passband 

cutoff
8e3
12e3, # stopband
cutoff
12e3
1.0, # passband
ripple
60) # stopband
attenuation
print ‘len(interp_taps)’,len(interp_taps)
self.interpolator = gr.interp_fir_filter_fff (interp_factor,
interp_taps)

Thanks in advance for any reply.

Brook

Martin B.-3 wrote:

Universitaet Karlsruhe (TH) http://www.int.uni-karlsruhe.de/


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


View this message in context:
http://www.nabble.com/Question-on-gr.wavfile_source-tp24176428p24208903.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Thu, Jun 25, 2009 at 11:41:48AM -0700, Brook L. wrote:

Thanks Martin for your reply. I gave a larger gain, but still doesn’t work.
And I think I was using AM modulation in my tx_path, wasn’t it? And I used
usrp_am_mw_rcv.py to receive my transmitted signal. Should I use
gr.interp_fir_filter_fff() on the transmitter side for am modulation? Are
the parameters correct in optfir.low_pass()?

usrp_am_mw_rcv tries to remove a carrier which you have not sent, that’s
what I meant with AM modulation.

MB