diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index 69c43aa207764b4166b4aec615f5713d0910cbfb..7f7cb5325291ceb8bf77e8da17f62b9847fc36b0 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -60,6 +60,8 @@ elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
 
 endif (${RF_BOARD} STREQUAL "OAI_USRP")
 
+message("RU=${RU}")
+
 pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
 if(NOT ${OPENPGM_FOUND})
   message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
@@ -3396,6 +3398,8 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
     ${OPENAIR_DIR}/common/utils/backtrace.c
     ${OPENAIR_DIR}/common/utils/system.c
     ${OPENAIR_DIR}/common/utils/utils.c
+    ${OPENAIR_DIR}/common/utils/lte/ue_power.c
+    ${OPENAIR_DIR}/common/utils/lte/prach_utils.c
     ${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
     ${XFORMS_SOURCE}
     ${T_SOURCE}
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index 971dd27c5684c646a99c3ca96906037a6b9c2bb4..a00008525aad575a7491dd2a715f79d5dd735917 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -301,6 +301,7 @@ function main() {
             shift 2;;
        -P | --phy_simulators)
             SIMUS_PHY=1
+	    RU=0
             echo_info "Will compile dlsim, ulsim, ..."
             shift;;
        -S | --core_simulators)
diff --git a/cmake_targets/phy_simulators/CMakeLists.txt b/cmake_targets/phy_simulators/CMakeLists.txt
index 447e90bcab1190b6aa03720898e8d8cf4175e1f2..f8c659959f36a6558a2cf76f3c8a6ac1676a9be0 100644
--- a/cmake_targets/phy_simulators/CMakeLists.txt
+++ b/cmake_targets/phy_simulators/CMakeLists.txt
@@ -17,4 +17,5 @@ set ( UE_TIMING_TRACE False )
 set ( USRP_REC_PLAY False )
 set ( SKIP_SHARED_LIB_FLAG False )
 set ( PHYSIM True)
+set ( RU 0)
 include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
index e3524b8912569c8311ee91191b016398bdf2d924..9a80558ee7349dc1cc0d50a1f90bd065eceff1a2 100644
--- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
@@ -1203,10 +1203,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round
   uint8_t harq_pid;
   char fname[100],vname[100];
   harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe);
-  LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n",
+  LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, first_rb %d, TBS %d, Qm %d, N_symb %d\n",
          subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
+         eNB->ulsch[UE_id]->harq_processes[harq_pid]->first_rb,
          eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm,
          eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
+  for (int aa=0;aa<eNB->frame_parms.nb_antennas_rx;aa++)
+     LOG_UI(PHY,"ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n",aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_power[aa]),aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_noise_power[aa]));
   sprintf(fname,"/tmp/ulsch_r%d_d",round);
   sprintf(vname,"/tmp/ulsch_r%d_dseq",round);
   LOG_UM(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96],
@@ -1264,6 +1267,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round
   sprintf(fname,"/tmp/ulsch0_rxF_comp0_r%d.m",round);
   sprintf(vname,"ulsch0_rxF_comp0_r%d",round);
   LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
+  if (eNB->frame_parms.nb_antennas_rx>1) {
+    sprintf(fname,"/tmp/ulsch0_rxF_comp1_r%d.m",round);
+    sprintf(vname,"ulsch0_rxF_comp1_r%d",round);
+    LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
+
+  }
+
   //  LOG_M("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&eNB->pusch_vars[UE_id]->rxdataF_comp[0][1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
   sprintf(fname,"/tmp/ulsch_rxF_llr_r%d.m",round);
   sprintf(vname,"ulsch_llr_r%d",round);
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index a6d18024925030cac4bbe2c955735ce4e9d557f6..a9a7a25dcce1128415710cddd63029c9ddbca75e 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -1473,6 +1473,16 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
                            ulsch_harq->V_UL_DAI,
                            ulsch_harq->nb_rb>20 ? 1 : 0);
       stop_meas(&eNB->ulsch_decoding_stats);
+      int ulsch_id=-1;
+      for  (ulsch_id=0;ulsch_id<NUMBER_OF_ULSCH_MAX;ulsch_id++)
+         if (ulsch->rnti == eNB->ulsch_stats[ulsch_id].rnti) break;
+      AssertFatal(ulsch_id>=0,"no ulsch_id found\n");
+
+      if (eNB->ulsch_stats[ulsch_id].round_trials[0]>100) {
+         dump_ulsch(eNB,frame,subframe,i,ulsch_harq->round);
+         AssertFatal(1==0,"exiting\n");
+      }
+
     }
     else if ((ulsch) &&
              (ulsch->rnti>0) &&
@@ -1639,10 +1649,10 @@ void fill_rx_indication(PHY_VARS_eNB *eNB,
   else
     pdu->rx_indication_rel8.ul_cqi = (640 + SNRtimes10) / 5;
 
-  LOG_D(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n",
+  LOG_I(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n",
         harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_times10(total_power),dB_fixed_times10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos);
   for (int i=0;i<eNB->frame_parms.nb_antennas_rx;i++)
-	LOG_D(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i]));
+	LOG_I(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i]));
 
   eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++;
   eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe;
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index d3f55785c9f7e9940b70c6d46dc99d1c3bfc009b..c6a4142edf29c592dc48b187f74f0e0c30b5fb22 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -82,6 +82,7 @@ double DS_TDL = .03;
 static int cmpdouble(const void *p1, const void *p2) {
   return *(double *)p1 > *(double *)p2;
 }
+RAN_CONTEXT_t RC;
 
 int emulate_rf = 0;
 int split73=0;
diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index 0443cde7381b0416113e34ff5f2b5a41b4ff602b..e9de56fd847eb96579835c872f49d3fe89154e3e 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -84,7 +84,7 @@ static int cmpdouble(const void *p1, const void *p2) {
   return *(double *)p1 > *(double *)p2;
 }
 
-
+RAN_CONTEXT_t RC;
 int split73=0;
 void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) {
   AssertFatal(false, "Must not be called in this context\n");
@@ -404,7 +404,7 @@ int main(int argc, char **argv) {
   printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz);
   AssertFatal(load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) != NULL, "Cannot load configuration module, exiting\n");
   logInit();
-  set_glog(OAILOG_WARNING);
+  set_glog(OAILOG_INFO);
   T_stdout = 1;
   // enable these lines if you need debug info
   // however itti will catch all signals, so ctrl-c won't work anymore
@@ -1137,6 +1137,15 @@ int main(int argc, char **argv) {
                          sqrt(sigma2/2)*gaussdouble(0.0,1.0));
             }
           }
+          if (n_frames==1)
+            for (i=0; i<eNB->frame_parms.samples_per_tti; i++) {
+              for (aa=0; aa<eNB->frame_parms.nb_antennas_rx; aa++) {
+                ((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*(subframe+1)%10])[2*i] =
+                  (short) (sqrt(sigma2/2)*gaussdouble(0.0,1.0));
+                ((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*(subframe+1)%10])[2*i+1] =
+                  (short) (sqrt(sigma2/2)*gaussdouble(0.0,1.0));
+              }
+            }
 
           if (n_frames<=10) {
             printf("rx_level Null symbol %f\n",10*log10((double)signal_energy((int *)
@@ -1162,9 +1171,10 @@ int main(int argc, char **argv) {
           start_meas(&eNB->phy_proc_rx);
           ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? ru_fep_full_2thread        : fep_full;
           ru->feprx(ru,subframe);
+          if (n_frames==1) lte_eNB_I0_measurements(eNB,(subframe+1)%10,0,1);
+
           phy_procedures_eNB_uespec_RX(eNB,proc_rxtx);
           stop_meas(&eNB->phy_proc_rx);
-
           if (cqi_flag > 0) {
             cqi_error = 0;
 
@@ -1290,6 +1300,7 @@ int main(int argc, char **argv) {
         LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n");
       }
 
+      dump_ulsch_stats(eNB);
       printf("\n**********rb: %d ***mcs : %d  *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n",
              nb_rb,mcs,SNR,SNR2,
              tx_lev_dB,
diff --git a/openair2/RRC/LTE/defs_NB_IoT.h b/openair2/RRC/LTE/defs_NB_IoT.h
index 91dc7aafd4396ccec1f11ad2a4dce7e5f03ecdad..4a4c9937e7d8e9b0ea8c1e81cf1ce4dc596551c6 100644
--- a/openair2/RRC/LTE/defs_NB_IoT.h
+++ b/openair2/RRC/LTE/defs_NB_IoT.h
@@ -211,13 +211,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NB_IoT_s {
   RB_INFO_NB_IoT Rb_info;
   uint8_t Active;
   uint32_t Next_check_frame;
-  uint8_t Status;
+  uint8_t status;
 } RB_INFO_TABLE_ENTRY_NB_IoT;
 
 typedef struct SRB_INFO_TABLE_ENTRY_NB_IoT_s {
   SRB_INFO_NB_IoT Srb_info;
   uint8_t Active;
-  uint8_t Status;
+  uint8_t status;
   uint32_t Next_check_frame;
 } SRB_INFO_TABLE_ENTRY_NB_IoT;
 
@@ -269,7 +269,7 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
   e_LTE_CipheringAlgorithm_r12     ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version
   e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
 
-  uint8_t                            Status;
+  uint8_t                            status;
   rnti_t                             rnti;
   uint64_t                           random_ue_identity;
 
diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h
index 596180e7939e012c172b59ad7494df682ff88db2..a2eae8b2ec74604f0fb7bbed35637e44f09337db 100644
--- a/openair2/RRC/NR/nr_rrc_defs.h
+++ b/openair2/RRC/NR/nr_rrc_defs.h
@@ -238,13 +238,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NR_s {
   NR_RB_INFO                                          Rb_info;
   uint8_t                                             Active;
   uint32_t                                            Next_check_frame;
-  uint8_t                                             Status;
+  uint8_t                                             status;
 } NR_RB_INFO_TABLE_ENTRY;
 
 typedef struct SRB_INFO_TABLE_ENTRY_NR_s {
   NR_SRB_INFO                                         Srb_info;
   uint8_t                                             Active;
-  uint8_t                                             Status;
+  uint8_t                                             status;
   uint32_t                                            Next_check_frame;
 } NR_SRB_INFO_TABLE_ENTRY;
 
@@ -297,7 +297,7 @@ typedef struct gNB_RRC_UE_s {
   NR_CipheringAlgorithm_t            ciphering_algorithm;
   e_NR_IntegrityProtAlgorithm        integrity_algorithm;
 
-  uint8_t                            Status;
+  uint8_t                            status;
   rnti_t                             rnti;
   uint64_t                           random_ue_identity;