From 90346d26c05ec675a80d34dd28a328093c176d8e Mon Sep 17 00:00:00 2001
From: Raymond Knopp <raymond.knopp@eurecom.fr>
Date: Sun, 22 Feb 2015 17:25:43 +0000
Subject: [PATCH] fixed issues in subframe 5 RE allocation when PDSCH overlaps
 PSS/SSS, Basic UE functionality on USRP, RK

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6596 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c |   2 +-
 openair1/PHY/LTE_TRANSPORT/dci_tools.c        |  17 +-
 .../PHY/LTE_TRANSPORT/dlsch_demodulation.c    |  92 ++++------
 .../PHY/LTE_TRANSPORT/dlsch_llr_computation.c |   8 +-
 openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c |   2 +-
 openair1/PHY/LTE_TRANSPORT/initial_sync.c     |   7 +-
 openair1/PHY/LTE_TRANSPORT/lte_mcs.c          |   6 +-
 openair1/PHY/LTE_TRANSPORT/print_stats.c      |   9 +-
 openair1/PHY/MODULATION/slot_fep.c            |  27 ++-
 openair1/SCHED/phy_procedures_lte_eNb.c       |   5 +-
 openair1/SCHED/phy_procedures_lte_ue.c        |  52 +++---
 openair1/SIMULATION/LTE_PHY/dlsim.c           |  48 ++---
 openair2/ENB_APP/enb_config.c                 |   3 +-
 openair2/LAYER2/MAC/eNB_scheduler_dlsch.c     |   2 +-
 openair2/RRC/LITE/plmn_data.h                 |  91 +++++-----
 openair2/RRC/LITE/rrc_UE.c                    | 165 +++++++++++-------
 16 files changed, 288 insertions(+), 248 deletions(-)

diff --git a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c
index 4283c245b6..ffff1d3858 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c
@@ -78,7 +78,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
     max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
 
   
-  diff = max_pos_fil - 2; //frame_parms->nb_prefix_samples/8;
+  diff = max_pos_fil - frame_parms->nb_prefix_samples/8;
 
   if ( diff > SYNCH_HYST )
     phy_vars_ue->rx_offset++;
diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index c136a802a3..92018c1f61 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -2600,7 +2600,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
       case 50:
 	msg("DCI format1A (TDD1-6, 10MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
 	msg("VRB_TYPE %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type);
-	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
+	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
 	msg("MCS %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs);
 	msg("HARQ_PID %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid);
 	msg("NDI %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi);
@@ -2611,7 +2611,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
       case 100:
 	msg("DCI format1A (TDD1-6, 20MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
 	msg("VRB_TYPE %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type);
-	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
+	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT100[((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
 	msg("MCS %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs);
 	msg("HARQ_PID %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid);
 	msg("NDI %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi);
@@ -2651,7 +2651,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
       case 50:
 	msg("DCI format1A(FDD, 10MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
 	msg("VRB_TYPE %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type);
-	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
+	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
 	msg("MCS %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->mcs);
 	msg("HARQ_PID %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid);
 	msg("NDI %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->ndi);
@@ -2661,7 +2661,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
       case 100:
 	msg("DCI format1A(FDD, 20MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
 	msg("VRB_TYPE %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type);
-	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
+	msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT100[((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
 	msg("MCS %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->mcs);
 	msg("HARQ_PID %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid);
 	msg("NDI %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->ndi);
@@ -3490,7 +3490,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
 	ndi      = ((DCI1A_10MHz_FDD_t *)dci_pdu)->ndi;
 	TPC      = ((DCI1A_10MHz_FDD_t *)dci_pdu)->TPC; 
 	harq_pid  = ((DCI1A_10MHz_FDD_t *)dci_pdu)->harq_pid;
-	//printf("FDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC);
+	//printf("FDD 1A: mcs %d, rballoc %x,ndi %d, rv %d, TPC %d\n",mcs,rballoc,ndi,rv,TPC);
       }
             
       if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)){  //
@@ -3588,7 +3588,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
       return(-1);
     }
     // change the mcs limit from 7 to 8, supported by MAC
-    if (mcs > 8) {
+    if (mcs > 10) {
       LOG_E(PHY,"Format 1A: unlikely mcs for format 1A (%d)\n",mcs);
       return(-1);
     } 
@@ -3608,15 +3608,16 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
 
     LOG_D(PHY,"UE (%x/%d): Subframe %d Format1A DCI: ndi %d, old_ndi %d (first tx %d) harq_status %d\n",dlsch[0]->rnti,harq_pid,subframe,ndi,dlsch0_harq->DCINdi,
 	  dlsch0_harq->first_tx,dlsch0_harq->status);
-
+    if ((rnti != si_rnti) && (rnti!=ra_rnti)) { 
     if ((ndi!=dlsch0_harq->DCINdi)||  // DCI has been toggled or this is the first transmission
 	(dlsch0_harq->first_tx==1)) {
       dlsch0_harq->round = 0;
       if (dlsch0_harq->first_tx==1) {
-	LOG_D(PHY,"[PDSCH %x/%d] Format 1A DCI First TX: Clearing flag\n");
+	LOG_I(PHY,"[PDSCH %x/%d] Format 1A DCI First TX: Clearing flag\n");
 	dlsch0_harq->first_tx = 0;
       }
     }
+    }
     dlsch0_harq->DCINdi = ndi;
 
     dlsch0_harq->mcs = mcs;        
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
index 85a7d6123d..f6a95f1a62 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
@@ -2355,12 +2355,10 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
 	else if (rb < 96)
 	  rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
 	else if (rb < 100)
-	  rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
+	  rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
 	else
 	  rb_alloc_ind = 0;
 
-	if (rb_alloc_ind==1)
-	  nb_rb++;
 
 	// PBCH
 	if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
@@ -2412,13 +2410,10 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
 	    skip_half=2;
 	}
 
+
 	if (rb_alloc_ind==1) {
-	  /*	  	  
-			  printf("rb %d\n",rb);
-			  for (i=0;i<12;i++)
-			  printf("(%d %d)",((short *)dl_ch0)[i<<1],((short*)dl_ch0)[1+(i<<1)]);
-			  printf("\n");
-	  */
+	  //	  printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half);
+
 	  if (pilots==0) {
 	    //	    	    printf("Extracting w/o pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half);
 	    if (skip_half==1) {
@@ -2482,6 +2477,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
 	      rxF_ext+=10;
 	    }
 	  }
+	  nb_rb++;
 	}	    
 	dl_ch0+=12;
 	rxF+=12;
@@ -2496,24 +2492,23 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
       else if (rb < 96)
 	rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
       else if (rb < 100)
-	rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
+	rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
       else
 	rb_alloc_ind = 0;
 
-      if (rb_alloc_ind==1)
-	nb_rb++;
+
 
       // PBCH
-      if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
+      if ((subframe==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
 	rb_alloc_ind = 0;
       }
       //SSS
-      if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
+      if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
 	rb_alloc_ind = 0;
       }
       if (frame_parms->frame_type == FDD) {
 	//PSS
-	if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
+	if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
 	  rb_alloc_ind = 0;
 	}
       }
@@ -2528,6 +2523,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
       //	printf("dlch_ext %d\n",dl_ch0_ext-&dl_ch_estimates_ext[aarx][0]);      
       //      printf("DC rb %d (%p)\n",rb,rxF);
       if (rb_alloc_ind==1) {
+	//	printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half);
 	if (pilots==0) {
 	  for (i=0;i<6;i++) {
 	    dl_ch0_ext[i]=dl_ch0[i];
@@ -2561,6 +2557,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
 	  dl_ch0_ext+=10;
 	  rxF_ext+=10;
 	} // symbol_mod==0
+	nb_rb++;
       } // rballoc==1
       else {
 	rxF       = &rxdataF[aarx][((symbol*(frame_parms->ofdm_symbol_size)))];
@@ -2580,12 +2577,11 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
 	else if (rb < 96)
 	  rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
 	else if (rb < 100)
-	  rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
+	  rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
 	else
 	  rb_alloc_ind = 0;
 
-	if (rb_alloc_ind==1)
-	  nb_rb++;
+
 
 	// PBCH
 	if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=nsymb>>1) && (l<((nsymb>>1) + 4))) {
@@ -2630,6 +2626,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
 	}
 	
 	if (rb_alloc_ind==1) {
+	  //	  printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half);
 	  /*
   	    printf("rb %d\n",rb);
 	    for (i=0;i<12;i++)
@@ -2700,6 +2697,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
 	      rxF_ext+=10;
 	    }
 	  } // pilots=0
+	  nb_rb++;
 	}
 	dl_ch0+=12;
 	rxF+=12;
@@ -2777,7 +2775,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	else if (rb < 96)
 	  rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
 	else if (rb < 100)
-	  rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
+	  rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
 	else
 	  rb_alloc_ind = 0;
 	
@@ -2789,55 +2787,35 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	}
 
 	// PBCH
-	if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
+	if ((subframe==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
 	  rb_alloc_ind = 0;
 	}
-	//PBCH subframe 0, symbols nsymb>>1 ... nsymb>>1 + 3
-	if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
-	  skip_half=1;
-	else if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
-	  skip_half=2;
 	
 	//SSS
 
 	if (((subframe==0)||(subframe==5)) && 
-	    (rb>((frame_parms->N_RB_DL>>1)-3)) && 
+	    (rb>=((frame_parms->N_RB_DL>>1)-3)) && 
 	    (rb<((frame_parms->N_RB_DL>>1)+3)) && 
 	    (l==sss_symb) ) {
 	  rb_alloc_ind = 0;
 	}
-	//SSS 
-	if (((subframe==0)||(subframe==5)) && 
-	    (rb==((frame_parms->N_RB_DL>>1)-3)) && 
-	    (l==sss_symb))
-	  skip_half=1;
-	else if (((subframe==0)||(subframe==5)) && 
-		 (rb==((frame_parms->N_RB_DL>>1)+3)) && 
-		 (l==sss_symb))
-	  skip_half=2;
+
+
 
 	//PSS in subframe 0/5 if FDD
 	if (frame_parms->frame_type == FDD) {  //FDD
-	  if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
+	  if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
 	    rb_alloc_ind = 0;
 	  }
-	  if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
-	    skip_half=1;
-	  else if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
-	    skip_half=2;
 	}
 	
 	if ((frame_parms->frame_type == TDD) &&
 	    (subframe==6)){  //TDD Subframe 6
-	  if ((rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
+	  if ((rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
 	    rb_alloc_ind = 0;
 	  }
-	  if ((rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
-	    skip_half=1;
-	  else if ((rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
-	    skip_half=2;
 	}
-	
+
 	if (rb_alloc_ind==1) {
 
 
@@ -2862,7 +2840,6 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	      //	      printf("%d : (%d,%d)\n",(rxF+(2*i)-&rxdataF[(aatx<<1)+aarx][( (symbol*(frame_parms->ofdm_symbol_size)))*2])/2,
 	      //     ((short*)&rxF[i<<1])[0],((short*)&rxF[i<<1])[0]);
 	    }
-	    nb_rb++;
 	    dl_ch0_ext+=12;
 	    dl_ch1_ext+=12;
 	    rxF_ext+=12;
@@ -2880,11 +2857,13 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 		dl_ch1_ext[j++]=dl_ch1[i];
 	      }
 	    }
-	    nb_rb++;
 	    dl_ch0_ext+=8;
 	    dl_ch1_ext+=8;
 	    rxF_ext+=8;
 	  } // pilots==1
+	  
+	  nb_rb++;
+
 	}
 	dl_ch0+=12;
 	dl_ch1+=12;
@@ -2900,12 +2879,12 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	else if (rb < 96)
 	  rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
 	else if (rb < 100)
-	  rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
+	  rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
 	else
 	  rb_alloc_ind = 0;
 
-	if (rb_alloc_ind == 1)
-	  nb_rb++;
+
+
 	// PBCH
 	if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
 	  rb_alloc_ind = 0;
@@ -3045,6 +3024,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	      rxF_ext+=8;		
 	    }
 	  }
+	  nb_rb++;
 	}
       
 	dl_ch0+=12;
@@ -3065,8 +3045,8 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
       else
 	rb_alloc_ind = 0;
       
-      if (rb_alloc_ind==1)
-	nb_rb++;
+
+
 
       
       // PBCH
@@ -3143,6 +3123,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	  dl_ch1_ext+=8;
 	  rxF_ext+=8; 
 	}
+	nb_rb++;
       }
       else {
 	rxF       = &rxdataF[aarx][((symbol*(frame_parms->ofdm_symbol_size)))];
@@ -3162,12 +3143,10 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	else if (rb < 96)
 	  rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
 	else if (rb < 100)
-	  rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
+	  rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
 	else
 	  rb_alloc_ind = 0;
 	
-	if (rb_alloc_ind==1)
-	  nb_rb++;
 	
 	// PBCH
 	if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
@@ -3307,6 +3286,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
 	      
 	    }
 	  }
+	  nb_rb++;
 	}
 	dl_ch0+=12;
 	dl_ch1+=12;
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
index 8ffb030fdd..7fa6bddcab 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
@@ -662,14 +662,14 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
 
   if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
       if (frame_parms->mode1_flag==0)
-          len = (nb_rb*8) - (2*pbch_pss_sss_adjust/3);
+          len = (nb_rb*8);// - (2*pbch_pss_sss_adjust/3);
       else
-          len = (nb_rb*10) - (5*pbch_pss_sss_adjust/6);
+          len = (nb_rb*10);// - (5*pbch_pss_sss_adjust/6);
   }
   else {
-      len = (nb_rb*12) - pbch_pss_sss_adjust;
+      len = (nb_rb*12);// - pbch_pss_sss_adjust;
   }
-  //  printf("dlsch_qpsk_llr: symbol %d,len %d,pbch_pss_sss_adjust %d\n",symbol,len,pbch_pss_sss_adjust);
+  //    printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
   for (i=0;i<len;i++) {
       *llr32 = *rxF;
       rxF++;
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
index 731d1ef7cb..264ce262a7 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c
@@ -1254,7 +1254,7 @@ int dlsch_modulation(mod_sym_t **txdataF,
 
 	if (rb_alloc_ind > 0)
         {
-	  //	  printf("Allocated rb %d, subframe_offset %d, symbol_offset %d, re_offset %d, jj %d\n",rb,subframe_offset,symbol_offset,re_offset,jj);
+	  //	  printf("Allocated rb %d/symbol %d, skip_half %d, subframe_offset %d, symbol_offset %d, re_offset %d, jj %d\n",rb,l,skip_half,subframe_offset,symbol_offset,re_offset,jj);
 	  allocate_REs_in_RB(frame_parms,
 			     txdataF,
 			     &jj,
diff --git a/openair1/PHY/LTE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_TRANSPORT/initial_sync.c
index 4541b91eb5..223e471451 100644
--- a/openair1/PHY/LTE_TRANSPORT/initial_sync.c
+++ b/openair1/PHY/LTE_TRANSPORT/initial_sync.c
@@ -173,12 +173,7 @@ int pbch_detection(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
       return -1;
       break;
     }
-#ifndef USER_MODE
-    if (frame_parms->N_RB_DL != 25) {
-        LOG_E(PHY,"[UE%d] Initial sync: PBCH decoding: Detected NB_RB %d, but CBMIMO1 can only handle NB_RB=25\n",phy_vars_ue->Mod_id,frame_parms->N_RB_DL);
-      return -1;
-    }
-#endif
+
     
     // now check for PHICH parameters
     frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((phy_vars_ue->lte_ue_pbch_vars[0]->decoded_output[2]>>4)&1);
diff --git a/openair1/PHY/LTE_TRANSPORT/lte_mcs.c b/openair1/PHY/LTE_TRANSPORT/lte_mcs.c
index 5e6a0551c9..402a02e02d 100644
--- a/openair1/PHY/LTE_TRANSPORT/lte_mcs.c
+++ b/openair1/PHY/LTE_TRANSPORT/lte_mcs.c
@@ -233,7 +233,7 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
       }
     }
   }
-  //    printf("re_pbch_sss %d\n",re_pbch_sss);
+    //  printf("re_pbch_sss %d\n",re_pbch_sss);
   return(re_pbch_sss);
 }
 
@@ -277,7 +277,6 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
     for (rb=((frame_parms->N_RB_DL>>1)-3);
 	 rb<((frame_parms->N_RB_DL>>1)+3);
 	 rb++) {
-    
       if (rb < 32)
 	rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
       else if (rb < 64)
@@ -290,7 +289,8 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
 	rb_alloc_ind = 0;
       
       if (rb_alloc_ind==1) {
-	  re_pbch_sss += 12;
+//	printf("Adjust G: rb %d\n",rb);
+	re_pbch_sss += 12;
       }
     }
   }
diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c
index 3f1508ad2c..8ef24b1b55 100644
--- a/openair1/PHY/LTE_TRANSPORT/print_stats.c
+++ b/openair1/PHY/LTE_TRANSPORT/print_stats.c
@@ -49,8 +49,7 @@
 #endif
 
 extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
-
-#ifdef EXMIMO
+#if defined(USRP) || defined(EXMIMO)
 #include "common_lib.h"
 extern openair0_config_t openair0_cfg[];
 #endif
@@ -82,8 +81,10 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
 		 phy_vars_ue->PHY_measurements.n0_power_dB[1]);
 #ifdef EXMIMO
   len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
-#else
-    len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB);
+#endif
+#ifdef USRP
+  len += sprintf(&buffer[len], "[UE PROC] RX Gain %d (%f) dB\n",phy_vars_ue->rx_total_gain_dB,
+		 (double)phy_vars_ue->rx_total_gain_dB-USRP_GAIN_OFFSET);
 #endif
 
   len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d)\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset);
diff --git a/openair1/PHY/MODULATION/slot_fep.c b/openair1/PHY/MODULATION/slot_fep.c
index 6fea6c858c..fe58e8c321 100644
--- a/openair1/PHY/MODULATION/slot_fep.c
+++ b/openair1/PHY/MODULATION/slot_fep.c
@@ -33,6 +33,16 @@
 
 #define SOFFSET 0
 
+void rescale(int16_t *input,int length) {
+
+  __m128i *input128 = (__m128i *)input;
+  int i;
+  
+  for (i=0;i<length>>2;i++) {
+    input128[i] = _mm_srai_epi16(input128[i],4);
+    }
+}
+
 int slot_fep(PHY_VARS_UE *phy_vars_ue,
 	     unsigned char l,
 	     unsigned char Ns,
@@ -116,6 +126,10 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
 	       (short *)&ue_common_vars->rxdata[aa][0],
 	       frame_parms->ofdm_symbol_size*sizeof(int));
       start_meas(&phy_vars_ue->rx_dft_stats);
+#ifdef USRP
+      rescale((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset-nb_prefix_samples0) % frame_length_samples],
+	      frame_parms->ofdm_symbol_size+nb_prefix_samples0);
+#endif
       dft((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
 	  (int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
       stop_meas(&phy_vars_ue->rx_dft_stats);
@@ -140,12 +154,21 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
 	memcpy((void *)tmp_dft_in,
 	       (void *)&ue_common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
 	       frame_parms->ofdm_symbol_size*sizeof(int));
+#ifdef USRP
+	rescale((int16_t *)tmp_dft_in,
+	        frame_parms->ofdm_symbol_size);
+#endif
 	dft((int16_t *)tmp_dft_in,
 	    (int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
       }
-      else // use dft input from RX buffer directly
+      else {// use dft input from RX buffer directly 
+#ifdef USRP
+	rescale((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset-nb_prefix_samples) % frame_length_samples],
+		frame_parms->ofdm_symbol_size+nb_prefix_samples);
+#endif
 	dft((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
-	    (int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
+	  (int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
+      }
       stop_meas(&phy_vars_ue->rx_dft_stats);
 
 
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index d91170da1b..cc7f821ea5 100755
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -2075,8 +2075,9 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
 			     1,
 			     num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
 		       0,
-		       subframe<<1);      
-      stop_meas(&phy_vars_eNB->dlsch_scrambling_stats);	      
+		       subframe<<1);
+
+            stop_meas(&phy_vars_eNB->dlsch_scrambling_stats);	      
 	
       start_meas(&phy_vars_eNB->dlsch_modulation_stats);	      
       //      for (sect_id=0;sect_id<number_of_cards;sect_id++) 
diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c
index 9f62cf0600..32f928eebb 100755
--- a/openair1/SCHED/phy_procedures_lte_ue.c
+++ b/openair1/SCHED/phy_procedures_lte_ue.c
@@ -191,14 +191,14 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe) {
 
   write_output("rxsigF0.m","rxsF0", phy_vars_ue->lte_ue_common_vars.rxdataF[0],2*nsymb*phy_vars_ue->lte_frame_parms.ofdm_symbol_size,2,1);
   write_output("rxsigF0_ext.m","rxsF0_ext", phy_vars_ue->lte_ue_pdsch_vars_SI[0]->rxdataF_ext[0],2*nsymb*phy_vars_ue->lte_frame_parms.ofdm_symbol_size,1,1);
-  write_output("dlsch00_ch0_ext.m","dl00_ch0_ext", phy_vars_ue->lte_ue_pdsch_vars_SI[0]->dl_ch_estimates_ext[0],300*nsymb,1,1);
+  write_output("dlsch00_ch0_ext.m","dl00_ch0_ext", phy_vars_ue->lte_ue_pdsch_vars_SI[0]->dl_ch_estimates_ext[0],phy_vars_ue->lte_frame_parms.N_RB_DL*12*nsymb,1,1);
   /*
     write_output("dlsch01_ch0_ext.m","dl01_ch0_ext",lte_ue_pdsch_vars[0]->dl_ch_estimates_ext[1],300*12,1,1);
     write_output("dlsch10_ch0_ext.m","dl10_ch0_ext",lte_ue_pdsch_vars[0]->dl_ch_estimates_ext[2],300*12,1,1);
     write_output("dlsch11_ch0_ext.m","dl11_ch0_ext",lte_ue_pdsch_vars[0]->dl_ch_estimates_ext[3],300*12,1,1);
     write_output("dlsch_rho.m","dl_rho",lte_ue_pdsch_vars[0]->rho[0],300*12,1,1);
   */
-  write_output("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", phy_vars_ue->lte_ue_pdsch_vars_SI[0]->rxdataF_comp0[0],300*nsymb,1,1);
+  write_output("dlsch_rxF_comp0.m","dlsch0_rxF_comp0", phy_vars_ue->lte_ue_pdsch_vars_SI[0]->rxdataF_comp0[0],phy_vars_ue->lte_frame_parms.N_RB_DL*12*nsymb,1,1);
   write_output("dlsch_rxF_llr.m","dlsch_llr", phy_vars_ue->lte_ue_pdsch_vars_SI[0]->llr[0],coded_bits_per_codeword,1,0);
   
   write_output("dlsch_mag1.m","dlschmag1",phy_vars_ue->lte_ue_pdsch_vars_SI[0]->dl_ch_mag0,300*nsymb,1,1);
@@ -2168,7 +2168,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 	     (dci_alloc_rx[i].rnti == phy_vars_ue->prach_resources[eNB_id]->ra_RNTI) && 
 	     (dci_alloc_rx[i].format == format1A)) {
 #ifdef DEBUG_PHY_PROC
-	LOG_I(PHY,"[UE  %d][RAPROC] subframe %d: Found RA rnti %x, format 1A, dci_cnt %d\n",phy_vars_ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,i);
+	LOG_D(PHY,"[UE  %d][RAPROC] subframe %d: Found RA rnti %x, format 1A, dci_cnt %d\n",phy_vars_ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,i);
 	
 	//if (((frame_rx%100) == 0) || (frame_rx < 20))
 	//dump_dci(&phy_vars_ue->lte_frame_parms, &dci_alloc_rx[i]);
@@ -2198,7 +2198,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 	  phy_vars_ue->dlsch_ra_received[eNB_id]++;
 	  
 #ifdef DEBUG_PHY_PROC
-	  LOG_I(PHY,"[UE  %d] Generate UE DLSCH RA_RNTI format 1A, rb_alloc %x, dlsch_ue_ra[eNB_id] %p\n",
+	  LOG_D(PHY,"[UE  %d] Generate UE DLSCH RA_RNTI format 1A, rb_alloc %x, dlsch_ue_ra[eNB_id] %p\n",
 	      phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue_ra[eNB_id]->harq_processes[0]->rb_alloc[0],phy_vars_ue->dlsch_ue_ra[eNB_id]);
 #endif
 	}
@@ -2249,7 +2249,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 	// UE could belong to more than one CBA group 
        // phy_vars_ue->Mod_id%phy_vars_ue->ulsch_ue[eNB_id]->num_active_cba_groups]
 #ifdef DEBUG_PHY_PROC
-	LOG_I(PHY,"[UE  %d][PUSCH] Frame %d subframe %d: Found cba rnti %x, format 0, dci_cnt %d\n",
+	LOG_D(PHY,"[UE  %d][PUSCH] Frame %d subframe %d: Found cba rnti %x, format 0, dci_cnt %d\n",
 	      phy_vars_ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].rnti,i);
 	/*
 	  if (((frame_rx%100) == 0) || (frame_rx < 20))
@@ -2593,7 +2593,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 #endif
 	  }
 	  else {
-	    LOG_I(PHY,"[UE  %d][PDSCH %x/%d] Frame %d subframe %d (slot_rx %d): Received DLSCH (rv %d,mcs %d,TBS %d)\n",
+	    LOG_D(PHY,"[UE  %d][PDSCH %x/%d] Frame %d subframe %d (slot_rx %d): Received DLSCH (rv %d,mcs %d,TBS %d)\n",
 		  phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,
 		  harq_pid,frame_rx,subframe_prev,slot_rx,
 		  phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->rvidx,
@@ -2625,7 +2625,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
             
 
 #ifdef DEBUG_PHY_PROC
-	LOG_I(PHY,"[UE  %d][PDSCH %x/%d] Frame %d subframe %d: PDSCH/DLSCH decoding iter %d (mcs %d, rv %d, TBS %d)\n",
+	LOG_D(PHY,"[UE  %d][PDSCH %x/%d] Frame %d subframe %d: PDSCH/DLSCH decoding iter %d (mcs %d, rv %d, TBS %d)\n",
 	    phy_vars_ue->Mod_id,
 	    phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,harq_pid,
 	      frame_rx,subframe_prev,ret,
@@ -2633,7 +2633,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 	    phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->rvidx,
 	    phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->TBS);
 	if (frame_rx%100==0) {
-	  LOG_I(PHY,"[UE  %d][PDSCH %x] Frame %d subframe %d dlsch_errors %d, dlsch_received %d, dlsch_fer %d, current_dlsch_cqi %d\n",
+	  LOG_D(PHY,"[UE  %d][PDSCH %x] Frame %d subframe %d dlsch_errors %d, dlsch_received %d, dlsch_fer %d, current_dlsch_cqi %d\n",
 		phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti,
 		frame_rx,subframe_prev,
 		phy_vars_ue->dlsch_errors[eNB_id],
@@ -2699,10 +2699,11 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 		    frame_rx,subframe_prev);
 	    
 #ifdef DEBUG_PHY_PROC
-	    LOG_D(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc[0],
+	    LOG_D(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d, num_pdcch_sym %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc[0],
 		  phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->nb_rb,
 		  phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->G,
-		  phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->TBS);
+		  phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->TBS,
+		  phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols);
 #endif
 
 
@@ -2745,9 +2746,8 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 	    LOG_D(PHY,"[UE  %d] Frame %d, subframe %d, received SI in error\n",phy_vars_ue->Mod_id,frame_rx,subframe_prev);
 #endif
 
-#ifdef USER_MODE
-	    //	    dump_dlsch_SI(phy_vars_ue,eNB_id,subframe_prev);
-#endif
+	    dump_dlsch_SI(phy_vars_ue,eNB_id,subframe_prev);
+	    exit(-1);
             vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
 	    stop_meas(&phy_vars_ue->phy_proc_rx);
 	    return(-1);
@@ -2757,16 +2757,18 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 
 #ifdef DEBUG_PHY_PROC
 	    //if ((frame_rx % 100) == 0)
-	    LOG_D(PHY,"[UE  %d] Frame %d, subframe %d, received SI for TBS %d\n",
-		  phy_vars_ue->Mod_id,frame_rx,subframe_prev,phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->TBS);
+	    LOG_D(PHY,"[UE  %d] Frame %d, subframe %d, received SI for TBS %d, mcs %d\n",
+		  phy_vars_ue->Mod_id,frame_rx,subframe_prev,phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->TBS,
+		  phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->mcs);
 #endif
 
 #ifdef OPENAIR2
-        /*
+/*
+                printf("\n\n"); 
 		for (i=0;i<phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->TBS>>3;i++)
-		  printf("%x.",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->b[i]);
+		  printf("%02x ",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->b[i]);
 		printf("\n");
-        */
+  */      
 		mac_xface->ue_decode_si(phy_vars_ue->Mod_id,
 					CC_id,
 					frame_rx,
@@ -2836,7 +2838,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
                                                                        subframe_prev);
 
 #ifdef DEBUG_PHY_PROC
-        LOG_I(PHY,"[UE] decoding RA (subframe %d): G %d,rnti %x\n" ,subframe_prev,
+        LOG_D(PHY,"[UE] decoding RA (subframe %d): G %d,rnti %x\n" ,subframe_prev,
               phy_vars_ue->dlsch_ue_ra[eNB_id]->harq_processes[0]->G,
               phy_vars_ue->dlsch_ue_ra[eNB_id]->rnti);
 #endif
@@ -2883,7 +2885,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 	}
 	else {
 #ifdef DEBUG_PHY_PROC
-	  LOG_I(PHY,"[UE  %d][RAPROC] Frame %d subframe %d Received RAR  mode %d\n",
+	  LOG_D(PHY,"[UE  %d][RAPROC] Frame %d subframe %d Received RAR  mode %d\n",
 		phy_vars_ue->Mod_id,
 		frame_rx,
 		subframe_prev, phy_vars_ue->UE_mode[eNB_id]);
@@ -2891,7 +2893,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 
 #ifdef OPENAIR2
 	  if ((phy_vars_ue->UE_mode[eNB_id] != PUSCH) && (phy_vars_ue->prach_resources[eNB_id]->Msg3!=NULL)) {
-	    LOG_I(PHY,"[UE  %d][RAPROC] Frame %d subframe %d Invoking MAC for RAR (current preamble %d)\n",
+	    LOG_D(PHY,"[UE  %d][RAPROC] Frame %d subframe %d Invoking MAC for RAR (current preamble %d)\n",
 		  phy_vars_ue->Mod_id,frame_rx-((subframe_prev==9) ? 1 : 0),
 		  subframe_prev,
 		  phy_vars_ue->prach_resources[eNB_id]->ra_PreambleIndex);			
@@ -2906,7 +2908,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 
 	    if (timing_advance!=0xffff) {
 
-	      LOG_I(PHY,"[UE  %d][RAPROC] Frame %d subframe %d Got rnti %x and timing advance %d from RAR\n",
+	      LOG_D(PHY,"[UE  %d][RAPROC] Frame %d subframe %d Got rnti %x and timing advance %d from RAR\n",
 		    phy_vars_ue->Mod_id,
 		    frame_rx-((subframe_prev==9) ? 1 : 0),
 		    subframe_prev,
@@ -2923,7 +2925,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 			       &phy_vars_ue->ulsch_ue_Msg3_frame[eNB_id],
 			       &phy_vars_ue->ulsch_ue_Msg3_subframe[eNB_id]);
 		
-		LOG_I(PHY,"[UE  %d][RAPROC] Got Msg3_alloc Frame %d subframe %d: Msg3_frame %d, Msg3_subframe %d\n",
+		LOG_D(PHY,"[UE  %d][RAPROC] Got Msg3_alloc Frame %d subframe %d: Msg3_frame %d, Msg3_subframe %d\n",
 		      phy_vars_ue->Mod_id,
 		      frame_rx-((subframe_prev==9) ? 1 : 0),
 		      subframe_prev,
@@ -3232,7 +3234,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 	  dump_mch(phy_vars_ue,0,phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->G,subframe_rx);
 #ifdef DEBUG_DLSCH	  
 	  for (i=0;i<phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->TBS>>3;i++){
-	    LOG_T(PHY,"%2x.",phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->c[0][i]);
+	    LOG_T(PHY,"%02x.",phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->c[0][i]);
 	  }
 	  LOG_T(PHY,"\n");
 #endif 
@@ -3283,7 +3285,7 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst
 		  phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->TBS>>3);
 #ifdef DEBUG_PHY
 	    for (i=0;i<phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->TBS>>3;i++)
-	      msg("%2x.",phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->b[i]); 
+	      msg("%02x ",phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->b[i]); 
 	    msg("\n");
 #endif 	 
 	  } else 
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index 16ea1c1d85..0b35ebe27c 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -1082,7 +1082,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_1_5MHz_TDD_1_6_t);
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 0;
-	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1095,7 +1095,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_5MHz_TDD_1_6_t);
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 0;
-	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,3);
+	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1108,7 +1108,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_10MHz_TDD_1_6_t);
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1119,7 +1119,7 @@ int main(int argc, char **argv) {
 	    case 100:
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1138,7 +1138,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_1_5MHz_FDD_t);
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1150,7 +1150,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_5MHz_FDD_t);
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1162,7 +1162,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_10MHz_FDD_t);
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1174,7 +1174,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_20MHz_FDD_t);
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1375,7 +1375,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_1_5MHz_TDD_1_6_t);
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 0;
-	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1388,7 +1388,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_5MHz_TDD_1_6_t);
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 0;
-	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,3);
+	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1401,7 +1401,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_10MHz_TDD_1_6_t);
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1412,7 +1412,7 @@ int main(int argc, char **argv) {
 	    case 100:
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1431,7 +1431,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_1_5MHz_FDD_t);
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1443,7 +1443,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_5MHz_FDD_t);
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1455,7 +1455,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_10MHz_FDD_t);
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1467,7 +1467,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_20MHz_FDD_t);
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1670,7 +1670,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_1_5MHz_TDD_1_6_t);
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 0;
-	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_1_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1683,7 +1683,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_5MHz_TDD_1_6_t);
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 0;
-	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,3);
+	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1696,7 +1696,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_10MHz_TDD_1_6_t);
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_10MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1707,7 +1707,7 @@ int main(int argc, char **argv) {
 	    case 100:
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->dai              = 0;
 	      ((DCI1A_20MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
@@ -1726,7 +1726,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_1_5MHz_FDD_t);
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_1_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1738,7 +1738,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_5MHz_FDD_t);
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_5MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1750,7 +1750,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_10MHz_FDD_t);
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_10MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
@@ -1762,7 +1762,7 @@ int main(int argc, char **argv) {
 	      dci_length_bytes = sizeof(DCI1A_20MHz_FDD_t);
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->type             = 1;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->vrb_type         = 1;
-	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,4);
+	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc          = computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_DL,0,9);
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->TPC              = TPC;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid         = 0;
 	      ((DCI1A_20MHz_FDD_t *)&DLSCH_alloc_pdu_1[k])->mcs             = mcs1;  
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index 75b79300a2..fbb0053129 100755
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -225,7 +225,8 @@ static const eutra_band_t eutra_bands[] =
         {14,  788    * MHz,  798    * MHz,  758    * MHz,  768    * MHz, FDD},
 
         {17,  704    * MHz,  716    * MHz,  734    * MHz,  746    * MHz, FDD},
-
+	{20,  832    * MHz,  862    * MHz,  791    * MHz,  821    * MHz, FDD},
+	{33, 1900    * MHz, 1920    * MHz, 1900    * MHz, 1920    * MHz, TDD},
         {33, 1900    * MHz, 1920    * MHz, 1900    * MHz, 1920    * MHz, TDD},
         {34, 2010    * MHz, 2025    * MHz, 2010    * MHz, 2025    * MHz, TDD},
         {35, 1850    * MHz, 1910    * MHz, 1850    * MHz, 1910    * MHz, TDD},
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
index cdc5f99212..a9bbade67d 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
@@ -1336,7 +1336,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
       eNB->common_channels[CC_id].bcch_active = 0;
       LOG_D(MAC,"[eNB %d] Frame %d subframeP %d: BCCH active\n", module_idP, frameP, subframeP);
       // randomize frequency allocation for SI
-      first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4));
+      first_rb = 10;//(unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4));
 
       /*  Where is this from, should be removed!!!!
 
diff --git a/openair2/RRC/LITE/plmn_data.h b/openair2/RRC/LITE/plmn_data.h
index 2cea0ac68b..98f2517409 100644
--- a/openair2/RRC/LITE/plmn_data.h
+++ b/openair2/RRC/LITE/plmn_data.h
@@ -6,6 +6,8 @@ typedef struct {
 } plmn_data_t;
 
 static const plmn_data_t plmn_data[] = {
+  // Test
+  {1,            1,     "OAI Testing","OAI Test"},
   // Abkhazia
   {289, 	67,   	"Aquafon Abkhazia", ""},
   {289, 	68,   	"A-Mobile Abkhazia", ""},
@@ -294,39 +296,40 @@ Cambodia
 Cameroon
 624 	1   	Mobile Telephone Networks Cameroon 	MTN Cameroon 	Operational
 624 	2   	Orange Cameroun 	Orange 	Operational
+*/
 
-Canada
-302 	220   	Telus Mobility 	Telus 	Operational
-302 	221   	Telus Mobility (Unknown) 	Telus 	Operational
-302 	290   	Aurtek Wurekess 		Operational
-302 	320   	Dave Wireless 	Mobilicity 	Operational
-302 	350   	FIRST Networks Operations 	FIRST 	Operational
-302 	360   	Telus Mobility 	MiKE 	Operational
-302 	361   	Telus Mobility 	Telus 	Operational
-302 	370   	Fido Solutions (Rogers Wireless) 	Fido 	Operational
-302 	380   	Dryden Mobility 	DMTS 	Operational
-302 	490   	Globalive Communications 	WIND Mobile 	Operational
-302 	500   	Videotron 	Videotron 	Operational
-302 	510   	Videotron 	Videotron 	Operational
-302 	610   	Bell Mobility 	Bell 	Operational
-302 	620   	ICE Wireless 	ICE Wireless 	Operational
-302 	640   	Bell Mobility 	Bell 	Operational
-302 	651   	Bell Mobility 	Bell 	Operational
-302 	652   	BC Tel Mobility 		Operational
-302 	653   	Telus Mobility 	Telus 	Operational
-302 	654   	Sask Tel Mobility 		Operational
-302 	655   	MTS Mobility 	MTS 	Operational
-302 	656   	Thunder Bay Telephone Mobility 	TBay 	Operational
-302 	657   	Telus Mobility 	Telus 	Operational
-302 	680   	SaskTel Mobility 	SaskTel 	Operational
-302 	701   	MB Tel Mobility 		Operational
-302 	702   	MT&T Mobility (Aliant) 		Operational
-302 	703   	New Tel Mobility (Aliant 		Operational
-302 	710   	Globalstar Canada 	Globalstar 	Operational
-302 	720   	Rorges Communications 	Rogers Wireless 	Operational
-302 	780   	SaskTel Mobility 	SaskTel 	Operational
-302 	880   	Shared Telus, Bell, and SaskTel 	Bell / Telus / SaskTel 	Operational
-
+//Canada
+  {302, 	220,   	"Telus Mobility", 	"Telus CA"},
+  {302, 	221,   	"Telus Mobility (Unknown)", 	"Telus CA"},
+  {302, 	290,   	"Aurtek Wurekess", "Aurtek CA"},
+  {302, 	320,   	"Dave Wireless", 	"Mobilicity CA"},
+  {302, 	350,   	"FIRST Networks Operations", 	"FIRST CA"},
+  {302, 	360,   	"Telus Mobility", 	"MiKE CA"},
+  {302, 	361,   	"Telus Mobility", 	"Telus CA"},
+  {302, 	370,   	"Fido Solutions (Rogers Wireless)", 	"Fido CA"},
+  {302, 	380,   	"Dryden Mobility", 	"DMTS CA"},
+  {302, 	490,   	"Globalive Communications", 	"WIND Mobile CA"},
+  {302, 	500,   	"Videotron", 	"Videotron CA"},
+  {302, 	510,   	"Videotron",    "Videotron CA"},
+  {302, 	610,   	"Bell Mobility", 	"Bell CA"},
+  {302, 	620,   	"ICE Wireless", 	"ICE Wireless CA"},
+  {302, 	640,   	"Bell Mobility", 	"Bell CA"},
+  {302, 	651,   	"Bell Mobility", 	"Bell CA"},
+  {302, 	652,   	"BC Tel Mobility",      "BC Tel CA"},
+  {302, 	653,   	"Telus Mobility", 	"Telus"},
+  {302, 	654,   	"Sask Tel Mobility",    "Sask Tel CA"},
+  {302, 	655,   	"MTS Mobility", 	"MTS CA"},
+  {302, 	656,   	"Thunder Bay Telephone Mobility", 	"TBay CA"},
+  {302, 	657,   	"Telus Mobility", 	"Telus CA"},
+  {302, 	680,   	"SaskTel Mobility", 	"SaskTel CA"},
+  {302, 	701,   	"MB Tel Mobility",      "MB Tel CA"},
+  {302, 	702,   	"MT&T Mobility (Aliant)", "MT&T CA"},
+  {302, 	703,   	"New Tel Mobility (Aliant", "New Tel CA"},
+  {302, 	710,   	"Globalstar Canada", 	"Globalstar CA"},
+  {302, 	720,   	"Rogers Communications", "Rogers Wireless CA"},
+  {302, 	780,   	"SaskTel Mobility", 	"SaskTel CA"},
+  {302, 	880,   	"Shared Telus, Bell, and SaskTel", 	"Bell / Telus / SaskTel CA"},
+  /*
 Cape Verde
 625 	1   	CVMovel, S.A. 	CVMOVEL 	Operational
 625 	2   	T+Telecomunicaçôes 	T+ 	Operational
@@ -356,18 +359,20 @@ Chile
 730 	9   	Centennial Cayman Corp. Chile 	Nextel 	Operational
 730 	10   	Entel Telefonia Móvil S.A. 	entel 	Operational
 730 	99   	WILL Telefonia 	Will 	Operational
+*/
 
-China
-460 	0   	China Mobile 		Operational
-460 	1   	China Unicom 		Operational
-460 	2   	Liaoning PPTA 		Operational
-460 	3   	China Unicom CDMA 		Operational
-460 	4   	China Satellite Global Star Network 		Inactive
-460 	5   	China Telecom 		Operational
-460 	6   	China Unicom 		Operational
-460 	7   	China Mobile 		Operational
-460 	20   	China Tietong (GSM-R) 		Inactive
-
+//China
+  {460, 	0,   	"China Mobile", "China Mobile"},
+  {460, 	1,   	"China Unicom", "China Unicom"},
+  {460, 	2,   	"Liaoning PPTA","Liaoning China"},
+  {460, 	3,   	"China Unicom CDMA", "China Unicom"},
+  {460, 	4,   	"China Satellite Global Star Network",""},
+  {460, 	5,   	"China Telecom", "China Telecom"},
+  {460, 	6,   	"China Unicom", "China Unicom"},
+  {460, 	7,   	"China Mobile", "China Mobile"},
+  {460, 	20,   	"China Tietong (GSM-R)",""},
+
+  /*
 Colombia
 732 	1   	Colombia Telecomunicaciones S.A. 		Operational
 732 	2   	Edatel S.A. 	Edatel 	Operational
diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c
index 46d8d2a205..1ff60ed37b 100644
--- a/openair2/RRC/LITE/rrc_UE.c
+++ b/openair2/RRC/LITE/rrc_UE.c
@@ -84,6 +84,7 @@
 #endif
 
 #include "pdcp.h"
+#include "plmn_data.h"
 
 #if defined(ENABLE_ITTI)
 # include "intertask_interface.h"
@@ -1863,7 +1864,7 @@ decode_BCCH_DLSCH_Message(
   SystemInformation_t **si=UE_rrc_inst[ue_mod_idP].si[eNB_index];
   asn_dec_rval_t dec_rval;
   uint32_t si_window;//, sib1_decoded=0, si_decoded=0;
-  // int i;
+  int i;
 
   vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_IN);
 
@@ -1879,13 +1880,10 @@ decode_BCCH_DLSCH_Message(
       rrc_set_sub_state (ue_mod_idP, RRC_SUB_STATE_IDLE_RECEIVING_SIB);
 
       //memset(&bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
-      /*
+      
       LOG_D(RRC,"[UE %d] Decoding DL_BCCH_DLSCH_Message\n",ue_mod_idP);
       int i;
-      for (i=0;i<Sdu_len;i++)
-	printf("%x.",Sdu[i]);
-      printf("\n");
-      */
+      
 
       dec_rval = uper_decode_complete(NULL,
           &asn_DEF_BCCH_DL_SCH_Message,
@@ -1895,6 +1893,9 @@ decode_BCCH_DLSCH_Message(
 
       if ((dec_rval.code != RC_OK) && (dec_rval.consumed==0)) {
           LOG_E(RRC,"[UE %d] Failed to decode BCCH_DLSCH_MESSAGE (%d bits)\n",ue_mod_idP,dec_rval.consumed);
+/*	  for (i=0;i<Sdu_len;i++)
+	    printf("%2x ",Sdu[i]);
+	  printf("\n"); */
           //free the memory
           SEQUENCE_free(&asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message, 1);
           vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH, VCD_FUNCTION_OUT);
@@ -1999,27 +2000,60 @@ decode_SIB1(
 {
   SystemInformationBlockType1_t **sib1=&UE_rrc_inst[ue_mod_idP].sib1[eNB_index];
   int i;
+  int mcc,mnc,mccdigits,mncdigits,tac=0;
+  PLMN_Identity_t *PLMN_identity;
+  int plmn_ind=0;
 
   vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1, VCD_FUNCTION_IN);
 
-  LOG_D(RRC,"[UE %d] : Dumping SIB 1\n",ue_mod_idP);
+  LOG_I(RRC,"[UE %d] : Dumping SIB 1\n",ue_mod_idP);
 
   //  xer_fprint(stdout,&asn_DEF_SystemInformationBlockType1, (void*)*sib1);
+  PLMN_identity = &(*sib1)->cellAccessRelatedInfo.plmn_IdentityList.list.array[0]->plmn_Identity;
+
+  mccdigits = PLMN_identity->mcc->list.count;
+  mncdigits = PLMN_identity->mnc.list.count;
+  if (mccdigits == 2) {
+    mcc = *PLMN_identity->mcc->list.array[0]*10 + *PLMN_identity->mcc->list.array[1]; 
+  }
+  else {
+    mcc = *PLMN_identity->mcc->list.array[0]*100 + *PLMN_identity->mcc->list.array[1]*10 + *PLMN_identity->mcc->list.array[2];
+  }
 
-  LOG_D(RRC,"cellAccessRelatedInfo.cellIdentity : %x.%x.%x.%x\n",
+ if (mncdigits == 2) {
+    mnc = *PLMN_identity->mnc.list.array[0]*10 + *PLMN_identity->mnc.list.array[1];
+  }
+  else {
+    mnc = *PLMN_identity->mnc.list.array[0]*100 + *PLMN_identity->mnc.list.array[1]*10 + *PLMN_identity->mnc.list.array[2];
+  }
+ if ((*sib1)->cellAccessRelatedInfo.trackingAreaCode.size == 2)
+     tac = ((*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[0]<<8)+(*sib1)->cellAccessRelatedInfo.trackingAreaCode.buf[1];
+
+  LOG_I(RRC,"PLMN MCC %d, MNC %d, TAC %x\n",mcc,mnc,tac);
+  plmn_ind = 0;
+  while (plmn_data[plmn_ind].mcc>0) {
+    if ((plmn_data[plmn_ind].mcc == mcc) && (plmn_data[plmn_ind].mnc==mnc)) {
+      LOG_I(RRC,"Found %s\n", plmn_data[plmn_ind].oper_short);
+      break;
+    }
+    plmn_ind++;
+  }
+  if (plmn_data[plmn_ind].mcc<0)
+     LOG_I(RRC,"Found Unknown operator\n");
+  LOG_I(RRC,"cellAccessRelatedInfo.cellIdentity : %x.%x.%x.%x\n",
       (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[0],
       (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[1],
       (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[2],
       (*sib1)->cellAccessRelatedInfo.cellIdentity.buf[3]);
 
-  LOG_D(RRC,"cellSelectionInfo.q_RxLevMin       : %d\n",(int)(*sib1)->cellSelectionInfo.q_RxLevMin);
-  LOG_D(RRC,"freqBandIndicator                  : %d\n",(int)(*sib1)->freqBandIndicator);
-  LOG_D(RRC,"siWindowLength                     : %s\n",siWindowLength[(*sib1)->si_WindowLength]);
+  LOG_I(RRC,"cellSelectionInfo.q_RxLevMin       : %d\n",(int)(*sib1)->cellSelectionInfo.q_RxLevMin);
+  LOG_I(RRC,"freqBandIndicator                  : %d\n",(int)(*sib1)->freqBandIndicator);
+  LOG_I(RRC,"siWindowLength                     : %s\n",siWindowLength[(*sib1)->si_WindowLength]);
   if ((*sib1)->schedulingInfoList.list.count>0) {
       for (i=0;i<(*sib1)->schedulingInfoList.list.count;i++) {
-          LOG_D(RRC,"siSchedulingInfoPeriod[%d]          : %s\n",i,SIBPeriod[(int)(*sib1)->schedulingInfoList.list.array[i]->si_Periodicity]);
+          LOG_I(RRC,"siSchedulingInfoPeriod[%d]          : %s\n",i,SIBPeriod[(int)(*sib1)->schedulingInfoList.list.array[i]->si_Periodicity]);
           if ((*sib1)->schedulingInfoList.list.array[i]->sib_MappingInfo.list.count>0)
-            LOG_D(RRC,"siSchedulingInfoSIBType[%d]         : %s\n",i,SIBType[(int)(*(*sib1)->schedulingInfoList.list.array[i]->sib_MappingInfo.list.array[0])]);
+            LOG_I(RRC,"siSchedulingInfoSIBType[%d]         : %s\n",i,SIBType[(int)(*(*sib1)->schedulingInfoList.list.array[i]->sib_MappingInfo.list.array[0])]);
           else {
               LOG_W(RRC,"mapping list %d is null\n",i);
           }
@@ -2031,8 +2065,8 @@ decode_SIB1(
   }
 
   if ((*sib1)->tdd_Config) {
-      LOG_D(RRC,"TDD subframe assignment            : %d\n",(int)(*sib1)->tdd_Config->subframeAssignment);
-      LOG_D(RRC,"S-Subframe Config                  : %d\n",(int)(*sib1)->tdd_Config->specialSubframePatterns);
+      LOG_I(RRC,"TDD subframe assignment            : %d\n",(int)(*sib1)->tdd_Config->subframeAssignment);
+      LOG_I(RRC,"S-Subframe Config                  : %d\n",(int)(*sib1)->tdd_Config->specialSubframePatterns);
   }
 
   UE_rrc_inst[ue_mod_idP].Info[eNB_index].SIperiod     = siPeriod_int[(*sib1)->schedulingInfoList.list.array[0]->si_Periodicity];
@@ -2144,83 +2178,83 @@ dump_sib2(
                 )
 {
 
-  LOG_D(RRC,"radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles : %ld\n",
+  LOG_I(RRC,"radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles : %ld\n",
       sib2->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.numberOfRA_Preambles);
 
   //  if (radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig)
   //msg("radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig ",sib2->radioResourceConfigCommon.rach_ConfigCommon.preambleInfo.preamblesGroupAConfig = NULL;
 
-  LOG_D(RRC,"[UE]radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep);
+  LOG_I(RRC,"[UE]radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.powerRampingStep);
 
-  LOG_D(RRC,"[UE]radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower);
+  LOG_I(RRC,"[UE]radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.powerRampingParameters.preambleInitialReceivedTargetPower);
 
-  LOG_D(RRC,"radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax  : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax);
+  LOG_I(RRC,"radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax  : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.preambleTransMax);
 
-  LOG_D(RRC,"radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize);
+  LOG_I(RRC,"radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.ra_ResponseWindowSize);
 
-  LOG_D(RRC,"radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer);
+  LOG_I(RRC,"radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer : %ld\n",sib2->radioResourceConfigCommon.rach_ConfigCommon.ra_SupervisionInfo.mac_ContentionResolutionTimer);
 
-  LOG_D(RRC,"radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx : %ld\n",
+  LOG_I(RRC,"radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx : %ld\n",
       sib2->radioResourceConfigCommon.rach_ConfigCommon.maxHARQ_Msg3Tx);
 
-  LOG_D(RRC,"radioResourceConfigCommon.prach_Config.rootSequenceIndex : %ld\n",sib2->radioResourceConfigCommon.prach_Config.rootSequenceIndex);
-  LOG_D(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex : %ld\n",sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex);
-  LOG_D(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag : %d\n",  (int)sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag);
-  LOG_D(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig : %ld\n",  sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig);
-  LOG_D(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset %ld\n",  sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset);
+  LOG_I(RRC,"radioResourceConfigCommon.prach_Config.rootSequenceIndex : %ld\n",sib2->radioResourceConfigCommon.prach_Config.rootSequenceIndex);
+  LOG_I(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex : %ld\n",sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_ConfigIndex);
+  LOG_I(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag : %d\n",  (int)sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.highSpeedFlag);
+  LOG_I(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig : %ld\n",  sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig);
+  LOG_I(RRC,"radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset %ld\n",  sib2->radioResourceConfigCommon.prach_Config.prach_ConfigInfo.prach_FreqOffset);
 
   // PDSCH-Config
-  LOG_D(RRC,"radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower  : %ld\n",sib2->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower);
-  LOG_D(RRC,"radioResourceConfigCommon.pdsch_ConfigCommon.p_b : %ld\n",sib2->radioResourceConfigCommon.pdsch_ConfigCommon.p_b);
+  LOG_I(RRC,"radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower  : %ld\n",sib2->radioResourceConfigCommon.pdsch_ConfigCommon.referenceSignalPower);
+  LOG_I(RRC,"radioResourceConfigCommon.pdsch_ConfigCommon.p_b : %ld\n",sib2->radioResourceConfigCommon.pdsch_ConfigCommon.p_b);
 
   // PUSCH-Config
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB  : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB);
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode  : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode);
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset);
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM : %d\n",(int)sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM);
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled : %d\n",(int)sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled : %d\n",(int)sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
-  LOG_D(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB  : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode  : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM : %d\n",(int)sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled : %d\n",(int)sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled : %d\n",(int)sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
+  LOG_I(RRC,"radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift : %ld\n",sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
 
   // PUCCH-Config
 
-  LOG_D(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift);
-  LOG_D(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI);
-  LOG_D(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN);
-  LOG_D(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN);
+  LOG_I(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.deltaPUCCH_Shift);
+  LOG_I(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.nRB_CQI);
+  LOG_I(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.nCS_AN);
+  LOG_I(RRC,"radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN : %ld\n",sib2->radioResourceConfigCommon.pucch_ConfigCommon.n1PUCCH_AN);
 
-  LOG_D(RRC,"radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present : %d\n",sib2-> radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present);
+  LOG_I(RRC,"radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present : %d\n",sib2-> radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present);
 
 
   // uplinkPowerControlCommon
 
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH);
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.alpha : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.alpha);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.alpha : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.alpha);
 
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH);
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1 : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1);
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b);
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2  :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2);
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a);
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1 : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format1b);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2  :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2a);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b :%ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaFList_PUCCH.deltaF_PUCCH_Format2b);
 
-  LOG_D(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3);
+  LOG_I(RRC,"radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3 : %ld\n",sib2->radioResourceConfigCommon.uplinkPowerControlCommon.deltaPreambleMsg3);
 
-  LOG_D(RRC,"radioResourceConfigCommon.ul_CyclicPrefixLength : %ld\n", sib2->radioResourceConfigCommon.ul_CyclicPrefixLength);
+  LOG_I(RRC,"radioResourceConfigCommon.ul_CyclicPrefixLength : %ld\n", sib2->radioResourceConfigCommon.ul_CyclicPrefixLength);
 
-  LOG_D(RRC,"ue_TimersAndConstants.t300 : %ld\n", sib2->ue_TimersAndConstants.t300);
-  LOG_D(RRC,"ue_TimersAndConstants.t301 : %ld\n", sib2->ue_TimersAndConstants.t301);
-  LOG_D(RRC,"ue_TimersAndConstants.t310 : %ld\n", sib2->ue_TimersAndConstants.t310);
-  LOG_D(RRC,"ue_TimersAndConstants.n310 : %ld\n", sib2->ue_TimersAndConstants.n310);
-  LOG_D(RRC,"ue_TimersAndConstants.t311 : %ld\n", sib2->ue_TimersAndConstants.t311);
-  LOG_D(RRC,"ue_TimersAndConstants.n311 : %ld\n", sib2->ue_TimersAndConstants.n311);
+  LOG_I(RRC,"ue_TimersAndConstants.t300 : %ld\n", sib2->ue_TimersAndConstants.t300);
+  LOG_I(RRC,"ue_TimersAndConstants.t301 : %ld\n", sib2->ue_TimersAndConstants.t301);
+  LOG_I(RRC,"ue_TimersAndConstants.t310 : %ld\n", sib2->ue_TimersAndConstants.t310);
+  LOG_I(RRC,"ue_TimersAndConstants.n310 : %ld\n", sib2->ue_TimersAndConstants.n310);
+  LOG_I(RRC,"ue_TimersAndConstants.t311 : %ld\n", sib2->ue_TimersAndConstants.t311);
+  LOG_I(RRC,"ue_TimersAndConstants.n311 : %ld\n", sib2->ue_TimersAndConstants.n311);
 
-  LOG_D(RRC,"freqInfo.additionalSpectrumEmission : %ld\n",sib2->freqInfo.additionalSpectrumEmission);
-  LOG_D(RRC,"freqInfo.ul_CarrierFreq : %p\n", sib2->freqInfo.ul_CarrierFreq);
-  LOG_D(RRC,"freqInfo.ul_Bandwidth : %p\n", sib2->freqInfo.ul_Bandwidth);
-  LOG_D(RRC,"mbsfn_SubframeConfigList : %p\n", sib2->mbsfn_SubframeConfigList);
-  LOG_D(RRC,"timeAlignmentTimerCommon : %ld\n", sib2->timeAlignmentTimerCommon);
+  LOG_I(RRC,"freqInfo.additionalSpectrumEmission : %ld\n",sib2->freqInfo.additionalSpectrumEmission);
+  LOG_I(RRC,"freqInfo.ul_CarrierFreq : %p\n", sib2->freqInfo.ul_CarrierFreq);
+  LOG_I(RRC,"freqInfo.ul_Bandwidth : %p\n", sib2->freqInfo.ul_Bandwidth);
+  LOG_I(RRC,"mbsfn_SubframeConfigList : %p\n", sib2->mbsfn_SubframeConfigList);
+  LOG_I(RRC,"timeAlignmentTimerCommon : %ld\n", sib2->timeAlignmentTimerCommon);
 }
 
 void
@@ -2768,6 +2802,7 @@ decode_MCCH_Message(
 
   MCCH_Message_t               *mcch=NULL;
   MBSFNAreaConfiguration_r9_t **mcch_message=&UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index];
+
   asn_dec_rval_t                dec_rval;
 
   if (UE_rrc_inst[ue_mod_idP].Info[eNB_index].MCCHStatus[mbsfn_sync_area] == 1) {
@@ -3231,10 +3266,6 @@ void
                 case RRC_STATE_IDLE:
                   {
                     if (rrc_get_sub_state(ue_mod_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE)
-                      {
-                        rrc_ue_generate_RRCConnectionRequest(ue_mod_id, 0 /* TODO put frameP number ! */, 0);
-                        LOG_I(RRC, "not sending connection request\n");
-
                         rrc_set_sub_state (ue_mod_id, RRC_SUB_STATE_IDLE_CONNECTING);
                       }
                     break;
-- 
GitLab