diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index c5ca88d5b84808c945142e9122dccb3a6f486775..b24db90edbf1fb502b304d49863fd95f308d09f7 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -1804,6 +1804,7 @@ add_executable(lte-softmodem-nos1
   ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
   ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
   ${OPENAIR_TARGETS}/RT/USER/lte-enb.c
+  ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
   ${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
   ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
   ${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
@@ -1934,7 +1935,7 @@ add_executable(oaisim_nos1
   ${x2ap_h}
   ${OPENAIR_BIN_DIR}/messages_xml.h
   ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
-  ${OPENAIR_TARGETS}/RT/USER/lte-enb.c
+  ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
   ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
   ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
   ${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
diff --git a/common/config/config_cmdline.c b/common/config/config_cmdline.c
index 42ea7259c31963ff871c201b8215745086532223..cb24cc52222f3a4fed6af979b61882a4db234c39 100644
--- a/common/config/config_cmdline.c
+++ b/common/config/config_cmdline.c
@@ -52,9 +52,12 @@ char defbool[2]="1";
      switch(cfgoptions->type)
        {
        	case TYPE_STRING:
-           config_check_valptr(cfgoptions, (char **)(cfgoptions->strptr), sizeof(char *));
-           config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval+1));
-           sprintf(*(cfgoptions->strptr), "%s",tmpval);
+           if (cfgoptions->numelt == 0 ) {
+              config_check_valptr(cfgoptions, cfgoptions->strptr, strlen(tmpval)+1);
+              sprintf(*(cfgoptions->strptr), "%s",tmpval);
+            } else {
+              sprintf( (char *)(cfgoptions->strptr), "%s",tmpval);              
+           }
            printf_cmdl("[CONFIG] %s set to  %s from command line\n", cfgoptions->optname, tmpval);
 	   optisset=1;
         break;
diff --git a/common/config/config_load_configmodule.c b/common/config/config_load_configmodule.c
index 8351d4d82c143bf05601638fcebe4e80e1f02039..ff66d22a1c847bd783ccd43211709b1e5bf741c1 100644
--- a/common/config/config_load_configmodule.c
+++ b/common/config/config_load_configmodule.c
@@ -129,20 +129,21 @@ int i;
 
 /* default */
   if (cfgparam == NULL) {
-     cfgparam = "libconfig:oaisoftmodem.conf";
+     tmpflags = tmpflags | CONFIG_NOOOPT;
+     cfgparam = DEFAULT_CFGMODE ":" DEFAULT_CFGFILENAME;
      }
 /* parse the config parameters to set the config source */
    i = sscanf(cfgparam,"%m[^':']:%ms",&cfgmode,&modeparams);
    if (i< 0) {
        fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source  %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno));
-       cfgmode=strdup("libconfig");
-       modeparams = strdup("oaisoftmodem.conf");
+       cfgmode=strdup(DEFAULT_CFGMODE);
+       modeparams = strdup(DEFAULT_CFGFILENAME);
    }
    else if ( i == 1 ) {
   /* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig
      with one parameter, the path to the configuration file */
        modeparams=cfgmode;
-       cfgmode=strdup("libconfig");
+       cfgmode=strdup(DEFAULT_CFGMODE);
    }
 
    cfgptr = malloc(sizeof(configmodule_interface_t));
diff --git a/common/config/config_load_configmodule.h b/common/config/config_load_configmodule.h
index 71c642f68054180bf521dfcd8a7e0f12bc39e57b..76f074cd6c38cf805938f28567237368b2d8e253 100644
--- a/common/config/config_load_configmodule.h
+++ b/common/config/config_load_configmodule.h
@@ -46,6 +46,7 @@
 #define CONFIG_DEBUGCMDLINE   4        // print command line processing messages
 #define CONFIG_HELP           8        // print help message
 #define CONFIG_ABORT          16       // config failed,abort execution 
+#define CONFIG_NOOOPT         32       // no -O option found when parsing command line 
 
 
 typedef int(*configmodule_initfunc_t)(char *cfgP[],int numP);
diff --git a/common/config/config_userapi.c b/common/config/config_userapi.c
index ad2e355d528153d8591ba7f89065b7c6cdeae2a4..37c77be93fd65ece230a894c594320bb2b9f076f 100644
--- a/common/config/config_userapi.c
+++ b/common/config/config_userapi.c
@@ -50,7 +50,11 @@ configmodule_interface_t *config_get_if(void)
 char * config_check_valptr(paramdef_t *cfgoptions, char **ptr, int length) 
 {
 
-     printf_ptrs("-- %s 0x%08lx %i\n",cfgoptions->optname,(uintptr_t)(*ptr),length);
+     printf_ptrs("[CONFIG] %s ptr: 0x%08lx requested size: %i\n",cfgoptions->optname,(uintptr_t)(ptr),length);
+     if(cfgoptions->numelt > 0) { /* already allocated */
+          return *ptr;
+     }
+
      if (*ptr == NULL) {
         *ptr = malloc(length);
         if ( *ptr != NULL) {
@@ -147,3 +151,7 @@ int config_isparamset(paramdef_t *params,int paramidx)
       return 0;
   }
 }
+
+int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx) {
+    
+}
diff --git a/common/config/config_userapi.h b/common/config/config_userapi.h
index 6acaacf7166b3e3dcac77c46bff4bef5b7d4d807..5bbc20a950bfb2150a6bfb0945821a08008dab41 100644
--- a/common/config/config_userapi.h
+++ b/common/config/config_userapi.h
@@ -38,6 +38,9 @@
 extern "C"
 {
 #endif
+#define DEFAULT_CFGFILENAME "oaisoftmodem.conf"
+#define DEFAULT_CFGMODE     "libconfig"
+
 #define CONFIG_GETSOURCE    ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgmode       )
 #define CONFIG_GETNUMP      ( (config_get_if()==NULL) ? 0    : config_get_if()->num_cfgP      )
 #define CONFIG_GETP(P)      ( (config_get_if()==NULL) ? NULL : config_get_if()->cfgP[P]       )
@@ -51,6 +54,7 @@ extern int config_get(paramdef_t *params,int numparams, char *prefix);
 extern int config_isparamset(paramdef_t *params,int paramidx);
 extern void config_assign_int(paramdef_t *cfgoptions, char *fullname, int val);
 extern int config_process_cmdline(paramdef_t *cfgoptions,int numoptions, char *prefix);
+extern int config_getparamval_fromparamdefidx(paramdef_t *cfgoptions,int paramidx);
 #define config_getlist config_get_if()->getlist
 #define CONFIG_GETCONFFILE (config_get_if()->cfgP[0])
 
diff --git a/common/config/libconfig/config_libconfig.c b/common/config/libconfig/config_libconfig.c
index 35a70dfcc79d49fd560a5f8952f4441812c24bf9..00f5f38b8fba60a042b42ebde78f78e6e87c886e 100644
--- a/common/config/libconfig/config_libconfig.c
+++ b/common/config/libconfig/config_libconfig.c
@@ -104,17 +104,28 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
                            cfgpath,str,cfgoptions[i].numelt); 
                   str[strlen(str)-1] = 0;
               }
-              config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
-              config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
-              sprintf( *(cfgoptions[i].strptr) , "%s", str);
-              printf_params("[LIBCONFIG] %s: %s\n", cfgpath,*(cfgoptions[i].strptr) );
+              if (cfgoptions[i].numelt == 0 ) {
+                  config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
+                  config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(str)+1);
+                  sprintf( *(cfgoptions[i].strptr) , "%s", str);
+                  printf_params("[LIBCONFIG] %s: %s\n", cfgpath,*(cfgoptions[i].strptr) );
+              } else {
+                 sprintf( (char *)(cfgoptions[i].strptr) , "%s", str);
+                 printf_params("[LIBCONFIG] %s: %s\n", cfgpath,(char *)cfgoptions[i].strptr );
+              }
            } else {
 	      if( cfgoptions[i].defstrval != NULL) {
                  defval=1;
-                 config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
-                 config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(cfgoptions[i].defstrval)+1);
-                 sprintf(*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
-                 printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, *(cfgoptions[i].strptr));
+ 
+                 if (cfgoptions[i].numelt == 0 ) {
+                     config_check_valptr(&(cfgoptions[i]), (char **)(&(cfgoptions[i].strptr)), sizeof(char *));
+                     config_check_valptr(&(cfgoptions[i]), cfgoptions[i].strptr, strlen(cfgoptions[i].defstrval)+1);
+                     sprintf(*(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
+                     printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, *(cfgoptions[i].strptr));
+                 } else {
+                    sprintf((char *)(cfgoptions[i].strptr), "%s",cfgoptions[i].defstrval);
+                    printf_params("[LIBCONFIG] %s set to default value %s\n", cfgpath, (char *)cfgoptions[i].strptr);
+                 }
               } else {
 	         notfound=1;
               } 
@@ -183,7 +194,7 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix )
               read_intarray(&cfgoptions[i],setting,cfgpath);
            } else {
               if( cfgoptions[i].defintarrayval != NULL) {
-                config_check_valptr(&(cfgoptions[i]),(char **)&(cfgoptions[i].iptr), sizeof(int32_t));
+                config_check_valptr(&(cfgoptions[i]),(char **)&(cfgoptions[i].iptr), sizeof(int32_t*));
                 cfgoptions[i].iptr=cfgoptions[i].defintarrayval;
                 defval=1;
                 for (int j=0; j<cfgoptions[i].numelt ; j++) {
diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c
index a1ad4c5375781ffb9d6ab37d5936c8b864d37d62..6094f5294029e1a54149216165d0c1089a91c619 100644
--- a/openair1/SCHED/phy_procedures_lte_ue.c
+++ b/openair1/SCHED/phy_procedures_lte_ue.c
@@ -2939,12 +2939,12 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
 	  
 	  //dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
 	  ue->UE_mode[eNB_id] = PUSCH;
-	  
-	} else {
+	}
+      } else {
 	  LOG_E(PHY,"[UE  %d] Frame %d, subframe %d: Problem in DCI!\n",ue->Mod_id,frame_rx,subframe_rx);
 	  dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
 	}
-      }
+    }
       
       else if ((dci_alloc_rx[i].rnti == SI_RNTI) &&
 	       ((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) {
@@ -2977,7 +2977,6 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
 	
 	}
       }
-    }
 
     else if ((dci_alloc_rx[i].rnti == P_RNTI) &&
        ((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) {
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index 9141a85d33293c55b14a0b3d514eb9398d1bcaf1..f2f89ad1ca73550888e57b55311cf7945f894155 100644
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -2592,7 +2592,9 @@ void RCConfig(void) {
 
 
 /* get global parameters, defined outside any section in the config file */
-  
+ 
+  printf("Getting ENBSParams\n");
+ 
   config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL); 
   RC.nb_inst = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
  
diff --git a/openair2/RRC/LITE/L2_interface.c b/openair2/RRC/LITE/L2_interface.c
index 408e0e817546a3f3833459e0bc0c33ea256f9b7f..504bf8ee9b9dd9f86852259927d331a59336ce52 100644
--- a/openair2/RRC/LITE/L2_interface.c
+++ b/openair2/RRC/LITE/L2_interface.c
@@ -807,7 +807,10 @@ mac_UE_get_rrc_status(
 )
 //------------------------------------------------------------------------------
 {
-  return(UE_rrc_inst[Mod_idP].Info[indexP].State);
+  if (UE_rrc_inst)
+    return(UE_rrc_inst[Mod_idP].Info[indexP].State);
+  else
+    return(-1);
 }
 
 //-------------------------------------------------------------------------------------------//
diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c
index 28d69826523702c7a0bdf48a9a432e6504613a92..c8b42d41b354160400dc7317cf58821ef4a95ef5 100644
--- a/openair2/RRC/LITE/rrc_eNB.c
+++ b/openair2/RRC/LITE/rrc_eNB.c
@@ -627,12 +627,12 @@ void rrc_eNB_emulation_notify_ue_module_id(
       return;
     }
     for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
-      if (RC.rrc[enb_module_id].carrier[CC_id].sib1 != NULL) {
+      if (&RC.rrc[enb_module_id]->carrier[CC_id].sib1 != NULL) {
         if (
-          (RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[0] == cell_identity_byte0P) &&
-          (RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[1] == cell_identity_byte1P) &&
-          (RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[2] == cell_identity_byte2P) &&
-          (RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[3] == cell_identity_byte3P)
+          (&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[0] == cell_identity_byte0P) &&
+          (&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[1] == cell_identity_byte1P) &&
+          (&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[2] == cell_identity_byte2P) &&
+          (&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[3] == cell_identity_byte3P)
         ) {
           ue_context_p = rrc_eNB_get_ue_context(
                            RC.rrc[enb_module_id],
diff --git a/openair2/UTIL/LOG/log.h b/openair2/UTIL/LOG/log.h
index 7b6d41f7e0d0043da664924494b57cba6b042132..1d795740b673839bc46fc97960dd73c1e284e7b1 100644
--- a/openair2/UTIL/LOG/log.h
+++ b/openair2/UTIL/LOG/log.h
@@ -314,8 +314,8 @@ void *log_thread_function(void * list);
 /*   optname                              helpstr   paramflags    XXXptr	             defXXXval				      type	     numelt	*/
 /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 #define LOG_GLOBALPARAMS_DESC { \
-{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL,    NULL,	    0,  	 strptr:(char **)&gloglevel, defstrval:log_level_names[2].name,       TYPE_STRING,  sizeof(gloglevel)}, \
-{LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,NULL,	    0,  	 strptr:(char **)&glogverbo, defstrval:log_verbosity_names[2].name,   TYPE_STRING,  sizeof(glogverbo)}, \
+{LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL,    NULL,	    0,  	 strptr:(char **)&gloglevel, defstrval:log_level_names[2].name,       TYPE_STRING,  0}, \
+{LOG_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,NULL,	    0,  	 strptr:(char **)&glogverbo, defstrval:log_verbosity_names[2].name,   TYPE_STRING,  0}, \
 {LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE,   NULL,	    0,  	 iptr:&(g_log->onlinelog),   defintval:1,                             TYPE_INT,      0,              }, \
 {LOG_CONFIG_STRING_GLOBAL_LOG_INFILE,   NULL,	    0,  	 iptr:&(g_log->filelog),     defintval:0,                             TYPE_INT,      0,              }, \
 }
diff --git a/targets/DOCS/oai_L1_L2_procedures.pdf b/targets/DOCS/oai_L1_L2_procedures.pdf
index 4e8059f503d8a4fedd634dc014c4f572275a5be8..28a4416e83a119a8950658dfe93969e8d5e2af6a 100644
Binary files a/targets/DOCS/oai_L1_L2_procedures.pdf and b/targets/DOCS/oai_L1_L2_procedures.pdf differ
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
index af262223f01f574c3890062c85192e7fce2156d9..24ae36a0a4c7c671f0cc4ad4754f1d6b233397a6 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
@@ -17,3 +17,20 @@ RUs = (
     }
 );  
 
+log_config = { 
+      global_log_level                      ="debug";
+      global_log_verbosity                  ="medium";
+      hw_log_level                          ="info";
+      hw_log_verbosity                      ="medium";
+      phy_log_level                         ="debug";
+      phy_log_verbosity                     ="medium";
+      mac_log_level                         ="debug";
+      mac_log_verbosity                     ="high";
+      rlc_log_level                         ="info";
+      rlc_log_verbosity                     ="medium";
+      pdcp_log_level                        ="info";
+      pdcp_log_verbosity                    ="medium";
+      rrc_log_level                         ="info";
+      rrc_log_verbosity                     ="medium";
+};
+
diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c
index 3dfa2f59366e14a1675aa23abfb3063b101b48d4..e90fc4335c5edd68369163e1cde3fcc9f474dc0b 100644
--- a/targets/RT/USER/lte-softmodem.c
+++ b/targets/RT/USER/lte-softmodem.c
@@ -227,6 +227,9 @@ threads_t threads= {-1,-1,-1,-1,-1,-1,-1};
  */
 uint8_t abstraction_flag=0;
 
+/* forward declarations */
+void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]);
+
 /*---------------------BMC: timespec helpers -----------------------------*/
 
 struct timespec min_diff_time = { .tv_sec = 0, .tv_nsec = 0 };
@@ -593,10 +596,11 @@ static void get_options(void) {
 
   
   if (UE_flag > 0) {
+     uint8_t n_rb_dl;
      paramdef_t cmdline_uemodeparams[] =CMDLINE_UEMODEPARAMS_DESC;
      paramdef_t cmdline_ueparams[] =CMDLINE_UEPARAMS_DESC;
 
-
+     set_default_frame_parms(frame_parms);
 
      config_process_cmdline( cmdline_uemodeparams,sizeof(cmdline_uemodeparams)/sizeof(paramdef_t),NULL);
      config_process_cmdline( cmdline_ueparams,sizeof(cmdline_ueparams)/sizeof(paramdef_t),NULL);
@@ -606,22 +610,21 @@ static void get_options(void) {
   	  input_fd = fopen(loopfile,"r");
   	  AssertFatal(input_fd != NULL,"Please provide a valid input file\n");
       }
+
       if ( (cmdline_uemodeparams[CMDLINE_CALIBUERX_IDX].paramflags &  PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue;
       if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXMED_IDX].paramflags &  PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_med;
       if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXBYP_IDX].paramflags &  PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_byp;
-      if ( *(cmdline_uemodeparams[CMDLINE_DEBUGUEPRACH_IDX].uptr) > 0) mode = debug_prach;
-      if ( *(cmdline_uemodeparams[CMDLINE_NOL2CONNECT_IDX].uptr) > 0)  mode = no_L2_connect;
-      if ( *(cmdline_uemodeparams[CMDLINE_CALIBPRACHTX_IDX].uptr) > 0) mode = calib_prach_tx; 
+      if ( (cmdline_uemodeparams[CMDLINE_DEBUGUEPRACH_IDX].paramflags &  PARAMFLAG_PARAMSET) != 0) mode = debug_prach;
+      if ( (cmdline_uemodeparams[CMDLINE_NOL2CONNECT_IDX].paramflags &  PARAMFLAG_PARAMSET) != 0)  mode = no_L2_connect;
+      if ( (cmdline_uemodeparams[CMDLINE_CALIBPRACHTX_IDX].paramflags &  PARAMFLAG_PARAMSET) != 0) mode = calib_prach_tx; 
       if (dumpframe  > 0)  mode = rx_dump_frame;
       
       if ( downlink_frequency[0][0] > 0) {
-  	  for (CC_id=1; CC_id<MAX_NUM_CCs; CC_id++) {
-  	    downlink_frequency[CC_id][1] = downlink_frequency[0][0];
-  	    downlink_frequency[CC_id][2] = downlink_frequency[0][0];
-  	    downlink_frequency[CC_id][3] = downlink_frequency[0][0];
-  	    printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]);
-  	  }
-      UE_scan=0;
+	printf("Downlink frequency set to %u\n", downlink_frequency[0][0]);
+	for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
+	  frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0];
+	}
+	UE_scan=0;
       } 
 
       if (tddflag > 0) {
@@ -629,38 +632,38 @@ static void get_options(void) {
 	     frame_parms[CC_id]->frame_type = TDD;
       }
 
-      if (frame_parms[0]->N_RB_DL !=0) {
-  	  if ( frame_parms[0]->N_RB_DL < 6 ) {
-  	     frame_parms[0]->N_RB_DL = 6;
-  	     printf ( "%i: Invalid number of ressource blocks, adjusted to 6\n",frame_parms[0]->N_RB_DL);
-  	  }
-  	  if ( frame_parms[0]->N_RB_DL > 100 ) {
-  	     frame_parms[0]->N_RB_DL = 100;
-  	     printf ( "%i: Invalid number of ressource blocks, adjusted to 100\n",frame_parms[0]->N_RB_DL);
-  	  }
-  	  if ( frame_parms[0]->N_RB_DL > 50 && frame_parms[0]->N_RB_DL < 100 ) {
-  	     frame_parms[0]->N_RB_DL = 50;
-  	     printf ( "%i: Invalid number of ressource blocks, adjusted to 50\n",frame_parms[0]->N_RB_DL);
-  	  }
-  	  if ( frame_parms[0]->N_RB_DL > 25 && frame_parms[0]->N_RB_DL < 50 ) {
-  	     frame_parms[0]->N_RB_DL = 25;
-  	     printf ( "%i: Invalid number of ressource blocks, adjusted to 25\n",frame_parms[0]->N_RB_DL);
-  	  }
-  	  UE_scan = 0;
-  	  frame_parms[0]->N_RB_UL=frame_parms[0]->N_RB_DL;
-  	  for (CC_id=1; CC_id<MAX_NUM_CCs; CC_id++) {
-  	      frame_parms[CC_id]->N_RB_DL=frame_parms[0]->N_RB_DL;
-  	      frame_parms[CC_id]->N_RB_UL=frame_parms[0]->N_RB_UL;
-  	  }
+      if (n_rb_dl !=0) {
+	printf("NB_RB set to %d\n",n_rb_dl);
+	if ( n_rb_dl < 6 ) {
+	  n_rb_dl = 6;
+	  printf ( "%i: Invalid number of ressource blocks, adjusted to 6\n",n_rb_dl);
+	}
+	if ( n_rb_dl > 100 ) {
+	  n_rb_dl = 100;
+	  printf ( "%i: Invalid number of ressource blocks, adjusted to 100\n",n_rb_dl);
+	}
+	if ( n_rb_dl > 50 && n_rb_dl < 100 ) {
+	  n_rb_dl = 50;
+	  printf ( "%i: Invalid number of ressource blocks, adjusted to 50\n",n_rb_dl);
+	}
+	if ( n_rb_dl > 25 && n_rb_dl < 50 ) {
+	  n_rb_dl = 25;
+	  printf ( "%i: Invalid number of ressource blocks, adjusted to 25\n",n_rb_dl);
+	}
+	UE_scan = 0;
+	for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
+	  frame_parms[CC_id]->N_RB_DL=n_rb_dl;
+	  frame_parms[CC_id]->N_RB_UL=n_rb_dl;
+	}
       }
 
-
-      for (CC_id=1;CC_id<MAX_NUM_CCs;CC_id++) {
-  	    tx_max_power[CC_id]=tx_max_power[0];
-	    rx_gain[0][CC_id] = rx_gain[0][0];
-	    tx_gain[0][CC_id] = tx_gain[0][0];
+      for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
+	tx_max_power[CC_id]=tx_max_power[0];
+	rx_gain[0][CC_id] = rx_gain[0][0];
+	tx_gain[0][CC_id] = tx_gain[0][0];
       }
   } /* UE_flag > 0 */
+
 #if T_TRACER
   paramdef_t cmdline_ttraceparams[] =CMDLINE_TTRACEPARAMS_DESC ;
   config_process_cmdline( cmdline_ttraceparams,sizeof(cmdline_ttraceparams)/sizeof(paramdef_t),NULL);   
@@ -675,10 +678,11 @@ static void get_options(void) {
       NB_RU	  = RC.nb_RU;
       printf("Configuration: nb_rrc_inst %d, nb_L1_inst %d, nb_ru %d\n",NB_eNB_INST,RC.nb_L1_inst,NB_RU);
     }
-  } else if (UE_flag == 1 && (CONFIG_GETCONFFILE != NULL)) {
+  } else if (UE_flag == 1 && (!(CONFIG_ISFLAGSET(CONFIG_NOOOPT))) ) {
     // Here the configuration file is the XER encoded UE capabilities
     // Read it in and store in asn1c data structures
-    strcpy(uecap_xer,CONFIG_GETCONFFILE);
+    sprintf(uecap_xer,"%stargets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_config.xml",getenv("OPENAIR_HOME"));
+    printf("%s\n",uecap_xer);
     uecap_xer_in=1;
   } /* UE with config file  */
 }
@@ -691,7 +695,7 @@ int T_dont_fork = 0;  /* default is to fork, see 'T_init' to understand */
 #endif
 
 
-void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]);
+
 void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
 
   int CC_id;
@@ -728,11 +732,12 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
     frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
     frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;
 
-    downlink_frequency[CC_id][0] = 2680000000; // Use float to avoid issue with frequency over 2^31.
-    downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
-    downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0];
-    downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
+//    downlink_frequency[CC_id][0] = 2680000000; // Use float to avoid issue with frequency over 2^31.
+//    downlink_frequency[CC_id][1] = downlink_frequency[CC_id][0];
+//    downlink_frequency[CC_id][2] = downlink_frequency[CC_id][0];
+//    downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
     //printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]);
+    frame_parms[CC_id]->dl_CarrierFreq=downlink_frequency[CC_id][0];
 
   }
 
@@ -905,14 +910,14 @@ int main( int argc, char **argv )
 
 
   // set default parameters
-  if (UE_flag == 1) set_default_frame_parms(frame_parms);
+  //if (UE_flag == 1) set_default_frame_parms(frame_parms);
 
   logInit();
 
   printf("Reading in command-line options\n");
 
   get_options (); 
-  if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
+  if (CONFIG_ISFLAGSET(CONFIG_ABORT) && UE_flag == 0) {
       fprintf(stderr,"Getting configuration failed\n");
       exit(-1);
   }
@@ -931,7 +936,7 @@ int main( int argc, char **argv )
     printf("configuring for UE\n");
 
     set_comp_log(HW,      LOG_DEBUG,  LOG_HIGH, 1);
-    set_comp_log(PHY,     LOG_DEBUG,   LOG_HIGH, 1);
+    set_comp_log(PHY,     LOG_INFO,   LOG_HIGH, 1);
     set_comp_log(MAC,     LOG_INFO,   LOG_HIGH, 1);
     set_comp_log(RLC,     LOG_INFO,   LOG_HIGH | FLAG_THREAD, 1);
     set_comp_log(PDCP,    LOG_INFO,   LOG_HIGH, 1);
@@ -1080,8 +1085,9 @@ int main( int argc, char **argv )
 	else if (frame_parms[CC_id]->N_RB_DL == 25)
 	  UE[CC_id]->N_TA_offset = 624/4;
       }
-      
+    init_openair0();      
     }
+
   }
 
   fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
@@ -1130,8 +1136,6 @@ int main( int argc, char **argv )
   
   
 #if defined(ENABLE_ITTI)
-  
-  
   if ((UE_flag == 1)||
       (RC.nb_inst > 0))  {
     
@@ -1149,16 +1153,6 @@ int main( int argc, char **argv )
   }
 #endif
   
-  if (phy_test==0) {
-    if (UE_flag==1) {
-      printf("Filling UE band info\n");
-      fill_ue_band_info();
-      dl_phy_sync_success (0, 0, 0, 1);
-    } 
-  }
-  
-  
-  
   
   mlockall(MCL_CURRENT | MCL_FUTURE);
   
@@ -1225,14 +1219,18 @@ int main( int argc, char **argv )
   rt_sleep_ns(10*100000000ULL);
   
   
-  
-  
   // start the main threads
   if (UE_flag == 1) {
     int eMBMS_active = 0;
     init_UE(1,eMBMS_active,uecap_xer_in);
+
+    if (phy_test==0) {
+      printf("Filling UE band info\n");
+      fill_ue_band_info();
+      dl_phy_sync_success (0, 0, 0, 1);
+    }
+
     number_of_cards = 1;
-    
     for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
       PHY_vars_UE_g[0][CC_id]->rf_map.card=0;
       PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h
index c0cc6ba77ca3b815c7193226bc367ac4a94a6789..44e35c88a385319e896142e77ec05d5a62a9eb01 100644
--- a/targets/RT/USER/lte-softmodem.h
+++ b/targets/RT/USER/lte-softmodem.h
@@ -65,7 +65,7 @@
 #define CONFIG_HLP_NOSNGLT       "Disables single-thread mode in lte-softmodem\n" 
 #define CONFIG_HLP_TADV          "Set timing_advance\n"
 #define CONFIG_HLP_DLF           "Set the downlink frequency for all component carriers\n"
-#define CONFIG_HLP_CHOFF         "Channel id offset"
+#define CONFIG_HLP_CHOFF         "Channel id offset\n"
 #define CONFIG_HLP_SOFTS         "Enable soft scope and L1 and L2 stats (Xforms)\n"
 #define CONFIG_HLP_EXMCAL        "Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"
 #define CONFIG_HLP_ITTIL         "Generate ITTI analyzser logs (similar to wireshark logs but with more details)\n"
@@ -127,7 +127,7 @@
 {"ue-nb-ant-tx",     	       CONFIG_HLP_UENANTT,    0,		u8ptr:&nb_antenna_tx,		    defuintval:1,   TYPE_UINT8,    0},     \
 {"ue-scan-carrier",  	       CONFIG_HLP_UESCAN,     PARAMFLAG_BOOL,	iptr:&UE_scan_carrier,  	    defintval:0,    TYPE_INT,	   0},     \
 {"ue-max-power",     	       NULL,		      0,		iptr:&(tx_max_power[0]),	    defintval:90,   TYPE_INT,	   0},     \
-{"r"  ,                        CONFIG_HLP_PRB,        0,                u8ptr:&(frame_parms[0]->N_RB_DL),   defintval:0,    TYPE_UINT8,    0},     \
+{"r"  ,                        CONFIG_HLP_PRB,        0,                u8ptr:&n_rb_dl,                     defintval:0,    TYPE_UINT8,    0},     \
 }
 
 
diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index cf0754f63d7d5fea1e8810f7c00cc7459e583a16..913ae958fc113af682b1ff17823e2f9bca898855 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -303,6 +303,7 @@ static void *UE_thread_synch(void *arg)
     } while (ind < sizeof(eutra_bands) / sizeof(eutra_bands[0]));
   
     if (found == 0) {
+      LOG_E(PHY,"Can't find EUTRA band for frequency %d",UE->frame_parms.dl_CarrierFreq);
       exit_fun("Can't find EUTRA band for frequency");
       return &UE_thread_synch_retval;
     }
diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c
index dce104dc0afba2b16288141c66e996f1877684f5..778f250a78756553dbbb2b9f8bae429abc595d04 100644
--- a/targets/SIMU/USER/oaisim_functions.c
+++ b/targets/SIMU/USER/oaisim_functions.c
@@ -782,7 +782,10 @@ void get_simulation_options(int argc, char *argv[])
     }
   }
 
-  
+  if ( load_configmodule(argc,argv) == NULL) {
+    exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
+  } 
+ 
   if (RC.config_file_name != NULL) {
     /* Read eNB configuration file */
     RCConfig();