# Set up USRP source; also adjusts decim, samples_per_symbol, and bitrate
self._setup_usrp_source()
-
+
+ g = self.subdev.gain_range()
+ if options.show_rx_gain_range:
+ print "Rx Gain Range: minimum = %g, maximum = %g, step size = %g" \
+ % (g[0], g[1], g[2])
+
+ self.set_gain(options.rx_gain)
+
+ self.set_auto_tr(True) # enable Auto Transmit/Receive switching
+
+ # Set RF frequency
+ ok = self.set_freq(self._rx_freq)
+ if not ok:
+ print "Failed to set Rx frequency to %s" % (eng_notation.num_to_str(self._rx_freq))
+ raise ValueError, eng_notation.num_to_str(self._rx_freq)
+
# copy the final answers back into options for use by demodulator
options.samples_per_symbol = self._samples_per_symbol
options.bitrate = self._bitrate
chan_coeffs = gr.firdes.low_pass (1.0, # gain
sw_decim * self._samples_per_symbol, # sampling rate
1.0, # midpoint of trans. band
- 0.1, # width of trans. band
+ 0.5, # width of trans. band
gr.firdes.WIN_HANN) # filter type
# Decimating channel filter
access_code=None,
callback=self._rx_callback,
threshold=-1)
-
- ok = self.set_freq(self._rx_freq)
- if not ok:
- print "Failed to set Rx frequency to %s" % (eng_notation.num_to_str(self._rx_freq))
- raise ValueError, eng_notation.num_to_str(self._rx_freq)
- g = self.subdev.gain_range()
- if options.show_rx_gain_range:
- print "Rx Gain Range: minimum = %g, maximum = %g, step size = %g" \
- % (g[0], g[1], g[2])
-
- self.set_gain(options.rx_gain)
-
- self.set_auto_tr(True) # enable Auto Transmit/Receive switching
-
# Carrier Sensing Blocks
alpha = 0.001
thresh = 30 # in dB, will have to adjust
"""
Prints information about the receive path
"""
+ print "\nReceive Path:"
print "Using RX d'board %s" % (self.subdev.side_and_name(),)
print "Rx gain: %g" % (self.gain,)
print "modulation: %s" % (self._demod_class.__name__)