├── README.md ├── WBFM_Transmitter.py ├── airband.py ├── airband_4.grc ├── ask_tx.grc ├── ceiling_fan_rx.grc ├── ceiling_fan_tx.grc ├── ceiling_fan_tx.py ├── fm-rv-uhd_fft.grc ├── fm_rx.grc ├── gfsk_tx.grc ├── gr-pocsag-master.zip ├── multi_tx.grc ├── multi_tx.py ├── osmo-tetra-master.zip ├── osmosdr_nfm_rx.grc ├── radio transmiter.grc ├── rv-uhd_fft.grc ├── rv-uhd_wbfm_receive.grc ├── sdr-examples-master.zip ├── signal-record.grc ├── signal-replay.grc ├── ssbrx.grc ├── top_block.py ├── uhd_fft.grc ├── uhd_fft.py ├── uhd_rx_dpsk.grc ├── uhd_rx_dpsk.py ├── uhd_wbfm_receive.py ├── va3odg.grc └── va3rft.grc /README.md: -------------------------------------------------------------------------------- 1 | first set of grc files archives you can use and modify for your projects. 2 | templates for usrp and hackrf 3 | -------------------------------------------------------------------------------- /WBFM_Transmitter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: WBFM Transmitter 6 | # Author: Scott Jordan 7 | # Description: Transmits WBFM from pc audio 8 | # Generated: Tue Sep 10 22:05:49 2019 9 | ################################################## 10 | 11 | 12 | if __name__ == '__main__': 13 | import ctypes 14 | import sys 15 | if sys.platform.startswith('linux'): 16 | try: 17 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 18 | x11.XInitThreads() 19 | except: 20 | print "Warning: failed to XInitThreads()" 21 | 22 | from gnuradio import eng_notation 23 | from gnuradio import gr 24 | from gnuradio import uhd 25 | from gnuradio.eng_option import eng_option 26 | from gnuradio.filter import firdes 27 | from gnuradio.wxgui import forms 28 | from grc_gnuradio import wxgui as grc_wxgui 29 | from optparse import OptionParser 30 | import baz 31 | import time 32 | import wx 33 | 34 | 35 | class WBFM_Transmitter(grc_wxgui.top_block_gui): 36 | 37 | def __init__(self): 38 | grc_wxgui.top_block_gui.__init__(self, title="WBFM Transmitter") 39 | _icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png" 40 | self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY)) 41 | 42 | ################################################## 43 | # Variables 44 | ################################################## 45 | self.rf_gain = rf_gain = 64 46 | self.if_gain = if_gain = 50 47 | self.freq = freq = 96100000 48 | self.bb_gain = bb_gain = 50 49 | self.audio_deci = audio_deci = 1 50 | self.aud_gain = aud_gain = 3 51 | self.adj = adj = 0 52 | 53 | ################################################## 54 | # Blocks 55 | ################################################## 56 | _bb_gain_sizer = wx.BoxSizer(wx.VERTICAL) 57 | self._bb_gain_text_box = forms.text_box( 58 | parent=self.GetWin(), 59 | sizer=_bb_gain_sizer, 60 | value=self.bb_gain, 61 | callback=self.set_bb_gain, 62 | label='BB Gain', 63 | converter=forms.float_converter(), 64 | proportion=0, 65 | ) 66 | self._bb_gain_slider = forms.slider( 67 | parent=self.GetWin(), 68 | sizer=_bb_gain_sizer, 69 | value=self.bb_gain, 70 | callback=self.set_bb_gain, 71 | minimum=0, 72 | maximum=100, 73 | num_steps=100, 74 | style=wx.SL_HORIZONTAL, 75 | cast=float, 76 | proportion=1, 77 | ) 78 | self.GridAdd(_bb_gain_sizer, 5, 1, 1, 1) 79 | self.uhd_usrp_sink_0_0 = uhd.usrp_sink( 80 | ",".join(('serial=30C7E1D', "")), 81 | uhd.stream_args( 82 | cpu_format="fc32", 83 | channels=range(1), 84 | ), 85 | ) 86 | self.uhd_usrp_sink_0_0.set_samp_rate(1000000) 87 | self.uhd_usrp_sink_0_0.set_center_freq(433.893e6, 0) 88 | self.uhd_usrp_sink_0_0.set_gain(bb_gain, 0) 89 | self.uhd_usrp_sink_0_0.set_antenna('TX/RX', 0) 90 | self.uhd_usrp_sink_0_0.set_bandwidth(1000000, 0) 91 | _rf_gain_sizer = wx.BoxSizer(wx.VERTICAL) 92 | self._rf_gain_text_box = forms.text_box( 93 | parent=self.GetWin(), 94 | sizer=_rf_gain_sizer, 95 | value=self.rf_gain, 96 | callback=self.set_rf_gain, 97 | label='RF Gain', 98 | converter=forms.float_converter(), 99 | proportion=0, 100 | ) 101 | self._rf_gain_slider = forms.slider( 102 | parent=self.GetWin(), 103 | sizer=_rf_gain_sizer, 104 | value=self.rf_gain, 105 | callback=self.set_rf_gain, 106 | minimum=0, 107 | maximum=100, 108 | num_steps=100, 109 | style=wx.SL_HORIZONTAL, 110 | cast=float, 111 | proportion=1, 112 | ) 113 | self.GridAdd(_rf_gain_sizer, 3, 1, 1, 1) 114 | _if_gain_sizer = wx.BoxSizer(wx.VERTICAL) 115 | self._if_gain_text_box = forms.text_box( 116 | parent=self.GetWin(), 117 | sizer=_if_gain_sizer, 118 | value=self.if_gain, 119 | callback=self.set_if_gain, 120 | label='IF Gain', 121 | converter=forms.float_converter(), 122 | proportion=0, 123 | ) 124 | self._if_gain_slider = forms.slider( 125 | parent=self.GetWin(), 126 | sizer=_if_gain_sizer, 127 | value=self.if_gain, 128 | callback=self.set_if_gain, 129 | minimum=0, 130 | maximum=100, 131 | num_steps=100, 132 | style=wx.SL_HORIZONTAL, 133 | cast=float, 134 | proportion=1, 135 | ) 136 | self.GridAdd(_if_gain_sizer, 4, 1, 1, 1) 137 | _freq_sizer = wx.BoxSizer(wx.VERTICAL) 138 | self._freq_text_box = forms.text_box( 139 | parent=self.GetWin(), 140 | sizer=_freq_sizer, 141 | value=self.freq, 142 | callback=self.set_freq, 143 | label='Transmit Frequency', 144 | converter=forms.float_converter(), 145 | proportion=0, 146 | ) 147 | self._freq_slider = forms.slider( 148 | parent=self.GetWin(), 149 | sizer=_freq_sizer, 150 | value=self.freq, 151 | callback=self.set_freq, 152 | minimum=88100000, 153 | maximum=108100000, 154 | num_steps=100, 155 | style=wx.SL_HORIZONTAL, 156 | cast=float, 157 | proportion=1, 158 | ) 159 | self.GridAdd(_freq_sizer, 1, 1, 1, 1) 160 | self.baz_file_source_0 = baz.file_source((0 if 0 > 0 else gr.sizeof_gr_complex)*1, '', True, 0, '', False, 0, True, []) 161 | _audio_deci_sizer = wx.BoxSizer(wx.VERTICAL) 162 | self._audio_deci_text_box = forms.text_box( 163 | parent=self.GetWin(), 164 | sizer=_audio_deci_sizer, 165 | value=self.audio_deci, 166 | callback=self.set_audio_deci, 167 | label='Input Audio Decimation', 168 | converter=forms.float_converter(), 169 | proportion=0, 170 | ) 171 | self._audio_deci_slider = forms.slider( 172 | parent=self.GetWin(), 173 | sizer=_audio_deci_sizer, 174 | value=self.audio_deci, 175 | callback=self.set_audio_deci, 176 | minimum=0, 177 | maximum=20, 178 | num_steps=1000, 179 | style=wx.SL_HORIZONTAL, 180 | cast=float, 181 | proportion=1, 182 | ) 183 | self.GridAdd(_audio_deci_sizer, 7, 1, 1, 1) 184 | _aud_gain_sizer = wx.BoxSizer(wx.VERTICAL) 185 | self._aud_gain_text_box = forms.text_box( 186 | parent=self.GetWin(), 187 | sizer=_aud_gain_sizer, 188 | value=self.aud_gain, 189 | callback=self.set_aud_gain, 190 | label='Audio Input Gain', 191 | converter=forms.float_converter(), 192 | proportion=0, 193 | ) 194 | self._aud_gain_slider = forms.slider( 195 | parent=self.GetWin(), 196 | sizer=_aud_gain_sizer, 197 | value=self.aud_gain, 198 | callback=self.set_aud_gain, 199 | minimum=1, 200 | maximum=100, 201 | num_steps=1000, 202 | style=wx.SL_HORIZONTAL, 203 | cast=float, 204 | proportion=1, 205 | ) 206 | self.GridAdd(_aud_gain_sizer, 6, 1, 1, 1) 207 | _adj_sizer = wx.BoxSizer(wx.VERTICAL) 208 | self._adj_text_box = forms.text_box( 209 | parent=self.GetWin(), 210 | sizer=_adj_sizer, 211 | value=self.adj, 212 | callback=self.set_adj, 213 | label='Fine Transmit Adj.', 214 | converter=forms.float_converter(), 215 | proportion=0, 216 | ) 217 | self._adj_slider = forms.slider( 218 | parent=self.GetWin(), 219 | sizer=_adj_sizer, 220 | value=self.adj, 221 | callback=self.set_adj, 222 | minimum=-200000, 223 | maximum=200000, 224 | num_steps=1000, 225 | style=wx.SL_HORIZONTAL, 226 | cast=float, 227 | proportion=1, 228 | ) 229 | self.GridAdd(_adj_sizer, 2, 1, 1, 1) 230 | 231 | 232 | 233 | ################################################## 234 | # Connections 235 | ################################################## 236 | self.connect((self.baz_file_source_0, 0), (self.uhd_usrp_sink_0_0, 0)) 237 | 238 | def get_rf_gain(self): 239 | return self.rf_gain 240 | 241 | def set_rf_gain(self, rf_gain): 242 | self.rf_gain = rf_gain 243 | self._rf_gain_slider.set_value(self.rf_gain) 244 | self._rf_gain_text_box.set_value(self.rf_gain) 245 | 246 | def get_if_gain(self): 247 | return self.if_gain 248 | 249 | def set_if_gain(self, if_gain): 250 | self.if_gain = if_gain 251 | self._if_gain_slider.set_value(self.if_gain) 252 | self._if_gain_text_box.set_value(self.if_gain) 253 | 254 | def get_freq(self): 255 | return self.freq 256 | 257 | def set_freq(self, freq): 258 | self.freq = freq 259 | self._freq_slider.set_value(self.freq) 260 | self._freq_text_box.set_value(self.freq) 261 | 262 | def get_bb_gain(self): 263 | return self.bb_gain 264 | 265 | def set_bb_gain(self, bb_gain): 266 | self.bb_gain = bb_gain 267 | self._bb_gain_slider.set_value(self.bb_gain) 268 | self._bb_gain_text_box.set_value(self.bb_gain) 269 | self.uhd_usrp_sink_0_0.set_gain(self.bb_gain, 0) 270 | 271 | 272 | def get_audio_deci(self): 273 | return self.audio_deci 274 | 275 | def set_audio_deci(self, audio_deci): 276 | self.audio_deci = audio_deci 277 | self._audio_deci_slider.set_value(self.audio_deci) 278 | self._audio_deci_text_box.set_value(self.audio_deci) 279 | 280 | def get_aud_gain(self): 281 | return self.aud_gain 282 | 283 | def set_aud_gain(self, aud_gain): 284 | self.aud_gain = aud_gain 285 | self._aud_gain_slider.set_value(self.aud_gain) 286 | self._aud_gain_text_box.set_value(self.aud_gain) 287 | 288 | def get_adj(self): 289 | return self.adj 290 | 291 | def set_adj(self, adj): 292 | self.adj = adj 293 | self._adj_slider.set_value(self.adj) 294 | self._adj_text_box.set_value(self.adj) 295 | 296 | 297 | def main(top_block_cls=WBFM_Transmitter, options=None): 298 | if gr.enable_realtime_scheduling() != gr.RT_OK: 299 | print "Error: failed to enable real-time scheduling." 300 | 301 | tb = top_block_cls() 302 | tb.Start(True) 303 | tb.Wait() 304 | 305 | 306 | if __name__ == '__main__': 307 | main() 308 | -------------------------------------------------------------------------------- /airband.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: Airband 6 | # Author: Tapio Valli 7 | # Description: Simple airband scanner 8 | # Generated: Mon Jun 27 13:34:23 2016 9 | ################################################## 10 | 11 | if __name__ == '__main__': 12 | import ctypes 13 | import sys 14 | if sys.platform.startswith('linux'): 15 | try: 16 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 17 | x11.XInitThreads() 18 | except: 19 | print "Warning: failed to XInitThreads()" 20 | 21 | from gnuradio import analog 22 | from gnuradio import audio 23 | from gnuradio import blocks 24 | from gnuradio import eng_notation 25 | from gnuradio import filter 26 | from gnuradio import gr 27 | from gnuradio import uhd 28 | from gnuradio import wxgui 29 | from gnuradio.eng_option import eng_option 30 | from gnuradio.fft import window 31 | from gnuradio.filter import firdes 32 | from gnuradio.wxgui import fftsink2 33 | from gnuradio.wxgui import forms 34 | from grc_gnuradio import wxgui as grc_wxgui 35 | from optparse import OptionParser 36 | import time 37 | import wx 38 | 39 | 40 | class airband(grc_wxgui.top_block_gui): 41 | 42 | def __init__(self): 43 | grc_wxgui.top_block_gui.__init__(self, title="Airband") 44 | _icon_path = "C:\gnuradio\share\icons\hicolor\48x48/apps\gnuradio-grc.png" 45 | self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY)) 46 | 47 | ################################################## 48 | # Variables 49 | ################################################## 50 | self.volume = volume = 500e-3 51 | self.samp_rate = samp_rate = 2.4e6 52 | self.offset_freq = offset_freq = -300e3 53 | self.freq_corr = freq_corr = 65 54 | self.base_freq = base_freq = 119.4e6 55 | 56 | ################################################## 57 | # Blocks 58 | ################################################## 59 | _volume_sizer = wx.BoxSizer(wx.VERTICAL) 60 | self._volume_text_box = forms.text_box( 61 | parent=self.GetWin(), 62 | sizer=_volume_sizer, 63 | value=self.volume, 64 | callback=self.set_volume, 65 | label="Volume", 66 | converter=forms.float_converter(), 67 | proportion=0, 68 | ) 69 | self._volume_slider = forms.slider( 70 | parent=self.GetWin(), 71 | sizer=_volume_sizer, 72 | value=self.volume, 73 | callback=self.set_volume, 74 | minimum=0, 75 | maximum=1, 76 | num_steps=100, 77 | style=wx.SL_HORIZONTAL, 78 | cast=float, 79 | proportion=1, 80 | ) 81 | self.Add(_volume_sizer) 82 | self._offset_freq_chooser = forms.radio_buttons( 83 | parent=self.GetWin(), 84 | value=self.offset_freq, 85 | callback=self.set_offset_freq, 86 | label="Frequency select", 87 | choices=[-800e3,-550e3, -300e3,300e3,500e3], 88 | labels=["meythet 118.2M","TWR2 118.85M", "APP1 119.1M","APP2 119.7M","APP3 119.9M"], 89 | style=wx.RA_VERTICAL, 90 | ) 91 | self.Add(self._offset_freq_chooser) 92 | self.wxgui_fftsink2_0 = fftsink2.fft_sink_c( 93 | self.GetWin(), 94 | baseband_freq=0, 95 | y_per_div=10, 96 | y_divs=10, 97 | ref_level=0, 98 | ref_scale=2.0, 99 | sample_rate=samp_rate, 100 | fft_size=512, 101 | fft_rate=5, 102 | average=False, 103 | avg_alpha=None, 104 | title="FFT Plot", 105 | peak_hold=False, 106 | ) 107 | self.Add(self.wxgui_fftsink2_0.win) 108 | self.uhd_usrp_source_0 = uhd.usrp_source( 109 | ",".join(("", "")), 110 | uhd.stream_args( 111 | cpu_format="fc32", 112 | channels=range(1), 113 | ), 114 | ) 115 | self.uhd_usrp_source_0.set_samp_rate(samp_rate) 116 | self.uhd_usrp_source_0.set_center_freq(base_freq, 0) 117 | self.uhd_usrp_source_0.set_gain(0, 0) 118 | self.uhd_usrp_source_0.set_antenna("RX2", 0) 119 | self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(50, (firdes.low_pass_2(1,samp_rate,25e3,10e3,40)), offset_freq, samp_rate) 120 | _freq_corr_sizer = wx.BoxSizer(wx.VERTICAL) 121 | self._freq_corr_text_box = forms.text_box( 122 | parent=self.GetWin(), 123 | sizer=_freq_corr_sizer, 124 | value=self.freq_corr, 125 | callback=self.set_freq_corr, 126 | label="Freq correction (ppm)", 127 | converter=forms.int_converter(), 128 | proportion=0, 129 | ) 130 | self._freq_corr_slider = forms.slider( 131 | parent=self.GetWin(), 132 | sizer=_freq_corr_sizer, 133 | value=self.freq_corr, 134 | callback=self.set_freq_corr, 135 | minimum=-127, 136 | maximum=127, 137 | num_steps=254, 138 | style=wx.SL_HORIZONTAL, 139 | cast=int, 140 | proportion=1, 141 | ) 142 | self.Add(_freq_corr_sizer) 143 | self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((volume, )) 144 | self.audio_sink_0 = audio.sink(48000, "pulse", True) 145 | self.analog_am_demod_cf_0 = analog.am_demod_cf( 146 | channel_rate=48e3, 147 | audio_decim=1, 148 | audio_pass=5000, 149 | audio_stop=5500, 150 | ) 151 | self.analog_agc2_xx_0 = analog.agc2_cc(1e-1, 1e-5, 1, 0) 152 | self.analog_agc2_xx_0.set_max_gain(5) 153 | 154 | ################################################## 155 | # Connections 156 | ################################################## 157 | self.connect((self.analog_agc2_xx_0, 0), (self.analog_am_demod_cf_0, 0)) 158 | self.connect((self.analog_am_demod_cf_0, 0), (self.blocks_multiply_const_vxx_0, 0)) 159 | self.connect((self.blocks_multiply_const_vxx_0, 0), (self.audio_sink_0, 0)) 160 | self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_agc2_xx_0, 0)) 161 | self.connect((self.uhd_usrp_source_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) 162 | self.connect((self.uhd_usrp_source_0, 0), (self.wxgui_fftsink2_0, 0)) 163 | 164 | def get_volume(self): 165 | return self.volume 166 | 167 | def set_volume(self, volume): 168 | self.volume = volume 169 | self._volume_slider.set_value(self.volume) 170 | self._volume_text_box.set_value(self.volume) 171 | self.blocks_multiply_const_vxx_0.set_k((self.volume, )) 172 | 173 | def get_samp_rate(self): 174 | return self.samp_rate 175 | 176 | def set_samp_rate(self, samp_rate): 177 | self.samp_rate = samp_rate 178 | self.freq_xlating_fir_filter_xxx_0.set_taps((firdes.low_pass_2(1,self.samp_rate,25e3,10e3,40))) 179 | self.uhd_usrp_source_0.set_samp_rate(self.samp_rate) 180 | self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate) 181 | 182 | def get_offset_freq(self): 183 | return self.offset_freq 184 | 185 | def set_offset_freq(self, offset_freq): 186 | self.offset_freq = offset_freq 187 | self._offset_freq_chooser.set_value(self.offset_freq) 188 | self.freq_xlating_fir_filter_xxx_0.set_center_freq(self.offset_freq) 189 | 190 | def get_freq_corr(self): 191 | return self.freq_corr 192 | 193 | def set_freq_corr(self, freq_corr): 194 | self.freq_corr = freq_corr 195 | self._freq_corr_slider.set_value(self.freq_corr) 196 | self._freq_corr_text_box.set_value(self.freq_corr) 197 | 198 | def get_base_freq(self): 199 | return self.base_freq 200 | 201 | def set_base_freq(self, base_freq): 202 | self.base_freq = base_freq 203 | self.uhd_usrp_source_0.set_center_freq(self.base_freq, 0) 204 | 205 | 206 | def main(top_block_cls=airband, options=None): 207 | 208 | tb = top_block_cls() 209 | tb.Start(True) 210 | tb.Wait() 211 | 212 | 213 | if __name__ == '__main__': 214 | main() 215 | -------------------------------------------------------------------------------- /ask_tx.grc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sun Mar 23 19:26:00 2014 4 | 5 | options 6 | 7 | id 8 | ask_tx 9 | 10 | 11 | _enabled 12 | True 13 | 14 | 15 | title 16 | 17 | 18 | 19 | author 20 | 21 | 22 | 23 | description 24 | 25 | 26 | 27 | window_size 28 | 1280, 1024 29 | 30 | 31 | generate_options 32 | wx_gui 33 | 34 | 35 | category 36 | Custom 37 | 38 | 39 | run_options 40 | prompt 41 | 42 | 43 | run 44 | True 45 | 46 | 47 | max_nouts 48 | 0 49 | 50 | 51 | realtime_scheduling 52 | 53 | 54 | 55 | _coordinate 56 | (10, 10) 57 | 58 | 59 | _rotation 60 | 0 61 | 62 | 63 | 64 | variable 65 | 66 | id 67 | samp_rate 68 | 69 | 70 | _enabled 71 | True 72 | 73 | 74 | value 75 | 192000 76 | 77 | 78 | _coordinate 79 | (35, 138) 80 | 81 | 82 | _rotation 83 | 0 84 | 85 | 86 | 87 | variable 88 | 89 | id 90 | center_freq 91 | 92 | 93 | _enabled 94 | True 95 | 96 | 97 | value 98 | 441000000 99 | 100 | 101 | _coordinate 102 | (34, 208) 103 | 104 | 105 | _rotation 106 | 0 107 | 108 | 109 | 110 | ham_varicode_tx 111 | 112 | id 113 | ham_varicode_tx_0 114 | 115 | 116 | _enabled 117 | True 118 | 119 | 120 | affinity 121 | 122 | 123 | 124 | minoutbuf 125 | 0 126 | 127 | 128 | maxoutbuf 129 | 0 130 | 131 | 132 | _coordinate 133 | (459, 154) 134 | 135 | 136 | _rotation 137 | 0 138 | 139 | 140 | 141 | digital_chunks_to_symbols_xx 142 | 143 | id 144 | digital_chunks_to_symbols_xx_0 145 | 146 | 147 | _enabled 148 | True 149 | 150 | 151 | in_type 152 | byte 153 | 154 | 155 | out_type 156 | complex 157 | 158 | 159 | symbol_table 160 | [0,1] 161 | 162 | 163 | dimension 164 | 1 165 | 166 | 167 | num_ports 168 | 1 169 | 170 | 171 | affinity 172 | 173 | 174 | 175 | minoutbuf 176 | 0 177 | 178 | 179 | maxoutbuf 180 | 0 181 | 182 | 183 | _coordinate 184 | (662, 142) 185 | 186 | 187 | _rotation 188 | 0 189 | 190 | 191 | 192 | interp_fir_filter_xxx 193 | 194 | id 195 | interp_fir_filter_xxx_0 196 | 197 | 198 | _enabled 199 | True 200 | 201 | 202 | type 203 | ccc 204 | 205 | 206 | interp 207 | 20 208 | 209 | 210 | taps 211 | numpy.convolve(numpy.array(filter.firdes.gaussian(1, 20, 1.0, 4*20)),numpy.array((1,) * 20)) 212 | 213 | 214 | samp_delay 215 | 0 216 | 217 | 218 | affinity 219 | 220 | 221 | 222 | minoutbuf 223 | 0 224 | 225 | 226 | maxoutbuf 227 | 0 228 | 229 | 230 | _coordinate 231 | (874, 142) 232 | 233 | 234 | _rotation 235 | 0 236 | 237 | 238 | 239 | blocks_file_source 240 | 241 | id 242 | blocks_file_source_0 243 | 244 | 245 | _enabled 246 | True 247 | 248 | 249 | file 250 | /home/argilo/git/sdr-examples/alice-in-wonderland.txt 251 | 252 | 253 | type 254 | byte 255 | 256 | 257 | repeat 258 | True 259 | 260 | 261 | vlen 262 | 1 263 | 264 | 265 | affinity 266 | 267 | 268 | 269 | minoutbuf 270 | 0 271 | 272 | 273 | maxoutbuf 274 | 0 275 | 276 | 277 | _coordinate 278 | (219, 142) 279 | 280 | 281 | _rotation 282 | 0 283 | 284 | 285 | 286 | variable_slider 287 | 288 | id 289 | gain 290 | 291 | 292 | _enabled 293 | True 294 | 295 | 296 | label 297 | 298 | 299 | 300 | value 301 | 25 302 | 303 | 304 | min 305 | 0 306 | 307 | 308 | max 309 | 25 310 | 311 | 312 | num_steps 313 | 25 314 | 315 | 316 | style 317 | wx.SL_HORIZONTAL 318 | 319 | 320 | converver 321 | float_converter 322 | 323 | 324 | grid_pos 325 | 326 | 327 | 328 | notebook 329 | 330 | 331 | 332 | _coordinate 333 | (34, 280) 334 | 335 | 336 | _rotation 337 | 0 338 | 339 | 340 | 341 | osmosdr_sink 342 | 343 | id 344 | osmosdr_sink_0 345 | 346 | 347 | _enabled 348 | True 349 | 350 | 351 | type 352 | fc32 353 | 354 | 355 | args 356 | 357 | 358 | 359 | nchan 360 | 1 361 | 362 | 363 | sample_rate 364 | samp_rate * 10 365 | 366 | 367 | freq0 368 | center_freq 369 | 370 | 371 | corr0 372 | 0 373 | 374 | 375 | gain0 376 | gain 377 | 378 | 379 | if_gain0 380 | 20 381 | 382 | 383 | bb_gain0 384 | 20 385 | 386 | 387 | ant0 388 | 389 | 390 | 391 | bw0 392 | 0 393 | 394 | 395 | freq1 396 | 100e6 397 | 398 | 399 | corr1 400 | 0 401 | 402 | 403 | gain1 404 | 10 405 | 406 | 407 | if_gain1 408 | 20 409 | 410 | 411 | bb_gain1 412 | 20 413 | 414 | 415 | ant1 416 | 417 | 418 | 419 | bw1 420 | 0 421 | 422 | 423 | freq2 424 | 100e6 425 | 426 | 427 | corr2 428 | 0 429 | 430 | 431 | gain2 432 | 10 433 | 434 | 435 | if_gain2 436 | 20 437 | 438 | 439 | bb_gain2 440 | 20 441 | 442 | 443 | ant2 444 | 445 | 446 | 447 | bw2 448 | 0 449 | 450 | 451 | freq3 452 | 100e6 453 | 454 | 455 | corr3 456 | 0 457 | 458 | 459 | gain3 460 | 10 461 | 462 | 463 | if_gain3 464 | 20 465 | 466 | 467 | bb_gain3 468 | 20 469 | 470 | 471 | ant3 472 | 473 | 474 | 475 | bw3 476 | 0 477 | 478 | 479 | freq4 480 | 100e6 481 | 482 | 483 | corr4 484 | 0 485 | 486 | 487 | gain4 488 | 10 489 | 490 | 491 | if_gain4 492 | 20 493 | 494 | 495 | bb_gain4 496 | 20 497 | 498 | 499 | ant4 500 | 501 | 502 | 503 | bw4 504 | 0 505 | 506 | 507 | affinity 508 | 509 | 510 | 511 | _coordinate 512 | (435, 247) 513 | 514 | 515 | _rotation 516 | 180 517 | 518 | 519 | 520 | rational_resampler_xxx 521 | 522 | id 523 | rational_resampler_xxx_0 524 | 525 | 526 | _enabled 527 | True 528 | 529 | 530 | type 531 | ccc 532 | 533 | 534 | interp 535 | 10 536 | 537 | 538 | decim 539 | 1 540 | 541 | 542 | taps 543 | 544 | 545 | 546 | fbw 547 | 0 548 | 549 | 550 | affinity 551 | 552 | 553 | 554 | minoutbuf 555 | 0 556 | 557 | 558 | maxoutbuf 559 | 0 560 | 561 | 562 | _coordinate 563 | (685, 263) 564 | 565 | 566 | _rotation 567 | 180 568 | 569 | 570 | 571 | blocks_multiply_const_vxx 572 | 573 | id 574 | blocks_multiply_const_vxx_0 575 | 576 | 577 | _enabled 578 | True 579 | 580 | 581 | type 582 | complex 583 | 584 | 585 | const 586 | 0.9 587 | 588 | 589 | vlen 590 | 1 591 | 592 | 593 | affinity 594 | 595 | 596 | 597 | minoutbuf 598 | 0 599 | 600 | 601 | maxoutbuf 602 | 0 603 | 604 | 605 | _coordinate 606 | (916, 287) 607 | 608 | 609 | _rotation 610 | 180 611 | 612 | 613 | 614 | import 615 | 616 | id 617 | import_0 618 | 619 | 620 | _enabled 621 | True 622 | 623 | 624 | import 625 | import numpy 626 | 627 | 628 | _coordinate 629 | (191, 16) 630 | 631 | 632 | _rotation 633 | 0 634 | 635 | 636 | 637 | blocks_file_source_0 638 | ham_varicode_tx_0 639 | 0 640 | 0 641 | 642 | 643 | ham_varicode_tx_0 644 | digital_chunks_to_symbols_xx_0 645 | 0 646 | 0 647 | 648 | 649 | digital_chunks_to_symbols_xx_0 650 | interp_fir_filter_xxx_0 651 | 0 652 | 0 653 | 654 | 655 | interp_fir_filter_xxx_0 656 | blocks_multiply_const_vxx_0 657 | 0 658 | 0 659 | 660 | 661 | blocks_multiply_const_vxx_0 662 | rational_resampler_xxx_0 663 | 0 664 | 0 665 | 666 | 667 | rational_resampler_xxx_0 668 | osmosdr_sink_0 669 | 0 670 | 0 671 | 672 | 673 | -------------------------------------------------------------------------------- /ceiling_fan_rx.grc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sat Mar 22 22:46:09 2014 4 | 5 | options 6 | 7 | id 8 | top_block 9 | 10 | 11 | _enabled 12 | True 13 | 14 | 15 | title 16 | 17 | 18 | 19 | author 20 | 21 | 22 | 23 | description 24 | 25 | 26 | 27 | window_size 28 | 1280, 1024 29 | 30 | 31 | generate_options 32 | wx_gui 33 | 34 | 35 | category 36 | Custom 37 | 38 | 39 | run_options 40 | prompt 41 | 42 | 43 | run 44 | True 45 | 46 | 47 | max_nouts 48 | 0 49 | 50 | 51 | realtime_scheduling 52 | 53 | 54 | 55 | _coordinate 56 | (10, 10) 57 | 58 | 59 | _rotation 60 | 0 61 | 62 | 63 | 64 | variable 65 | 66 | id 67 | offset 68 | 69 | 70 | _enabled 71 | True 72 | 73 | 74 | value 75 | 100000 76 | 77 | 78 | _coordinate 79 | (18, 279) 80 | 81 | 82 | _rotation 83 | 0 84 | 85 | 86 | 87 | variable 88 | 89 | id 90 | decim 91 | 92 | 93 | _enabled 94 | True 95 | 96 | 97 | value 98 | 10 99 | 100 | 101 | _coordinate 102 | (18, 472) 103 | 104 | 105 | _rotation 106 | 0 107 | 108 | 109 | 110 | variable 111 | 112 | id 113 | samp_rate 114 | 115 | 116 | _enabled 117 | True 118 | 119 | 120 | value 121 | 2.0e6 122 | 123 | 124 | _coordinate 125 | (11, 119) 126 | 127 | 128 | _rotation 129 | 0 130 | 131 | 132 | 133 | variable 134 | 135 | id 136 | freq 137 | 138 | 139 | _enabled 140 | True 141 | 142 | 143 | value 144 | 303.747e6 145 | 146 | 147 | _coordinate 148 | (15, 203) 149 | 150 | 151 | _rotation 152 | 0 153 | 154 | 155 | 156 | blocks_multiply_xx 157 | 158 | id 159 | blocks_multiply_xx_0 160 | 161 | 162 | _enabled 163 | True 164 | 165 | 166 | type 167 | complex 168 | 169 | 170 | num_inputs 171 | 2 172 | 173 | 174 | vlen 175 | 1 176 | 177 | 178 | affinity 179 | 180 | 181 | 182 | minoutbuf 183 | 0 184 | 185 | 186 | maxoutbuf 187 | 0 188 | 189 | 190 | _coordinate 191 | (453, 157) 192 | 193 | 194 | _rotation 195 | 0 196 | 197 | 198 | 199 | variable_slider 200 | 201 | id 202 | gain 203 | 204 | 205 | _enabled 206 | True 207 | 208 | 209 | label 210 | 211 | 212 | 213 | value 214 | 50 215 | 216 | 217 | min 218 | 0 219 | 220 | 221 | max 222 | 50 223 | 224 | 225 | num_steps 226 | 125 227 | 228 | 229 | style 230 | wx.SL_HORIZONTAL 231 | 232 | 233 | converver 234 | float_converter 235 | 236 | 237 | grid_pos 238 | 239 | 240 | 241 | notebook 242 | 243 | 244 | 245 | _coordinate 246 | (17, 353) 247 | 248 | 249 | _rotation 250 | 0 251 | 252 | 253 | 254 | osmosdr_source 255 | 256 | id 257 | osmosdr_source_0 258 | 259 | 260 | _enabled 261 | True 262 | 263 | 264 | type 265 | fc32 266 | 267 | 268 | args 269 | 270 | 271 | 272 | nchan 273 | 1 274 | 275 | 276 | sample_rate 277 | samp_rate 278 | 279 | 280 | freq0 281 | freq - offset 282 | 283 | 284 | corr0 285 | 29 286 | 287 | 288 | dc_offset_mode0 289 | 0 290 | 291 | 292 | iq_balance_mode0 293 | 0 294 | 295 | 296 | gain_mode0 297 | 0 298 | 299 | 300 | gain0 301 | gain 302 | 303 | 304 | if_gain0 305 | 30 306 | 307 | 308 | bb_gain0 309 | 30 310 | 311 | 312 | ant0 313 | 314 | 315 | 316 | bw0 317 | 2000000 318 | 319 | 320 | freq1 321 | 100e6 322 | 323 | 324 | corr1 325 | 0 326 | 327 | 328 | dc_offset_mode1 329 | 0 330 | 331 | 332 | iq_balance_mode1 333 | 0 334 | 335 | 336 | gain_mode1 337 | 0 338 | 339 | 340 | gain1 341 | 10 342 | 343 | 344 | if_gain1 345 | 20 346 | 347 | 348 | bb_gain1 349 | 20 350 | 351 | 352 | ant1 353 | 354 | 355 | 356 | bw1 357 | 0 358 | 359 | 360 | freq2 361 | 100e6 362 | 363 | 364 | corr2 365 | 0 366 | 367 | 368 | dc_offset_mode2 369 | 0 370 | 371 | 372 | iq_balance_mode2 373 | 0 374 | 375 | 376 | gain_mode2 377 | 0 378 | 379 | 380 | gain2 381 | 10 382 | 383 | 384 | if_gain2 385 | 20 386 | 387 | 388 | bb_gain2 389 | 20 390 | 391 | 392 | ant2 393 | 394 | 395 | 396 | bw2 397 | 0 398 | 399 | 400 | freq3 401 | 100e6 402 | 403 | 404 | corr3 405 | 0 406 | 407 | 408 | dc_offset_mode3 409 | 0 410 | 411 | 412 | iq_balance_mode3 413 | 0 414 | 415 | 416 | gain_mode3 417 | 0 418 | 419 | 420 | gain3 421 | 10 422 | 423 | 424 | if_gain3 425 | 20 426 | 427 | 428 | bb_gain3 429 | 20 430 | 431 | 432 | ant3 433 | 434 | 435 | 436 | bw3 437 | 0 438 | 439 | 440 | freq4 441 | 100e6 442 | 443 | 444 | corr4 445 | 0 446 | 447 | 448 | dc_offset_mode4 449 | 0 450 | 451 | 452 | iq_balance_mode4 453 | 0 454 | 455 | 456 | gain_mode4 457 | 0 458 | 459 | 460 | gain4 461 | 10 462 | 463 | 464 | if_gain4 465 | 20 466 | 467 | 468 | bb_gain4 469 | 20 470 | 471 | 472 | ant4 473 | 474 | 475 | 476 | bw4 477 | 0 478 | 479 | 480 | affinity 481 | 482 | 483 | 484 | minoutbuf 485 | 0 486 | 487 | 488 | maxoutbuf 489 | 0 490 | 491 | 492 | _coordinate 493 | (190, 81) 494 | 495 | 496 | _rotation 497 | 0 498 | 499 | 500 | 501 | analog_sig_source_x 502 | 503 | id 504 | analog_sig_source_x_0 505 | 506 | 507 | _enabled 508 | True 509 | 510 | 511 | type 512 | complex 513 | 514 | 515 | samp_rate 516 | samp_rate 517 | 518 | 519 | waveform 520 | analog.GR_COS_WAVE 521 | 522 | 523 | freq 524 | -offset 525 | 526 | 527 | amp 528 | 1 529 | 530 | 531 | offset 532 | 0 533 | 534 | 535 | affinity 536 | 537 | 538 | 539 | minoutbuf 540 | 0 541 | 542 | 543 | maxoutbuf 544 | 0 545 | 546 | 547 | _coordinate 548 | (244, 303) 549 | 550 | 551 | _rotation 552 | 0 553 | 554 | 555 | 556 | low_pass_filter 557 | 558 | id 559 | low_pass_filter_0 560 | 561 | 562 | _enabled 563 | True 564 | 565 | 566 | type 567 | fir_filter_ccf 568 | 569 | 570 | decim 571 | decim 572 | 573 | 574 | interp 575 | 1 576 | 577 | 578 | gain 579 | 1 580 | 581 | 582 | samp_rate 583 | samp_rate 584 | 585 | 586 | cutoff_freq 587 | 50000 588 | 589 | 590 | width 591 | 25000 592 | 593 | 594 | win 595 | firdes.WIN_HAMMING 596 | 597 | 598 | beta 599 | 6.76 600 | 601 | 602 | affinity 603 | 604 | 605 | 606 | minoutbuf 607 | 0 608 | 609 | 610 | maxoutbuf 611 | 0 612 | 613 | 614 | _coordinate 615 | (595, 122) 616 | 617 | 618 | _rotation 619 | 0 620 | 621 | 622 | 623 | blocks_complex_to_mag 624 | 625 | id 626 | blocks_complex_to_mag_0 627 | 628 | 629 | _enabled 630 | True 631 | 632 | 633 | vlen 634 | 1 635 | 636 | 637 | affinity 638 | 639 | 640 | 641 | minoutbuf 642 | 0 643 | 644 | 645 | maxoutbuf 646 | 0 647 | 648 | 649 | _coordinate 650 | (467, 339) 651 | 652 | 653 | _rotation 654 | 0 655 | 656 | 657 | 658 | wxgui_scopesink2 659 | 660 | id 661 | wxgui_scopesink2_0 662 | 663 | 664 | _enabled 665 | True 666 | 667 | 668 | type 669 | float 670 | 671 | 672 | title 673 | Scope Plot 674 | 675 | 676 | samp_rate 677 | samp_rate / decim 678 | 679 | 680 | v_scale 681 | 0 682 | 683 | 684 | v_offset 685 | 0 686 | 687 | 688 | t_scale 689 | 0 690 | 691 | 692 | ac_couple 693 | False 694 | 695 | 696 | xy_mode 697 | False 698 | 699 | 700 | num_inputs 701 | 1 702 | 703 | 704 | win_size 705 | 706 | 707 | 708 | grid_pos 709 | 710 | 711 | 712 | notebook 713 | 714 | 715 | 716 | trig_mode 717 | wxgui.TRIG_MODE_AUTO 718 | 719 | 720 | y_axis_label 721 | Counts 722 | 723 | 724 | affinity 725 | 726 | 727 | 728 | _coordinate 729 | (660, 311) 730 | 731 | 732 | _rotation 733 | 0 734 | 735 | 736 | 737 | osmosdr_source_0 738 | blocks_multiply_xx_0 739 | 0 740 | 0 741 | 742 | 743 | analog_sig_source_x_0 744 | blocks_multiply_xx_0 745 | 0 746 | 1 747 | 748 | 749 | blocks_multiply_xx_0 750 | low_pass_filter_0 751 | 0 752 | 0 753 | 754 | 755 | low_pass_filter_0 756 | blocks_complex_to_mag_0 757 | 0 758 | 0 759 | 760 | 761 | blocks_complex_to_mag_0 762 | wxgui_scopesink2_0 763 | 0 764 | 0 765 | 766 | 767 | -------------------------------------------------------------------------------- /ceiling_fan_tx.grc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sat Mar 22 22:26:40 2014 4 | 5 | variable 6 | 7 | id 8 | baud_rate 9 | 10 | 11 | _enabled 12 | True 13 | 14 | 15 | value 16 | 3211 17 | 18 | 19 | _coordinate 20 | (26, 271) 21 | 22 | 23 | _rotation 24 | 0 25 | 26 | 27 | 28 | variable 29 | 30 | id 31 | interp 32 | 33 | 34 | _enabled 35 | True 36 | 37 | 38 | value 39 | 600 40 | 41 | 42 | _coordinate 43 | (26, 340) 44 | 45 | 46 | _rotation 47 | 0 48 | 49 | 50 | 51 | variable 52 | 53 | id 54 | samp_rate 55 | 56 | 57 | _enabled 58 | True 59 | 60 | 61 | value 62 | baud_rate*interp 63 | 64 | 65 | _coordinate 66 | (14, 81) 67 | 68 | 69 | _rotation 70 | 0 71 | 72 | 73 | 74 | variable 75 | 76 | id 77 | center_freq 78 | 79 | 80 | _enabled 81 | True 82 | 83 | 84 | value 85 | 303747000 86 | 87 | 88 | _coordinate 89 | (26, 201) 90 | 91 | 92 | _rotation 93 | 0 94 | 95 | 96 | 97 | variable_slider 98 | 99 | id 100 | gain 101 | 102 | 103 | _enabled 104 | True 105 | 106 | 107 | label 108 | 109 | 110 | 111 | value 112 | 15 113 | 114 | 115 | min 116 | 0 117 | 118 | 119 | max 120 | 25 121 | 122 | 123 | num_steps 124 | 50 125 | 126 | 127 | style 128 | wx.SL_HORIZONTAL 129 | 130 | 131 | converver 132 | float_converter 133 | 134 | 135 | grid_pos 136 | 137 | 138 | 139 | notebook 140 | 141 | 142 | 143 | _coordinate 144 | (26, 409) 145 | 146 | 147 | _rotation 148 | 0 149 | 150 | 151 | 152 | options 153 | 154 | id 155 | ceiling_fan_tx 156 | 157 | 158 | _enabled 159 | True 160 | 161 | 162 | title 163 | 164 | 165 | 166 | author 167 | 168 | 169 | 170 | description 171 | 172 | 173 | 174 | window_size 175 | 1280, 1024 176 | 177 | 178 | generate_options 179 | wx_gui 180 | 181 | 182 | category 183 | Custom 184 | 185 | 186 | run_options 187 | prompt 188 | 189 | 190 | run 191 | True 192 | 193 | 194 | max_nouts 195 | 0 196 | 197 | 198 | realtime_scheduling 199 | 200 | 201 | 202 | _coordinate 203 | (14, 13) 204 | 205 | 206 | _rotation 207 | 0 208 | 209 | 210 | 211 | blocks_vector_source_x 212 | 213 | id 214 | blocks_vector_source_x_0 215 | 216 | 217 | _enabled 218 | True 219 | 220 | 221 | type 222 | complex 223 | 224 | 225 | vector 226 | [1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]*10 + [0]*3321 227 | 228 | 229 | tags 230 | [] 231 | 232 | 233 | repeat 234 | True 235 | 236 | 237 | vlen 238 | 1 239 | 240 | 241 | affinity 242 | 243 | 244 | 245 | minoutbuf 246 | 0 247 | 248 | 249 | maxoutbuf 250 | 0 251 | 252 | 253 | _coordinate 254 | (224, 137) 255 | 256 | 257 | _rotation 258 | 0 259 | 260 | 261 | 262 | blocks_moving_average_xx 263 | 264 | id 265 | blocks_moving_average_xx_0 266 | 267 | 268 | _enabled 269 | True 270 | 271 | 272 | type 273 | complex 274 | 275 | 276 | length 277 | 20 278 | 279 | 280 | scale 281 | 0.9/20 282 | 283 | 284 | max_iter 285 | 4000 286 | 287 | 288 | affinity 289 | 290 | 291 | 292 | minoutbuf 293 | 0 294 | 295 | 296 | maxoutbuf 297 | 0 298 | 299 | 300 | _coordinate 301 | (656, 137) 302 | 303 | 304 | _rotation 305 | 0 306 | 307 | 308 | 309 | blocks_repeat 310 | 311 | id 312 | blocks_repeat_0 313 | 314 | 315 | _enabled 316 | True 317 | 318 | 319 | type 320 | complex 321 | 322 | 323 | interp 324 | interp 325 | 326 | 327 | vlen 328 | 1 329 | 330 | 331 | affinity 332 | 333 | 334 | 335 | minoutbuf 336 | 0 337 | 338 | 339 | maxoutbuf 340 | 0 341 | 342 | 343 | _coordinate 344 | (461, 153) 345 | 346 | 347 | _rotation 348 | 0 349 | 350 | 351 | 352 | osmosdr_sink 353 | 354 | id 355 | osmosdr_sink_0 356 | 357 | 358 | _enabled 359 | True 360 | 361 | 362 | type 363 | fc32 364 | 365 | 366 | args 367 | 368 | 369 | 370 | nchan 371 | 1 372 | 373 | 374 | sample_rate 375 | samp_rate 376 | 377 | 378 | freq0 379 | center_freq 380 | 381 | 382 | corr0 383 | 0 384 | 385 | 386 | gain0 387 | gain 388 | 389 | 390 | if_gain0 391 | 20 392 | 393 | 394 | bb_gain0 395 | 20 396 | 397 | 398 | ant0 399 | 400 | 401 | 402 | bw0 403 | 2000000 404 | 405 | 406 | freq1 407 | 100e6 408 | 409 | 410 | corr1 411 | 0 412 | 413 | 414 | gain1 415 | 10 416 | 417 | 418 | if_gain1 419 | 20 420 | 421 | 422 | bb_gain1 423 | 20 424 | 425 | 426 | ant1 427 | 428 | 429 | 430 | bw1 431 | 0 432 | 433 | 434 | freq2 435 | 100e6 436 | 437 | 438 | corr2 439 | 0 440 | 441 | 442 | gain2 443 | 10 444 | 445 | 446 | if_gain2 447 | 20 448 | 449 | 450 | bb_gain2 451 | 20 452 | 453 | 454 | ant2 455 | 456 | 457 | 458 | bw2 459 | 0 460 | 461 | 462 | freq3 463 | 100e6 464 | 465 | 466 | corr3 467 | 0 468 | 469 | 470 | gain3 471 | 10 472 | 473 | 474 | if_gain3 475 | 20 476 | 477 | 478 | bb_gain3 479 | 20 480 | 481 | 482 | ant3 483 | 484 | 485 | 486 | bw3 487 | 0 488 | 489 | 490 | freq4 491 | 100e6 492 | 493 | 494 | corr4 495 | 0 496 | 497 | 498 | gain4 499 | 10 500 | 501 | 502 | if_gain4 503 | 20 504 | 505 | 506 | bb_gain4 507 | 20 508 | 509 | 510 | ant4 511 | 512 | 513 | 514 | bw4 515 | 0 516 | 517 | 518 | affinity 519 | 520 | 521 | 522 | _coordinate 523 | (853, 105) 524 | 525 | 526 | _rotation 527 | 0 528 | 529 | 530 | 531 | blocks_moving_average_xx_0 532 | osmosdr_sink_0 533 | 0 534 | 0 535 | 536 | 537 | blocks_repeat_0 538 | blocks_moving_average_xx_0 539 | 0 540 | 0 541 | 542 | 543 | blocks_vector_source_x_0 544 | blocks_repeat_0 545 | 0 546 | 0 547 | 548 | 549 | -------------------------------------------------------------------------------- /ceiling_fan_tx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: Ceiling Fan Tx 6 | # Generated: Tue Sep 10 21:58:16 2019 7 | ################################################## 8 | 9 | 10 | if __name__ == '__main__': 11 | import ctypes 12 | import sys 13 | if sys.platform.startswith('linux'): 14 | try: 15 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 16 | x11.XInitThreads() 17 | except: 18 | print "Warning: failed to XInitThreads()" 19 | 20 | from gnuradio import blocks 21 | from gnuradio import eng_notation 22 | from gnuradio import gr 23 | from gnuradio.eng_option import eng_option 24 | from gnuradio.filter import firdes 25 | from gnuradio.wxgui import forms 26 | from grc_gnuradio import wxgui as grc_wxgui 27 | from optparse import OptionParser 28 | import osmosdr 29 | import time 30 | import wx 31 | 32 | 33 | class ceiling_fan_tx(grc_wxgui.top_block_gui): 34 | 35 | def __init__(self): 36 | grc_wxgui.top_block_gui.__init__(self, title="Ceiling Fan Tx") 37 | _icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png" 38 | self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY)) 39 | 40 | ################################################## 41 | # Variables 42 | ################################################## 43 | self.interp = interp = 600 44 | self.baud_rate = baud_rate = 3211 45 | self.samp_rate = samp_rate = baud_rate*interp 46 | self.gain = gain = 15 47 | self.center_freq = center_freq = 303747000 48 | 49 | ################################################## 50 | # Blocks 51 | ################################################## 52 | _gain_sizer = wx.BoxSizer(wx.VERTICAL) 53 | self._gain_text_box = forms.text_box( 54 | parent=self.GetWin(), 55 | sizer=_gain_sizer, 56 | value=self.gain, 57 | callback=self.set_gain, 58 | label='gain', 59 | converter=forms.float_converter(), 60 | proportion=0, 61 | ) 62 | self._gain_slider = forms.slider( 63 | parent=self.GetWin(), 64 | sizer=_gain_sizer, 65 | value=self.gain, 66 | callback=self.set_gain, 67 | minimum=0, 68 | maximum=25, 69 | num_steps=50, 70 | style=wx.SL_HORIZONTAL, 71 | cast=float, 72 | proportion=1, 73 | ) 74 | self.Add(_gain_sizer) 75 | self.osmosdr_sink_0 = osmosdr.sink( args="numchan=" + str(1) + " " + '' ) 76 | self.osmosdr_sink_0.set_sample_rate(samp_rate) 77 | self.osmosdr_sink_0.set_center_freq(center_freq, 0) 78 | self.osmosdr_sink_0.set_freq_corr(0, 0) 79 | self.osmosdr_sink_0.set_gain(gain, 0) 80 | self.osmosdr_sink_0.set_if_gain(20, 0) 81 | self.osmosdr_sink_0.set_bb_gain(20, 0) 82 | self.osmosdr_sink_0.set_antenna('', 0) 83 | self.osmosdr_sink_0.set_bandwidth(2000000, 0) 84 | 85 | self.blocks_vector_source_x_0 = blocks.vector_source_c([1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]*10 + [0]*3321, True, 1, []) 86 | self.blocks_repeat_0 = blocks.repeat(gr.sizeof_gr_complex*1, interp) 87 | self.blocks_moving_average_xx_0 = blocks.moving_average_cc(20, 0.9/20, 4000, 1) 88 | 89 | 90 | 91 | ################################################## 92 | # Connections 93 | ################################################## 94 | self.connect((self.blocks_moving_average_xx_0, 0), (self.osmosdr_sink_0, 0)) 95 | self.connect((self.blocks_repeat_0, 0), (self.blocks_moving_average_xx_0, 0)) 96 | self.connect((self.blocks_vector_source_x_0, 0), (self.blocks_repeat_0, 0)) 97 | 98 | def get_interp(self): 99 | return self.interp 100 | 101 | def set_interp(self, interp): 102 | self.interp = interp 103 | self.set_samp_rate(self.baud_rate*self.interp) 104 | self.blocks_repeat_0.set_interpolation(self.interp) 105 | 106 | def get_baud_rate(self): 107 | return self.baud_rate 108 | 109 | def set_baud_rate(self, baud_rate): 110 | self.baud_rate = baud_rate 111 | self.set_samp_rate(self.baud_rate*self.interp) 112 | 113 | def get_samp_rate(self): 114 | return self.samp_rate 115 | 116 | def set_samp_rate(self, samp_rate): 117 | self.samp_rate = samp_rate 118 | self.osmosdr_sink_0.set_sample_rate(self.samp_rate) 119 | 120 | def get_gain(self): 121 | return self.gain 122 | 123 | def set_gain(self, gain): 124 | self.gain = gain 125 | self._gain_slider.set_value(self.gain) 126 | self._gain_text_box.set_value(self.gain) 127 | self.osmosdr_sink_0.set_gain(self.gain, 0) 128 | 129 | def get_center_freq(self): 130 | return self.center_freq 131 | 132 | def set_center_freq(self, center_freq): 133 | self.center_freq = center_freq 134 | self.osmosdr_sink_0.set_center_freq(self.center_freq, 0) 135 | 136 | 137 | def main(top_block_cls=ceiling_fan_tx, options=None): 138 | 139 | tb = top_block_cls() 140 | tb.Start(True) 141 | tb.Wait() 142 | 143 | 144 | if __name__ == '__main__': 145 | main() 146 | -------------------------------------------------------------------------------- /gfsk_tx.grc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sun Mar 23 19:23:30 2014 4 | 5 | ham_varicode_tx 6 | 7 | id 8 | ham_varicode_tx_0 9 | 10 | 11 | _enabled 12 | True 13 | 14 | 15 | affinity 16 | 17 | 18 | 19 | minoutbuf 20 | 0 21 | 22 | 23 | maxoutbuf 24 | 0 25 | 26 | 27 | _coordinate 28 | (459, 154) 29 | 30 | 31 | _rotation 32 | 0 33 | 34 | 35 | 36 | variable 37 | 38 | id 39 | samp_rate 40 | 41 | 42 | _enabled 43 | True 44 | 45 | 46 | value 47 | 192000 48 | 49 | 50 | _coordinate 51 | (35, 142) 52 | 53 | 54 | _rotation 55 | 0 56 | 57 | 58 | 59 | variable 60 | 61 | id 62 | center_freq 63 | 64 | 65 | _enabled 66 | True 67 | 68 | 69 | value 70 | 441000000 71 | 72 | 73 | _coordinate 74 | (34, 208) 75 | 76 | 77 | _rotation 78 | 0 79 | 80 | 81 | 82 | blocks_unpacked_to_packed_xx 83 | 84 | id 85 | blocks_unpacked_to_packed_xx_0 86 | 87 | 88 | _enabled 89 | True 90 | 91 | 92 | type 93 | byte 94 | 95 | 96 | bits_per_chunk 97 | 1 98 | 99 | 100 | endianness 101 | gr.GR_MSB_FIRST 102 | 103 | 104 | num_ports 105 | 1 106 | 107 | 108 | affinity 109 | 110 | 111 | 112 | minoutbuf 113 | 0 114 | 115 | 116 | maxoutbuf 117 | 0 118 | 119 | 120 | _coordinate 121 | (663, 142) 122 | 123 | 124 | _rotation 125 | 0 126 | 127 | 128 | 129 | digital_gfsk_mod 130 | 131 | id 132 | digital_gfsk_mod_0 133 | 134 | 135 | _enabled 136 | True 137 | 138 | 139 | samples_per_symbol 140 | 20 141 | 142 | 143 | sensitivity 144 | 1.0 145 | 146 | 147 | bt 148 | 1.0 149 | 150 | 151 | verbose 152 | False 153 | 154 | 155 | log 156 | False 157 | 158 | 159 | affinity 160 | 161 | 162 | 163 | minoutbuf 164 | 0 165 | 166 | 167 | maxoutbuf 168 | 0 169 | 170 | 171 | _coordinate 172 | (887, 134) 173 | 174 | 175 | _rotation 176 | 0 177 | 178 | 179 | 180 | blocks_file_source 181 | 182 | id 183 | blocks_file_source_0 184 | 185 | 186 | _enabled 187 | True 188 | 189 | 190 | file 191 | /home/argilo/git/sdr-examples/alice-in-wonderland.txt 192 | 193 | 194 | type 195 | byte 196 | 197 | 198 | repeat 199 | True 200 | 201 | 202 | vlen 203 | 1 204 | 205 | 206 | affinity 207 | 208 | 209 | 210 | minoutbuf 211 | 0 212 | 213 | 214 | maxoutbuf 215 | 0 216 | 217 | 218 | _coordinate 219 | (219, 142) 220 | 221 | 222 | _rotation 223 | 0 224 | 225 | 226 | 227 | options 228 | 229 | id 230 | gfsk_tx 231 | 232 | 233 | _enabled 234 | True 235 | 236 | 237 | title 238 | 239 | 240 | 241 | author 242 | 243 | 244 | 245 | description 246 | 247 | 248 | 249 | window_size 250 | 1280, 1024 251 | 252 | 253 | generate_options 254 | wx_gui 255 | 256 | 257 | category 258 | Custom 259 | 260 | 261 | run_options 262 | prompt 263 | 264 | 265 | run 266 | True 267 | 268 | 269 | max_nouts 270 | 0 271 | 272 | 273 | realtime_scheduling 274 | 275 | 276 | 277 | _coordinate 278 | (10, 10) 279 | 280 | 281 | _rotation 282 | 0 283 | 284 | 285 | 286 | variable_slider 287 | 288 | id 289 | gain 290 | 291 | 292 | _enabled 293 | True 294 | 295 | 296 | label 297 | 298 | 299 | 300 | value 301 | 25 302 | 303 | 304 | min 305 | 0 306 | 307 | 308 | max 309 | 25 310 | 311 | 312 | num_steps 313 | 25 314 | 315 | 316 | style 317 | wx.SL_HORIZONTAL 318 | 319 | 320 | converver 321 | float_converter 322 | 323 | 324 | grid_pos 325 | 326 | 327 | 328 | notebook 329 | 330 | 331 | 332 | _coordinate 333 | (34, 279) 334 | 335 | 336 | _rotation 337 | 0 338 | 339 | 340 | 341 | osmosdr_sink 342 | 343 | id 344 | osmosdr_sink_0 345 | 346 | 347 | _enabled 348 | True 349 | 350 | 351 | type 352 | fc32 353 | 354 | 355 | args 356 | 357 | 358 | 359 | nchan 360 | 1 361 | 362 | 363 | sample_rate 364 | samp_rate * 10 365 | 366 | 367 | freq0 368 | center_freq 369 | 370 | 371 | corr0 372 | 0 373 | 374 | 375 | gain0 376 | gain 377 | 378 | 379 | if_gain0 380 | 20 381 | 382 | 383 | bb_gain0 384 | 20 385 | 386 | 387 | ant0 388 | 389 | 390 | 391 | bw0 392 | 0 393 | 394 | 395 | freq1 396 | 100e6 397 | 398 | 399 | corr1 400 | 0 401 | 402 | 403 | gain1 404 | 10 405 | 406 | 407 | if_gain1 408 | 20 409 | 410 | 411 | bb_gain1 412 | 20 413 | 414 | 415 | ant1 416 | 417 | 418 | 419 | bw1 420 | 0 421 | 422 | 423 | freq2 424 | 100e6 425 | 426 | 427 | corr2 428 | 0 429 | 430 | 431 | gain2 432 | 10 433 | 434 | 435 | if_gain2 436 | 20 437 | 438 | 439 | bb_gain2 440 | 20 441 | 442 | 443 | ant2 444 | 445 | 446 | 447 | bw2 448 | 0 449 | 450 | 451 | freq3 452 | 100e6 453 | 454 | 455 | corr3 456 | 0 457 | 458 | 459 | gain3 460 | 10 461 | 462 | 463 | if_gain3 464 | 20 465 | 466 | 467 | bb_gain3 468 | 20 469 | 470 | 471 | ant3 472 | 473 | 474 | 475 | bw3 476 | 0 477 | 478 | 479 | freq4 480 | 100e6 481 | 482 | 483 | corr4 484 | 0 485 | 486 | 487 | gain4 488 | 10 489 | 490 | 491 | if_gain4 492 | 20 493 | 494 | 495 | bb_gain4 496 | 20 497 | 498 | 499 | ant4 500 | 501 | 502 | 503 | bw4 504 | 0 505 | 506 | 507 | affinity 508 | 509 | 510 | 511 | _coordinate 512 | (430, 249) 513 | 514 | 515 | _rotation 516 | 180 517 | 518 | 519 | 520 | rational_resampler_xxx 521 | 522 | id 523 | rational_resampler_xxx_0 524 | 525 | 526 | _enabled 527 | True 528 | 529 | 530 | type 531 | ccc 532 | 533 | 534 | interp 535 | 10 536 | 537 | 538 | decim 539 | 1 540 | 541 | 542 | taps 543 | 544 | 545 | 546 | fbw 547 | 0 548 | 549 | 550 | affinity 551 | 552 | 553 | 554 | minoutbuf 555 | 0 556 | 557 | 558 | maxoutbuf 559 | 0 560 | 561 | 562 | _coordinate 563 | (675, 265) 564 | 565 | 566 | _rotation 567 | 180 568 | 569 | 570 | 571 | blocks_multiply_const_vxx 572 | 573 | id 574 | blocks_multiply_const_vxx_0 575 | 576 | 577 | _enabled 578 | True 579 | 580 | 581 | type 582 | complex 583 | 584 | 585 | const 586 | 0.9 587 | 588 | 589 | vlen 590 | 1 591 | 592 | 593 | affinity 594 | 595 | 596 | 597 | minoutbuf 598 | 0 599 | 600 | 601 | maxoutbuf 602 | 0 603 | 604 | 605 | _coordinate 606 | (892, 289) 607 | 608 | 609 | _rotation 610 | 180 611 | 612 | 613 | 614 | blocks_file_source_0 615 | ham_varicode_tx_0 616 | 0 617 | 0 618 | 619 | 620 | ham_varicode_tx_0 621 | blocks_unpacked_to_packed_xx_0 622 | 0 623 | 0 624 | 625 | 626 | blocks_unpacked_to_packed_xx_0 627 | digital_gfsk_mod_0 628 | 0 629 | 0 630 | 631 | 632 | digital_gfsk_mod_0 633 | blocks_multiply_const_vxx_0 634 | 0 635 | 0 636 | 637 | 638 | blocks_multiply_const_vxx_0 639 | rational_resampler_xxx_0 640 | 0 641 | 0 642 | 643 | 644 | rational_resampler_xxx_0 645 | osmosdr_sink_0 646 | 0 647 | 0 648 | 649 | 650 | -------------------------------------------------------------------------------- /gr-pocsag-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nocomp/grc/dcf0c77eaef37aed70024ee5bd324cc497813063/gr-pocsag-master.zip -------------------------------------------------------------------------------- /multi_tx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: Multi Tx 6 | # Generated: Tue Sep 10 21:59:36 2019 7 | ################################################## 8 | 9 | 10 | if __name__ == '__main__': 11 | import ctypes 12 | import sys 13 | if sys.platform.startswith('linux'): 14 | try: 15 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 16 | x11.XInitThreads() 17 | except: 18 | print "Warning: failed to XInitThreads()" 19 | 20 | from gnuradio import analog 21 | from gnuradio import blocks 22 | from gnuradio import digital 23 | from gnuradio import eng_notation 24 | from gnuradio import filter 25 | from gnuradio import gr 26 | from gnuradio import iqbalance 27 | from gnuradio.eng_option import eng_option 28 | from gnuradio.filter import firdes 29 | from gnuradio.wxgui import forms 30 | from grc_gnuradio import wxgui as grc_wxgui 31 | from optparse import OptionParser 32 | import osmosdr 33 | import time 34 | import wx 35 | 36 | 37 | class multi_tx(grc_wxgui.top_block_gui): 38 | 39 | def __init__(self): 40 | grc_wxgui.top_block_gui.__init__(self, title="Multi Tx") 41 | _icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png" 42 | self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY)) 43 | 44 | ################################################## 45 | # Variables 46 | ################################################## 47 | self.audio_rate = audio_rate = 48000 48 | self.wpm = wpm = 15 49 | self.wbfm_on = wbfm_on = True 50 | self.usb_on = usb_on = True 51 | self.samp_rate = samp_rate = audio_rate * 40 52 | self.q_offset = q_offset = 0 53 | self.psk_on = psk_on = True 54 | self.phase = phase = 0 55 | self.nbfm_on = nbfm_on = True 56 | self.magnitude = magnitude = 0 57 | self.lsb_on = lsb_on = True 58 | self.i_offset = i_offset = 0 59 | self.gain = gain = 25 60 | self.cw_on = cw_on = True 61 | self.center_freq = center_freq = 441000000 62 | self.am_on = am_on = True 63 | 64 | ################################################## 65 | # Blocks 66 | ################################################## 67 | self._wbfm_on_check_box = forms.check_box( 68 | parent=self.GetWin(), 69 | value=self.wbfm_on, 70 | callback=self.set_wbfm_on, 71 | label='WBFM', 72 | true=True, 73 | false=False, 74 | ) 75 | self.GridAdd(self._wbfm_on_check_box, 4, 1, 1, 1) 76 | self._usb_on_check_box = forms.check_box( 77 | parent=self.GetWin(), 78 | value=self.usb_on, 79 | callback=self.set_usb_on, 80 | label='USB', 81 | true=True, 82 | false=False, 83 | ) 84 | self.GridAdd(self._usb_on_check_box, 4, 4, 1, 1) 85 | _q_offset_sizer = wx.BoxSizer(wx.VERTICAL) 86 | self._q_offset_text_box = forms.text_box( 87 | parent=self.GetWin(), 88 | sizer=_q_offset_sizer, 89 | value=self.q_offset, 90 | callback=self.set_q_offset, 91 | label='DC offset Q', 92 | converter=forms.float_converter(), 93 | proportion=0, 94 | ) 95 | self._q_offset_slider = forms.slider( 96 | parent=self.GetWin(), 97 | sizer=_q_offset_sizer, 98 | value=self.q_offset, 99 | callback=self.set_q_offset, 100 | minimum=-0.1, 101 | maximum=0.1, 102 | num_steps=200, 103 | style=wx.SL_HORIZONTAL, 104 | cast=float, 105 | proportion=1, 106 | ) 107 | self.GridAdd(_q_offset_sizer, 3, 0, 1, 7) 108 | self._psk_on_check_box = forms.check_box( 109 | parent=self.GetWin(), 110 | value=self.psk_on, 111 | callback=self.set_psk_on, 112 | label='PSK31', 113 | true=True, 114 | false=False, 115 | ) 116 | self.GridAdd(self._psk_on_check_box, 4, 6, 1, 1) 117 | _phase_sizer = wx.BoxSizer(wx.VERTICAL) 118 | self._phase_text_box = forms.text_box( 119 | parent=self.GetWin(), 120 | sizer=_phase_sizer, 121 | value=self.phase, 122 | callback=self.set_phase, 123 | label='Phase correction', 124 | converter=forms.float_converter(), 125 | proportion=0, 126 | ) 127 | self._phase_slider = forms.slider( 128 | parent=self.GetWin(), 129 | sizer=_phase_sizer, 130 | value=self.phase, 131 | callback=self.set_phase, 132 | minimum=-0.1, 133 | maximum=0.1, 134 | num_steps=200, 135 | style=wx.SL_HORIZONTAL, 136 | cast=float, 137 | proportion=1, 138 | ) 139 | self.GridAdd(_phase_sizer, 0, 0, 1, 7) 140 | self._nbfm_on_check_box = forms.check_box( 141 | parent=self.GetWin(), 142 | value=self.nbfm_on, 143 | callback=self.set_nbfm_on, 144 | label='NBFM', 145 | true=True, 146 | false=False, 147 | ) 148 | self.GridAdd(self._nbfm_on_check_box, 4, 0, 1, 1) 149 | _magnitude_sizer = wx.BoxSizer(wx.VERTICAL) 150 | self._magnitude_text_box = forms.text_box( 151 | parent=self.GetWin(), 152 | sizer=_magnitude_sizer, 153 | value=self.magnitude, 154 | callback=self.set_magnitude, 155 | label='Magnitude correction', 156 | converter=forms.float_converter(), 157 | proportion=0, 158 | ) 159 | self._magnitude_slider = forms.slider( 160 | parent=self.GetWin(), 161 | sizer=_magnitude_sizer, 162 | value=self.magnitude, 163 | callback=self.set_magnitude, 164 | minimum=-0.1, 165 | maximum=0.1, 166 | num_steps=200, 167 | style=wx.SL_HORIZONTAL, 168 | cast=float, 169 | proportion=1, 170 | ) 171 | self.GridAdd(_magnitude_sizer, 1, 0, 1, 7) 172 | self._lsb_on_check_box = forms.check_box( 173 | parent=self.GetWin(), 174 | value=self.lsb_on, 175 | callback=self.set_lsb_on, 176 | label='LSB', 177 | true=True, 178 | false=False, 179 | ) 180 | self.GridAdd(self._lsb_on_check_box, 4, 3, 1, 1) 181 | _i_offset_sizer = wx.BoxSizer(wx.VERTICAL) 182 | self._i_offset_text_box = forms.text_box( 183 | parent=self.GetWin(), 184 | sizer=_i_offset_sizer, 185 | value=self.i_offset, 186 | callback=self.set_i_offset, 187 | label='DC offset I', 188 | converter=forms.float_converter(), 189 | proportion=0, 190 | ) 191 | self._i_offset_slider = forms.slider( 192 | parent=self.GetWin(), 193 | sizer=_i_offset_sizer, 194 | value=self.i_offset, 195 | callback=self.set_i_offset, 196 | minimum=-0.1, 197 | maximum=0.1, 198 | num_steps=200, 199 | style=wx.SL_HORIZONTAL, 200 | cast=float, 201 | proportion=1, 202 | ) 203 | self.GridAdd(_i_offset_sizer, 2, 0, 1, 7) 204 | self._cw_on_check_box = forms.check_box( 205 | parent=self.GetWin(), 206 | value=self.cw_on, 207 | callback=self.set_cw_on, 208 | label='CW', 209 | true=True, 210 | false=False, 211 | ) 212 | self.GridAdd(self._cw_on_check_box, 4, 5, 1, 1) 213 | self._am_on_check_box = forms.check_box( 214 | parent=self.GetWin(), 215 | value=self.am_on, 216 | callback=self.set_am_on, 217 | label='AM', 218 | true=True, 219 | false=False, 220 | ) 221 | self.GridAdd(self._am_on_check_box, 4, 2, 1, 1) 222 | self.root_raised_cosine_filter_1 = filter.fir_filter_ccf(1, firdes.root_raised_cosine( 223 | 1, audio_rate, 5, 0.35, 200)) 224 | self.root_raised_cosine_filter_0 = filter.fir_filter_ccf(1, firdes.root_raised_cosine( 225 | 1, audio_rate, 5, 0.35, 200)) 226 | self.rational_resampler_xxx_3 = filter.rational_resampler_ccc( 227 | interpolation=192, 228 | decimation=1, 229 | taps=None, 230 | fractional_bw=None, 231 | ) 232 | self.rational_resampler_xxx_2 = filter.rational_resampler_ccc( 233 | interpolation=samp_rate, 234 | decimation=audio_rate, 235 | taps=None, 236 | fractional_bw=None, 237 | ) 238 | self.rational_resampler_xxx_1 = filter.rational_resampler_ccc( 239 | interpolation=samp_rate / audio_rate / 2, 240 | decimation=1, 241 | taps=None, 242 | fractional_bw=None, 243 | ) 244 | self.rational_resampler_xxx_0 = filter.rational_resampler_ccc( 245 | interpolation=samp_rate / audio_rate / 4, 246 | decimation=1, 247 | taps=None, 248 | fractional_bw=None, 249 | ) 250 | self.osmosdr_sink_0 = osmosdr.sink( args="numchan=" + str(1) + " " + '' ) 251 | self.osmosdr_sink_0.set_sample_rate(samp_rate) 252 | self.osmosdr_sink_0.set_center_freq(center_freq, 0) 253 | self.osmosdr_sink_0.set_freq_corr(0, 0) 254 | self.osmosdr_sink_0.set_gain(gain, 0) 255 | self.osmosdr_sink_0.set_if_gain(20, 0) 256 | self.osmosdr_sink_0.set_bb_gain(20, 0) 257 | self.osmosdr_sink_0.set_antenna('', 0) 258 | self.osmosdr_sink_0.set_bandwidth(0, 0) 259 | 260 | self.low_pass_filter_1 = filter.interp_fir_filter_ccf(1, firdes.low_pass( 261 | 0.5, audio_rate, 5000, 400, firdes.WIN_HAMMING, 6.76)) 262 | self.iqbalance_fix_cc_0 = iqbalance.fix_cc(magnitude, phase) 263 | self.digital_psk_mod_0 = digital.psk.psk_mod( 264 | constellation_points=2, 265 | mod_code="none", 266 | differential=True, 267 | samples_per_symbol=8, 268 | excess_bw=0.35, 269 | verbose=False, 270 | log=False, 271 | ) 272 | self.digital_map_bb_0 = digital.map_bb(([1,0])) 273 | self.blocks_wavfile_source_0 = blocks.wavfile_source('/home/nocomp/Musique/wave/maybe-next-time.wav', True) 274 | self.blocks_vector_source_x_2 = blocks.vector_source_b((0,0, 1,1,0,1,1,0,1, 0,0, 1,0,1,0,1,1, 0,0, 1,1,0,1, 0,0, 1,0,1,1,1, 0,0, 1, 0,0, 1,1,0,1, 0,0, 1,0,1,1,1, 0,0, 1, 0,0, 1,1,0,1,1,0,1,0,1, 0,0, 1,1,1,0,1,1,1, 0,0, 1,1,1,1,1,1,1,1, 0,0, 1,1,1,1,1,1,1, 0,0, 1,0,1,0,1,1,1,1, 0,0, 1,0,1,0,1,1,1,1, 0,0, 1, 0,0, 1,0,1, 0,0, 1,1, 0,0, 1,0,1,1,1, 0,0, 1,0,1, 0,0, 1,1,0,1, 0,0, 1,1,1,1, 0,0, 1,0,1,1,0,1,1, 0,0, 1,0,1,0,1,1,1, 0,0, 1,1,1,0,1), True, 1, []) 275 | self.blocks_vector_source_x_0 = blocks.vector_source_c((1,0,1,0,1,0,1,1,1, 0,0,0, 1,0,1,0,1,0,1,1,1, 0,0,0, 1,0,1,0,1,0,1,1,1, 0,0,0,0,0,0,0, 1,1,1,0,1,0,1, 0,0,0, 1, 0,0,0,0,0,0,0, 1,0,1,0,1,0,1,1,1, 0,0,0, 1, 0,0,0, 1,0,1,0,1,0,1,1,1,0,1,1,1, 0,0,0, 1,0,1, 0,0,0, 1,0,1,1,1,0,1, 0,0,0, 1,0,1,1,1,0,1, 0,0,0,0,0,0,0, 1,1,1, 0,0,0, 1, 0,0,0, 1,0,1,0,1, 0,0,0, 1,1,1, 0,0,0, 1,0,1, 0,0,0, 1,1,1,0,1, 0,0,0, 1,1,1,0,1,1,1,0,1, 0,0,0,0,0,0,0), True, 1, []) 276 | self.blocks_unpacked_to_packed_xx_0 = blocks.unpacked_to_packed_bb(1, gr.GR_MSB_FIRST) 277 | self.blocks_repeat_0 = blocks.repeat(gr.sizeof_gr_complex*1, int(1.2 * audio_rate / wpm)) 278 | self.blocks_multiply_xx_6 = blocks.multiply_vcc(1) 279 | self.blocks_multiply_xx_5 = blocks.multiply_vcc(1) 280 | self.blocks_multiply_xx_4 = blocks.multiply_vcc(1) 281 | self.blocks_multiply_xx_3_0 = blocks.multiply_vcc(1) 282 | self.blocks_multiply_xx_3 = blocks.multiply_vcc(1) 283 | self.blocks_multiply_xx_2 = blocks.multiply_vcc(1) 284 | self.blocks_multiply_xx_1 = blocks.multiply_vcc(1) 285 | self.blocks_multiply_xx_0 = blocks.multiply_vcc(1) 286 | self.blocks_float_to_complex_0 = blocks.float_to_complex(1) 287 | self.blocks_add_xx_1 = blocks.add_vcc(1) 288 | self.blocks_add_xx_0 = blocks.add_vcc(1) 289 | self.blocks_add_const_vxx_1 = blocks.add_const_vcc((i_offset + 1j * q_offset, )) 290 | self.blocks_add_const_vxx_0 = blocks.add_const_vcc((0.5, )) 291 | self.band_pass_filter_0_0 = filter.interp_fir_filter_ccc(1, firdes.complex_band_pass( 292 | 1, audio_rate, -2800, -200, 200, firdes.WIN_HAMMING, 6.76)) 293 | self.band_pass_filter_0 = filter.interp_fir_filter_ccc(1, firdes.complex_band_pass( 294 | 1, audio_rate, 200, 2800, 200, firdes.WIN_HAMMING, 6.76)) 295 | self.analog_wfm_tx_0 = analog.wfm_tx( 296 | audio_rate=audio_rate, 297 | quad_rate=audio_rate * 4, 298 | tau=75e-6, 299 | max_dev=75e3, 300 | fh=-1.0, 301 | ) 302 | self.analog_sig_source_x_6 = analog.sig_source_c(audio_rate, analog.GR_COS_WAVE, 22000, 1 if psk_on else 0, 0) 303 | self.analog_sig_source_x_5 = analog.sig_source_c(audio_rate, analog.GR_COS_WAVE, 20000, 1 if cw_on else 0, 0) 304 | self.analog_sig_source_x_4 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, 120000, 1.0 / 7, 0) 305 | self.analog_sig_source_x_3_0 = analog.sig_source_c(audio_rate, analog.GR_COS_WAVE, 11000, 1.8 if lsb_on else 0, 0) 306 | self.analog_sig_source_x_3 = analog.sig_source_c(audio_rate, analog.GR_COS_WAVE, 14000, 1.8 if usb_on else 0, 0) 307 | self.analog_sig_source_x_2 = analog.sig_source_c(audio_rate, analog.GR_COS_WAVE, 0, 1 if am_on else 0, 0) 308 | self.analog_sig_source_x_1 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, 0, 1.0 / 7 if wbfm_on else 0, 0) 309 | self.analog_sig_source_x_0 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, -100000, 1.0 / 7 if nbfm_on else 0, 0) 310 | self.analog_nbfm_tx_0 = analog.nbfm_tx( 311 | audio_rate=audio_rate, 312 | quad_rate=audio_rate * 2, 313 | tau=75e-6, 314 | max_dev=5e3, 315 | fh=-1.0, 316 | ) 317 | self.analog_const_source_x_0 = analog.sig_source_f(0, analog.GR_CONST_WAVE, 0, 0, 0) 318 | 319 | 320 | 321 | ################################################## 322 | # Connections 323 | ################################################## 324 | self.connect((self.analog_const_source_x_0, 0), (self.blocks_float_to_complex_0, 1)) 325 | self.connect((self.analog_nbfm_tx_0, 0), (self.rational_resampler_xxx_1, 0)) 326 | self.connect((self.analog_sig_source_x_0, 0), (self.blocks_multiply_xx_0, 1)) 327 | self.connect((self.analog_sig_source_x_1, 0), (self.blocks_multiply_xx_1, 1)) 328 | self.connect((self.analog_sig_source_x_2, 0), (self.blocks_multiply_xx_2, 1)) 329 | self.connect((self.analog_sig_source_x_3, 0), (self.blocks_multiply_xx_3, 1)) 330 | self.connect((self.analog_sig_source_x_3_0, 0), (self.blocks_multiply_xx_3_0, 1)) 331 | self.connect((self.analog_sig_source_x_4, 0), (self.blocks_multiply_xx_4, 1)) 332 | self.connect((self.analog_sig_source_x_5, 0), (self.blocks_multiply_xx_5, 1)) 333 | self.connect((self.analog_sig_source_x_6, 0), (self.blocks_multiply_xx_6, 1)) 334 | self.connect((self.analog_wfm_tx_0, 0), (self.rational_resampler_xxx_0, 0)) 335 | self.connect((self.band_pass_filter_0, 0), (self.blocks_multiply_xx_3, 0)) 336 | self.connect((self.band_pass_filter_0_0, 0), (self.blocks_multiply_xx_3_0, 0)) 337 | self.connect((self.blocks_add_const_vxx_0, 0), (self.blocks_multiply_xx_2, 0)) 338 | self.connect((self.blocks_add_const_vxx_1, 0), (self.osmosdr_sink_0, 0)) 339 | self.connect((self.blocks_add_xx_0, 0), (self.iqbalance_fix_cc_0, 0)) 340 | self.connect((self.blocks_add_xx_1, 0), (self.rational_resampler_xxx_2, 0)) 341 | self.connect((self.blocks_float_to_complex_0, 0), (self.band_pass_filter_0, 0)) 342 | self.connect((self.blocks_float_to_complex_0, 0), (self.band_pass_filter_0_0, 0)) 343 | self.connect((self.blocks_float_to_complex_0, 0), (self.low_pass_filter_1, 0)) 344 | self.connect((self.blocks_multiply_xx_0, 0), (self.blocks_add_xx_0, 1)) 345 | self.connect((self.blocks_multiply_xx_1, 0), (self.blocks_add_xx_0, 0)) 346 | self.connect((self.blocks_multiply_xx_2, 0), (self.blocks_add_xx_1, 0)) 347 | self.connect((self.blocks_multiply_xx_3, 0), (self.blocks_add_xx_1, 2)) 348 | self.connect((self.blocks_multiply_xx_3_0, 0), (self.blocks_add_xx_1, 1)) 349 | self.connect((self.blocks_multiply_xx_4, 0), (self.blocks_add_xx_0, 2)) 350 | self.connect((self.blocks_multiply_xx_5, 0), (self.blocks_add_xx_1, 3)) 351 | self.connect((self.blocks_multiply_xx_6, 0), (self.blocks_add_xx_1, 4)) 352 | self.connect((self.blocks_repeat_0, 0), (self.root_raised_cosine_filter_1, 0)) 353 | self.connect((self.blocks_unpacked_to_packed_xx_0, 0), (self.digital_psk_mod_0, 0)) 354 | self.connect((self.blocks_vector_source_x_0, 0), (self.blocks_repeat_0, 0)) 355 | self.connect((self.blocks_vector_source_x_2, 0), (self.digital_map_bb_0, 0)) 356 | self.connect((self.blocks_wavfile_source_0, 0), (self.analog_nbfm_tx_0, 0)) 357 | self.connect((self.blocks_wavfile_source_0, 0), (self.analog_wfm_tx_0, 0)) 358 | self.connect((self.blocks_wavfile_source_0, 0), (self.blocks_float_to_complex_0, 0)) 359 | self.connect((self.digital_map_bb_0, 0), (self.blocks_unpacked_to_packed_xx_0, 0)) 360 | self.connect((self.digital_psk_mod_0, 0), (self.rational_resampler_xxx_3, 0)) 361 | self.connect((self.iqbalance_fix_cc_0, 0), (self.blocks_add_const_vxx_1, 0)) 362 | self.connect((self.low_pass_filter_1, 0), (self.blocks_add_const_vxx_0, 0)) 363 | self.connect((self.rational_resampler_xxx_0, 0), (self.blocks_multiply_xx_1, 0)) 364 | self.connect((self.rational_resampler_xxx_1, 0), (self.blocks_multiply_xx_0, 0)) 365 | self.connect((self.rational_resampler_xxx_2, 0), (self.blocks_multiply_xx_4, 0)) 366 | self.connect((self.rational_resampler_xxx_3, 0), (self.blocks_multiply_xx_6, 0)) 367 | self.connect((self.root_raised_cosine_filter_0, 0), (self.blocks_multiply_xx_5, 0)) 368 | self.connect((self.root_raised_cosine_filter_1, 0), (self.root_raised_cosine_filter_0, 0)) 369 | 370 | def get_audio_rate(self): 371 | return self.audio_rate 372 | 373 | def set_audio_rate(self, audio_rate): 374 | self.audio_rate = audio_rate 375 | self.set_samp_rate(self.audio_rate * 40) 376 | self.root_raised_cosine_filter_1.set_taps(firdes.root_raised_cosine(1, self.audio_rate, 5, 0.35, 200)) 377 | self.root_raised_cosine_filter_0.set_taps(firdes.root_raised_cosine(1, self.audio_rate, 5, 0.35, 200)) 378 | self.low_pass_filter_1.set_taps(firdes.low_pass(0.5, self.audio_rate, 5000, 400, firdes.WIN_HAMMING, 6.76)) 379 | self.blocks_repeat_0.set_interpolation(int(1.2 * self.audio_rate / self.wpm)) 380 | self.band_pass_filter_0_0.set_taps(firdes.complex_band_pass(1, self.audio_rate, -2800, -200, 200, firdes.WIN_HAMMING, 6.76)) 381 | self.band_pass_filter_0.set_taps(firdes.complex_band_pass(1, self.audio_rate, 200, 2800, 200, firdes.WIN_HAMMING, 6.76)) 382 | self.analog_sig_source_x_6.set_sampling_freq(self.audio_rate) 383 | self.analog_sig_source_x_5.set_sampling_freq(self.audio_rate) 384 | self.analog_sig_source_x_3_0.set_sampling_freq(self.audio_rate) 385 | self.analog_sig_source_x_3.set_sampling_freq(self.audio_rate) 386 | self.analog_sig_source_x_2.set_sampling_freq(self.audio_rate) 387 | 388 | def get_wpm(self): 389 | return self.wpm 390 | 391 | def set_wpm(self, wpm): 392 | self.wpm = wpm 393 | self.blocks_repeat_0.set_interpolation(int(1.2 * self.audio_rate / self.wpm)) 394 | 395 | def get_wbfm_on(self): 396 | return self.wbfm_on 397 | 398 | def set_wbfm_on(self, wbfm_on): 399 | self.wbfm_on = wbfm_on 400 | self._wbfm_on_check_box.set_value(self.wbfm_on) 401 | self.analog_sig_source_x_1.set_amplitude(1.0 / 7 if self.wbfm_on else 0) 402 | 403 | def get_usb_on(self): 404 | return self.usb_on 405 | 406 | def set_usb_on(self, usb_on): 407 | self.usb_on = usb_on 408 | self._usb_on_check_box.set_value(self.usb_on) 409 | self.analog_sig_source_x_3.set_amplitude(1.8 if self.usb_on else 0) 410 | 411 | def get_samp_rate(self): 412 | return self.samp_rate 413 | 414 | def set_samp_rate(self, samp_rate): 415 | self.samp_rate = samp_rate 416 | self.osmosdr_sink_0.set_sample_rate(self.samp_rate) 417 | self.analog_sig_source_x_4.set_sampling_freq(self.samp_rate) 418 | self.analog_sig_source_x_1.set_sampling_freq(self.samp_rate) 419 | self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) 420 | 421 | def get_q_offset(self): 422 | return self.q_offset 423 | 424 | def set_q_offset(self, q_offset): 425 | self.q_offset = q_offset 426 | self._q_offset_slider.set_value(self.q_offset) 427 | self._q_offset_text_box.set_value(self.q_offset) 428 | self.blocks_add_const_vxx_1.set_k((self.i_offset + 1j * self.q_offset, )) 429 | 430 | def get_psk_on(self): 431 | return self.psk_on 432 | 433 | def set_psk_on(self, psk_on): 434 | self.psk_on = psk_on 435 | self._psk_on_check_box.set_value(self.psk_on) 436 | self.analog_sig_source_x_6.set_amplitude(1 if self.psk_on else 0) 437 | 438 | def get_phase(self): 439 | return self.phase 440 | 441 | def set_phase(self, phase): 442 | self.phase = phase 443 | self._phase_slider.set_value(self.phase) 444 | self._phase_text_box.set_value(self.phase) 445 | self.iqbalance_fix_cc_0.set_phase(self.phase) 446 | 447 | def get_nbfm_on(self): 448 | return self.nbfm_on 449 | 450 | def set_nbfm_on(self, nbfm_on): 451 | self.nbfm_on = nbfm_on 452 | self._nbfm_on_check_box.set_value(self.nbfm_on) 453 | self.analog_sig_source_x_0.set_amplitude(1.0 / 7 if self.nbfm_on else 0) 454 | 455 | def get_magnitude(self): 456 | return self.magnitude 457 | 458 | def set_magnitude(self, magnitude): 459 | self.magnitude = magnitude 460 | self._magnitude_slider.set_value(self.magnitude) 461 | self._magnitude_text_box.set_value(self.magnitude) 462 | self.iqbalance_fix_cc_0.set_mag(self.magnitude) 463 | 464 | def get_lsb_on(self): 465 | return self.lsb_on 466 | 467 | def set_lsb_on(self, lsb_on): 468 | self.lsb_on = lsb_on 469 | self._lsb_on_check_box.set_value(self.lsb_on) 470 | self.analog_sig_source_x_3_0.set_amplitude(1.8 if self.lsb_on else 0) 471 | 472 | def get_i_offset(self): 473 | return self.i_offset 474 | 475 | def set_i_offset(self, i_offset): 476 | self.i_offset = i_offset 477 | self._i_offset_slider.set_value(self.i_offset) 478 | self._i_offset_text_box.set_value(self.i_offset) 479 | self.blocks_add_const_vxx_1.set_k((self.i_offset + 1j * self.q_offset, )) 480 | 481 | def get_gain(self): 482 | return self.gain 483 | 484 | def set_gain(self, gain): 485 | self.gain = gain 486 | self.osmosdr_sink_0.set_gain(self.gain, 0) 487 | 488 | def get_cw_on(self): 489 | return self.cw_on 490 | 491 | def set_cw_on(self, cw_on): 492 | self.cw_on = cw_on 493 | self._cw_on_check_box.set_value(self.cw_on) 494 | self.analog_sig_source_x_5.set_amplitude(1 if self.cw_on else 0) 495 | 496 | def get_center_freq(self): 497 | return self.center_freq 498 | 499 | def set_center_freq(self, center_freq): 500 | self.center_freq = center_freq 501 | self.osmosdr_sink_0.set_center_freq(self.center_freq, 0) 502 | 503 | def get_am_on(self): 504 | return self.am_on 505 | 506 | def set_am_on(self, am_on): 507 | self.am_on = am_on 508 | self._am_on_check_box.set_value(self.am_on) 509 | self.analog_sig_source_x_2.set_amplitude(1 if self.am_on else 0) 510 | 511 | 512 | def main(top_block_cls=multi_tx, options=None): 513 | 514 | tb = top_block_cls() 515 | tb.Start(True) 516 | tb.Wait() 517 | 518 | 519 | if __name__ == '__main__': 520 | main() 521 | -------------------------------------------------------------------------------- /osmo-tetra-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nocomp/grc/dcf0c77eaef37aed70024ee5bd324cc497813063/osmo-tetra-master.zip -------------------------------------------------------------------------------- /sdr-examples-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nocomp/grc/dcf0c77eaef37aed70024ee5bd324cc497813063/sdr-examples-master.zip -------------------------------------------------------------------------------- /top_block.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: Top Block 6 | # Generated: Tue Sep 10 22:13:25 2019 7 | ################################################## 8 | 9 | from distutils.version import StrictVersion 10 | 11 | if __name__ == '__main__': 12 | import ctypes 13 | import sys 14 | if sys.platform.startswith('linux'): 15 | try: 16 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 17 | x11.XInitThreads() 18 | except: 19 | print "Warning: failed to XInitThreads()" 20 | 21 | from PyQt5 import Qt 22 | from PyQt5 import Qt, QtCore 23 | from gnuradio import blocks 24 | from gnuradio import eng_notation 25 | from gnuradio import gr 26 | from gnuradio import qtgui 27 | from gnuradio.eng_option import eng_option 28 | from gnuradio.filter import firdes 29 | from optparse import OptionParser 30 | import osmosdr 31 | import pmt 32 | import sip 33 | import sys 34 | import time 35 | from gnuradio import qtgui 36 | 37 | 38 | class top_block(gr.top_block, Qt.QWidget): 39 | 40 | def __init__(self): 41 | gr.top_block.__init__(self, "Top Block") 42 | Qt.QWidget.__init__(self) 43 | self.setWindowTitle("Top Block") 44 | qtgui.util.check_set_qss() 45 | try: 46 | self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) 47 | except: 48 | pass 49 | self.top_scroll_layout = Qt.QVBoxLayout() 50 | self.setLayout(self.top_scroll_layout) 51 | self.top_scroll = Qt.QScrollArea() 52 | self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) 53 | self.top_scroll_layout.addWidget(self.top_scroll) 54 | self.top_scroll.setWidgetResizable(True) 55 | self.top_widget = Qt.QWidget() 56 | self.top_scroll.setWidget(self.top_widget) 57 | self.top_layout = Qt.QVBoxLayout(self.top_widget) 58 | self.top_grid_layout = Qt.QGridLayout() 59 | self.top_layout.addLayout(self.top_grid_layout) 60 | 61 | self.settings = Qt.QSettings("GNU Radio", "top_block") 62 | self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray)) 63 | 64 | 65 | ################################################## 66 | # Variables 67 | ################################################## 68 | self.samp_rate = samp_rate = 2e6 69 | self.frequency = frequency = 868e6 70 | 71 | ################################################## 72 | # Blocks 73 | ################################################## 74 | self.qtgui_time_sink_x_0 = qtgui.time_sink_c( 75 | 1024, #size 76 | samp_rate, #samp_rate 77 | "", #name 78 | 1 #number of inputs 79 | ) 80 | self.qtgui_time_sink_x_0.set_update_time(0.10) 81 | self.qtgui_time_sink_x_0.set_y_axis(-1, 1) 82 | 83 | self.qtgui_time_sink_x_0.set_y_label('Amplitude', "") 84 | 85 | self.qtgui_time_sink_x_0.enable_tags(-1, True) 86 | self.qtgui_time_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") 87 | self.qtgui_time_sink_x_0.enable_autoscale(False) 88 | self.qtgui_time_sink_x_0.enable_grid(False) 89 | self.qtgui_time_sink_x_0.enable_axis_labels(True) 90 | self.qtgui_time_sink_x_0.enable_control_panel(False) 91 | self.qtgui_time_sink_x_0.enable_stem_plot(False) 92 | 93 | if not True: 94 | self.qtgui_time_sink_x_0.disable_legend() 95 | 96 | labels = ['', '', '', '', '', 97 | '', '', '', '', ''] 98 | widths = [1, 1, 1, 1, 1, 99 | 1, 1, 1, 1, 1] 100 | colors = ["blue", "red", "green", "black", "cyan", 101 | "magenta", "yellow", "dark red", "dark green", "blue"] 102 | styles = [1, 1, 1, 1, 1, 103 | 1, 1, 1, 1, 1] 104 | markers = [-1, -1, -1, -1, -1, 105 | -1, -1, -1, -1, -1] 106 | alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 107 | 1.0, 1.0, 1.0, 1.0, 1.0] 108 | 109 | for i in xrange(2): 110 | if len(labels[i]) == 0: 111 | if(i % 2 == 0): 112 | self.qtgui_time_sink_x_0.set_line_label(i, "Re{{Data {0}}}".format(i/2)) 113 | else: 114 | self.qtgui_time_sink_x_0.set_line_label(i, "Im{{Data {0}}}".format(i/2)) 115 | else: 116 | self.qtgui_time_sink_x_0.set_line_label(i, labels[i]) 117 | self.qtgui_time_sink_x_0.set_line_width(i, widths[i]) 118 | self.qtgui_time_sink_x_0.set_line_color(i, colors[i]) 119 | self.qtgui_time_sink_x_0.set_line_style(i, styles[i]) 120 | self.qtgui_time_sink_x_0.set_line_marker(i, markers[i]) 121 | self.qtgui_time_sink_x_0.set_line_alpha(i, alphas[i]) 122 | 123 | self._qtgui_time_sink_x_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0.pyqwidget(), Qt.QWidget) 124 | self.top_grid_layout.addWidget(self._qtgui_time_sink_x_0_win) 125 | self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c( 126 | 1024, #size 127 | firdes.WIN_BLACKMAN_hARRIS, #wintype 128 | 0, #fc 129 | samp_rate, #bw 130 | "", #name 131 | 1 #number of inputs 132 | ) 133 | self.qtgui_freq_sink_x_0.set_update_time(0.10) 134 | self.qtgui_freq_sink_x_0.set_y_axis(-140, 10) 135 | self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB') 136 | self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "") 137 | self.qtgui_freq_sink_x_0.enable_autoscale(False) 138 | self.qtgui_freq_sink_x_0.enable_grid(False) 139 | self.qtgui_freq_sink_x_0.set_fft_average(1.0) 140 | self.qtgui_freq_sink_x_0.enable_axis_labels(True) 141 | self.qtgui_freq_sink_x_0.enable_control_panel(False) 142 | 143 | if not True: 144 | self.qtgui_freq_sink_x_0.disable_legend() 145 | 146 | if "complex" == "float" or "complex" == "msg_float": 147 | self.qtgui_freq_sink_x_0.set_plot_pos_half(not True) 148 | 149 | labels = ['', '', '', '', '', 150 | '', '', '', '', ''] 151 | widths = [1, 1, 1, 1, 1, 152 | 1, 1, 1, 1, 1] 153 | colors = ["blue", "red", "green", "black", "cyan", 154 | "magenta", "yellow", "dark red", "dark green", "dark blue"] 155 | alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 156 | 1.0, 1.0, 1.0, 1.0, 1.0] 157 | for i in xrange(1): 158 | if len(labels[i]) == 0: 159 | self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i)) 160 | else: 161 | self.qtgui_freq_sink_x_0.set_line_label(i, labels[i]) 162 | self.qtgui_freq_sink_x_0.set_line_width(i, widths[i]) 163 | self.qtgui_freq_sink_x_0.set_line_color(i, colors[i]) 164 | self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i]) 165 | 166 | self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget) 167 | self.top_grid_layout.addWidget(self._qtgui_freq_sink_x_0_win) 168 | self.osmosdr_sink_0 = osmosdr.sink( args="numchan=" + str(1) + " " + '' ) 169 | self.osmosdr_sink_0.set_sample_rate(samp_rate) 170 | self.osmosdr_sink_0.set_center_freq(frequency, 0) 171 | self.osmosdr_sink_0.set_freq_corr(0, 0) 172 | self.osmosdr_sink_0.set_gain(20, 0) 173 | self.osmosdr_sink_0.set_if_gain(20, 0) 174 | self.osmosdr_sink_0.set_bb_gain(20, 0) 175 | self.osmosdr_sink_0.set_antenna('', 0) 176 | self.osmosdr_sink_0.set_bandwidth(0, 0) 177 | 178 | self.blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, '/tmp/key.raw', True) 179 | self.blocks_file_source_0.set_begin_tag(pmt.PMT_NIL) 180 | 181 | 182 | 183 | ################################################## 184 | # Connections 185 | ################################################## 186 | self.connect((self.blocks_file_source_0, 0), (self.osmosdr_sink_0, 0)) 187 | self.connect((self.blocks_file_source_0, 0), (self.qtgui_freq_sink_x_0, 0)) 188 | self.connect((self.blocks_file_source_0, 0), (self.qtgui_time_sink_x_0, 0)) 189 | 190 | def closeEvent(self, event): 191 | self.settings = Qt.QSettings("GNU Radio", "top_block") 192 | self.settings.setValue("geometry", self.saveGeometry()) 193 | event.accept() 194 | 195 | def get_samp_rate(self): 196 | return self.samp_rate 197 | 198 | def set_samp_rate(self, samp_rate): 199 | self.samp_rate = samp_rate 200 | self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate) 201 | self.qtgui_freq_sink_x_0.set_frequency_range(0, self.samp_rate) 202 | self.osmosdr_sink_0.set_sample_rate(self.samp_rate) 203 | 204 | def get_frequency(self): 205 | return self.frequency 206 | 207 | def set_frequency(self, frequency): 208 | self.frequency = frequency 209 | self.osmosdr_sink_0.set_center_freq(self.frequency, 0) 210 | 211 | 212 | def main(top_block_cls=top_block, options=None): 213 | 214 | qapp = Qt.QApplication(sys.argv) 215 | 216 | tb = top_block_cls() 217 | tb.start() 218 | tb.show() 219 | 220 | def quitting(): 221 | tb.stop() 222 | tb.wait() 223 | qapp.aboutToQuit.connect(quitting) 224 | qapp.exec_() 225 | 226 | 227 | if __name__ == '__main__': 228 | main() 229 | -------------------------------------------------------------------------------- /uhd_fft.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: UHD FFT 6 | # Author: Example 7 | # Description: UHD FFT Waveform Plotter 8 | # Generated: Tue Sep 10 21:54:12 2019 9 | ################################################## 10 | 11 | from distutils.version import StrictVersion 12 | 13 | if __name__ == '__main__': 14 | import ctypes 15 | import sys 16 | if sys.platform.startswith('linux'): 17 | try: 18 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 19 | x11.XInitThreads() 20 | except: 21 | print "Warning: failed to XInitThreads()" 22 | 23 | from PyQt5 import Qt 24 | from PyQt5 import Qt, QtCore 25 | from PyQt5.QtCore import QObject, pyqtSlot 26 | from gnuradio import analog 27 | from gnuradio import audio 28 | from gnuradio import eng_notation 29 | from gnuradio import filter 30 | from gnuradio import gr 31 | from gnuradio import qtgui 32 | from gnuradio import uhd 33 | from gnuradio.eng_option import eng_option 34 | from gnuradio.filter import firdes 35 | from gnuradio.qtgui import Range, RangeWidget 36 | from optparse import OptionParser 37 | import numpy 38 | import sip 39 | import sys 40 | import threading 41 | import time 42 | from gnuradio import qtgui 43 | 44 | 45 | class uhd_fft(gr.top_block, Qt.QWidget): 46 | 47 | def __init__(self, antenna='RX2', args='', fft_size=1024, freq=466.05e6, gain=20, samp_rate=1e6, spec='', stream_args='', update_rate=.1, wire_format=''): 48 | gr.top_block.__init__(self, "UHD FFT") 49 | Qt.QWidget.__init__(self) 50 | self.setWindowTitle("UHD FFT") 51 | qtgui.util.check_set_qss() 52 | try: 53 | self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) 54 | except: 55 | pass 56 | self.top_scroll_layout = Qt.QVBoxLayout() 57 | self.setLayout(self.top_scroll_layout) 58 | self.top_scroll = Qt.QScrollArea() 59 | self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) 60 | self.top_scroll_layout.addWidget(self.top_scroll) 61 | self.top_scroll.setWidgetResizable(True) 62 | self.top_widget = Qt.QWidget() 63 | self.top_scroll.setWidget(self.top_widget) 64 | self.top_layout = Qt.QVBoxLayout(self.top_widget) 65 | self.top_grid_layout = Qt.QGridLayout() 66 | self.top_layout.addLayout(self.top_grid_layout) 67 | 68 | self.settings = Qt.QSettings("GNU Radio", "uhd_fft") 69 | self.restoreGeometry(self.settings.value("geometry", type=QtCore.QByteArray)) 70 | 71 | 72 | ################################################## 73 | # Parameters 74 | ################################################## 75 | self.antenna = antenna 76 | self.args = args 77 | self.fft_size = fft_size 78 | self.freq = freq 79 | self.gain = gain 80 | self.samp_rate = samp_rate 81 | self.spec = spec 82 | self.stream_args = stream_args 83 | self.update_rate = update_rate 84 | self.wire_format = wire_format 85 | 86 | ################################################## 87 | # Variables 88 | ################################################## 89 | self.freq_c = freq_c = freq 90 | self.chan0_lo_locked = chan0_lo_locked = uhd.sensor_value("", False, "") 91 | self.usrp_device_info = usrp_device_info = uhd.get_version_string() 92 | self.uhd_version_info = uhd_version_info = uhd.get_version_string() 93 | self.samp_rate_ = samp_rate_ = samp_rate 94 | self.lo_locked_probe = lo_locked_probe = chan0_lo_locked.to_bool() 95 | self.gain_ = gain_ = gain 96 | self.current_freq_c = current_freq_c = freq_c 97 | self.ant = ant = antenna 98 | 99 | ################################################## 100 | # Blocks 101 | ################################################## 102 | self._samp_rate__tool_bar = Qt.QToolBar(self) 103 | self._samp_rate__tool_bar.addWidget(Qt.QLabel('Sampling Rate'+": ")) 104 | self._samp_rate__line_edit = Qt.QLineEdit(str(self.samp_rate_)) 105 | self._samp_rate__tool_bar.addWidget(self._samp_rate__line_edit) 106 | self._samp_rate__line_edit.returnPressed.connect( 107 | lambda: self.set_samp_rate_(eng_notation.str_to_num(str(self._samp_rate__line_edit.text().toAscii())))) 108 | self.top_grid_layout.addWidget(self._samp_rate__tool_bar, 3, 2, 1, 2) 109 | for r in range(3, 4): 110 | self.top_grid_layout.setRowStretch(r, 1) 111 | for c in range(2, 4): 112 | self.top_grid_layout.setColumnStretch(c, 1) 113 | self._gain__range = Range(0, 31.5, .5, gain, 200) 114 | self._gain__win = RangeWidget(self._gain__range, self.set_gain_, 'RX Gain', "counter_slider", float) 115 | self.top_grid_layout.addWidget(self._gain__win, 2, 0, 1, 4) 116 | for r in range(2, 3): 117 | self.top_grid_layout.setRowStretch(r, 1) 118 | for c in range(0, 4): 119 | self.top_grid_layout.setColumnStretch(c, 1) 120 | self._freq_c_tool_bar = Qt.QToolBar(self) 121 | self._freq_c_tool_bar.addWidget(Qt.QLabel('RX Tune Frequency'+": ")) 122 | self._freq_c_line_edit = Qt.QLineEdit(str(self.freq_c)) 123 | self._freq_c_tool_bar.addWidget(self._freq_c_line_edit) 124 | self._freq_c_line_edit.returnPressed.connect( 125 | lambda: self.set_freq_c(eng_notation.str_to_num(str(self._freq_c_line_edit.text().toAscii())))) 126 | self.top_grid_layout.addWidget(self._freq_c_tool_bar, 3, 0, 1, 2) 127 | for r in range(3, 4): 128 | self.top_grid_layout.setRowStretch(r, 1) 129 | for c in range(0, 2): 130 | self.top_grid_layout.setColumnStretch(c, 1) 131 | self.uhd_usrp_source_0 = uhd.usrp_source( 132 | ",".join((args, "")), 133 | uhd.stream_args( 134 | cpu_format="fc32", 135 | channels=range(1), 136 | ), 137 | ) 138 | self.uhd_usrp_source_0.set_samp_rate(samp_rate_) 139 | self.uhd_usrp_source_0.set_center_freq(float(freq_c), 0) 140 | self.uhd_usrp_source_0.set_gain(gain_, 0) 141 | self.uhd_usrp_source_0.set_antenna('TX/RX', 0) 142 | self.uhd_usrp_source_0.set_bandwidth(samp_rate, 0) 143 | self.uhd_usrp_source_0.set_auto_dc_offset("", 0) 144 | self.uhd_usrp_source_0.set_auto_iq_balance("", 0) 145 | self.display = Qt.QTabWidget() 146 | self.display_widget_0 = Qt.QWidget() 147 | self.display_layout_0 = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.display_widget_0) 148 | self.display_grid_layout_0 = Qt.QGridLayout() 149 | self.display_layout_0.addLayout(self.display_grid_layout_0) 150 | self.display.addTab(self.display_widget_0, 'Spectrum') 151 | self.display_widget_1 = Qt.QWidget() 152 | self.display_layout_1 = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.display_widget_1) 153 | self.display_grid_layout_1 = Qt.QGridLayout() 154 | self.display_layout_1.addLayout(self.display_grid_layout_1) 155 | self.display.addTab(self.display_widget_1, 'Waterfall') 156 | self.display_widget_2 = Qt.QWidget() 157 | self.display_layout_2 = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.display_widget_2) 158 | self.display_grid_layout_2 = Qt.QGridLayout() 159 | self.display_layout_2.addLayout(self.display_grid_layout_2) 160 | self.display.addTab(self.display_widget_2, 'Scope') 161 | self.top_grid_layout.addWidget(self.display, 0, 0, 1, 4) 162 | for r in range(0, 1): 163 | self.top_grid_layout.setRowStretch(r, 1) 164 | for c in range(0, 4): 165 | self.top_grid_layout.setColumnStretch(c, 1) 166 | self._usrp_device_info_tool_bar = Qt.QToolBar(self) 167 | 168 | if None: 169 | self._usrp_device_info_formatter = None 170 | else: 171 | self._usrp_device_info_formatter = lambda x: repr(x) 172 | 173 | self._usrp_device_info_tool_bar.addWidget(Qt.QLabel('Device Information'+": ")) 174 | self._usrp_device_info_label = Qt.QLabel(str(self._usrp_device_info_formatter(self.usrp_device_info))) 175 | self._usrp_device_info_tool_bar.addWidget(self._usrp_device_info_label) 176 | self.top_grid_layout.addWidget(self._usrp_device_info_tool_bar, 1, 2, 1, 2) 177 | for r in range(1, 2): 178 | self.top_grid_layout.setRowStretch(r, 1) 179 | for c in range(2, 4): 180 | self.top_grid_layout.setColumnStretch(c, 1) 181 | self._uhd_version_info_tool_bar = Qt.QToolBar(self) 182 | 183 | if None: 184 | self._uhd_version_info_formatter = None 185 | else: 186 | self._uhd_version_info_formatter = lambda x: str(x) 187 | 188 | self._uhd_version_info_tool_bar.addWidget(Qt.QLabel('UHD Version'+": ")) 189 | self._uhd_version_info_label = Qt.QLabel(str(self._uhd_version_info_formatter(self.uhd_version_info))) 190 | self._uhd_version_info_tool_bar.addWidget(self._uhd_version_info_label) 191 | self.top_grid_layout.addWidget(self._uhd_version_info_tool_bar, 1, 0, 1, 2) 192 | for r in range(1, 2): 193 | self.top_grid_layout.setRowStretch(r, 1) 194 | for c in range(0, 2): 195 | self.top_grid_layout.setColumnStretch(c, 1) 196 | self.qtgui_waterfall_sink_x_0 = qtgui.waterfall_sink_c( 197 | 1024, #size 198 | firdes.WIN_BLACKMAN_hARRIS, #wintype 199 | freq, #fc 200 | samp_rate_, #bw 201 | '', #name 202 | 1 #number of inputs 203 | ) 204 | self.qtgui_waterfall_sink_x_0.set_update_time(update_rate) 205 | self.qtgui_waterfall_sink_x_0.enable_grid(False) 206 | self.qtgui_waterfall_sink_x_0.enable_axis_labels(True) 207 | 208 | if not True: 209 | self.qtgui_waterfall_sink_x_0.disable_legend() 210 | 211 | if "complex" == "float" or "complex" == "msg_float": 212 | self.qtgui_waterfall_sink_x_0.set_plot_pos_half(not True) 213 | 214 | labels = ['', '', '', '', '', 215 | '', '', '', '', ''] 216 | colors = [0, 0, 0, 0, 0, 217 | 0, 0, 0, 0, 0] 218 | alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 219 | 1.0, 1.0, 1.0, 1.0, 1.0] 220 | for i in xrange(1): 221 | if len(labels[i]) == 0: 222 | self.qtgui_waterfall_sink_x_0.set_line_label(i, "Data {0}".format(i)) 223 | else: 224 | self.qtgui_waterfall_sink_x_0.set_line_label(i, labels[i]) 225 | self.qtgui_waterfall_sink_x_0.set_color_map(i, colors[i]) 226 | self.qtgui_waterfall_sink_x_0.set_line_alpha(i, alphas[i]) 227 | 228 | self.qtgui_waterfall_sink_x_0.set_intensity_range(-140, 10) 229 | 230 | self._qtgui_waterfall_sink_x_0_win = sip.wrapinstance(self.qtgui_waterfall_sink_x_0.pyqwidget(), Qt.QWidget) 231 | self.display_grid_layout_1.addWidget(self._qtgui_waterfall_sink_x_0_win, 0, 0, 1, 4) 232 | for r in range(0, 1): 233 | self.display_grid_layout_1.setRowStretch(r, 1) 234 | for c in range(0, 4): 235 | self.display_grid_layout_1.setColumnStretch(c, 1) 236 | self.qtgui_time_sink_x_0 = qtgui.time_sink_c( 237 | 1024, #size 238 | samp_rate_, #samp_rate 239 | '', #name 240 | 1 #number of inputs 241 | ) 242 | self.qtgui_time_sink_x_0.set_update_time(update_rate) 243 | self.qtgui_time_sink_x_0.set_y_axis(-1, 1) 244 | 245 | self.qtgui_time_sink_x_0.set_y_label('Amplitude', "") 246 | 247 | self.qtgui_time_sink_x_0.enable_tags(-1, True) 248 | self.qtgui_time_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") 249 | self.qtgui_time_sink_x_0.enable_autoscale(True) 250 | self.qtgui_time_sink_x_0.enable_grid(False) 251 | self.qtgui_time_sink_x_0.enable_axis_labels(True) 252 | self.qtgui_time_sink_x_0.enable_control_panel(True) 253 | self.qtgui_time_sink_x_0.enable_stem_plot(False) 254 | 255 | if not False: 256 | self.qtgui_time_sink_x_0.disable_legend() 257 | 258 | labels = ['', '', '', '', '', 259 | '', '', '', '', ''] 260 | widths = [1, 1, 1, 1, 1, 261 | 1, 1, 1, 1, 1] 262 | colors = ["blue", "red", "green", "black", "cyan", 263 | "magenta", "yellow", "dark red", "dark green", "blue"] 264 | styles = [1, 1, 1, 1, 1, 265 | 1, 1, 1, 1, 1] 266 | markers = [-1, -1, -1, -1, -1, 267 | -1, -1, -1, -1, -1] 268 | alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 269 | 1.0, 1.0, 1.0, 1.0, 1.0] 270 | 271 | for i in xrange(2): 272 | if len(labels[i]) == 0: 273 | if(i % 2 == 0): 274 | self.qtgui_time_sink_x_0.set_line_label(i, "Re{{Data {0}}}".format(i/2)) 275 | else: 276 | self.qtgui_time_sink_x_0.set_line_label(i, "Im{{Data {0}}}".format(i/2)) 277 | else: 278 | self.qtgui_time_sink_x_0.set_line_label(i, labels[i]) 279 | self.qtgui_time_sink_x_0.set_line_width(i, widths[i]) 280 | self.qtgui_time_sink_x_0.set_line_color(i, colors[i]) 281 | self.qtgui_time_sink_x_0.set_line_style(i, styles[i]) 282 | self.qtgui_time_sink_x_0.set_line_marker(i, markers[i]) 283 | self.qtgui_time_sink_x_0.set_line_alpha(i, alphas[i]) 284 | 285 | self._qtgui_time_sink_x_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0.pyqwidget(), Qt.QWidget) 286 | self.display_grid_layout_2.addWidget(self._qtgui_time_sink_x_0_win, 0, 0, 1, 4) 287 | for r in range(0, 1): 288 | self.display_grid_layout_2.setRowStretch(r, 1) 289 | for c in range(0, 4): 290 | self.display_grid_layout_2.setColumnStretch(c, 1) 291 | self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c( 292 | fft_size, #size 293 | firdes.WIN_BLACKMAN_hARRIS, #wintype 294 | freq, #fc 295 | samp_rate_, #bw 296 | '', #name 297 | 1 #number of inputs 298 | ) 299 | self.qtgui_freq_sink_x_0.set_update_time(update_rate) 300 | self.qtgui_freq_sink_x_0.set_y_axis(-140, 10) 301 | self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB') 302 | self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "") 303 | self.qtgui_freq_sink_x_0.enable_autoscale(False) 304 | self.qtgui_freq_sink_x_0.enable_grid(True) 305 | self.qtgui_freq_sink_x_0.set_fft_average(0.1) 306 | self.qtgui_freq_sink_x_0.enable_axis_labels(True) 307 | self.qtgui_freq_sink_x_0.enable_control_panel(True) 308 | 309 | if not False: 310 | self.qtgui_freq_sink_x_0.disable_legend() 311 | 312 | if "complex" == "float" or "complex" == "msg_float": 313 | self.qtgui_freq_sink_x_0.set_plot_pos_half(not True) 314 | 315 | labels = ['', '', '', '', '', 316 | '', '', '', '', ''] 317 | widths = [1, 1, 1, 1, 1, 318 | 1, 1, 1, 1, 1] 319 | colors = ["blue", "red", "green", "black", "cyan", 320 | "magenta", "yellow", "dark red", "dark green", "dark blue"] 321 | alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 322 | 1.0, 1.0, 1.0, 1.0, 1.0] 323 | for i in xrange(1): 324 | if len(labels[i]) == 0: 325 | self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i)) 326 | else: 327 | self.qtgui_freq_sink_x_0.set_line_label(i, labels[i]) 328 | self.qtgui_freq_sink_x_0.set_line_width(i, widths[i]) 329 | self.qtgui_freq_sink_x_0.set_line_color(i, colors[i]) 330 | self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i]) 331 | 332 | self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget) 333 | self.display_grid_layout_0.addWidget(self._qtgui_freq_sink_x_0_win, 0, 0, 1, 4) 334 | for r in range(0, 1): 335 | self.display_grid_layout_0.setRowStretch(r, 1) 336 | for c in range(0, 4): 337 | self.display_grid_layout_0.setColumnStretch(c, 1) 338 | self.low_pass_filter_0 = filter.fir_filter_ccf(25, firdes.low_pass( 339 | 1, samp_rate, 7500, 5000, firdes.WIN_HAMMING, 6.76)) 340 | self._lo_locked_probe_tool_bar = Qt.QToolBar(self) 341 | 342 | if None: 343 | self._lo_locked_probe_formatter = None 344 | else: 345 | self._lo_locked_probe_formatter = lambda x: str(x) 346 | 347 | self._lo_locked_probe_tool_bar.addWidget(Qt.QLabel('LO locked'+": ")) 348 | self._lo_locked_probe_label = Qt.QLabel(str(self._lo_locked_probe_formatter(self.lo_locked_probe))) 349 | self._lo_locked_probe_tool_bar.addWidget(self._lo_locked_probe_label) 350 | self.top_grid_layout.addWidget(self._lo_locked_probe_tool_bar, 4, 0, 1, 2) 351 | for r in range(4, 5): 352 | self.top_grid_layout.setRowStretch(r, 1) 353 | for c in range(0, 2): 354 | self.top_grid_layout.setColumnStretch(c, 1) 355 | 356 | def _current_freq_c_probe(): 357 | while True: 358 | val = self.uhd_usrp_source_0.get_sensor('lo_locked') 359 | try: 360 | self.set_current_freq_c(val) 361 | except AttributeError: 362 | pass 363 | time.sleep(1.0 / (10)) 364 | _current_freq_c_thread = threading.Thread(target=_current_freq_c_probe) 365 | _current_freq_c_thread.daemon = True 366 | _current_freq_c_thread.start() 367 | 368 | 369 | def _chan0_lo_locked_probe(): 370 | while True: 371 | val = self.uhd_usrp_source_0.get_sensor('lo_locked') 372 | try: 373 | self.set_chan0_lo_locked(val) 374 | except AttributeError: 375 | pass 376 | time.sleep(1.0 / (10)) 377 | _chan0_lo_locked_thread = threading.Thread(target=_chan0_lo_locked_probe) 378 | _chan0_lo_locked_thread.daemon = True 379 | _chan0_lo_locked_thread.start() 380 | 381 | self.audio_sink_0 = audio.sink(48000, '', True) 382 | self._ant_options = ('RX2', 'TX/RX', 'J1', 'J2', ) 383 | self._ant_labels = ('RX2', 'TX/RX', 'J1', 'J2', ) 384 | self._ant_tool_bar = Qt.QToolBar(self) 385 | self._ant_tool_bar.addWidget(Qt.QLabel('Antenna'+": ")) 386 | self._ant_combo_box = Qt.QComboBox() 387 | self._ant_tool_bar.addWidget(self._ant_combo_box) 388 | for label in self._ant_labels: self._ant_combo_box.addItem(label) 389 | self._ant_callback = lambda i: Qt.QMetaObject.invokeMethod(self._ant_combo_box, "setCurrentIndex", Qt.Q_ARG("int", self._ant_options.index(i))) 390 | self._ant_callback(self.ant) 391 | self._ant_combo_box.currentIndexChanged.connect( 392 | lambda i: self.set_ant(self._ant_options[i])) 393 | self.top_grid_layout.addWidget(self._ant_tool_bar, 4, 2, 1, 2) 394 | for r in range(4, 5): 395 | self.top_grid_layout.setRowStretch(r, 1) 396 | for c in range(2, 4): 397 | self.top_grid_layout.setColumnStretch(c, 1) 398 | self.analog_nbfm_rx_0 = analog.nbfm_rx( 399 | audio_rate=32000, 400 | quad_rate=32000, 401 | tau=75e-6, 402 | max_dev=5e3, 403 | ) 404 | 405 | 406 | 407 | ################################################## 408 | # Connections 409 | ################################################## 410 | self.msg_connect((self.qtgui_freq_sink_x_0, 'freq'), (self.qtgui_freq_sink_x_0, 'freq')) 411 | self.msg_connect((self.qtgui_freq_sink_x_0, 'freq'), (self.uhd_usrp_source_0, 'command')) 412 | self.connect((self.analog_nbfm_rx_0, 0), (self.audio_sink_0, 0)) 413 | self.connect((self.low_pass_filter_0, 0), (self.analog_nbfm_rx_0, 0)) 414 | self.connect((self.uhd_usrp_source_0, 0), (self.low_pass_filter_0, 0)) 415 | self.connect((self.uhd_usrp_source_0, 0), (self.qtgui_freq_sink_x_0, 0)) 416 | self.connect((self.uhd_usrp_source_0, 0), (self.qtgui_time_sink_x_0, 0)) 417 | self.connect((self.uhd_usrp_source_0, 0), (self.qtgui_waterfall_sink_x_0, 0)) 418 | 419 | def closeEvent(self, event): 420 | self.settings = Qt.QSettings("GNU Radio", "uhd_fft") 421 | self.settings.setValue("geometry", self.saveGeometry()) 422 | event.accept() 423 | 424 | def get_antenna(self): 425 | return self.antenna 426 | 427 | def set_antenna(self, antenna): 428 | self.antenna = antenna 429 | self.set_ant(self.antenna) 430 | 431 | def get_args(self): 432 | return self.args 433 | 434 | def set_args(self, args): 435 | self.args = args 436 | 437 | def get_fft_size(self): 438 | return self.fft_size 439 | 440 | def set_fft_size(self, fft_size): 441 | self.fft_size = fft_size 442 | 443 | def get_freq(self): 444 | return self.freq 445 | 446 | def set_freq(self, freq): 447 | self.freq = freq 448 | self.set_freq_c(self.freq) 449 | self.qtgui_waterfall_sink_x_0.set_frequency_range(self.freq, self.samp_rate_) 450 | self.qtgui_freq_sink_x_0.set_frequency_range(self.freq, self.samp_rate_) 451 | 452 | def get_gain(self): 453 | return self.gain 454 | 455 | def set_gain(self, gain): 456 | self.gain = gain 457 | self.set_gain_(self.gain) 458 | 459 | def get_samp_rate(self): 460 | return self.samp_rate 461 | 462 | def set_samp_rate(self, samp_rate): 463 | self.samp_rate = samp_rate 464 | self.set_samp_rate_(self.samp_rate) 465 | self.uhd_usrp_source_0.set_bandwidth(self.samp_rate, 0) 466 | self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate, 7500, 5000, firdes.WIN_HAMMING, 6.76)) 467 | 468 | def get_spec(self): 469 | return self.spec 470 | 471 | def set_spec(self, spec): 472 | self.spec = spec 473 | 474 | def get_stream_args(self): 475 | return self.stream_args 476 | 477 | def set_stream_args(self, stream_args): 478 | self.stream_args = stream_args 479 | 480 | def get_update_rate(self): 481 | return self.update_rate 482 | 483 | def set_update_rate(self, update_rate): 484 | self.update_rate = update_rate 485 | self.qtgui_waterfall_sink_x_0.set_update_time(self.update_rate) 486 | self.qtgui_time_sink_x_0.set_update_time(self.update_rate) 487 | self.qtgui_freq_sink_x_0.set_update_time(self.update_rate) 488 | 489 | def get_wire_format(self): 490 | return self.wire_format 491 | 492 | def set_wire_format(self, wire_format): 493 | self.wire_format = wire_format 494 | 495 | def get_freq_c(self): 496 | return self.freq_c 497 | 498 | def set_freq_c(self, freq_c): 499 | self.freq_c = freq_c 500 | Qt.QMetaObject.invokeMethod(self._freq_c_line_edit, "setText", Qt.Q_ARG("QString", eng_notation.num_to_str(self.freq_c))) 501 | self.uhd_usrp_source_0.set_center_freq(float(self.freq_c), 0) 502 | self.set_current_freq_c(self.freq_c) 503 | 504 | def get_chan0_lo_locked(self): 505 | return self.chan0_lo_locked 506 | 507 | def set_chan0_lo_locked(self, chan0_lo_locked): 508 | self.chan0_lo_locked = chan0_lo_locked 509 | 510 | def get_usrp_device_info(self): 511 | return self.usrp_device_info 512 | 513 | def set_usrp_device_info(self, usrp_device_info): 514 | self.usrp_device_info = usrp_device_info 515 | Qt.QMetaObject.invokeMethod(self._usrp_device_info_label, "setText", Qt.Q_ARG("QString", self.usrp_device_info)) 516 | 517 | def get_uhd_version_info(self): 518 | return self.uhd_version_info 519 | 520 | def set_uhd_version_info(self, uhd_version_info): 521 | self.uhd_version_info = uhd_version_info 522 | Qt.QMetaObject.invokeMethod(self._uhd_version_info_label, "setText", Qt.Q_ARG("QString", self.uhd_version_info)) 523 | 524 | def get_samp_rate_(self): 525 | return self.samp_rate_ 526 | 527 | def set_samp_rate_(self, samp_rate_): 528 | self.samp_rate_ = samp_rate_ 529 | Qt.QMetaObject.invokeMethod(self._samp_rate__line_edit, "setText", Qt.Q_ARG("QString", eng_notation.num_to_str(self.samp_rate_))) 530 | self.uhd_usrp_source_0.set_samp_rate(self.samp_rate_) 531 | self.qtgui_waterfall_sink_x_0.set_frequency_range(self.freq, self.samp_rate_) 532 | self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate_) 533 | self.qtgui_freq_sink_x_0.set_frequency_range(self.freq, self.samp_rate_) 534 | 535 | def get_lo_locked_probe(self): 536 | return self.lo_locked_probe 537 | 538 | def set_lo_locked_probe(self, lo_locked_probe): 539 | self.lo_locked_probe = lo_locked_probe 540 | Qt.QMetaObject.invokeMethod(self._lo_locked_probe_label, "setText", Qt.Q_ARG("QString", self.lo_locked_probe)) 541 | 542 | def get_gain_(self): 543 | return self.gain_ 544 | 545 | def set_gain_(self, gain_): 546 | self.gain_ = gain_ 547 | self.uhd_usrp_source_0.set_gain(self.gain_, 0) 548 | 549 | 550 | def get_current_freq_c(self): 551 | return self.current_freq_c 552 | 553 | def set_current_freq_c(self, current_freq_c): 554 | self.current_freq_c = current_freq_c 555 | 556 | def get_ant(self): 557 | return self.ant 558 | 559 | def set_ant(self, ant): 560 | self.ant = ant 561 | self._ant_callback(self.ant) 562 | 563 | 564 | def argument_parser(): 565 | description = 'UHD FFT Waveform Plotter' 566 | parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description) 567 | parser.add_option( 568 | "-A", "--antenna", dest="antenna", type="string", default='RX2', 569 | help="Set Antenna [default=%default]") 570 | parser.add_option( 571 | "-a", "--args", dest="args", type="string", default='', 572 | help="Set UHD device address args [default=%default]") 573 | parser.add_option( 574 | "", "--fft-size", dest="fft_size", type="intx", default=1024, 575 | help="Set Set number of FFT bins [default=%default]") 576 | parser.add_option( 577 | "-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(466.05e6), 578 | help="Set Default Frequency [default=%default]") 579 | parser.add_option( 580 | "-g", "--gain", dest="gain", type="eng_float", default=eng_notation.num_to_str(20), 581 | help="Set Set gain in dB (default is midpoint) [default=%default]") 582 | parser.add_option( 583 | "-s", "--samp-rate", dest="samp_rate", type="eng_float", default=eng_notation.num_to_str(1e6), 584 | help="Set Sample Rate [default=%default]") 585 | parser.add_option( 586 | "", "--spec", dest="spec", type="string", default='', 587 | help="Set Subdev [default=%default]") 588 | parser.add_option( 589 | "", "--stream-args", dest="stream_args", type="string", default='', 590 | help="Set Set additional stream args [default=%default]") 591 | parser.add_option( 592 | "", "--update-rate", dest="update_rate", type="eng_float", default=eng_notation.num_to_str(.1), 593 | help="Set Set GUI widget update rate [default=%default]") 594 | parser.add_option( 595 | "", "--wire-format", dest="wire_format", type="string", default='', 596 | help="Set Wire format [default=%default]") 597 | return parser 598 | 599 | 600 | def main(top_block_cls=uhd_fft, options=None): 601 | if options is None: 602 | options, _ = argument_parser().parse_args() 603 | 604 | qapp = Qt.QApplication(sys.argv) 605 | 606 | tb = top_block_cls(antenna=options.antenna, args=options.args, fft_size=options.fft_size, freq=options.freq, gain=options.gain, samp_rate=options.samp_rate, spec=options.spec, stream_args=options.stream_args, update_rate=options.update_rate, wire_format=options.wire_format) 607 | tb.start() 608 | tb.show() 609 | 610 | def quitting(): 611 | tb.stop() 612 | tb.wait() 613 | qapp.aboutToQuit.connect(quitting) 614 | qapp.exec_() 615 | 616 | 617 | if __name__ == '__main__': 618 | main() 619 | -------------------------------------------------------------------------------- /uhd_rx_dpsk.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: UHD RX DPSK 6 | # Generated: Mon May 23 11:47:10 2016 7 | ################################################## 8 | 9 | if __name__ == '__main__': 10 | import ctypes 11 | import sys 12 | if sys.platform.startswith('linux'): 13 | try: 14 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 15 | x11.XInitThreads() 16 | except: 17 | print "Warning: failed to XInitThreads()" 18 | 19 | from PyQt4 import Qt 20 | from gnuradio import blocks 21 | from gnuradio import digital 22 | from gnuradio import eng_notation 23 | from gnuradio import gr 24 | from gnuradio import qtgui 25 | from gnuradio import uhd 26 | from gnuradio.eng_option import eng_option 27 | from gnuradio.filter import firdes 28 | from gnuradio.qtgui import Range, RangeWidget 29 | from optparse import OptionParser 30 | import sip 31 | import sys 32 | import time 33 | 34 | 35 | class uhd_rx_dpsk(gr.top_block, Qt.QWidget): 36 | 37 | def __init__(self, address="addr=192.168.10.2", freq=2.45e9, freq_offset=0, gain=0, samp_rate=1e6): 38 | gr.top_block.__init__(self, "UHD RX DPSK") 39 | Qt.QWidget.__init__(self) 40 | self.setWindowTitle("UHD RX DPSK") 41 | try: 42 | self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) 43 | except: 44 | pass 45 | self.top_scroll_layout = Qt.QVBoxLayout() 46 | self.setLayout(self.top_scroll_layout) 47 | self.top_scroll = Qt.QScrollArea() 48 | self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) 49 | self.top_scroll_layout.addWidget(self.top_scroll) 50 | self.top_scroll.setWidgetResizable(True) 51 | self.top_widget = Qt.QWidget() 52 | self.top_scroll.setWidget(self.top_widget) 53 | self.top_layout = Qt.QVBoxLayout(self.top_widget) 54 | self.top_grid_layout = Qt.QGridLayout() 55 | self.top_layout.addLayout(self.top_grid_layout) 56 | 57 | self.settings = Qt.QSettings("GNU Radio", "uhd_rx_dpsk") 58 | self.restoreGeometry(self.settings.value("geometry").toByteArray()) 59 | 60 | ################################################## 61 | # Parameters 62 | ################################################## 63 | self.address = address 64 | self.freq = freq 65 | self.freq_offset = freq_offset 66 | self.gain = gain 67 | self.samp_rate = samp_rate 68 | 69 | ################################################## 70 | # Variables 71 | ################################################## 72 | self.tun_gain = tun_gain = 0 73 | self.tun_freq = tun_freq = 2.45e9 74 | self.samps_per_sym = samps_per_sym = 4 75 | self.rx_freq_off = rx_freq_off = 0 76 | self.rolloff = rolloff = .35 77 | self.nfilts = nfilts = 32 78 | 79 | ################################################## 80 | # Blocks 81 | ################################################## 82 | self._tun_gain_range = Range(0, 20, 1, 0, 200) 83 | self._tun_gain_win = RangeWidget(self._tun_gain_range, self.set_tun_gain, "UHD Tx Gain", "counter_slider", float) 84 | self.top_layout.addWidget(self._tun_gain_win) 85 | self._tun_freq_range = Range(2.4e9, 2.5e9, 1, 2.45e9, 200) 86 | self._tun_freq_win = RangeWidget(self._tun_freq_range, self.set_tun_freq, "UHD Freq (Hz)", "counter_slider", float) 87 | self.top_layout.addWidget(self._tun_freq_win) 88 | self._rx_freq_off_range = Range(-100e3, 100e3, 1, 0, 200) 89 | self._rx_freq_off_win = RangeWidget(self._rx_freq_off_range, self.set_rx_freq_off, "Rx Freq Offset (Hz)", "counter_slider", float) 90 | self.top_layout.addWidget(self._rx_freq_off_win) 91 | self.uhd_usrp_source_1 = uhd.usrp_source( 92 | ",".join(("", "")), 93 | uhd.stream_args( 94 | cpu_format="fc32", 95 | channels=range(1), 96 | ), 97 | ) 98 | self.uhd_usrp_source_1.set_samp_rate(samp_rate) 99 | self.uhd_usrp_source_1.set_center_freq(tun_freq+rx_freq_off, 0) 100 | self.uhd_usrp_source_1.set_gain(tun_gain, 0) 101 | self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c( 102 | 1024, #size 103 | firdes.WIN_BLACKMAN_hARRIS, #wintype 104 | tun_freq, #fc 105 | samp_rate, #bw 106 | "", #name 107 | 1 #number of inputs 108 | ) 109 | self.qtgui_freq_sink_x_0.set_update_time(0.10) 110 | self.qtgui_freq_sink_x_0.set_y_axis(-140, 10) 111 | self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "") 112 | self.qtgui_freq_sink_x_0.enable_autoscale(False) 113 | self.qtgui_freq_sink_x_0.enable_grid(False) 114 | self.qtgui_freq_sink_x_0.set_fft_average(1.0) 115 | self.qtgui_freq_sink_x_0.enable_control_panel(False) 116 | 117 | if not False: 118 | self.qtgui_freq_sink_x_0.disable_legend() 119 | 120 | if "complex" == "float" or "complex" == "msg_float": 121 | self.qtgui_freq_sink_x_0.set_plot_pos_half(not True) 122 | 123 | labels = ["", "", "", "", "", 124 | "", "", "", "", ""] 125 | widths = [1, 1, 1, 1, 1, 126 | 1, 1, 1, 1, 1] 127 | colors = ["blue", "red", "green", "black", "cyan", 128 | "magenta", "yellow", "dark red", "dark green", "dark blue"] 129 | alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 130 | 1.0, 1.0, 1.0, 1.0, 1.0] 131 | for i in xrange(1): 132 | if len(labels[i]) == 0: 133 | self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i)) 134 | else: 135 | self.qtgui_freq_sink_x_0.set_line_label(i, labels[i]) 136 | self.qtgui_freq_sink_x_0.set_line_width(i, widths[i]) 137 | self.qtgui_freq_sink_x_0.set_line_color(i, colors[i]) 138 | self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i]) 139 | 140 | self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget) 141 | self.top_layout.addWidget(self._qtgui_freq_sink_x_0_win) 142 | self.digital_dxpsk_demod_0 = digital.dqpsk_demod( 143 | samples_per_symbol=samps_per_sym, 144 | excess_bw=0.35, 145 | freq_bw=6.28/100.0, 146 | phase_bw=6.28/100.0, 147 | timing_bw=6.28/100.0, 148 | mod_code="gray", 149 | verbose=False, 150 | log=False 151 | ) 152 | self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_char*1) 153 | 154 | ################################################## 155 | # Connections 156 | ################################################## 157 | self.connect((self.digital_dxpsk_demod_0, 0), (self.blocks_null_sink_0, 0)) 158 | self.connect((self.uhd_usrp_source_1, 0), (self.digital_dxpsk_demod_0, 0)) 159 | self.connect((self.uhd_usrp_source_1, 0), (self.qtgui_freq_sink_x_0, 0)) 160 | 161 | def closeEvent(self, event): 162 | self.settings = Qt.QSettings("GNU Radio", "uhd_rx_dpsk") 163 | self.settings.setValue("geometry", self.saveGeometry()) 164 | event.accept() 165 | 166 | 167 | def get_address(self): 168 | return self.address 169 | 170 | def set_address(self, address): 171 | self.address = address 172 | 173 | def get_freq(self): 174 | return self.freq 175 | 176 | def set_freq(self, freq): 177 | self.freq = freq 178 | 179 | def get_freq_offset(self): 180 | return self.freq_offset 181 | 182 | def set_freq_offset(self, freq_offset): 183 | self.freq_offset = freq_offset 184 | 185 | def get_gain(self): 186 | return self.gain 187 | 188 | def set_gain(self, gain): 189 | self.gain = gain 190 | 191 | def get_samp_rate(self): 192 | return self.samp_rate 193 | 194 | def set_samp_rate(self, samp_rate): 195 | self.samp_rate = samp_rate 196 | self.uhd_usrp_source_1.set_samp_rate(self.samp_rate) 197 | self.qtgui_freq_sink_x_0.set_frequency_range(self.tun_freq, self.samp_rate) 198 | 199 | def get_tun_gain(self): 200 | return self.tun_gain 201 | 202 | def set_tun_gain(self, tun_gain): 203 | self.tun_gain = tun_gain 204 | self.uhd_usrp_source_1.set_gain(self.tun_gain, 0) 205 | 206 | 207 | def get_tun_freq(self): 208 | return self.tun_freq 209 | 210 | def set_tun_freq(self, tun_freq): 211 | self.tun_freq = tun_freq 212 | self.uhd_usrp_source_1.set_center_freq(self.tun_freq+self.rx_freq_off, 0) 213 | self.qtgui_freq_sink_x_0.set_frequency_range(self.tun_freq, self.samp_rate) 214 | 215 | def get_samps_per_sym(self): 216 | return self.samps_per_sym 217 | 218 | def set_samps_per_sym(self, samps_per_sym): 219 | self.samps_per_sym = samps_per_sym 220 | 221 | def get_rx_freq_off(self): 222 | return self.rx_freq_off 223 | 224 | def set_rx_freq_off(self, rx_freq_off): 225 | self.rx_freq_off = rx_freq_off 226 | self.uhd_usrp_source_1.set_center_freq(self.tun_freq+self.rx_freq_off, 0) 227 | 228 | def get_rolloff(self): 229 | return self.rolloff 230 | 231 | def set_rolloff(self, rolloff): 232 | self.rolloff = rolloff 233 | 234 | def get_nfilts(self): 235 | return self.nfilts 236 | 237 | def set_nfilts(self, nfilts): 238 | self.nfilts = nfilts 239 | 240 | 241 | def argument_parser(): 242 | parser = OptionParser(option_class=eng_option, usage="%prog: [options]") 243 | parser.add_option( 244 | "-a", "--address", dest="address", type="string", default="addr=192.168.10.2", 245 | help="Set IP Address [default=%default]") 246 | parser.add_option( 247 | "-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(2.45e9), 248 | help="Set Default Frequency [default=%default]") 249 | parser.add_option( 250 | "-o", "--freq-offset", dest="freq_offset", type="eng_float", default=eng_notation.num_to_str(0), 251 | help="Set Rx Frequency Offset [default=%default]") 252 | parser.add_option( 253 | "-g", "--gain", dest="gain", type="eng_float", default=eng_notation.num_to_str(0), 254 | help="Set Default Gain [default=%default]") 255 | parser.add_option( 256 | "-s", "--samp-rate", dest="samp_rate", type="eng_float", default=eng_notation.num_to_str(1e6), 257 | help="Set Sample Rate [default=%default]") 258 | return parser 259 | 260 | 261 | def main(top_block_cls=uhd_rx_dpsk, options=None): 262 | if options is None: 263 | options, _ = argument_parser().parse_args() 264 | 265 | from distutils.version import StrictVersion 266 | if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): 267 | style = gr.prefs().get_string('qtgui', 'style', 'raster') 268 | Qt.QApplication.setGraphicsSystem(style) 269 | qapp = Qt.QApplication(sys.argv) 270 | 271 | tb = top_block_cls(address=options.address, freq=options.freq, freq_offset=options.freq_offset, gain=options.gain, samp_rate=options.samp_rate) 272 | tb.start() 273 | tb.show() 274 | 275 | def quitting(): 276 | tb.stop() 277 | tb.wait() 278 | qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) 279 | qapp.exec_() 280 | 281 | 282 | if __name__ == '__main__': 283 | main() 284 | -------------------------------------------------------------------------------- /uhd_wbfm_receive.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | ################################################## 4 | # GNU Radio Python Flow Graph 5 | # Title: UHD WBFM Receive 6 | # Author: Example 7 | # Description: WBFM Receive 8 | # Generated: Wed May 3 09:58:34 2017 9 | ################################################## 10 | 11 | if __name__ == '__main__': 12 | import ctypes 13 | import sys 14 | if sys.platform.startswith('linux'): 15 | try: 16 | x11 = ctypes.cdll.LoadLibrary('libX11.so') 17 | x11.XInitThreads() 18 | except: 19 | print "Warning: failed to XInitThreads()" 20 | 21 | from PyQt4 import Qt 22 | from gnuradio import analog 23 | from gnuradio import audio 24 | from gnuradio import blocks 25 | from gnuradio import eng_notation 26 | from gnuradio import filter 27 | from gnuradio import gr 28 | from gnuradio import qtgui 29 | from gnuradio import uhd 30 | from gnuradio.eng_option import eng_option 31 | from gnuradio.filter import firdes 32 | from gnuradio.qtgui import Range, RangeWidget 33 | from optparse import OptionParser 34 | import sip 35 | import sys 36 | import time 37 | from gnuradio import qtgui 38 | 39 | 40 | class uhd_wbfm_receive(gr.top_block, Qt.QWidget): 41 | 42 | def __init__(self, address='addr=192.168.10.2', audio_output='', freq=104.2e6, gain=0, samp_rate=400e3): 43 | gr.top_block.__init__(self, "UHD WBFM Receive") 44 | Qt.QWidget.__init__(self) 45 | self.setWindowTitle("UHD WBFM Receive") 46 | qtgui.util.check_set_qss() 47 | try: 48 | self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) 49 | except: 50 | pass 51 | self.top_scroll_layout = Qt.QVBoxLayout() 52 | self.setLayout(self.top_scroll_layout) 53 | self.top_scroll = Qt.QScrollArea() 54 | self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) 55 | self.top_scroll_layout.addWidget(self.top_scroll) 56 | self.top_scroll.setWidgetResizable(True) 57 | self.top_widget = Qt.QWidget() 58 | self.top_scroll.setWidget(self.top_widget) 59 | self.top_layout = Qt.QVBoxLayout(self.top_widget) 60 | self.top_grid_layout = Qt.QGridLayout() 61 | self.top_layout.addLayout(self.top_grid_layout) 62 | 63 | self.settings = Qt.QSettings("GNU Radio", "uhd_wbfm_receive") 64 | self.restoreGeometry(self.settings.value("geometry").toByteArray()) 65 | 66 | ################################################## 67 | # Parameters 68 | ################################################## 69 | self.address = address 70 | self.audio_output = audio_output 71 | self.freq = freq 72 | self.gain = gain 73 | self.samp_rate = samp_rate 74 | 75 | ################################################## 76 | # Variables 77 | ################################################## 78 | self.volume = volume = 1 79 | self.tun_gain = tun_gain = 10 80 | self.tun_freq = tun_freq = freq/1e6 81 | self.fine = fine = 0 82 | self.audio_decim = audio_decim = 10 83 | 84 | ################################################## 85 | # Blocks 86 | ################################################## 87 | self._volume_range = Range(0, 10, 0.1, 1, 200) 88 | self._volume_win = RangeWidget(self._volume_range, self.set_volume, 'Volume', "counter_slider", float) 89 | self.top_grid_layout.addWidget(self._volume_win, 1, 0, 1, 4) 90 | self._tun_gain_range = Range(0, 20, 1, 10, 200) 91 | self._tun_gain_win = RangeWidget(self._tun_gain_range, self.set_tun_gain, 'UHD Gain', "counter_slider", float) 92 | self.top_layout.addWidget(self._tun_gain_win) 93 | self._tun_freq_range = Range(87.9, 108.1, 1, freq/1e6, 200) 94 | self._tun_freq_win = RangeWidget(self._tun_freq_range, self.set_tun_freq, 'UHD Freq (MHz)', "counter_slider", float) 95 | self.top_grid_layout.addWidget(self._tun_freq_win, 0,0,1,2) 96 | self._fine_range = Range(-.1, .1, .01, 0, 200) 97 | self._fine_win = RangeWidget(self._fine_range, self.set_fine, 'Fine Freq (MHz)', "counter_slider", float) 98 | self.top_grid_layout.addWidget(self._fine_win, 0,2,1,2) 99 | self.uhd_usrp_source_1 = uhd.usrp_source( 100 | ",".join(("", "")), 101 | uhd.stream_args( 102 | cpu_format="fc32", 103 | channels=range(1), 104 | ), 105 | ) 106 | self.uhd_usrp_source_1.set_samp_rate(samp_rate) 107 | self.uhd_usrp_source_1.set_center_freq((tun_freq+fine)*1e6, 0) 108 | self.uhd_usrp_source_1.set_gain(tun_gain, 0) 109 | self.uhd_usrp_source_1.set_antenna('TX/RX', 0) 110 | self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c( 111 | 512, #size 112 | firdes.WIN_BLACKMAN_hARRIS, #wintype 113 | (tun_freq+fine)*1e6, #fc 114 | samp_rate, #bw 115 | '', #name 116 | 1 #number of inputs 117 | ) 118 | self.qtgui_freq_sink_x_0.set_update_time(0.10) 119 | self.qtgui_freq_sink_x_0.set_y_axis(-140, 10) 120 | self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB') 121 | self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "") 122 | self.qtgui_freq_sink_x_0.enable_autoscale(False) 123 | self.qtgui_freq_sink_x_0.enable_grid(False) 124 | self.qtgui_freq_sink_x_0.set_fft_average(1.0) 125 | self.qtgui_freq_sink_x_0.enable_axis_labels(True) 126 | self.qtgui_freq_sink_x_0.enable_control_panel(False) 127 | 128 | if not False: 129 | self.qtgui_freq_sink_x_0.disable_legend() 130 | 131 | if "complex" == "float" or "complex" == "msg_float": 132 | self.qtgui_freq_sink_x_0.set_plot_pos_half(not True) 133 | 134 | labels = ['', '', '', '', '', 135 | '', '', '', '', ''] 136 | widths = [1, 1, 1, 1, 1, 137 | 1, 1, 1, 1, 1] 138 | colors = ["blue", "red", "green", "black", "cyan", 139 | "magenta", "yellow", "dark red", "dark green", "dark blue"] 140 | alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 141 | 1.0, 1.0, 1.0, 1.0, 1.0] 142 | for i in xrange(1): 143 | if len(labels[i]) == 0: 144 | self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i)) 145 | else: 146 | self.qtgui_freq_sink_x_0.set_line_label(i, labels[i]) 147 | self.qtgui_freq_sink_x_0.set_line_width(i, widths[i]) 148 | self.qtgui_freq_sink_x_0.set_line_color(i, colors[i]) 149 | self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i]) 150 | 151 | self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget) 152 | self.top_grid_layout.addWidget(self._qtgui_freq_sink_x_0_win, 2,0,2,4) 153 | self.low_pass_filter_0 = filter.fir_filter_ccf(1, firdes.low_pass( 154 | 1, samp_rate, 115e3, 30e3, firdes.WIN_HANN, 6.76)) 155 | self.blocks_multiply_const_vxx = blocks.multiply_const_vff((volume, )) 156 | self.audio_sink = audio.sink(int(samp_rate/audio_decim), audio_output, True) 157 | self.analog_wfm_rcv = analog.wfm_rcv( 158 | quad_rate=samp_rate, 159 | audio_decimation=audio_decim, 160 | ) 161 | 162 | ################################################## 163 | # Connections 164 | ################################################## 165 | self.connect((self.analog_wfm_rcv, 0), (self.blocks_multiply_const_vxx, 0)) 166 | self.connect((self.blocks_multiply_const_vxx, 0), (self.audio_sink, 0)) 167 | self.connect((self.low_pass_filter_0, 0), (self.analog_wfm_rcv, 0)) 168 | self.connect((self.low_pass_filter_0, 0), (self.qtgui_freq_sink_x_0, 0)) 169 | self.connect((self.uhd_usrp_source_1, 0), (self.low_pass_filter_0, 0)) 170 | 171 | def closeEvent(self, event): 172 | self.settings = Qt.QSettings("GNU Radio", "uhd_wbfm_receive") 173 | self.settings.setValue("geometry", self.saveGeometry()) 174 | event.accept() 175 | 176 | def get_address(self): 177 | return self.address 178 | 179 | def set_address(self, address): 180 | self.address = address 181 | 182 | def get_audio_output(self): 183 | return self.audio_output 184 | 185 | def set_audio_output(self, audio_output): 186 | self.audio_output = audio_output 187 | 188 | def get_freq(self): 189 | return self.freq 190 | 191 | def set_freq(self, freq): 192 | self.freq = freq 193 | self.set_tun_freq(self.freq/1e6) 194 | 195 | def get_gain(self): 196 | return self.gain 197 | 198 | def set_gain(self, gain): 199 | self.gain = gain 200 | 201 | def get_samp_rate(self): 202 | return self.samp_rate 203 | 204 | def set_samp_rate(self, samp_rate): 205 | self.samp_rate = samp_rate 206 | self.uhd_usrp_source_1.set_samp_rate(self.samp_rate) 207 | self.qtgui_freq_sink_x_0.set_frequency_range((self.tun_freq+self.fine)*1e6, self.samp_rate) 208 | self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate, 115e3, 30e3, firdes.WIN_HANN, 6.76)) 209 | 210 | def get_volume(self): 211 | return self.volume 212 | 213 | def set_volume(self, volume): 214 | self.volume = volume 215 | self.blocks_multiply_const_vxx.set_k((self.volume, )) 216 | 217 | def get_tun_gain(self): 218 | return self.tun_gain 219 | 220 | def set_tun_gain(self, tun_gain): 221 | self.tun_gain = tun_gain 222 | self.uhd_usrp_source_1.set_gain(self.tun_gain, 0) 223 | 224 | 225 | def get_tun_freq(self): 226 | return self.tun_freq 227 | 228 | def set_tun_freq(self, tun_freq): 229 | self.tun_freq = tun_freq 230 | self.uhd_usrp_source_1.set_center_freq((self.tun_freq+self.fine)*1e6, 0) 231 | self.qtgui_freq_sink_x_0.set_frequency_range((self.tun_freq+self.fine)*1e6, self.samp_rate) 232 | 233 | def get_fine(self): 234 | return self.fine 235 | 236 | def set_fine(self, fine): 237 | self.fine = fine 238 | self.uhd_usrp_source_1.set_center_freq((self.tun_freq+self.fine)*1e6, 0) 239 | self.qtgui_freq_sink_x_0.set_frequency_range((self.tun_freq+self.fine)*1e6, self.samp_rate) 240 | 241 | def get_audio_decim(self): 242 | return self.audio_decim 243 | 244 | def set_audio_decim(self, audio_decim): 245 | self.audio_decim = audio_decim 246 | 247 | 248 | def argument_parser(): 249 | description = 'WBFM Receive' 250 | parser = OptionParser(usage="%prog: [options]", option_class=eng_option, description=description) 251 | parser.add_option( 252 | "-a", "--address", dest="address", type="string", default='addr=192.168.10.2', 253 | help="Set IP Address [default=%default]") 254 | parser.add_option( 255 | "-O", "--audio-output", dest="audio_output", type="string", default='', 256 | help="Set Audio Output Device [default=%default]") 257 | parser.add_option( 258 | "-f", "--freq", dest="freq", type="eng_float", default=eng_notation.num_to_str(104.2e6), 259 | help="Set Default Frequency [default=%default]") 260 | parser.add_option( 261 | "-g", "--gain", dest="gain", type="eng_float", default=eng_notation.num_to_str(0), 262 | help="Set Default Gain [default=%default]") 263 | parser.add_option( 264 | "-s", "--samp-rate", dest="samp_rate", type="eng_float", default=eng_notation.num_to_str(400e3), 265 | help="Set Sample Rate [default=%default]") 266 | return parser 267 | 268 | 269 | def main(top_block_cls=uhd_wbfm_receive, options=None): 270 | if options is None: 271 | options, _ = argument_parser().parse_args() 272 | 273 | from distutils.version import StrictVersion 274 | if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"): 275 | style = gr.prefs().get_string('qtgui', 'style', 'raster') 276 | Qt.QApplication.setGraphicsSystem(style) 277 | qapp = Qt.QApplication(sys.argv) 278 | 279 | tb = top_block_cls(address=options.address, audio_output=options.audio_output, freq=options.freq, gain=options.gain, samp_rate=options.samp_rate) 280 | tb.start() 281 | tb.show() 282 | 283 | def quitting(): 284 | tb.stop() 285 | tb.wait() 286 | qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting) 287 | qapp.exec_() 288 | 289 | 290 | if __name__ == '__main__': 291 | main() 292 | -------------------------------------------------------------------------------- /va3rft.grc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sat Feb 1 10:05:00 2014 4 | 5 | variable 6 | 7 | id 8 | freq 9 | 10 | 11 | _enabled 12 | True 13 | 14 | 15 | value 16 | 444475000 17 | 18 | 19 | _coordinate 20 | (13, 218) 21 | 22 | 23 | _rotation 24 | 0 25 | 26 | 27 | 28 | variable 29 | 30 | id 31 | fsk_deviation_hz 32 | 33 | 34 | _enabled 35 | True 36 | 37 | 38 | value 39 | 8000 40 | 41 | 42 | _coordinate 43 | (12, 353) 44 | 45 | 46 | _rotation 47 | 0 48 | 49 | 50 | 51 | variable 52 | 53 | id 54 | offset 55 | 56 | 57 | _enabled 58 | True 59 | 60 | 61 | value 62 | 50000 63 | 64 | 65 | _coordinate 66 | (13, 286) 67 | 68 | 69 | _rotation 70 | 0 71 | 72 | 73 | 74 | variable 75 | 76 | id 77 | samp_rate 78 | 79 | 80 | _enabled 81 | True 82 | 83 | 84 | value 85 | 1920000 86 | 87 | 88 | _coordinate 89 | (13, 149) 90 | 91 | 92 | _rotation 93 | 0 94 | 95 | 96 | 97 | blocks_multiply_xx 98 | 99 | id 100 | blocks_multiply_xx_0 101 | 102 | 103 | _enabled 104 | True 105 | 106 | 107 | type 108 | complex 109 | 110 | 111 | num_inputs 112 | 2 113 | 114 | 115 | vlen 116 | 1 117 | 118 | 119 | affinity 120 | 121 | 122 | 123 | minoutbuf 124 | 0 125 | 126 | 127 | maxoutbuf 128 | 0 129 | 130 | 131 | _coordinate 132 | (444, 286) 133 | 134 | 135 | _rotation 136 | 0 137 | 138 | 139 | 140 | analog_sig_source_x 141 | 142 | id 143 | analog_sig_source_x_0 144 | 145 | 146 | _enabled 147 | True 148 | 149 | 150 | type 151 | complex 152 | 153 | 154 | samp_rate 155 | samp_rate 156 | 157 | 158 | waveform 159 | analog.GR_COS_WAVE 160 | 161 | 162 | freq 163 | -offset 164 | 165 | 166 | amp 167 | 1 168 | 169 | 170 | offset 171 | 0 172 | 173 | 174 | affinity 175 | 176 | 177 | 178 | minoutbuf 179 | 0 180 | 181 | 182 | maxoutbuf 183 | 0 184 | 185 | 186 | _coordinate 187 | (229, 307) 188 | 189 | 190 | _rotation 191 | 0 192 | 193 | 194 | 195 | low_pass_filter 196 | 197 | id 198 | low_pass_filter_0 199 | 200 | 201 | _enabled 202 | True 203 | 204 | 205 | type 206 | fir_filter_ccf 207 | 208 | 209 | decim 210 | 40 211 | 212 | 213 | interp 214 | 1 215 | 216 | 217 | gain 218 | 20 219 | 220 | 221 | samp_rate 222 | samp_rate 223 | 224 | 225 | cutoff_freq 226 | 3500 227 | 228 | 229 | width 230 | 2000 231 | 232 | 233 | win 234 | firdes.WIN_HAMMING 235 | 236 | 237 | beta 238 | 6.76 239 | 240 | 241 | affinity 242 | 243 | 244 | 245 | minoutbuf 246 | 0 247 | 248 | 249 | maxoutbuf 250 | 0 251 | 252 | 253 | _coordinate 254 | (596, 251) 255 | 256 | 257 | _rotation 258 | 0 259 | 260 | 261 | 262 | dsd_block_ff 263 | 264 | id 265 | dsd_block_ff_0 266 | 267 | 268 | _enabled 269 | True 270 | 271 | 272 | frame 273 | dsd.dsd_FRAME_DMR_MOTOTRBO 274 | 275 | 276 | mod 277 | dsd.dsd_MOD_AUTO_SELECT 278 | 279 | 280 | uvquality 281 | 3 282 | 283 | 284 | errorbars 285 | True 286 | 287 | 288 | verbosity 289 | 2 290 | 291 | 292 | affinity 293 | 294 | 295 | 296 | minoutbuf 297 | 0 298 | 299 | 300 | maxoutbuf 301 | 0 302 | 303 | 304 | _coordinate 305 | (876, 547) 306 | 307 | 308 | _rotation 309 | 0 310 | 311 | 312 | 313 | audio_sink 314 | 315 | id 316 | audio_sink_0 317 | 318 | 319 | _enabled 320 | True 321 | 322 | 323 | samp_rate 324 | 8000 325 | 326 | 327 | device_name 328 | 329 | 330 | 331 | ok_to_block 332 | True 333 | 334 | 335 | num_inputs 336 | 1 337 | 338 | 339 | affinity 340 | 341 | 342 | 343 | _coordinate 344 | (1154, 579) 345 | 346 | 347 | _rotation 348 | 0 349 | 350 | 351 | 352 | osmosdr_source 353 | 354 | id 355 | osmosdr_source_0 356 | 357 | 358 | _enabled 359 | True 360 | 361 | 362 | type 363 | fc32 364 | 365 | 366 | args 367 | 368 | 369 | 370 | nchan 371 | 1 372 | 373 | 374 | sample_rate 375 | samp_rate 376 | 377 | 378 | freq0 379 | freq - offset 380 | 381 | 382 | corr0 383 | corr 384 | 385 | 386 | dc_offset_mode0 387 | 0 388 | 389 | 390 | iq_balance_mode0 391 | 0 392 | 393 | 394 | gain_mode0 395 | 0 396 | 397 | 398 | gain0 399 | gain 400 | 401 | 402 | if_gain0 403 | 20 404 | 405 | 406 | bb_gain0 407 | 20 408 | 409 | 410 | ant0 411 | 412 | 413 | 414 | bw0 415 | 0 416 | 417 | 418 | freq1 419 | 100e6 420 | 421 | 422 | corr1 423 | 0 424 | 425 | 426 | dc_offset_mode1 427 | 0 428 | 429 | 430 | iq_balance_mode1 431 | 0 432 | 433 | 434 | gain_mode1 435 | 0 436 | 437 | 438 | gain1 439 | 10 440 | 441 | 442 | if_gain1 443 | 20 444 | 445 | 446 | bb_gain1 447 | 20 448 | 449 | 450 | ant1 451 | 452 | 453 | 454 | bw1 455 | 0 456 | 457 | 458 | freq2 459 | 100e6 460 | 461 | 462 | corr2 463 | 0 464 | 465 | 466 | dc_offset_mode2 467 | 0 468 | 469 | 470 | iq_balance_mode2 471 | 0 472 | 473 | 474 | gain_mode2 475 | 0 476 | 477 | 478 | gain2 479 | 10 480 | 481 | 482 | if_gain2 483 | 20 484 | 485 | 486 | bb_gain2 487 | 20 488 | 489 | 490 | ant2 491 | 492 | 493 | 494 | bw2 495 | 0 496 | 497 | 498 | freq3 499 | 100e6 500 | 501 | 502 | corr3 503 | 0 504 | 505 | 506 | dc_offset_mode3 507 | 0 508 | 509 | 510 | iq_balance_mode3 511 | 0 512 | 513 | 514 | gain_mode3 515 | 0 516 | 517 | 518 | gain3 519 | 10 520 | 521 | 522 | if_gain3 523 | 20 524 | 525 | 526 | bb_gain3 527 | 20 528 | 529 | 530 | ant3 531 | 532 | 533 | 534 | bw3 535 | 0 536 | 537 | 538 | freq4 539 | 100e6 540 | 541 | 542 | corr4 543 | 0 544 | 545 | 546 | dc_offset_mode4 547 | 0 548 | 549 | 550 | iq_balance_mode4 551 | 0 552 | 553 | 554 | gain_mode4 555 | 0 556 | 557 | 558 | gain4 559 | 10 560 | 561 | 562 | if_gain4 563 | 20 564 | 565 | 566 | bb_gain4 567 | 20 568 | 569 | 570 | ant4 571 | 572 | 573 | 574 | bw4 575 | 0 576 | 577 | 578 | affinity 579 | 580 | 581 | 582 | minoutbuf 583 | 0 584 | 585 | 586 | maxoutbuf 587 | 0 588 | 589 | 590 | _coordinate 591 | (171, 97) 592 | 593 | 594 | _rotation 595 | 0 596 | 597 | 598 | 599 | analog_quadrature_demod_cf 600 | 601 | id 602 | analog_quadrature_demod_cf_0 603 | 604 | 605 | _enabled 606 | True 607 | 608 | 609 | gain 610 | 1 611 | 612 | 613 | affinity 614 | 615 | 616 | 617 | minoutbuf 618 | 0 619 | 620 | 621 | maxoutbuf 622 | 0 623 | 624 | 625 | _coordinate 626 | (281, 579) 627 | 628 | 629 | _rotation 630 | 0 631 | 632 | 633 | 634 | low_pass_filter 635 | 636 | id 637 | low_pass_filter_1 638 | 639 | 640 | _enabled 641 | True 642 | 643 | 644 | type 645 | fir_filter_fff 646 | 647 | 648 | decim 649 | 1 650 | 651 | 652 | interp 653 | 1 654 | 655 | 656 | gain 657 | 1 658 | 659 | 660 | samp_rate 661 | 48000 662 | 663 | 664 | cutoff_freq 665 | 8000 666 | 667 | 668 | width 669 | 2000 670 | 671 | 672 | win 673 | firdes.WIN_HAMMING 674 | 675 | 676 | beta 677 | 6.76 678 | 679 | 680 | affinity 681 | 682 | 683 | 684 | minoutbuf 685 | 0 686 | 687 | 688 | maxoutbuf 689 | 0 690 | 691 | 692 | _coordinate 693 | (496, 531) 694 | 695 | 696 | _rotation 697 | 0 698 | 699 | 700 | 701 | wxgui_waterfallsink2 702 | 703 | id 704 | wxgui_waterfallsink2_1 705 | 706 | 707 | _enabled 708 | True 709 | 710 | 711 | type 712 | complex 713 | 714 | 715 | title 716 | Waterfall Plot 717 | 718 | 719 | samp_rate 720 | 48000 721 | 722 | 723 | baseband_freq 724 | 0 725 | 726 | 727 | dynamic_range 728 | 50 729 | 730 | 731 | ref_level 732 | -20 733 | 734 | 735 | ref_scale 736 | 2.0 737 | 738 | 739 | fft_size 740 | 512 741 | 742 | 743 | fft_rate 744 | 3 745 | 746 | 747 | average 748 | False 749 | 750 | 751 | avg_alpha 752 | 0 753 | 754 | 755 | win 756 | None 757 | 758 | 759 | win_size 760 | 761 | 762 | 763 | grid_pos 764 | 765 | 766 | 767 | notebook 768 | 769 | 770 | 771 | freqvar 772 | None 773 | 774 | 775 | affinity 776 | 777 | 778 | 779 | _coordinate 780 | (822, 235) 781 | 782 | 783 | _rotation 784 | 0 785 | 786 | 787 | 788 | wxgui_scopesink2 789 | 790 | id 791 | wxgui_scopesink2_0 792 | 793 | 794 | _enabled 795 | True 796 | 797 | 798 | type 799 | float 800 | 801 | 802 | title 803 | Scope Plot 804 | 805 | 806 | samp_rate 807 | 48000 808 | 809 | 810 | v_scale 811 | 0.25 812 | 813 | 814 | v_offset 815 | 0 816 | 817 | 818 | t_scale 819 | 0.001 820 | 821 | 822 | ac_couple 823 | False 824 | 825 | 826 | xy_mode 827 | False 828 | 829 | 830 | num_inputs 831 | 1 832 | 833 | 834 | win_size 835 | 836 | 837 | 838 | grid_pos 839 | 840 | 841 | 842 | notebook 843 | 844 | 845 | 846 | trig_mode 847 | wxgui.TRIG_MODE_AUTO 848 | 849 | 850 | y_axis_label 851 | Counts 852 | 853 | 854 | affinity 855 | 856 | 857 | 858 | _coordinate 859 | (876, 420) 860 | 861 | 862 | _rotation 863 | 0 864 | 865 | 866 | 867 | wxgui_fftsink2 868 | 869 | id 870 | wxgui_fftsink2_0 871 | 872 | 873 | _enabled 874 | False 875 | 876 | 877 | type 878 | float 879 | 880 | 881 | title 882 | FFT Plot 883 | 884 | 885 | samp_rate 886 | 48000 887 | 888 | 889 | baseband_freq 890 | 0 891 | 892 | 893 | y_per_div 894 | 10 895 | 896 | 897 | y_divs 898 | 10 899 | 900 | 901 | ref_level 902 | 0 903 | 904 | 905 | ref_scale 906 | 2.0 907 | 908 | 909 | fft_size 910 | 1024 911 | 912 | 913 | fft_rate 914 | 15 915 | 916 | 917 | peak_hold 918 | False 919 | 920 | 921 | average 922 | False 923 | 924 | 925 | avg_alpha 926 | 0 927 | 928 | 929 | win 930 | None 931 | 932 | 933 | win_size 934 | 935 | 936 | 937 | grid_pos 938 | 939 | 940 | 941 | notebook 942 | 943 | 944 | 945 | freqvar 946 | None 947 | 948 | 949 | affinity 950 | 951 | 952 | 953 | _coordinate 954 | (876, 665) 955 | 956 | 957 | _rotation 958 | 0 959 | 960 | 961 | 962 | variable_slider 963 | 964 | id 965 | gain 966 | 967 | 968 | _enabled 969 | True 970 | 971 | 972 | label 973 | RX gain 974 | 975 | 976 | value 977 | 40 978 | 979 | 980 | min 981 | 0 982 | 983 | 984 | max 985 | 49.6 986 | 987 | 988 | num_steps 989 | 124 990 | 991 | 992 | style 993 | wx.SL_HORIZONTAL 994 | 995 | 996 | converver 997 | float_converter 998 | 999 | 1000 | grid_pos 1001 | 1002 | 1003 | 1004 | notebook 1005 | 1006 | 1007 | 1008 | _coordinate 1009 | (13, 420) 1010 | 1011 | 1012 | _rotation 1013 | 0 1014 | 1015 | 1016 | 1017 | variable_slider 1018 | 1019 | id 1020 | corr 1021 | 1022 | 1023 | _enabled 1024 | True 1025 | 1026 | 1027 | label 1028 | Freq. correction 1029 | 1030 | 1031 | value 1032 | 0 1033 | 1034 | 1035 | min 1036 | -150 1037 | 1038 | 1039 | max 1040 | 150 1041 | 1042 | 1043 | num_steps 1044 | 300 1045 | 1046 | 1047 | style 1048 | wx.SL_HORIZONTAL 1049 | 1050 | 1051 | converver 1052 | float_converter 1053 | 1054 | 1055 | grid_pos 1056 | 1057 | 1058 | 1059 | notebook 1060 | 1061 | 1062 | 1063 | _coordinate 1064 | (12, 553) 1065 | 1066 | 1067 | _rotation 1068 | 0 1069 | 1070 | 1071 | 1072 | options 1073 | 1074 | id 1075 | va3rft 1076 | 1077 | 1078 | _enabled 1079 | True 1080 | 1081 | 1082 | title 1083 | VA3RFT 1084 | 1085 | 1086 | author 1087 | 1088 | 1089 | 1090 | description 1091 | 1092 | 1093 | 1094 | window_size 1095 | 1280, 1024 1096 | 1097 | 1098 | generate_options 1099 | wx_gui 1100 | 1101 | 1102 | category 1103 | Custom 1104 | 1105 | 1106 | run_options 1107 | prompt 1108 | 1109 | 1110 | run 1111 | True 1112 | 1113 | 1114 | max_nouts 1115 | 0 1116 | 1117 | 1118 | realtime_scheduling 1119 | 1120 | 1121 | 1122 | _coordinate 1123 | (10, 10) 1124 | 1125 | 1126 | _rotation 1127 | 0 1128 | 1129 | 1130 | 1131 | analog_sig_source_x_0 1132 | blocks_multiply_xx_0 1133 | 0 1134 | 1 1135 | 1136 | 1137 | osmosdr_source_0 1138 | blocks_multiply_xx_0 1139 | 0 1140 | 0 1141 | 1142 | 1143 | blocks_multiply_xx_0 1144 | low_pass_filter_0 1145 | 0 1146 | 0 1147 | 1148 | 1149 | low_pass_filter_0 1150 | wxgui_waterfallsink2_1 1151 | 0 1152 | 0 1153 | 1154 | 1155 | low_pass_filter_1 1156 | wxgui_scopesink2_0 1157 | 0 1158 | 0 1159 | 1160 | 1161 | low_pass_filter_1 1162 | wxgui_fftsink2_0 1163 | 0 1164 | 0 1165 | 1166 | 1167 | low_pass_filter_1 1168 | dsd_block_ff_0 1169 | 0 1170 | 0 1171 | 1172 | 1173 | dsd_block_ff_0 1174 | audio_sink_0 1175 | 0 1176 | 0 1177 | 1178 | 1179 | analog_quadrature_demod_cf_0 1180 | low_pass_filter_1 1181 | 0 1182 | 0 1183 | 1184 | 1185 | low_pass_filter_0 1186 | analog_quadrature_demod_cf_0 1187 | 0 1188 | 0 1189 | 1190 | 1191 | --------------------------------------------------------------------------------