Commit 8ada5496 authored by oai's avatar oai

Merge branch 'fix_ue' of...

Merge branch 'fix_ue' of https://gitlab.eurecom.fr/florian.kaltenberger/openairinterface5g into fix_ue
parents 28c4c6a4 27387ee8
......@@ -1803,6 +1803,7 @@ add_executable(lte-softmodem-nos1
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-enb.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/SIMU/USER/init_lte.c
......
......@@ -627,12 +627,12 @@ void rrc_eNB_emulation_notify_ue_module_id(
return;
}
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
if (RC.rrc[enb_module_id].carrier[CC_id].sib1 != NULL) {
if (&RC.rrc[enb_module_id]->carrier[CC_id].sib1 != NULL) {
if (
(RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[0] == cell_identity_byte0P) &&
(RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[1] == cell_identity_byte1P) &&
(RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[2] == cell_identity_byte2P) &&
(RC.rrc[enb_module_id].carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[3] == cell_identity_byte3P)
(&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[0] == cell_identity_byte0P) &&
(&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[1] == cell_identity_byte1P) &&
(&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[2] == cell_identity_byte2P) &&
(&RC.rrc[enb_module_id]->carrier[CC_id].sib1->cellAccessRelatedInfo.cellIdentity.buf[3] == cell_identity_byte3P)
) {
ue_context_p = rrc_eNB_get_ue_context(
RC.rrc[enb_module_id],
......
......@@ -596,10 +596,11 @@ static void get_options(void) {
if (UE_flag > 0) {
uint8_t n_rb_dl;
paramdef_t cmdline_uemodeparams[] =CMDLINE_UEMODEPARAMS_DESC;
paramdef_t cmdline_ueparams[] =CMDLINE_UEPARAMS_DESC;
set_default_frame_parms(frame_parms);
config_process_cmdline( cmdline_uemodeparams,sizeof(cmdline_uemodeparams)/sizeof(paramdef_t),NULL);
config_process_cmdline( cmdline_ueparams,sizeof(cmdline_ueparams)/sizeof(paramdef_t),NULL);
......@@ -609,6 +610,7 @@ static void get_options(void) {
input_fd = fopen(loopfile,"r");
AssertFatal(input_fd != NULL,"Please provide a valid input file\n");
}
if ( (cmdline_uemodeparams[CMDLINE_CALIBUERX_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue;
if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXMED_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_med;
if ( (cmdline_uemodeparams[CMDLINE_CALIBUERXBYP_IDX].paramflags & PARAMFLAG_PARAMSET) != 0) mode = rx_calib_ue_byp;
......@@ -618,11 +620,9 @@ static void get_options(void) {
if (dumpframe > 0) mode = rx_dump_frame;
if ( downlink_frequency[0][0] > 0) {
for (CC_id=1; CC_id<MAX_NUM_CCs; CC_id++) {
downlink_frequency[CC_id][1] = downlink_frequency[0][0];
downlink_frequency[CC_id][2] = downlink_frequency[0][0];
downlink_frequency[CC_id][3] = downlink_frequency[0][0];
printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]);
printf("Downlink frequency set to %u\n", downlink_frequency[0][0]);
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0];
}
UE_scan=0;
}
......@@ -631,7 +631,7 @@ static void get_options(void) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++)
frame_parms[CC_id]->frame_type = TDD;
}
set_default_frame_parms(frame_parms);
if (frame_parms[0]->N_RB_DL !=0) {
if ( frame_parms[0]->N_RB_DL < 6 ) {
frame_parms[0]->N_RB_DL = 6;
......@@ -651,9 +651,9 @@ static void get_options(void) {
}
UE_scan = 0;
frame_parms[0]->N_RB_UL=frame_parms[0]->N_RB_DL;
for (CC_id=1; CC_id<MAX_NUM_CCs; CC_id++) {
frame_parms[CC_id]->N_RB_DL=frame_parms[0]->N_RB_DL;
frame_parms[CC_id]->N_RB_UL=frame_parms[0]->N_RB_UL;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
frame_parms[CC_id]->N_RB_DL=n_rb_dl;
frame_parms[CC_id]->N_RB_UL=n_rb_dl;
}
}
......@@ -681,7 +681,8 @@ static void get_options(void) {
} else if (UE_flag == 1 && (!(CONFIG_ISFLAGSET(CONFIG_NOOOPT))) ) {
// Here the configuration file is the XER encoded UE capabilities
// Read it in and store in asn1c data structures
strcpy(uecap_xer,CONFIG_GETCONFFILE);
sprintf(uecap_xer,"%stargets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_config.xml",getenv("OPENAIR_HOME"));
printf("%s\n",uecap_xer);
uecap_xer_in=1;
} /* UE with config file */
}
......@@ -737,6 +738,7 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
// downlink_frequency[CC_id][3] = downlink_frequency[CC_id][0];
//printf("Downlink for CC_id %d frequency set to %u\n", CC_id, downlink_frequency[CC_id][0]);
frame_parms[CC_id]->dl_CarrierFreq=downlink_frequency[CC_id][0];
}
}
......@@ -908,7 +910,7 @@ int main( int argc, char **argv )
// set default parameters
// if (UE_flag == 1) set_default_frame_parms(frame_parms);
//if (UE_flag == 1) set_default_frame_parms(frame_parms);
logInit();
......
......@@ -127,7 +127,7 @@
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:0, TYPE_UINT8, 0}, \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&n_rb_dl, defintval:0, TYPE_UINT8, 0}, \
}
......
......@@ -303,6 +303,7 @@ static void *UE_thread_synch(void *arg)
} while (ind < sizeof(eutra_bands) / sizeof(eutra_bands[0]));
if (found == 0) {
LOG_E(PHY,"Can't find EUTRA band for frequency %d",UE->frame_parms.dl_CarrierFreq);
exit_fun("Can't find EUTRA band for frequency");
return &UE_thread_synch_retval;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment