diff --git a/octal/oc-lte-testbench/calibration.py b/octal/oc-lte-testbench/calibration.py index e9778e17e3..f7e1e80b0e 100644 --- a/octal/oc-lte-testbench/calibration.py +++ b/octal/oc-lte-testbench/calibration.py @@ -30,6 +30,23 @@ if __name__ == '__main__': # config_script_loader.load_config('CALIBRATION', '$DEFAULT') context = config_loader.get_conf() + + context.path_loss = raw_input("What is the path loss?") + print("\nUsing a path loss of " + context.path_loss + "db") + + context.analyzer_name = "TCPIP0::K-N9030B-80108.local::hislip0::INSTR" + se = 'n' + while (se != 'y'): + print("\nUsing analyzer " + context.analyzer_name) + se = raw_input("Is this the correct analyzer?(y/n):") + if (se == 'y') or (se == 'Y'): + se = 'y' + print("\nWill use analyzer " + context.analyzer_name) + break + else: + context.analyzer_name = raw_input("Please enter the correct analyzer name:") + + # context = config_script_loader.get_conf() context.logger = create_logger() context.server = serverinterface.LocalLaunchedServerInterface(port=5050) @@ -45,6 +62,11 @@ if __name__ == '__main__': # This clears /mnt/app if True context.FLASH_CLEAR_APP = False + + + + + # COM PORT from tools.lte.lte_comport import LTECOMServiceClient # context.server.com = context.server.get_service_client_from_name('tools.lte.lte_comport.LTECOMServiceClient', url='com') @@ -67,11 +89,15 @@ if __name__ == '__main__': context.server.spectrum = context.server.get_service_client_from_name('KeysightEXASpectrumClient', url='spectrum') # commenting out for now to test on analyzer later # hislip is working for borrowed - context.server.spectrum.create_service("TCPIP0::K-N9030B-80108.local::hislip0::INSTR") + #context.server.spectrum.create_service("TCPIP0::K-N9030B-80108.local::hislip0::INSTR") # NRG # context.server.spectrum.create_service("TCPIP0::K-N9030B-41982.local::inst0::INSTR") # system near door\ - #context.server.spectrum.create_service("TCPIP0::K-N9010B-10686.local::hislip0::INSTR") + # context.server.spectrum.create_service("TCPIP0::K-N9010B-10686.local::hislip0::INSTR") + context.server.spectrum.create_service(context.analyzer_name) + + + with utils.stack_chdir(ROOT_FOLDER): context.BB_MAC_ADDR = MAC_ADDR diff --git a/octal/oc-lte-testbench/pyscripts/script/.calib_const.ini b/octal/oc-lte-testbench/pyscripts/script/.calib_const.ini index efb1c08782..c9562f4830 100644 --- a/octal/oc-lte-testbench/pyscripts/script/.calib_const.ini +++ b/octal/oc-lte-testbench/pyscripts/script/.calib_const.ini @@ -19,7 +19,7 @@ RFPAL_IN_TARGET_dBm = 30 BB_ATTN_RESOLUTION_DIVIDER = 1 BB_ATTN_MIN = 1 BB_ATTN_INIT_ATTEN = 6 -BB_ATTN_MAX = 10 +BB_ATTN_MAX = 40 RFPAL_FB_TARGET_dBm = -17.5 FB_ATTN_RESOLUTION_DIVIDER = 4 diff --git a/octal/oc-lte-testbench/tools/lte/lte_calib.py b/octal/oc-lte-testbench/tools/lte/lte_calib.py index 0a5104aeff..567d28ab48 100644 --- a/octal/oc-lte-testbench/tools/lte/lte_calib.py +++ b/octal/oc-lte-testbench/tools/lte/lte_calib.py @@ -1148,7 +1148,10 @@ class BBAttenuatorCalibrator(BBGeneratedSignalCalibrator): def read_power_spectrum(self): #rfmeasure.set_spectrum_path(self.context, 'UUT_ANT', tx) - self.context.server.spectrum.set_loss(31) + #self.context.server.spectrum.set_loss(31) + float_path_loss = float(self.context.path_loss) + #print("Path Loss = %f" % float_path_loss) + self.context.server.spectrum.set_loss(float_path_loss) if not hasattr(self, 'previous'): self.previous = None value = read_output_power(self.context, self.context.server.spectrum)