From dd52807ac7b7baf7af21ff78ec14e50e83f05f56 Mon Sep 17 00:00:00 2001
From: Matthieu Kanj <Matthieu.kanj@b-com.com>
Date: Sun, 17 Dec 2017 02:28:37 +0100
Subject: [PATCH] Corrections to config file, putting new values

---
 openair2/ENB_APP/enb_config_NB_IoT.c          | 45 +-------------
 .../enb.nbiot.band7.tm1.50PRB.usrp210.conf    | 58 +++++++++----------
 2 files changed, 31 insertions(+), 72 deletions(-)

diff --git a/openair2/ENB_APP/enb_config_NB_IoT.c b/openair2/ENB_APP/enb_config_NB_IoT.c
index 613c5dc828..d3cdf0b120 100644
--- a/openair2/ENB_APP/enb_config_NB_IoT.c
+++ b/openair2/ENB_APP/enb_config_NB_IoT.c
@@ -2290,8 +2290,8 @@ const Enb_properties_array_NB_IoT_t *enb_config_init_NB_IoT(char* lib_config_fil
 
               default:
                 AssertFatal (0,
-                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_120 choice: 120,118,116,114,112,110,108,106,104,102,100,98,96,94,92,90 ",
-                             lib_config_file_name_pP, i, PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_120);
+                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower_NB choice: -120,-118,-116,-114,-112,-110,-108,-106,-104,-102,-100,-98,-96,-94,-92,-90 ",
+                             lib_config_file_name_pP, i, rach_preambleInitialReceivedTargetPower_NB);
                 break;
 
               }
@@ -2678,47 +2678,6 @@ const Enb_properties_array_NB_IoT_t *enb_config_init_NB_IoT(char* lib_config_fil
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for deltaPreambleMsg3 choice: -1..6 !\n",
                              lib_config_file_name_pP, i, deltaPreambleMsg3);
-
-        enb_properties.properties[enb_properties_index]->rach_raResponseWindowSize_NB[j] =  (rach_raResponseWindowSize_NB==10)?7:rach_raResponseWindowSize_NB-2;
- 
-              if ((rach_raResponseWindowSize_NB<0)||(rach_raResponseWindowSize_NB==9)||(rach_raResponseWindowSize_NB>10))
-                AssertFatal (0,
-                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize_NB choice: 2,3,4,5,6,7,8,10!\n",
-                             lib_config_file_name_pP, i, rach_preambleTransMax);
-        enb_properties.properties[enb_properties_index]->rach_powerRampingStep[j] = rach_powerRampingStep/2;
-
-              if ((rach_powerRampingStep<0) || (rach_powerRampingStep>6) || ((rach_powerRampingStep&1)!=0))
-                AssertFatal (0,
-                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n",
-                             lib_config_file_name_pP, i, rach_powerRampingStep);
-
-
-
-        switch (bcch_modificationPeriodCoeff_NB) {
-              case 2:
-                enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16;
-                break;
-
-              case 4:
-                enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n32;
-                break;
-
-              case 8:
-                enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n64;
-                break;
-
-              case 16:
-                enb_properties.properties[enb_properties_index]->bcch_modificationPeriodCoeff_NB[j] = BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n128;
-                break;
-
-              default:
-                AssertFatal (0,
-                             "Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff_NB choice: 16,32,64,128",
-                             lib_config_file_name_pP, i, bcch_modificationPeriodCoeff_NB);
-
-                break;
-              }
-
       
 
         //************************************************************************* NB-IoT Timer ************************************************************
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrp210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrp210.conf
index 5013142eee..0e448d936b 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrp210.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.nbiot.band7.tm1.50PRB.usrp210.conf
@@ -105,45 +105,45 @@ eNBs =
 	ue_TransmissionMode	   			      = 1;
 
 
-   rach_raResponseWindowSize_NB                    = 20 ;   # 20,50,80,120,180,240,320,400
-   rach_macContentionResolutionTimer_NB            = 80 ;   # 80,100,120,160,200,240,480,960
-   rach_powerRampingStep_NB                        = 0  ;   # 2,4,6
-   rach_preambleInitialReceivedTargetPower_NB      = -112 ; #  >= -120 && <= -90
-   rach_preambleTransMax_CE_NB                     = 3 ;    # 3,4,5,6,7,8,10,20,50,100,200
-   bcch_modificationPeriodCoeff_NB                 = 0 ;    #
-   pcch_defaultPagingCycle_NB                      = 0 ;    #
+   rach_raResponseWindowSize_NB                    = 2 ;    # 2,3,4,5,6,7,8,10
+   rach_macContentionResolutionTimer_NB            = 1 ;    # 1,2,3,4,8,16,32,64
+   rach_powerRampingStep_NB                        = 0 ;    # 0,2,4,6
+   rach_preambleInitialReceivedTargetPower_NB      = -112;  # -120,-118,-116,-114,-112,-110,-108,-106,-104,-102,-100,-98,-96,-94,-92,-90
+   rach_preambleTransMax_CE_NB                     = 3;     # 3,4,5,6,7,8,10,20,50,100,200
+   bcch_modificationPeriodCoeff_NB                 = 16 ;   # 16,32,64,128
+   pcch_defaultPagingCycle_NB                      = 256 ;  # 128,256,512,1024
    nprach_CP_Length                                = 0 ;    # 0,1
-   nprach_rsrp_range                               = 0 ;    # ?
-   nprach_SubcarrierMSG3_RangeStart                = "one" ;# "zero","oneThird","twoThird","one"
-   maxNumPreambleAttemptCE_NB                      = 10 ;   # 3,4,5,6,7,8,10  
+   nprach_rsrp_range                               = 0 ;    # >=0 && <=96
    npdsch_nrs_Power                                = 0 ;    # >= -60 && <= 50
-   npusch_ack_nack_numRepetitions_NB               = 0 ;    #  
-   npusch_srs_SubframeConfig_NB                    = 0 ;    # >= 0  && <= 15
+   npusch_ack_nack_numRepetitions_NB               = 1 ;    # 1,2,4,8,16,32,64,128 
+   npusch_srs_SubframeConfig_NB                    = 0 ;    # 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    npusch_threeTone_CyclicShift_r13                = 0 ;    # >= 0  && <= 2
    npusch_sixTone_CyclicShift_r13                  = 0 ;    # >= 0  && <= 3
-   npusch_groupHoppingEnabled                      = 0 ;    # 0,1
+   npusch_groupHoppingEnabled                      = "DISABLE";     # ENABLE,DISABLE
    npusch_groupAssignmentNPUSCH_r13                = 0 ;    # >= 0  && <= 29
    dl_GapThreshold_NB                              = 32;    # 32,64,128,256
    dl_GapPeriodicity_NB                            = 64;    # 64,128,256,512
-   dl_GapDurationCoeff_NB                          = "oneEighth";# "oneEighth","oneFourth","threeEighth","oneHalf"
-   npusch_p0_NominalNPUSCH                         = 0 ;    # >= -128  && <= 24
-   npusch_alpha                                    = 10;    #0,4,5,10
+   dl_GapDurationCoeff_NB                          = "oneEighth";   # "oneEighth","oneFourth","threeEighth","oneHalf"
+   npusch_p0_NominalNPUSCH                         = 0 ;    # >= -126  && <= 24
+   npusch_alpha                                    = "AL0"; #AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1
    deltaPreambleMsg3                               = 0 ;    # >= -1  && <= 6
-   ue_TimersAndConstants_t300_NB                   = 1000;
-   ue_TimersAndConstants_t301_NB                   = 1000;
-   ue_TimersAndConstants_t310_NB                   = 1000;
-   ue_TimersAndConstants_t311_NB                   = 10000;
-   ue_TimersAndConstants_n310_NB                   = 20;
-   ue_TimersAndConstants_n311_NB                   = 1;
+   ue_TimersAndConstants_t300_NB                   = 2500;  # 2500,4000,6000,10000,15000,25000,40000,60000
+   ue_TimersAndConstants_t301_NB                   = 2500;  # 2500,4000,6000,10000,15000,25000,40000,60000
+   ue_TimersAndConstants_t310_NB                   = 1000;  # 0,200,500,1000,2000,4000,8000
+   ue_TimersAndConstants_t311_NB                   = 10000; # 1000,3000,5000,10000,150000,20000,30000
+   ue_TimersAndConstants_n310_NB                   = 20;    # 1,2,3,4,6,8,10,20
+   ue_TimersAndConstants_n311_NB                   = 1;     # 1,2,3,4,5,6,8,10
 
     nprach_Periodicity                = 320; # 40,80,160,240,320,640,1280,2560
-        nprach_StartTime                  = 8;   # 8,16,32,64,128,256,512,1024
-        nprach_SubcarrierOffset           = 0;   # 0,12,24,36,2,18,34
-        nprach_NumSubcarriers             = 12;  # 12,24,36,48
-        numRepetitionsPerPreambleAttempt  = 2;   # 1,2,4,8,16,32,64,128
-        npdcch_NumRepetitions_RA          = 16 ;  # 1,2,4,8,16,32,64,128
-        npdcch_StartSF_CSS_RA             = 16 ;    # 1.5,2,4,8,16,32,48,64
-        npdcch_Offset_RA                  = "zero";# "zero","oneEighth","oneFourth","threeEighth"
+    nprach_StartTime                  = 8;   # 8,16,32,64,128,256,512,1024
+    nprach_SubcarrierOffset           = 0;   # 0,12,24,36,2,18,34
+    nprach_NumSubcarriers             = 12;  # 12,24,36,48
+    nprach_SubcarrierMSG3_RangeStart  = "one"; # "zero","oneThird","twoThird","one"
+    maxNumPreambleAttemptCE_NB        = 10 ;   # 3,4,5,6,7,8,10  
+    numRepetitionsPerPreambleAttempt  = 2;   # 1,2,4,8,16,32,64,128
+    npdcch_NumRepetitions_RA          = 16 ;  # 1,2,4,8,16,32,64,128,512,1024,2048
+    npdcch_StartSF_CSS_RA             = 16 ;    # 1,2,4,8,16,32,48,64
+    npdcch_Offset_RA                  = "zero";# "zero","oneEighth","oneFourth","threeEighth"
       }
     );
 
-- 
2.26.2