diff --git a/apps/osmosdr_source.grc b/apps/osmosdr_source.grc index 446f015..939a7e4 100644 --- a/apps/osmosdr_source.grc +++ b/apps/osmosdr_source.grc @@ -1,6 +1,6 @@ - Wed Apr 11 17:53:04 2012 + Sat Apr 28 19:58:05 2012 options @@ -56,61 +56,6 @@ 0 - - variable_slider - - id - freq - - - _enabled - True - - - label - - - - value - 100e6 - - - min - 50e6 - - - max - 2.2e9 - - - num_steps - 1000 - - - style - wx.SL_HORIZONTAL - - - converver - float_converter - - - grid_pos - - - - notebook - - - - _coordinate - (268, 65) - - - _rotation - 0 - - variable_slider @@ -166,6 +111,29 @@ 0 + + variable + + id + samp_rate + + + _enabled + True + + + value + samplerate + + + _coordinate + (54, 141) + + + _rotation + 0 + + wxgui_fftsink2 @@ -246,7 +214,7 @@ _coordinate - (681, 242) + (724, 129) _rotation @@ -254,61 +222,133 @@ - variable + variable_slider id - samp_rate - - - _enabled - True - - - value - samplerate - - - _coordinate - (39, 137) - - - _rotation - 0 - - - - osmosdr_source_c - - id - osmosdr_source_c_0 - - - _enabled - True - - - args - - - - freq freq - freq_corr - 0 + _enabled + True - rate - samplerate + label + - gain - gain + value + 394.4e6 + + + min + 50e6 + + + max + 2.2e9 + + + num_steps + 1000 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + _coordinate - (278, 276) + (268, 65) + + + _rotation + 0 + + + + wxgui_waterfallsink2 + + id + wxgui_waterfallsink2_0 + + + _enabled + True + + + type + complex + + + title + Waterfall Plot + + + samp_rate + samp_rate + + + baseband_freq + freq + + + dynamic_range + 100 + + + ref_level + 0 + + + ref_scale + 2.0 + + + fft_size + 512 + + + fft_rate + 15 + + + average + False + + + avg_alpha + 0 + + + win + None + + + win_size + + + + grid_pos + + + + notebook + + + + _coordinate + (724, 320) _rotation @@ -363,7 +403,122 @@ _coordinate - (40, 237) + (38, 280) + + + _rotation + 0 + + + + osmosdr_source_c + + id + osmosdr_source_c_0 + + + _enabled + True + + + type + fc32 + + + args + rtl=0 + + + nchan + 1 + + + sample_rate + samp_rate + + + freq0 + freq + + + corr0 + 0 + + + gain0 + gain + + + ant0 + + + + freq1 + freq + + + corr1 + 0 + + + gain1 + gain + + + ant1 + + + + freq2 + 0 + + + corr2 + 0 + + + gain2 + 0 + + + ant2 + + + + freq3 + 0 + + + corr3 + 0 + + + gain3 + 0 + + + ant3 + + + + freq4 + 0 + + + corr4 + 0 + + + gain4 + 0 + + + ant4 + + + + _coordinate + (277, 277) _rotation @@ -376,4 +531,10 @@ 0 0 + + osmosdr_source_c_0 + wxgui_waterfallsink2_0 + 0 + 0 + diff --git a/apps/osmosdr_source.py b/apps/osmosdr_source.py index e7c3120..832d645 100755 --- a/apps/osmosdr_source.py +++ b/apps/osmosdr_source.py @@ -20,7 +20,10 @@ class osmosdr_source_c(grc_wxgui.top_block_gui): def __init__(self): grc_wxgui.top_block_gui.__init__(self, title="OsmoSDR Source") - self.src = osmosdr.source_c() + #self.src = osmosdr.source_c() + self.src = osmosdr.source_c("rtl=0") + #self.src = osmosdr.source_c("fcd=0") + #self.src = osmosdr.source_c("uhd=0") self.src.set_sample_rate(1024000) self.src.set_center_freq(394.5e6) @@ -55,6 +58,7 @@ class osmosdr_source_c(grc_wxgui.top_block_gui): ################################################## self.connect((self.src, 0), (self.sink, 0)) + def set_sample_rate(self, sample_rate): self.sample_rate = sample_rate self.sink.set_sample_rate(self.sample_rate) diff --git a/apps/osmosdr_source_multi.grc b/apps/osmosdr_source_multi.grc new file mode 100644 index 0000000..dc14239 --- /dev/null +++ b/apps/osmosdr_source_multi.grc @@ -0,0 +1,548 @@ + + + Sat Apr 28 20:02:00 2012 + + options + + id + osmosdr_source_c + + + _enabled + True + + + title + + + + author + + + + description + + + + window_size + 1280, 1024 + + + generate_options + wx_gui + + + category + Custom + + + run_options + prompt + + + run + True + + + realtime_scheduling + + + + _coordinate + (10, 10) + + + _rotation + 0 + + + + variable_slider + + id + gain + + + _enabled + True + + + label + + + + value + 10 + + + min + 0 + + + max + 30 + + + num_steps + 31 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + + + + _coordinate + (472, 65) + + + _rotation + 0 + + + + variable + + id + samp_rate + + + _enabled + True + + + value + samplerate + + + _coordinate + (54, 141) + + + _rotation + 0 + + + + variable_slider + + id + freq + + + _enabled + True + + + label + + + + value + 394e6 + + + min + 50e6 + + + max + 2.2e9 + + + num_steps + 1000 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + + + + _coordinate + (268, 65) + + + _rotation + 0 + + + + variable_slider + + id + samplerate + + + _enabled + True + + + label + + + + value + 2048e3 + + + min + 1e6 + + + max + 3.2e6 + + + num_steps + 100 + + + style + wx.SL_HORIZONTAL + + + converver + float_converter + + + grid_pos + + + + notebook + + + + _coordinate + (38, 280) + + + _rotation + 0 + + + + wxgui_fftsink2 + + id + wxgui_fftsink2_0 + + + _enabled + True + + + type + complex + + + title + FFT Plot + + + samp_rate + samp_rate + + + baseband_freq + freq + + + y_per_div + 10 + + + y_divs + 10 + + + ref_level + 0 + + + ref_scale + 2.0 + + + fft_size + 1024 + + + fft_rate + 15 + + + peak_hold + False + + + average + False + + + avg_alpha + 0 + + + win + None + + + win_size + + + + grid_pos + + + + notebook + + + + _coordinate + (717, 114) + + + _rotation + 0 + + + + wxgui_fftsink2 + + id + wxgui_fftsink2_0_0 + + + _enabled + True + + + type + complex + + + title + FFT Plot + + + samp_rate + samp_rate + + + baseband_freq + freq + + + y_per_div + 10 + + + y_divs + 10 + + + ref_level + 0 + + + ref_scale + 2.0 + + + fft_size + 1024 + + + fft_rate + 15 + + + peak_hold + False + + + average + False + + + avg_alpha + 0 + + + win + None + + + win_size + + + + grid_pos + + + + notebook + + + + _coordinate + (718, 318) + + + _rotation + 0 + + + + osmosdr_source_c + + id + osmosdr_source_c_0 + + + _enabled + True + + + type + fc32 + + + args + rtl=0 rtl=1 + + + nchan + 2 + + + sample_rate + samp_rate + + + freq0 + freq + + + corr0 + 0 + + + gain0 + gain + + + ant0 + + + + freq1 + freq + + + corr1 + 0 + + + gain1 + gain + + + ant1 + + + + freq2 + 0 + + + corr2 + 0 + + + gain2 + 0 + + + ant2 + + + + freq3 + 0 + + + corr3 + 0 + + + gain3 + 0 + + + ant3 + + + + freq4 + 0 + + + corr4 + 0 + + + gain4 + 0 + + + ant4 + + + + _coordinate + (277, 223) + + + _rotation + 0 + + + + osmosdr_source_c_0 + wxgui_fftsink2_0 + 0 + 0 + + + osmosdr_source_c_0 + wxgui_fftsink2_0_0 + 1 + 0 + + diff --git a/grc/gen_osmosdr_blocks.py b/grc/gen_osmosdr_blocks.py index 2b0fb21..7150350 100644 --- a/grc/gen_osmosdr_blocks.py +++ b/grc/gen_osmosdr_blocks.py @@ -25,7 +25,7 @@ MAIN_TMPL = """\ osmosdr_$(sourk)_c 1 import osmosdr - osmosdr.$(sourk)_c( args='nchan=' + str(\$nchan) + ' ' + \$args ) + osmosdr.$(sourk)_c( args="nchan=" + str(\$nchan) + " " + \$args ) self.\$(id).set_sample_rate(\$sample_rate) #for $n in range($max_nchan) \#if \$nchan() > $n @@ -108,8 +108,8 @@ of devices. If left blank, the first device found will be used. Examples: fcd=0 fcd=1 fcd=2 ... rtl=0 rtl=1 rtl=2 ... - uhd=0|name,mcr=52e6,chans=2 ... - osmo=0|name,mcr=64e6,chans=5,port=/dev/ttyUSB0 ... + uhd=0|name,mcr=52e6,nchan=2,subdev='\\\\'B:0 A:0'\\\\' ... + osmosdr=0|name,mcr=64e6,nchan=5,port=/dev/ttyUSB0 ... Num Channels: Selects the total number of channels in this multi-device configuration.