diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
index 8718d3e98b..e4c9375330 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
@@ -240,7 +240,7 @@ void ue_rrc_measurements(PHY_VARS_UE *phy_vars_ue,
}
}
-
+ LOG_D(PHY,"eNB: %d, RSRP_tmp: %d \n",eNB_offset,phy_vars_ue->PHY_measurements.rsrp[eNB_offset]);
// 2 RE per PRB
phy_vars_ue->PHY_measurements.rsrp[eNB_offset]/=(24*phy_vars_ue->lte_frame_parms.N_RB_DL);
diff --git a/openair2/RRC/LITE/rrc_UE.c b/openair2/RRC/LITE/rrc_UE.c
index 64e8928301..8e48fabbb9 100644
--- a/openair2/RRC/LITE/rrc_UE.c
+++ b/openair2/RRC/LITE/rrc_UE.c
@@ -2416,11 +2416,11 @@ void ue_meas_filtering(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index)
//LOG_D(RRC,"RSRP_total_dB: %3.2f \n",(dB_fixed_times10(mac_xface->get_RSRP(ue_mod_idP,0,eNB_offset))/10.0)-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0)-dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12));
- //LOG_D(RRC,"RSRP_dB: %3.2f \n",(dB_fixed_times10(mac_xface->get_RSRP(ue_mod_idP,0,eNB_offset))/10.0));
- //LOG_D(RRC,"gain_loss_dB: %d \n",mac_xface->get_rx_total_gain_dB(ue_mod_idP,0));
- //LOG_D(RRC,"gain_fixed_dB: %d \n",dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12));
- //LOG_D(PHY,"[UE %d] Frame %d, RRC Measurements => rssi %3.1f dBm (digital: %3.1f dB)\n",
- //ue_mod_idP, frameP, 10*log10(mac_xface->get_RSSI(ue_mod_idP,0))-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0),10*log10(mac_xface->get_RSSI(ue_mod_idP,0)));
+ LOG_D(RRC,"RSRP_dBm: %3.2f \n",(dB_fixed_times10(mac_xface->get_RSRP(ue_mod_idP,0,eNB_offset))/10.0));
+ LOG_D(RRC,"gain_loss_dB: %d \n",mac_xface->get_rx_total_gain_dB(ue_mod_idP,0));
+ LOG_D(RRC,"gain_fixed_dB: %d \n",dB_fixed(mac_xface->lte_frame_parms->N_RB_DL*12));
+ LOG_D(PHY,"[UE %d] Frame %d, RRC Measurements => rssi %3.1f dBm (digital: %3.1f dB)\n",
+ ue_mod_idP, frameP, 10*log10(mac_xface->get_RSSI(ue_mod_idP,0))-mac_xface->get_rx_total_gain_dB(ue_mod_idP,0),10*log10(mac_xface->get_RSSI(ue_mod_idP,0)));
LOG_D(RRC,"[UE %d] Frame %d: Meas RSRP: eNB_offset: %d rsrp_coef: %3.1f filter_coef: %d before L3 filtering: rsrp: %3.1f after L3 filtering: rsrp: %3.1f \n ",
ue_mod_idP, frameP, eNB_offset,a,
*UE_rrc_inst->QuantityConfig[0]->quantityConfigEUTRA->filterCoefficientRSRP,
@@ -2444,9 +2444,8 @@ void ue_meas_filtering(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index)
UE_rrc_inst[ue_mod_idP].rsrq_db_filtered[eNB_offset]=(1-a1)*UE_rrc_inst[ue_mod_idP].rsrq_db_filtered[eNB_offset] + a1 *UE_rrc_inst[ue_mod_idP].rsrq_db[eNB_offset];
//mac_xface->set_RSRP_filtered(ue_mod_idP,eNB_offset,UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]);
/*
- LOG_D(RRC,"[UE %d] meas RSRQ: eNB_offset: %d rsrq_coef: %3.2f filter_coef: %d before L3 filtering: rsrq: %3.1f after L3 filtering: rsrq: %3.1f \n ",
- ue_mod_idP, eNB_offset,
- a1,
+ LOG_D(RRC,"[UE %d] Frame %d: Meas RSRQ: eNB_offset: %d rsrq_coef: %3.2f filter_coef: %d before L3 filtering: rsrq: %3.1f after L3 filtering: rsrq: %3.1f \n ",
+ ue_mod_idP,frameP,eNB_offset,a1,
*UE_rrc_inst->QuantityConfig[0]->quantityConfigEUTRA->filterCoefficientRSRQ,
mac_xface->get_RSRQ(ue_mod_idP,0,eNB_offset),
UE_rrc_inst[ue_mod_idP].rsrq_db[eNB_offset],
@@ -2558,8 +2557,8 @@ void ue_measurement_report_triggering(module_id_t ue_mod_idP, frame_t frameP,uin
//LOG_N(RRC,"[UE%d] Frame %d Check below lines for segfault :), Fix me \n",ue_mod_idP, frameP);
ttt_ms = timeToTrigger_ms[UE_rrc_inst[ue_mod_idP].ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger];
// Freq specific offset of neighbor cell freq
- ofn = ((UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq != NULL) ?
- *UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq : 15); // /* 15 is the Default */
+ ofn = 5;//((UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq != NULL) ?
+ // *UE_rrc_inst[ue_mod_idP].MeasObj[i][measObjId-1]->measObject.choice.measObjectEUTRA.offsetFreq : 15); // /* 15 is the Default */
// cellIndividualOffset of neighbor cell - not defined yet
ocn = 0;
a3_offset = UE_rrc_inst[ue_mod_idP].ReportConfig[i][reportConfigId-1]->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.eventId.choice.eventA3.a3_Offset;
@@ -2637,13 +2636,13 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t
}
if(UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_offset]+ofn+ocn-hys > UE_rrc_inst[ue_mod_idP].rsrp_db_filtered[eNB_index]+ofs+ocs-1/*+a3_offset*/) {
UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] += 2; //Called every subframe = 2ms
- LOG_D(RRC,"[UE %d] Frame %d: Entry measTimer[%d][%d]: %d currentCell: %d betterCell: %d \n",
- ue_mod_idP, frameP, ue_cnx_index,meas_index,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset);
+ LOG_D(RRC,"[UE %d] Frame %d: Entry measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n",
+ ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset);
}
else {
UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] = 0; //Exit condition: Resetting the measurement timer
- LOG_D(RRC,"[UE %d] Frame %d: Exit measTimer[%d][%d]: %d currentCell: %d betterCell: %d \n",
- ue_mod_idP, frameP, ue_cnx_index,meas_index,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset);
+ LOG_D(RRC,"[UE %d] Frame %d: Exit measTimer[%d][%d][%d]: %d currentCell: %d betterCell: %d \n",
+ ue_mod_idP, frameP, ue_cnx_index,meas_index,tmp_offset,UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset],currentCellIndex,eNB_offset);
}
if (UE_rrc_inst->measTimer[ue_cnx_index][meas_index][tmp_offset] >= ttt) {
UE_rrc_inst->HandoverInfoUe.targetCellId = get_adjacent_cell_id(ue_mod_idP,tmp_offset); //WARNING!!!...check this!
@@ -2656,6 +2655,9 @@ uint8_t check_trigger_meas_event(module_id_t ue_mod_idP,frame_t frameP, uint8_t
//LOG_D(RRC,"PHY_ID: %d \n",UE_rrc_inst->HandoverInfoUe.targetCellId);
return 1;
}
+ // else{
+ // LOG_D(RRC,"Condition does not hold\n");
+ // }
}
}
return 0;
diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c
index 05355002a8..4281fb98a3 100644
--- a/openair2/RRC/LITE/rrc_eNB.c
+++ b/openair2/RRC/LITE/rrc_eNB.c
@@ -1386,7 +1386,7 @@ void rrc_eNB_generate_HandoverPreparationInformation(
memcpy((void *)&eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->as_config,
(void *)&eNB_rrc_inst[enb_mod_idP].handover_info[ue_mod_idP]->as_config, sizeof(AS_Config_t));
- eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->ho_prepare = 0xFF;
+ eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->ho_prepare = 0x00;// 0xFF;
eNB_rrc_inst[mod_id_target].handover_info[UE_id_target]->ho_complete = 0;
eNB_rrc_inst[enb_mod_idP].handover_info[ue_mod_idP]->modid_t = mod_id_target;
diff --git a/openair2/UTIL/OMG/TRACE/handover.tr b/openair2/UTIL/OMG/TRACE/handover.tr
index cbfa892d8c..decdf355ee 100644
--- a/openair2/UTIL/OMG/TRACE/handover.tr
+++ b/openair2/UTIL/OMG/TRACE/handover.tr
@@ -1,13 +1,4 @@
-0 0 867 1440 40
-1 0 887 1460 40
-2 0 907 1480 30
-3 0 927 1500 30
-4 0 947 1520 30
-5 0 967 1540 30
-6 0 987 1560 30
-7 0 1007 1580 30
-8 0 1027 1600 30
-9 0 1047 1620 30
-10 0 1067 1640 30
-11 0 1087 1660 30
-12 0 1107 1680 30
+0 0 1800 4800 200
+10 0 4700 4840 200
+20 0 6500 4880 200
+
diff --git a/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr b/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr
index cc4ea41b4b..09d8cb4091 100644
--- a/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr
+++ b/openair2/UTIL/OMG/TRACE/hexagonal_eNBs.tr
@@ -1,3 +1,3 @@
-0 0 670 1200 0
-0 1 1162 1800 0
-0 2 1162 600 0
\ No newline at end of file
+0 0 2680 4800 0
+0 1 4648 4800 0
+0 2 6648 4800 0
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml
index e7ef5433cd..cbec73e902 100644
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml
+++ b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml
@@ -4,7 +4,8 @@
urban
3.67
- -120
+
+ -120
AWGN
@@ -29,8 +30,8 @@
- 2400
- 2400
+ 10000 //2400
+ 10000 //2400
@@ -54,7 +55,7 @@
- 3000
+ 10000
debug
diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c
index 6c731d9ee7..aca03d4ca2 100644
--- a/targets/SIMU/USER/oaisim_functions.c
+++ b/targets/SIMU/USER/oaisim_functions.c
@@ -93,6 +93,7 @@ uint16_t Nid_cell = 0; //needed by init_lte_vars
int nb_antennas_rx = 2; // //
uint8_t target_dl_mcs = 16; // max mcs used by MAC scheduler
uint8_t rate_adaptation_flag = 0;
+uint8_t set_snr = 0;
uint8_t set_sinr = 0;
double snr_dB=0, sinr_dB=0;
uint8_t set_seed = 0;