Esempio n. 1
0
 def stop_diag(self):
     self.io_device.read(0x1000)
     self.logger.log(logging.INFO, 'Stopping diag')
     # Static event reporting Disable
     self.io_device.write_then_read_discard(util.generate_packet(struct.pack('<BB', diagcmd.DIAG_EVENT_REPORT_F, 0x00)), 0x1000, False)
     self.io_device.write_then_read_discard(util.generate_packet(struct.pack('<LL', diagcmd.DIAG_LOG_CONFIG_F, diagcmd.LOG_CONFIG_DISABLE_OP)), 0x1000, False)
     self.io_device.write_then_read_discard(util.generate_packet(b'\x7d\x05\x00\x00\x00\x00\x00\x00'), 0x1000, False)
Esempio n. 2
0
    def prepare_diag(self):
        self.logger.log(logging.INFO, 'Starting diag')
        # Static event reporting Enable
        self.io_device.write_then_read_discard(util.generate_packet(struct.pack('<BB', diagcmd.DIAG_EVENT_REPORT_F, 0x01)), 0x1000, False)

        self.io_device.write_then_read_discard(util.generate_packet(diagcmd.log_mask_scat_1x()), 0x1000, False)
        self.io_device.write_then_read_discard(util.generate_packet(diagcmd.log_mask_scat_wcdma()), 0x1000, False)
        self.io_device.write_then_read_discard(util.generate_packet(diagcmd.log_mask_scat_gsm()), 0x1000, False)
        self.io_device.write_then_read_discard(util.generate_packet(diagcmd.log_mask_scat_umts()), 0x1000, False)
        self.io_device.write_then_read_discard(util.generate_packet(diagcmd.log_mask_scat_lte()), 0x1000, False)
Esempio n. 3
0
    def init_diag(self):
        self.logger.log(logging.INFO, 'Initializing diag')
        # Disable static event reporting
        self.io_device.read(0x1000)
        self.io_device.write_then_read_discard(
            util.generate_packet(
                struct.pack('<BB', diagcmd.DIAG_EVENT_REPORT_F, 0x00)), 0x1000,
            False)

        # Send empty masks
        self.io_device.write_then_read_discard(
            util.generate_packet(diagcmd.log_mask_empty_1x()), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(diagcmd.log_mask_empty_wcdma()), 0x1000,
            False)
        self.io_device.write_then_read_discard(
            util.generate_packet(diagcmd.log_mask_empty_gsm()), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(diagcmd.log_mask_empty_umts()), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(diagcmd.log_mask_empty_dtv()), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(diagcmd.log_mask_empty_lte()), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(diagcmd.log_mask_empty_tdscdma()), 0x1000,
            False)

        emr = lambda x, y: diagcmd.create_extended_message_config_set_mask(
            x, y)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x0000, 0x0065)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x01f4, 0x01fa)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x03e8, 0x033f)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x07d0, 0x07d8)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x0bb8, 0x0bc6)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x0fa0, 0x0faa)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1194, 0x11ae)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x11f8, 0x1206)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1388, 0x13a6)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x157c, 0x158c)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1770, 0x17c0)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1964, 0x1979)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1b58, 0x1b5b)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1bbc, 0x1bc7)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1c20, 0x1c21)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x1f40, 0x1f40)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x2134, 0x214c)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x2328, 0x2330)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x251c, 0x2525)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x27d8, 0x27e2)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x280b, 0x280f)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x283c, 0x283c)), 0x1000, False)
        self.io_device.write_then_read_discard(
            util.generate_packet(emr(0x286e, 0x2886)), 0x1000, False)