def __init__(self, sample_rate, dict_key, origin_t_secs, origin_t_frac):
        gr.sync_block.__init__(self,
                               name="retune_uhd_to_timed_tag",
                               in_sig=[numpy.complex64],
                               out_sig=[numpy.complex64])

        # setup logger
        logger_name = 'gr_log.' + self.to_basic_block().alias()
        if logger_name in gr.logger_get_names():
            self.log = gr.logger(logger_name)
        else:
            self.log = gr.logger('log')

        self.set_sample_rate(sample_rate)
        self.set_ref_time(offset=0, secs=origin_t_secs, frac=origin_t_frac)

        # this is exposed as a member variable, but really should not be
        # modified as the downstream block respects this key
        self.set_tag_key(pmt.intern("set_freq"))
        self.set_dict_key(dict_key)

        # time reference key
        self.time_key = pmt.intern("rx_time")

        self.message_port_register_in(pmt.intern("command"))
        self.set_msg_handler(pmt.intern("command"), self.handle_command)
        self.message_port_register_out(pmt.intern("freq"))

        # queue for tune commands
        self.tune_commands = deque((), maxlen=64)

        self.lock = threading.Lock()
Exemplo n.º 2
0
  def __init__(self, encapsulation_from, custom_dlt, custom_dissector_name):
      gr.basic_block.__init__(self,
          name="rftap_encap",
          in_sig=[],
          out_sig=[])

      # setup logger
      logger_name = 'gr_log.' + self.to_basic_block().alias()
      if logger_name in gr.logger_get_names():
        self.log = gr.logger(logger_name)
      else:
        self.log = gr.logger('log')

      self.encapsulation_from = encapsulation_from
      self.custom_dlt = custom_dlt
      self.custom_dissector_name = custom_dissector_name

      self.message_port_register_in(self.PMT_IN)
      self.set_msg_handler(self.PMT_IN, self.handle_msg)

      self.message_port_register_out(self.PMT_OUT)
Exemplo n.º 3
0
    def __init__(self, output_path="/tmp", fname_format="", archive=False):
        gr.basic_block.__init__(self,
                                name="file_archiver",
                                in_sig=None,
                                out_sig=None)
        self.message_port_register_in(pmt.intern("pdu"))
        self.set_msg_handler(pmt.intern("pdu"), self.handler)

        # setup logger
        logger_name = 'gr_log.' + self.to_basic_block().alias()
        if logger_name in gr.logger_get_names():
            self.log = gr.logger(logger_name)
        else:
            self.log = gr.logger('log')

        # protection mutex
        self.mutex = threading.Lock()

        # file pdu dictionary elements
        self.filename_tag = pmt.intern('fname')
        self.freq_tag = pmt.intern("rx_freq")
        self.rate_tag = pmt.intern("rx_rate")
        self.time_tag = pmt.intern("rx_time")

        # frequency specifiers
        self.freq_specs = [('%fcM', 1e6), ('%fck', 1e3), ('%fcc', 1.)]

        # rate specifiers
        self.rate_specs = [('%fsM', 1e6), ('%fsk', 1e3), ('%fsc', 1.)]

        # where to copy files
        self.set_output_path(output_path)

        # filename format
        self.set_fname_format(fname_format)

        # set archive
        self.set_archive(archive)
    def __init__(self, parent, usrp_source):
        gr.sync_block.__init__(self,
                               name="usrp_gps_time_sync",
                               in_sig=None,
                               out_sig=None)

        # setup logger
        logger_name = 'gr_log.' + self.to_basic_block().alias()
        if logger_name in gr.logger_get_names():
            self.log = gr.logger(logger_name)
        else:
            self.log = gr.logger('log')

        self.parent = parent
        self.usrp_source = usrp_source
        self.usrp_source_object = None

        self.message_port_register_in(timing_utils.PMTCONSTSTR__in())
        self.set_msg_handler(timing_utils.PMTCONSTSTR__in(), self.msg_handler)

        # current gps status
        self.has_gpsdo = False
        self.gps_locked = False
Exemplo n.º 5
0
#!/usr/bin/env python

from gnuradio import gr
# Add logging
#gr.logger_config("")
statLog = gr.logger("STATS")
statLog.add_console_appender("stdout", "%m%n")
statLog.set_level("DEBUG")
eventLog = gr.logger("EVENTS")
eventLog.add_console_appender("stdout", "%m%n")
eventLog.set_level("DEBUG")

print gr.logger_get_names()
statLog.debug("Stat logging")
eventLog.debug("Event logging")
Exemplo n.º 6
0
    def __init__(self, filename, loop, decimation, samp_rate, f0, short,
                 start_time):
        gr.hier_block2.__init__(self, "uhd_timed_cordic_emulator",
                                gr.io_signature(0, 0, 0),
                                gr.io_signature(1, 1, gr.sizeof_gr_complex))

        # setup logger
        logger_name = 'gr_log.' + self.to_basic_block().alias()
        if logger_name in gr.logger_get_names():
            self.log = gr.logger(logger_name)
        else:
            self.log = gr.logger('log')

        # variables
        taps = filter.firdes.low_pass_2(1, samp_rate,
                                        (samp_rate * 0.4) / decimation,
                                        (samp_rate * 0.4) / decimation, 60)
        self.log.debug("freq xlating filter created with " + repr(len(taps)) +
                       " taps")
        fc_start = f0

        # message inputs / outputs
        self.message_port_register_hier_in("command")

        # blocks
        if short:
            self.file = blocks.file_source(gr.sizeof_short * 1, filename, loop)
        else:
            self.file = blocks.file_source(gr.sizeof_gr_complex * 1, filename,
                                           loop)
        self.deint = sandia_utils.interleaved_short_to_complex(
            False, False, 1.0 / pow(2, 15))
        self.throttle = blocks.throttle(gr.sizeof_gr_complex * 1, samp_rate,
                                        True)
        self.tagger = timing_utils.add_usrp_tags_c(
            fc_start, samp_rate, int(start_time),
            (start_time - int(start_time)))
        self.tuner = timing_utils.retune_uhd_to_timed_tag(
            int(samp_rate), pmt.intern('dsp_freq'), int(start_time),
            (start_time - int(start_time)))
        if DECIMATE_IN_FREQ_XLATING_FILTER:
            self.filt = timing_utils.timed_freq_xlating_fir_ccf(
                decimation, (taps), fc_start, samp_rate)
        else:
            self.filt = timing_utils.timed_freq_xlating_fir_ccf(
                1, [1], fc_start, samp_rate)
            self.fir = filter.fir_filter_ccf(decimation, (taps))
            self.fir.declare_sample_delay(0)

        # connections
        if short:
            self.connect(self.file, self.deint)
            self.connect(self.deint, self.throttle)
            self.connect(self.throttle, self.tagger)
        else:
            self.connect(self.file, self.throttle)
            self.connect(self.throttle, self.tagger)

        self.connect(self.tagger, self.tuner)
        self.connect(self.tuner, self.filt)

        if DECIMATE_IN_FREQ_XLATING_FILTER:
            self.connect(self.filt, self)
        else:
            self.connect(self.filt, self.fir)
            self.connect(self.fir, self)

        self.msg_connect(self, "command", self.tuner, "command")
Exemplo n.º 7
0
    def __init__(self,
                 fname='',
                 add_metadata=False,
                 metadata_format='',
                 data_type='uint8',
                 precision=0):
        gr.sync_block.__init__(self,
                               name="csv_writer",
                               in_sig=None,
                               out_sig=None)
        self.fname = fname
        self.add_metadata = add_metadata
        self.metadata_format = metadata_format
        self.data_type = data_type
        self.precision = precision
        self.fid = None

        # setup logger
        logger_name = 'gr_log.' + self.to_basic_block().alias()
        if logger_name in gr.logger_get_names():
            self.log = gr.logger(logger_name)
        else:
            self.log = gr.logger('log')

        # metadata field mappings
        self.metadata_mappings = {
            'string':
            lambda x: pmt.symbol_to_string(x),
            'bool':
            lambda x: pmt.to_bool(x),
            'long':
            lambda x: pmt.to_long(x),
            'uint64':
            lambda x: pmt.to_uint64(x),
            'float':
            lambda x: pmt.to_float(x),
            'double':
            lambda x: pmt.to_double(x),
            'complex':
            lambda x: pmt.to_complex(x),
            'time':
            lambda x: float(pmt.to_uint64(pmt.car(x))) + pmt.to_double(
                pmt.cdr(x)),
            'time_tuple':
            lambda x: float(pmt.to_uint64(pmt.tuple_ref(x, 0))) + pmt.
            to_double(pmt.tuple_ref(x, 1))
        }

        # data type parsers
        self.data_type_mappings = {
            'uint8': lambda x: pmt.u8vector_elements(x),
            'int8': lambda x: pmt.s8vector_elements(x),
            'uint16': lambda x: pmt.u16vector_elements(x),
            'int16': lambda x: pmt.s16vector_elements(x),
            'uint32': lambda x: pmt.u32vector_elements(x),
            'int32': lambda x: pmt.s32vector_elements(x),
            'float': lambda x: pmt.f32vector_elements(x),
            'complex float': lambda x: pmt.c32vector_elements(x),
            'double': lambda x: pmt.f64vector_elements(x),
            'complex double': lambda x: pmt.c64vector_elements(x)
        }

        # check data type
        if data_type not in self.data_type_mappings.keys():
            raise ValueError('Invalid data type')

        self.find_metadata = False
        self.header = []
        if self.add_metadata:
            if self.metadata_format == '':
                # set flag to load metadata on first message received
                self.find_metadata = True
            else:
                self.parse_header_format()

        # register message handler
        self.message_port_name = pmt.intern('in')
        self.message_port_register_in(self.message_port_name)
        self.set_msg_handler(self.message_port_name, self.message_handler)
Exemplo n.º 8
0
    def __init__(self,
                 fname='',
                 has_header=True,
                 data_type='uint8',
                 period=1000,
                 start_delay=0,
                 repeat=True):
        gr.sync_block.__init__(self, "CSV Reader", in_sig=None, out_sig=None)
        self.file = fname
        self.has_header = has_header
        self.data_type = data_type
        self.period = period
        self.repeat = repeat
        self.start_delay = start_delay

        # setup logger
        logger_name = 'gr_log.' + self.to_basic_block().alias()
        if logger_name in gr.logger_get_names():
            self.log = gr.logger(logger_name)
        else:
            self.log = gr.logger('log')

        # metadata field mappings
        self.metadata_mappings = {
            'string':
            lambda x: pmt.intern(x),
            'bool':
            lambda x: pmt.from_bool(bool(x)),
            'long':
            lambda x: pmt.from_long(int(x)),
            'uint64':
            lambda x: pmt.from_uint64(int(x)),
            'float':
            lambda x: pmt.from_float(float(x)),
            'double':
            lambda x: pmt.from_double(float(x)),
            'complex':
            lambda x: pmt.from_complex(complex(x)),
            'time':
            lambda x: pmt.cons(pmt.from_uint64(int(math.modf(float(x))[1])),
                               pmt.from_double(math.modf(float(x))[0])),
            'time_tuple':
            lambda x: pmt.make_tuple(
                pmt.from_uint64(int(math.modf(float(x))[1])),
                pmt.from_double(math.modf(float(x))[0]))
        }

        self.data_type_mappings = {
            'uint8':
            lambda x: pmt.init_u8vector(len(x), [int(y) for y in x]),
            'int8':
            lambda x: pmt.init_s8vector(len(x), [int(y) for y in x]),
            'uint16':
            lambda x: pmt.init_u16vector(len(x), [int(y) for y in x]),
            'int16':
            lambda x: pmt.init_s16vector(len(x), [int(y) for y in x]),
            'uint32':
            lambda x: pmt.init_u32vector(len(x), [int(y) for y in x]),
            'int32':
            lambda x: pmt.init_s32vector(len(x), [int(y) for y in x]),
            'float':
            lambda x: pmt.init_f32vector(len(x), [float(y) for y in x]),
            'complex float':
            lambda x: pmt.init_c32vector(len(x), [complex(y) for y in x]),
            'double':
            lambda x: pmt.init_f64vector(len(x), [float(y) for y in x]),
            'complex double':
            lambda x: pmt.init_c64vector(len(x), [complex(y) for y in x])
        }

        # ensure valid data type
        if self.data_type not in self.data_type_mappings.keys():
            raise ValueError('Invalid data type {}'.format(data_type))

        # set file name
        self.set_fname(self.file)

        self.message_port_name = pmt.intern('out')
        self.message_port_register_out(self.message_port_name)

        # flag for when to stop
        self.stop_signal_called = False

        # no timer yet
        self.timer = None

        # file lock
        self.lock = threading.Lock()
Exemplo n.º 9
0
    def __init__(self,
                 input_port_num="55555",
                 output_port_num="55556",
                 rx_bw=0.5e6,
                 rx_freq=1e9,
                 rx_gain=0.8,
                 serial_num="",
                 tx_bw=0.5e6,
                 tx_freq=1e9,
                 tx_gain=0.8):
        gr.top_block.__init__(self, "tranceiver_ofdm_usrp")

        ##################################################
        # Parameters
        ##################################################
        self.input_port_num = input_port_num
        self.output_port_num = output_port_num
        self.rx_bw = rx_bw
        self.rx_freq = rx_freq
        self.rx_gain = rx_gain
        self.serial_num = serial_num
        self.tx_bw = tx_bw
        self.tx_freq = tx_freq
        self.tx_gain = tx_gain

        ##################################################
        # Variables
        ##################################################
        self.pilot_symbols = pilot_symbols = ((
            1,
            1,
            1,
            -1,
        ), )
        self.pilot_carriers = pilot_carriers = ((
            -21,
            -7,
            7,
            21,
        ), )
        self.payload_mod = payload_mod = digital.constellation_qpsk()
        self.packet_length_tag_key = packet_length_tag_key = "packet_len"
        self.occupied_carriers = occupied_carriers = (
            list(range(-26, -21)) + list(range(-20, -7)) + list(range(-6, 0)) +
            list(range(1, 7)) + list(range(8, 21)) + list(range(22, 27)), )
        self.length_tag_key = length_tag_key = "frame_len"
        self.header_mod = header_mod = digital.constellation_bpsk()
        self.fft_len = fft_len = 64
        self.sync_word2 = sync_word2 = [
            0j, 0j, 0j, 0j, 0j, 0j, (-1 + 0j), (-1 + 0j), (-1 + 0j), (-1 + 0j),
            (1 + 0j), (1 + 0j), (-1 + 0j), (-1 + 0j), (-1 + 0j), (1 + 0j),
            (-1 + 0j), (1 + 0j), (1 + 0j), (1 + 0j), (1 + 0j), (1 + 0j),
            (-1 + 0j), (-1 + 0j), (-1 + 0j), (-1 + 0j), (-1 + 0j), (1 + 0j),
            (-1 + 0j), (-1 + 0j), (1 + 0j), (-1 + 0j), 0j, (1 + 0j), (-1 + 0j),
            (1 + 0j), (1 + 0j), (1 + 0j), (-1 + 0j), (1 + 0j), (1 + 0j),
            (1 + 0j), (-1 + 0j), (1 + 0j), (1 + 0j), (1 + 0j), (1 + 0j),
            (-1 + 0j), (1 + 0j), (-1 + 0j), (-1 + 0j), (-1 + 0j), (1 + 0j),
            (-1 + 0j), (1 + 0j), (-1 + 0j), (-1 + 0j), (-1 + 0j), (-1 + 0j),
            0j, 0j, 0j, 0j, 0j
        ]
        self.sync_word1 = sync_word1 = [
            0., 0., 0., 0., 0., 0., 0., 1.41421356, 0., -1.41421356, 0.,
            1.41421356, 0., -1.41421356, 0., -1.41421356, 0., -1.41421356, 0.,
            1.41421356, 0., -1.41421356, 0., 1.41421356, 0., -1.41421356, 0.,
            -1.41421356, 0., -1.41421356, 0., -1.41421356, 0., 1.41421356, 0.,
            -1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, 0.,
            -1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, 0.,
            -1.41421356, 0., 1.41421356, 0., 1.41421356, 0., 1.41421356, 0.,
            0., 0., 0., 0., 0.
        ]
        self.samp_rate = samp_rate = 10000
        self.rolloff = rolloff = 0
        self.payload_equalizer = payload_equalizer = digital.ofdm_equalizer_simpledfe(
            fft_len, payload_mod.base(), occupied_carriers, pilot_carriers,
            pilot_symbols, 1)
        self.packet_len = packet_len = 200
        self.header_formatter = header_formatter = digital.packet_header_ofdm(
            occupied_carriers,
            n_syms=1,
            len_tag_key=packet_length_tag_key,
            frame_len_tag_key=length_tag_key,
            bits_per_header_sym=header_mod.bits_per_symbol(),
            bits_per_payload_sym=payload_mod.bits_per_symbol(),
            scramble_header=False)
        self.header_equalizer = header_equalizer = digital.ofdm_equalizer_simpledfe(
            fft_len, header_mod.base(), occupied_carriers, pilot_carriers,
            pilot_symbols)
        self.hdr_format = hdr_format = digital.header_format_ofdm(
            occupied_carriers,
            1,
            length_tag_key,
        )

        ##################################################
        # Blocks
        ##################################################
        self.zeromq_sub_source_0 = zeromq.sub_source(
            gr.sizeof_char, 1, "tcp://127.0.0.1:" + input_port_num, 100, False,
            -1)
        self.zeromq_pub_sink_0 = zeromq.pub_sink(
            gr.sizeof_char, 1, "tcp://127.0.0.1:" + output_port_num, 100,
            False, -1)

        if self.serial_num == "" or self.serial_num == None or self.serial_num == "None":
            self.uhd_usrp_source_0 = uhd.usrp_source(
                ",".join(("", "")),
                uhd.stream_args(
                    cpu_format="fc32",
                    args='',
                    channels=list(range(0, 1)),
                ),
            )

            self.uhd_usrp_sink_0 = uhd.usrp_sink(
                ",".join(("", "")),
                uhd.stream_args(
                    cpu_format="fc32",
                    args='',
                    channels=list(range(0, 1)),
                ),
                packet_length_tag_key,
            )

        else:
            self.uhd_usrp_source_0 = uhd.usrp_source(
                ",".join(("serial=" + serial_num, "")),
                uhd.stream_args(
                    cpu_format="fc32",
                    args='',
                    channels=list(range(0, 1)),
                ),
            )

            self.uhd_usrp_sink_0 = uhd.usrp_sink(
                ",".join(("serial=" + serial_num, "")),
                uhd.stream_args(
                    cpu_format="fc32",
                    args='',
                    channels=list(range(0, 1)),
                ),
                packet_length_tag_key,
            )

        self.uhd_usrp_source_0.set_samp_rate(rx_bw)
        self.uhd_usrp_source_0.set_time_now(uhd.time_spec(time.time()),
                                            uhd.ALL_MBOARDS)

        self.uhd_usrp_source_0.set_center_freq(rx_freq, 0)
        self.uhd_usrp_source_0.set_antenna('RX2', 0)
        self.uhd_usrp_source_0.set_normalized_gain(rx_gain, 0)

        self.uhd_usrp_sink_0.set_samp_rate(tx_bw)
        self.uhd_usrp_sink_0.set_time_now(uhd.time_spec(time.time()),
                                          uhd.ALL_MBOARDS)

        self.uhd_usrp_sink_0.set_center_freq(tx_freq, 0)
        self.uhd_usrp_sink_0.set_antenna('TX/RX', 0)
        self.uhd_usrp_sink_0.set_normalized_gain(tx_gain, 0)
        self.fft_vxx_1 = fft.fft_vcc(fft_len, True, (), True, 1)
        self.fft_vxx_0_0 = fft.fft_vcc(fft_len, False, (), True, 1)
        self.fft_vxx_0 = fft.fft_vcc(fft_len, True, (), True, 1)
        self.digital_protocol_formatter_bb_0 = digital.protocol_formatter_bb(
            hdr_format, packet_length_tag_key)
        self.digital_packet_headerparser_b_0 = digital.packet_headerparser_b(
            header_formatter.base())
        self.digital_ofdm_sync_sc_cfb_0 = digital.ofdm_sync_sc_cfb(
            fft_len, fft_len // 4, False, 0.9)
        self.digital_ofdm_serializer_vcc_payload = digital.ofdm_serializer_vcc(
            fft_len, occupied_carriers, length_tag_key, packet_length_tag_key,
            1, '', True)
        self.digital_ofdm_serializer_vcc_header = digital.ofdm_serializer_vcc(
            fft_len, occupied_carriers, length_tag_key, '', 0, '', True)
        self.digital_ofdm_frame_equalizer_vcvc_1 = digital.ofdm_frame_equalizer_vcvc(
            payload_equalizer.base(), fft_len // 4, length_tag_key, True, 0)
        self.digital_ofdm_frame_equalizer_vcvc_0 = digital.ofdm_frame_equalizer_vcvc(
            header_equalizer.base(), fft_len // 4, length_tag_key, True, 1)
        self.digital_ofdm_cyclic_prefixer_0 = digital.ofdm_cyclic_prefixer(
            fft_len, fft_len + fft_len // 4, rolloff, packet_length_tag_key)
        self.digital_ofdm_chanest_vcvc_0 = digital.ofdm_chanest_vcvc(
            sync_word1, sync_word2, 1, 0, 3, False)
        self.digital_ofdm_carrier_allocator_cvc_0 = digital.ofdm_carrier_allocator_cvc(
            fft_len, occupied_carriers, pilot_carriers, pilot_symbols,
            (sync_word1, sync_word2), packet_length_tag_key, True)
        self.digital_header_payload_demux_0 = digital.header_payload_demux(
            3, fft_len, fft_len // 4, length_tag_key, "", True,
            gr.sizeof_gr_complex, "rx_time", samp_rate, (), 0)
        self.digital_crc32_bb_0_0 = digital.crc32_bb(False,
                                                     packet_length_tag_key,
                                                     True)
        self.digital_crc32_bb_0 = digital.crc32_bb(True, packet_length_tag_key,
                                                   True)
        self.digital_constellation_decoder_cb_1 = digital.constellation_decoder_cb(
            payload_mod.base())
        self.digital_constellation_decoder_cb_0 = digital.constellation_decoder_cb(
            header_mod.base())
        self.digital_chunks_to_symbols_xx_0_0 = digital.chunks_to_symbols_bc(
            payload_mod.points(), 1)
        self.digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bc(
            header_mod.points(), 1)
        self.blocks_tagged_stream_mux_0 = blocks.tagged_stream_mux(
            gr.sizeof_gr_complex * 1, packet_length_tag_key, 0)
        self.blocks_stream_to_tagged_stream_0 = blocks.stream_to_tagged_stream(
            gr.sizeof_char, 1, packet_len, packet_length_tag_key)
        self.blocks_repack_bits_bb_0_1 = blocks.repack_bits_bb(
            8, payload_mod.bits_per_symbol(), packet_length_tag_key, False,
            gr.GR_LSB_FIRST)
        self.blocks_repack_bits_bb_0_0 = blocks.repack_bits_bb(
            8, 1, packet_length_tag_key, False, gr.GR_LSB_FIRST)
        self.blocks_repack_bits_bb_0 = blocks.repack_bits_bb(
            payload_mod.bits_per_symbol(), 8, packet_length_tag_key, True,
            gr.GR_LSB_FIRST)
        self.blocks_multiply_xx_0 = blocks.multiply_vcc(1)
        self.blocks_multiply_const_vxx_0 = blocks.multiply_const_cc(0.05)
        self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex * 1,
                                           fft_len + fft_len // 4)
        self.analog_frequency_modulator_fc_0 = analog.frequency_modulator_fc(
            -2.0 / fft_len)

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.digital_packet_headerparser_b_0, 'header_data'),
                         (self.digital_header_payload_demux_0, 'header_data'))
        self.connect((self.analog_frequency_modulator_fc_0, 0),
                     (self.blocks_multiply_xx_0, 0))
        self.connect((self.blocks_delay_0, 0), (self.blocks_multiply_xx_0, 1))
        self.connect((self.blocks_multiply_const_vxx_0, 0),
                     (self.uhd_usrp_sink_0, 0))
        self.connect((self.blocks_multiply_xx_0, 0),
                     (self.digital_header_payload_demux_0, 0))
        self.connect((self.blocks_repack_bits_bb_0, 0),
                     (self.digital_crc32_bb_0, 0))
        self.connect((self.blocks_repack_bits_bb_0_0, 0),
                     (self.digital_chunks_to_symbols_xx_0, 0))
        self.connect((self.blocks_repack_bits_bb_0_1, 0),
                     (self.digital_chunks_to_symbols_xx_0_0, 0))
        self.connect((self.blocks_stream_to_tagged_stream_0, 0),
                     (self.digital_crc32_bb_0_0, 0))
        self.connect((self.blocks_tagged_stream_mux_0, 0),
                     (self.digital_ofdm_carrier_allocator_cvc_0, 0))
        self.connect((self.digital_chunks_to_symbols_xx_0, 0),
                     (self.blocks_tagged_stream_mux_0, 0))
        self.connect((self.digital_chunks_to_symbols_xx_0_0, 0),
                     (self.blocks_tagged_stream_mux_0, 1))
        self.connect((self.digital_constellation_decoder_cb_0, 0),
                     (self.digital_packet_headerparser_b_0, 0))
        self.connect((self.digital_constellation_decoder_cb_1, 0),
                     (self.blocks_repack_bits_bb_0, 0))
        self.connect((self.digital_crc32_bb_0, 0), (self.zeromq_pub_sink_0, 0))
        self.connect((self.digital_crc32_bb_0_0, 0),
                     (self.blocks_repack_bits_bb_0_1, 0))
        self.connect((self.digital_crc32_bb_0_0, 0),
                     (self.digital_protocol_formatter_bb_0, 0))
        self.connect((self.digital_header_payload_demux_0, 0),
                     (self.fft_vxx_0, 0))
        self.connect((self.digital_header_payload_demux_0, 1),
                     (self.fft_vxx_1, 0))
        self.connect((self.digital_ofdm_carrier_allocator_cvc_0, 0),
                     (self.fft_vxx_0_0, 0))
        self.connect((self.digital_ofdm_chanest_vcvc_0, 0),
                     (self.digital_ofdm_frame_equalizer_vcvc_0, 0))
        self.connect((self.digital_ofdm_cyclic_prefixer_0, 0),
                     (self.blocks_multiply_const_vxx_0, 0))
        self.connect((self.digital_ofdm_frame_equalizer_vcvc_0, 0),
                     (self.digital_ofdm_serializer_vcc_header, 0))
        self.connect((self.digital_ofdm_frame_equalizer_vcvc_1, 0),
                     (self.digital_ofdm_serializer_vcc_payload, 0))
        self.connect((self.digital_ofdm_serializer_vcc_header, 0),
                     (self.digital_constellation_decoder_cb_0, 0))
        self.connect((self.digital_ofdm_serializer_vcc_payload, 0),
                     (self.digital_constellation_decoder_cb_1, 0))
        self.connect((self.digital_ofdm_sync_sc_cfb_0, 0),
                     (self.analog_frequency_modulator_fc_0, 0))
        self.connect((self.digital_ofdm_sync_sc_cfb_0, 1),
                     (self.digital_header_payload_demux_0, 1))
        self.connect((self.digital_protocol_formatter_bb_0, 0),
                     (self.blocks_repack_bits_bb_0_0, 0))
        self.connect((self.fft_vxx_0, 0),
                     (self.digital_ofdm_chanest_vcvc_0, 0))
        self.connect((self.fft_vxx_0_0, 0),
                     (self.digital_ofdm_cyclic_prefixer_0, 0))
        self.connect((self.fft_vxx_1, 0),
                     (self.digital_ofdm_frame_equalizer_vcvc_1, 0))
        self.connect((self.uhd_usrp_source_0, 0), (self.blocks_delay_0, 0))
        self.connect((self.uhd_usrp_source_0, 0),
                     (self.digital_ofdm_sync_sc_cfb_0, 0))
        self.connect((self.zeromq_sub_source_0, 0),
                     (self.blocks_stream_to_tagged_stream_0, 0))

        for logname in gr.logger_get_names():
            gr.logger(logname).set_level("ERROR")