예제 #1
0
    def set_up(self):
        """
        Set up the test configuration
        """

        # Call LabMobilityBase Setup function
        LabMobilityBase.set_up(self)

        # Set cell off
        self._ns1_cell.set_cell_off()

        # Set cell off
        self._ns2_cell.set_cell_off()

        # Set EPC off
        self._ns1_data.set_epc_off()
        self._ns2_data.set_epc_off()

        # Call specific configuration functions
        RegUtil.setup_cell_lte(self._ns1, self._ns1_mcc, self._ns1_mnc,
                               self._ns1_ip_dut, self._ns1_signal_mode,
                               self._ns1_cell_id, self._ns1_physical_cell_id,
                               self._ns1_mimo, self._ns1_cell_power_rf1,
                               self._ns1_cell_power_rf2,
                               self._ns1_scenario_path, self._ns1_cell_band,
                               self._ns1_lte_dl_earfcn, self._apn)

        # Call specific configuration functions
        RegUtil.setup_cell_lte(self._ns2, self._ns2_mcc, self._ns2_mnc,
                               self._ns2_ip_dut, self._ns2_signal_mode,
                               self._ns2_cell_id, self._ns2_physical_cell_id,
                               self._ns2_mimo, self._ns2_cell_power_rf1,
                               self._ns2_cell_power_rf2,
                               self._ns2_scenario_path, self._ns2_cell_band,
                               self._ns2_lte_dl_earfcn, self._apn)

        # Set EPC on
        self._ns1_data.set_epc_on()
        self._ns2_data.set_epc_on()

        # Set the APN
        self._logger.info("Setting APN " + str(self._apn) + "...")
        self._networking_api.set_apn(self._ssid, self._apn)

        return Global.SUCCESS, "No errors"
예제 #2
0
    def set_up(self):
        """
        Set up the test configuration
        """

        # Call LabMobilityBase set_up function
        LabMobilityBase.set_up(self)

        # Ensure flight mode off so that GSM sim operator info can be retrieved
        self._networking_api.set_flight_mode("off")
        time.sleep(self._wait_btwn_cmd)

        # Determinates the kind of registration state to wait
        # by comparing test case MCC/MNC parameters to sim MCC/MNC
        sim_info = self._modem_api.get_sim_operator_info()
        if sim_info["MCC"] != self._ns_lte_mcc or \
           sim_info["MNC"] != self._ns_lte_mnc:
            self._wanted_reg_state = "roaming"
            self._networking_api.set_roaming_mode("ON")
        else:
            self._wanted_reg_state = "registered"

        # Disable data and PDP context
        self._networking_api.deactivate_pdp_context()

        # Enable flight mode
        self._networking_api.set_flight_mode("on")

        # Set the Network Simulators APIs instances
        self._set_ns_apis_instances()

        # Set the equipment application format depending on ACTIVE_CELL_TECH.
        # If 4G switch to ""LTE FDD""
        self._ns_lte.switch_app_format("LTE FDD")

        # Perform full preset on LTE cell
        self._ns_lte.perform_full_preset()

        # Perform full preset on 3GSM cell
        self._ns_3gsm.perform_full_preset()

        # Set EPC off, not for CMW500 because DAU starting is a long lasting time operation
        self._ns_lte_data.set_epc_off()

        # Set cell off on LTE cell
        self._ns_lte_cell.set_cell_off()

        # Set cell off
        self._ns_3gsm_cell.set_cell_off()

        # Set IP addresses for the 3GSM NS
        self._ns_3gsm.set_ip_addresses(
            self._ns_3gsm_ip_lan1, self._ns_3gsm_ip_lan2,
            self._ns_3gsm_ip_subnet_mask, self._ns_3gsm_ip_default_gateway,
            self._ns_3gsm_ip_dut, self._ns_3gsm_ip_dns1, self._ns_3gsm_ip_dns2)

        # Call specific configuration functions
        # Some parameters are defined by function
        RegUtil.setup_cell(self._ns_number, self._ns_model,
                           self._ns_3gsm_cell_tech, self._ns_3gsm_cell_band,
                           self._ns_3gsm_cell_rel, self._logger)

        # Set Cell Band and ARFCN using 3GSM_CELL_BAND
        # and 3GSM_ARFCN parameters
        # Set cell service using 3GSM_CELL_SERVICE parameter
        # Set Cell Power using 3GSM_CELL_POWER parameter
        # Set Cell LAC using 3GSM_LAC_VALUE parameter
        # Set Cell RAC using 3GSM_RAC_VALUE parameter
        self._ns_3gsm_cell.configure_basic_cell_parameters(
            self._ns_3gsm_cell_service, self._ns_3gsm_cell_band,
            self._ns_3gsm_dl_arfcn, self._ns_3gsm_cell_power,
            self._ns_3gsm_lac, self._ns_3gsm_rac)

        # set mcc and mnc of 3gsm network
        self._ns_3gsm_cell.set_mcc(self._ns_3gsm_mcc)
        self._ns_3gsm_cell.set_mnc(self._ns_3gsm_mnc)
        if self._ns_lte_duplex_type == "FDD":
            # Call specific configuration functions for LTE Cell
            RegUtil.setup_cell_lte(
                self._ns_lte, self._ns_lte_mcc, self._ns_lte_mnc,
                self._ns_lte_ip_dut, self._ns_lte_signal_mode,
                self._ns_lte_cell_id, self._ns_lte_physical_cell_id,
                self._ns_lte_mimo, self._ns_lte_cell_power_rf1,
                self._ns_lte_cell_power_rf2, self._ns_lte_scenario_path,
                self._ns_lte_cell_band, self._ns_lte_dl_earfcn, self._apn)
        elif self._ns_lte_duplex_type == "TDD":
            # Set the DUT IP address
            self._ns_lte_data.set_dut_ip_address(self._ns_dut_ip_Address)
            # Load LTE TDD optimal configuration
            self._ns_lte.load_cell_config("TDD_COMMON", self._ns_number)
            if hasattr(self, "_lte_tdd_config"):
                self._ns_lte.load_cell_config(self._lte_tdd_config,
                                              self._ns_number)
            if self._cell_band is not None:
                self._ns_lte_cell.set_cell_band(self._ns_lte_cell_band)
                self._ns_lte_cell.set_downlink_earfcn(self._ns_lte_dl_earfcn)

            # Set MIMO mode
            self._ns_cell_4g.set_lte_tdd_configuration(self._antennas_number,
                                                       self._mimo)
        # Set EPC on
        self._ns_lte_data.set_epc_on()

        # Deactivate E-DCH Cell and HSDPA Cell capabilities
        # if 3GSM NS cell tech is 3G
        if self._ns_3gsm_cell_tech == "3G":
            self._ns_3gsm_data.set_edch_cell_capability("OFF")
            self._ns_3gsm_data.set_hsdpa_cell_capability("OFF")
        # if 3GSM NS cell tech is 2G
        else:
            # Set the multislot configuration
            self._ns_3gsm_data.set_multislot_config(self._multislot)

        return Global.SUCCESS, "No errors"
예제 #3
0
    def set_up(self):
        """
        Initialize the test
        """
        UseCaseBase.set_up(self)

        # Ensure flight mode off so that GSM sim operator info can be retrieved
        self._networking_api.set_flight_mode("off")
        time.sleep(self._wait_btwn_cmd)

        # Determinates the kind of registration state to wait
        # by comparing test case MCC/MNC parameters to sim MCC/MNC
        sim_info = self._modem_api.get_sim_operator_info()
        if sim_info["MCC"] != self._mcc or\
                sim_info["MNC"] != self._mnc:
            self._wanted_reg_state = "roaming"
            self._networking_api.set_roaming_mode("ON")
        else:
            self._wanted_reg_state = "registered"

        # Clear all data connections
        self._networking_api.clean_all_data_connections()
        time.sleep(self._wait_btwn_cmd)

        # Flight mode activation
        self._networking_api.set_flight_mode("on")

        # Phone has to see the cell off!
        self._modem_api.check_cdk_no_registration_bfor_timeout(
            self._registration_timeout)

        # Connect to equipment
        self._ns.init()

        # Perform a full preset
        self._ns.perform_full_preset()

        # Wait a while for the full preset
        time.sleep(self._wait_btwn_cmd)

        # Set EPC off, not for CMW500 because DAU starting is a long lasting time operation
        if self._ns_model == "AGILENT_E6621A":
            self._ns_data_4g.set_epc_off()

        # Set cell off
        self._ns_cell_4g.set_cell_off()

        self._ns.configure_amplitude_offset_table()

        self._check_ip_version()

        if self._ip_version in ["IPV4V6", "IPV6"]:
            self._ns_dut_ip_Address = self._ns_dut_ipv6_Address

        # Perform setup for a FDD cell
        if self._duplex_type == "FDD":
            # Load Cell Configuration
            self._ns.load_cell_config("COMMON_LTE", self._ns_number)
            self._ns.load_cell_config(self._cell_band, self._ns_number)
            if self._carrier_aggregation:
                self._ns.load_cell_config("CAT6", self._ns_number)
            if self._ims == "on":
                self._ns.load_cell_config("COMMON_IMS", self._ns_number)
                if self._ip_version != "IPV4":
                    self._ns_data_4g.set_ims_ip_version(self._ip_version)

            # Call specific configuration functions
            RegUtil.setup_cell_lte(self._ns, self._mcc, self._mnc,
                                   self._ns_dut_ip_Address, self._signal_mode,
                                   self._cell_id, self._physical_cell_id,
                                   self._mimo, self._cell_power_rf1,
                                   self._cell_power_rf2, self._scenario_path,
                                   self._cell_band, self._dl_earfcn, self._apn)

            # Set EPC on for Agilent PXT or DAU for RCW500
            self._ns_data_4g.set_epc_on()

            if self._ims == "on":
                self._ns_cell_4g.set_ims_on()

            time.sleep(self._wait_btwn_cmd)

            # stop scenario to set cell parameters
            self._ns.stop_scenario()
            # set configuration for LTE
            self._ns_cell_4g.set_lte_configuration(
                self._antennas_number, self._bandwidth,
                self._transmission_mode, self._type0_bitmap,
                self._ul_grant_mode, self._dl_nb_rb, self._dl_i_mcs,
                self._ul_nb_rb, self._ul_i_mcs, self._mimo,
                self._carrier_aggregation)

            # Set configugation on Secondary Component Carrier
            if self._carrier_aggregation:
                self._ns_cell_4g.set_secondary_carrier_configuration(
                    self._scc_band, self._scc_earfcn, self._scc_bandwidth,
                    self._cell_power_rf1, self._scc_dl_nb_rb,
                    self._scc_dl_i_mcs)
            # Start the scenario
            self._ns.start_scenario()
        elif self._duplex_type == "TDD":
            if self._ip_version in ["IPV4V6", "IPV6"]:
                # Setting the IPv6 Prefix and IID on the CallBox
                self._ns_data_4g.set_ip6_network_parameters(
                    self._server_ip_v6_address)
            # Set the DUT IP address
            self._ns_data_4g.set_dut_ip_address(self._ns_dut_ip_Address)
            # Load LTE TDD optimal configuration
            self._ns.load_cell_config("TDD_COMMON", self._ns_number)
            if hasattr(self, "_lte_tdd_config"):
                self._ns.load_cell_config(self._lte_tdd_config,
                                          self._ns_number)
            if self._cell_band is not None and not self._switch_tdd_fdd:
                self._ns_cell_4g.set_cell_band(self._cell_band)
                self._ns_cell_4g.set_downlink_earfcn(self._dl_earfcn)

            # Set MIMO mode
            self._ns_cell_4g.set_lte_tdd_configuration(self._antennas_number,
                                                       self._mimo)
        else:
            return Global.FAILURE, "Wrong duplex type for LTE: %s it must be FDD or TDD" % self._duplex_type

        return Global.SUCCESS, "No errors"