From 3ea9834df62763cf8213ea004feaa77ab7c911a4 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 29 Apr 2015 16:31:35 +0000 Subject: [PATCH] changes in targets/RT/USER/lte-softmodem.c and targets/RT/USER/lte-ue.c for UE band scanning git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7298 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- targets/RT/USER/lte-softmodem.c | 27 ++++++++++------ targets/RT/USER/lte-ue.c | 55 ++++++++++++++++++--------------- 2 files changed, 48 insertions(+), 34 deletions(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index c3e29a7d43..7723d32e1b 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -2002,6 +2002,7 @@ static void get_options (int argc, char **argv) break; case 'r': + UE_scan = 0; for (CC_id=0; CC_idframe_type = TDD; /* TDD */ + frame_parms[CC_id]->frame_type = FDD; /* TDD */ frame_parms[CC_id]->tdd_config = 3; frame_parms[CC_id]->tdd_config_S = 0; - frame_parms[CC_id]->N_RB_DL = 25; - frame_parms[CC_id]->N_RB_UL = 25; + frame_parms[CC_id]->N_RB_DL = 100; + frame_parms[CC_id]->N_RB_UL = 100; frame_parms[CC_id]->Ncp = NORMAL; frame_parms[CC_id]->Ncp_UL = NORMAL; frame_parms[CC_id]->Nid_cell = Nid_cell; @@ -2272,6 +2273,14 @@ int main( int argc, char **argv ) set_taus_seed (0); + for (CC_id=0; CC_iddl_phy_sync_success (0, 0, 0, 1); - else - mac_xface->mrbch_phy_sync_failure (0, 0, 0); #endif @@ -2756,11 +2761,15 @@ int main( int argc, char **argv ) #endif #ifdef OPENAIR2 + printf("Filling UE band info\n"); - if (UE_flag==1) + if (UE_flag==1) { fill_ue_band_info(); - + mac_xface->dl_phy_sync_success (0, 0, 0, 1); + } + else + mac_xface->mrbch_phy_sync_failure (0, 0, 0); #endif /* #ifdef OPENAIR2 diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 347452ff8c..f631582e2f 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -233,29 +233,32 @@ static void *UE_thread_synch(void *arg) found = 0; current_band = eutra_bands[ind].band; - do { - printf("Scanning band %d, dl_min %u\n",current_band,eutra_bands[ind].dl_min); - if ((eutra_bands[ind].dl_min <= downlink_frequency[0][0]) && (eutra_bands[ind].dl_max>= downlink_frequency[0][0])) { - for (card=0; cardUE_scan == 0) { + do { + printf("Scanning band %d, dl_min %u\n",current_band,eutra_bands[ind].dl_min); - found = 1; - break; + if ((eutra_bands[ind].dl_min <= downlink_frequency[0][0]) && (eutra_bands[ind].dl_max>= downlink_frequency[0][0])) { + for (card=0; cardUE_scan == 1) { + else if (UE->UE_scan == 1) { + current_band=0; for (card=0; cardmutex_synch) != 0) { @@ -1012,7 +1017,7 @@ void *UE_thread(void *arg) UE->PHY_measurements.rx_power_avg_dB[0] - rx_input_level_dBm, UE->rx_total_gain_dB, openair0_cfg[0].rx_gain[0] - ); + ); exit_fun("[HW][UE] UE in RX calibration mode, exiting"); } } @@ -1378,7 +1383,7 @@ void *UE_thread(void *arg) UE->PHY_measurements.rx_power_avg_dB[0] - rx_input_level_dBm, UE->rx_total_gain_dB, openair0_cfg[0].rx_gain[0] - ); + ); exit_fun("[HW][UE] UE in RX calibration mode, exiting"); } } @@ -1414,8 +1419,8 @@ void *UE_thread(void *arg) } /* - if ((slot%2000)<10) - LOG_D(HW,"fun0: doing very hard work\n"); + if ((slot%2000)<10) + LOG_D(HW,"fun0: doing very hard work\n"); */ // now increment slot and frame counters slot++;