uecap file path from command line at UE
This commit is contained in:
@@ -88,7 +88,8 @@
|
|||||||
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
|
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
|
||||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||||
#define CONFIG_HLP_DISABLETIMECORR "disable UE timing correction\n"
|
#define CONFIG_HLP_DISABLETIMECORR "disable UE timing correction\n"
|
||||||
#define CONFIG_HLP_RRC_CFG_PATH "path for RRC configuration\n"
|
#define CONFIG_HLP_RRC_CFG_PATH "path for RRC configuration\n"
|
||||||
|
#define CONFIG_HLP_UECAP_PATH "path for UE Capabilities file\n"
|
||||||
|
|
||||||
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
|
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
|
||||||
#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n"
|
#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n"
|
||||||
|
|||||||
+4
-2
@@ -756,13 +756,15 @@ void *UE_thread(void *arg) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_NR_UE(int nb_inst, char* rrc_config_path) {
|
void init_NR_UE(int nb_inst,
|
||||||
|
char* uecap_path,
|
||||||
|
char* rrc_config_path) {
|
||||||
int inst;
|
int inst;
|
||||||
NR_UE_MAC_INST_t *mac_inst;
|
NR_UE_MAC_INST_t *mac_inst;
|
||||||
NR_UE_RRC_INST_t* rrc_inst;
|
NR_UE_RRC_INST_t* rrc_inst;
|
||||||
|
|
||||||
for (inst=0; inst < nb_inst; inst++) {
|
for (inst=0; inst < nb_inst; inst++) {
|
||||||
AssertFatal((rrc_inst = nr_l3_init_ue(rrc_config_path)) != NULL, "can not initialize RRC module\n");
|
AssertFatal((rrc_inst = nr_l3_init_ue(uecap_path,rrc_config_path)) != NULL, "can not initialize RRC module\n");
|
||||||
AssertFatal((mac_inst = nr_l2_init_ue(rrc_inst)) != NULL, "can not initialize L2 module\n");
|
AssertFatal((mac_inst = nr_l2_init_ue(rrc_inst)) != NULL, "can not initialize L2 module\n");
|
||||||
AssertFatal((mac_inst->if_module = nr_ue_if_module_init(inst)) != NULL, "can not initialize IF module\n");
|
AssertFatal((mac_inst->if_module = nr_ue_if_module_init(inst)) != NULL, "can not initialize IF module\n");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ int vcdflag = 0;
|
|||||||
double rx_gain_off = 0.0;
|
double rx_gain_off = 0.0;
|
||||||
char *usrp_args = NULL;
|
char *usrp_args = NULL;
|
||||||
char *rrc_config_path = NULL;
|
char *rrc_config_path = NULL;
|
||||||
|
char *uecap_path = NULL;
|
||||||
int dumpframe = 0;
|
int dumpframe = 0;
|
||||||
|
|
||||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||||
@@ -443,7 +444,7 @@ int main( int argc, char **argv ) {
|
|||||||
#endif
|
#endif
|
||||||
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
|
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
|
||||||
|
|
||||||
init_NR_UE(1,rrc_config_path);
|
init_NR_UE(1,uecap_path,rrc_config_path);
|
||||||
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa)
|
if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->sa)
|
||||||
init_pdcp();
|
init_pdcp();
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,9 @@
|
|||||||
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, iptr:(int32_t *)&nrUE_params.nr_dlsch_parallel, defintval:0, TYPE_UINT8, 0}, \
|
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, iptr:(int32_t *)&nrUE_params.nr_dlsch_parallel, defintval:0, TYPE_UINT8, 0}, \
|
||||||
{"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, uptr:(uint32_t *)&nrUE_params.ofdm_offset_divisor, defuintval:UINT_MAX, TYPE_UINT32, 0}, \
|
{"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, uptr:(uint32_t *)&nrUE_params.ofdm_offset_divisor, defuintval:UINT_MAX, TYPE_UINT32, 0}, \
|
||||||
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
|
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
|
||||||
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0} \
|
{"uecap_path", CONFIG_HLP_UECAP_PATH, 0, strptr:(char **)&uecap_path, defstrval:"./", TYPE_STRING, 0}, \
|
||||||
|
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -84,7 +85,7 @@ extern nrUE_params_t *get_nrUE_params(void);
|
|||||||
// In nr-ue.c
|
// In nr-ue.c
|
||||||
extern int setup_nr_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
extern int setup_nr_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||||
extern void fill_ue_band_info(void);
|
extern void fill_ue_band_info(void);
|
||||||
extern void init_NR_UE(int, char*);
|
extern void init_NR_UE(int, char*, char*);
|
||||||
extern void init_NR_UE_threads(int);
|
extern void init_NR_UE_threads(int);
|
||||||
extern void reset_opp_meas(void);
|
extern void reset_opp_meas(void);
|
||||||
extern void print_opp_meas(void);
|
extern void print_opp_meas(void);
|
||||||
|
|||||||
@@ -34,8 +34,8 @@
|
|||||||
#include "rrc_proto.h"
|
#include "rrc_proto.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
|
||||||
NR_UE_RRC_INST_t* nr_l3_init_ue(char* rrc_config_path){
|
NR_UE_RRC_INST_t* nr_l3_init_ue(char* uecap, char* rrc_config_path){
|
||||||
//LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
|
//LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
|
||||||
|
|
||||||
return openair_rrc_top_init_ue_nr(rrc_config_path);
|
return openair_rrc_top_init_ue_nr(uecap,rrc_config_path);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ void process_nsa_message(NR_UE_RRC_INST_t *rrc, nsa_message_t nsa_message_type,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
|
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_path, char* rrc_config_path){
|
||||||
int nr_ue;
|
int nr_ue;
|
||||||
if(NB_NR_UE_INST > 0){
|
if(NB_NR_UE_INST > 0){
|
||||||
NR_UE_rrc_inst = (NR_UE_RRC_INST_t *)malloc(NB_NR_UE_INST * sizeof(NR_UE_RRC_INST_t));
|
NR_UE_rrc_inst = (NR_UE_RRC_INST_t *)malloc(NB_NR_UE_INST * sizeof(NR_UE_RRC_INST_t));
|
||||||
@@ -485,6 +485,8 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
|
|||||||
RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].CSI_ReportConfig_list, NR_maxNrofCSI_ReportConfigurations);
|
RRC_LIST_INIT(NR_UE_rrc_inst[nr_ue].CSI_ReportConfig_list, NR_maxNrofCSI_ReportConfigurations);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NR_UE_rrc_inst->uecap_path = uecap_path;
|
||||||
|
|
||||||
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1) {
|
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra==1) {
|
||||||
// read in files for RRCReconfiguration and RBconfig
|
// read in files for RRCReconfiguration and RBconfig
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
@@ -494,7 +496,7 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
|
|||||||
else
|
else
|
||||||
sprintf(filename,"reconfig.raw");
|
sprintf(filename,"reconfig.raw");
|
||||||
fd = fopen(filename,"r");
|
fd = fopen(filename,"r");
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
AssertFatal(fd,
|
AssertFatal(fd,
|
||||||
"cannot read file %s: errno %d, %s\n",
|
"cannot read file %s: errno %d, %s\n",
|
||||||
filename,
|
filename,
|
||||||
@@ -2632,8 +2634,12 @@ nr_rrc_ue_process_ueCapabilityEnquiry(
|
|||||||
ctxt_pP->frame,
|
ctxt_pP->frame,
|
||||||
gNB_index);
|
gNB_index);
|
||||||
|
|
||||||
sprintf(UE_NR_Capability_xer_fname,"../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap.xml");
|
FILE *f = NULL;
|
||||||
FILE *f = fopen(UE_NR_Capability_xer_fname, "r");
|
char *file_path = NR_UE_rrc_inst[ctxt_pP->module_id].uecap_path;
|
||||||
|
if (file_path) {
|
||||||
|
sprintf(UE_NR_Capability_xer_fname,"%s/uecap.xml",file_path);
|
||||||
|
f = fopen(UE_NR_Capability_xer_fname, "r");
|
||||||
|
}
|
||||||
|
|
||||||
memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t));
|
memset((void *)&ul_dcch_msg,0,sizeof(NR_UL_DCCH_Message_t));
|
||||||
memset((void *)&ue_CapabilityRAT_Container,0,sizeof(NR_UE_CapabilityRAT_Container_t));
|
memset((void *)&ue_CapabilityRAT_Container,0,sizeof(NR_UE_CapabilityRAT_Container_t));
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ typedef struct NR_UE_RRC_INST_s {
|
|||||||
NR_DRB_ToAddMod_t *DRB_config[NB_CNX_UE][8];
|
NR_DRB_ToAddMod_t *DRB_config[NB_CNX_UE][8];
|
||||||
rb_id_t *defaultDRB; // remember the ID of the default DRB
|
rb_id_t *defaultDRB; // remember the ID of the default DRB
|
||||||
|
|
||||||
|
char *uecap_path;
|
||||||
|
|
||||||
NR_SRB_INFO Srb0[NB_SIG_CNX_UE];
|
NR_SRB_INFO Srb0[NB_SIG_CNX_UE];
|
||||||
NR_SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
|
NR_SRB_INFO_TABLE_ENTRY Srb1[NB_CNX_UE];
|
||||||
NR_SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
|
NR_SRB_INFO_TABLE_ENTRY Srb2[NB_CNX_UE];
|
||||||
|
|||||||
@@ -43,14 +43,14 @@
|
|||||||
// main_rrc.c
|
// main_rrc.c
|
||||||
//
|
//
|
||||||
/**\brief Layer 3 initialization*/
|
/**\brief Layer 3 initialization*/
|
||||||
NR_UE_RRC_INST_t* nr_l3_init_ue(char*);
|
NR_UE_RRC_INST_t* nr_l3_init_ue(char*,char*);
|
||||||
|
|
||||||
//
|
//
|
||||||
// UE_rrc.c
|
// UE_rrc.c
|
||||||
//
|
//
|
||||||
|
|
||||||
/**\brief Initial the top level RRC structure instance*/
|
/**\brief Initial the top level RRC structure instance*/
|
||||||
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char*);
|
NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char*,char*);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user