diff --git a/targets/RT/USER/enb2tx_850rflo.lime b/targets/RT/USER/enb2tx_850rflo.lime deleted file mode 100644 index 778d07a9b5e20aad3ff3532c3ed9d8a7822644de..0000000000000000000000000000000000000000 --- a/targets/RT/USER/enb2tx_850rflo.lime +++ /dev/null @@ -1 +0,0 @@ -8254992 8254992 8257340 8257340 \ No newline at end of file diff --git a/targets/RT/USER/enb2txrflo.lime b/targets/RT/USER/enb2txrflo.lime deleted file mode 100644 index 6907a298c79f9b6b59f19b1c280b55c7fa9f6ab2..0000000000000000000000000000000000000000 --- a/targets/RT/USER/enb2txrflo.lime +++ /dev/null @@ -1 +0,0 @@ -8254744 8255063 8257340 8257340 diff --git a/targets/RT/USER/enb2txrxg.lime b/targets/RT/USER/enb2txrxg.lime deleted file mode 100644 index 7b7a2962d810ef2bc196adb15273dfbdd20f48fc..0000000000000000000000000000000000000000 --- a/targets/RT/USER/enb2txrxg.lime +++ /dev/null @@ -1,9 +0,0 @@ -# this file contains the calibration values to compute the RSSI -# we can use three different gain stages (high, low, med) as well as a gain factor for fine tuning -# the three lines in this file gives the total rx gain in dB for the three gain stages if the rx gain is set to 30dB -# high gain -138 138 138 138 -# med gain -129 129 129 129 -# low gain -120 120 120 120 diff --git a/targets/RT/USER/enb2txtxg.lime b/targets/RT/USER/enb2txtxg.lime deleted file mode 100644 index acc8d23c620e4d89394daec88aec3912440ba078..0000000000000000000000000000000000000000 --- a/targets/RT/USER/enb2txtxg.lime +++ /dev/null @@ -1,5 +0,0 @@ -# For the TX, we need to set the tx gain values such that the transmitted power on all antennas is the same -# tx gain (dB) -25 19 25 25 -# total tx power (dBm) -17 diff --git a/targets/RT/USER/enb4txrflo.lime b/targets/RT/USER/enb4txrflo.lime deleted file mode 100644 index 6e794ce437efb241c4bb73f5278d5abcf23563f3..0000000000000000000000000000000000000000 --- a/targets/RT/USER/enb4txrflo.lime +++ /dev/null @@ -1 +0,0 @@ -8255067 8254810 8257340 8257340 diff --git a/targets/RT/USER/enb4txrxg.lime b/targets/RT/USER/enb4txrxg.lime deleted file mode 100644 index b296e67b71c16fd7059f0f2a1f84d44f7dc3b2b4..0000000000000000000000000000000000000000 --- a/targets/RT/USER/enb4txrxg.lime +++ /dev/null @@ -1,3 +0,0 @@ -133 133 133 133 -127 127 127 127 -120 120 120 120 diff --git a/targets/RT/USER/ex2_2rfdc.lime b/targets/RT/USER/ex2_2rfdc.lime deleted file mode 100644 index ced3d41e444267977a1cd9aff7c373413f14619a..0000000000000000000000000000000000000000 --- a/targets/RT/USER/ex2_2rfdc.lime +++ /dev/null @@ -1 +0,0 @@ -34689 34756 36300 36999 diff --git a/targets/RT/USER/ex2_2rflo.lime b/targets/RT/USER/ex2_2rflo.lime deleted file mode 100644 index 487b30edf62064668d1bcd7a8abc43a7f5091caf..0000000000000000000000000000000000000000 --- a/targets/RT/USER/ex2_2rflo.lime +++ /dev/null @@ -1 +0,0 @@ -8256036 8256804 8257340 8257340 diff --git a/targets/RT/USER/ex2_2txg.lime b/targets/RT/USER/ex2_2txg.lime deleted file mode 100644 index f92a3e8e4583301a7ece5b81baae276992395cfc..0000000000000000000000000000000000000000 --- a/targets/RT/USER/ex2_2txg.lime +++ /dev/null @@ -1,6 +0,0 @@ -# For the TX, we need to set the tx gain values such that the transmitted power on all antennas is the same -# tx gain (dB) -# 25 19 25 25 -10 10 10 10 -# total tx power (dBm) -17 diff --git a/targets/RT/USER/ex2_850rfdc.lime b/targets/RT/USER/ex2_850rfdc.lime deleted file mode 100644 index fbcd8e8f49452f96b4f8a1182185bd0d26607a24..0000000000000000000000000000000000000000 --- a/targets/RT/USER/ex2_850rfdc.lime +++ /dev/null @@ -1,2 +0,0 @@ -33421 36226 34957 37000 - diff --git a/targets/RT/USER/ex2_850rflo.lime b/targets/RT/USER/ex2_850rflo.lime deleted file mode 100644 index 9739db22bb3fe02c58977f6aadfb5169f17e7549..0000000000000000000000000000000000000000 --- a/targets/RT/USER/ex2_850rflo.lime +++ /dev/null @@ -1 +0,0 @@ -8254212 8256991 8257340 8257340 diff --git a/targets/RT/USER/ex2_850txg.lime b/targets/RT/USER/ex2_850txg.lime deleted file mode 100644 index f77d7654630af02edde2f0cb096c331ab0422447..0000000000000000000000000000000000000000 --- a/targets/RT/USER/ex2_850txg.lime +++ /dev/null @@ -1,6 +0,0 @@ -# For the TX, we need to set the tx gain values such that the transmitted power on all antennas is the same -# tx gain (dB) -# 25 19 25 25 -0 0 0 0 -# total tx power (dBm) -17 diff --git a/targets/RT/USER/ex2_2rxg.lime b/targets/RT/USER/exmimo2_2arxg.lime similarity index 88% rename from targets/RT/USER/ex2_2rxg.lime rename to targets/RT/USER/exmimo2_2arxg.lime index 282cf4efc1cbb20a191aac3de539dd4eed13e06f..0c24ef999245f5ee903b1170f5e79cad072e222c 100644 --- a/targets/RT/USER/ex2_2rxg.lime +++ b/targets/RT/USER/exmimo2_2arxg.lime @@ -3,8 +3,8 @@ # the three lines in this file gives the total rx gain in dB for the three gain stages if the rx gain is set to 30dB # this is for Express MIMO2 without any additional RF frontend # high gain -124 124 124 124 +103 107 106 104 # med gain -118 118 118 118 +98 101 100 98 # low gain (byp) -109 109 109 109 +94 97 96 94 diff --git a/targets/RT/USER/ex2_850rxg.lime b/targets/RT/USER/exmimo2_2brxg.lime similarity index 88% rename from targets/RT/USER/ex2_850rxg.lime rename to targets/RT/USER/exmimo2_2brxg.lime index 282cf4efc1cbb20a191aac3de539dd4eed13e06f..e99c738cd0a512f4a67abe582df28ee08f163d5a 100644 --- a/targets/RT/USER/ex2_850rxg.lime +++ b/targets/RT/USER/exmimo2_2brxg.lime @@ -3,8 +3,8 @@ # the three lines in this file gives the total rx gain in dB for the three gain stages if the rx gain is set to 30dB # this is for Express MIMO2 without any additional RF frontend # high gain -124 124 124 124 +128 128 128 126 # med gain -118 118 118 118 +122 123 123 120 # low gain (byp) -109 109 109 109 +116 117 116 116 diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index b6f67627075bf1b7bdf07b7cf9e17cd2f2272cc4..4db607408c5875a3889906f74fe04fd887b0310e 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -2400,20 +2400,20 @@ static void get_options (int argc, char **argv) { int clock_src; #endif int CC_id; + char rxg_fname[256], line[1000]; + FILE *rxg_fd; + int l; const Enb_properties_array_t *enb_properties; enum long_option_e { LONG_OPTION_START = 0x100, /* Start after regular single char options */ - LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS, LONG_OPTION_CALIB_UE_RX, LONG_OPTION_CALIB_UE_RX_MED, LONG_OPTION_CALIB_UE_RX_BYP, - LONG_OPTION_DEBUG_UE_PRACH, - - LONG_OPTION_NO_L2_CONNECT, + LONG_OPTION_NO_L2_CONNECT }; static const struct option long_options[] = { @@ -2425,7 +2425,7 @@ static void get_options (int argc, char **argv) { {"no-L2-connect", no_argument, NULL, LONG_OPTION_NO_L2_CONNECT}, {NULL, 0, NULL, 0}}; - while ((c = getopt_long (argc, argv, "C:dK:g:G:qO:m:SUVRMr:s:t:",long_options,NULL)) != -1) { + while ((c = getopt_long (argc, argv, "C:dK:g:F:G:qO:m:SUVRMr:s:t:",long_options,NULL)) != -1) { switch (c) { case LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS: ULSCH_max_consecutive_errors = atoi(optarg); @@ -2553,6 +2553,27 @@ static void get_options (int argc, char **argv) { case 'g': glog_level=atoi(optarg); // value between 1 - 9 break; + + case 'F': + sprintf(rxg_fname,"%srxg.lime",optarg); + rxg_fd = fopen(rxg_fname,"r"); + if (rxg_fd) { + printf("Loading RX Gain parameters from %s\n",rxg_fname); + l=0; + while (fgets(line, sizeof(line), rxg_fd)) { + if ((strlen(line)==0) || (*line == '#')) continue; //ignore empty or comment lines + else { + if (l==0) sscanf(line,"%d %d %d %d",&rxg_max[0],&rxg_max[1],&rxg_max[2],&rxg_max[3]); + if (l==1) sscanf(line,"%d %d %d %d",&rxg_med[0],&rxg_med[1],&rxg_med[2],&rxg_med[3]); + if (l==2) sscanf(line,"%d %d %d %d",&rxg_byp[0],&rxg_byp[1],&rxg_byp[2],&rxg_byp[3]); + l++; + } + } + } + else + printf("%s not found, running with defaults\n",rxg_fname); + break; + case 'G': glog_verbosity=atoi(optarg);// value from 0, 0x5, 0x15, 0x35, 0x75 break;