Commit 61a0e4f7 authored by rmagueta's avatar rmagueta

Fix creation of rbconfig.raw and reconfig.raw files in standalone mode

parent 104b8ab2
...@@ -419,7 +419,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -419,7 +419,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0)) { if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0 && get_softmodem_params()->sa==0)) {
if (gnb_nb > 0) { if (gnb_nb > 0) {
/* /*
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
...@@ -851,6 +851,9 @@ int main( int argc, char **argv ) ...@@ -851,6 +851,9 @@ int main( int argc, char **argv )
if (get_softmodem_params()->do_ra) if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n"); AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
if (get_softmodem_params()->sa)
AssertFatal(get_softmodem_params()->phy_test == 0,"Standalone mode and phy_test are mutually exclusive\n");
#if T_TRACER #if T_TRACER
T_Config_Init(); T_Config_Init();
#endif #endif
......
...@@ -536,6 +536,9 @@ int main( int argc, char **argv ) { ...@@ -536,6 +536,9 @@ int main( int argc, char **argv ) {
if (get_softmodem_params()->do_ra) if (get_softmodem_params()->do_ra)
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n"); AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
if (get_softmodem_params()->sa)
AssertFatal(get_softmodem_params()->phy_test == 0,"Standalone mode and phy_test are mutually exclusive\n");
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_UE_g[0][CC_id] = (PHY_VARS_NR_UE *)malloc(sizeof(PHY_VARS_NR_UE)); PHY_vars_UE_g[0][CC_id] = (PHY_VARS_NR_UE *)malloc(sizeof(PHY_VARS_NR_UE));
......
...@@ -437,10 +437,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -437,10 +437,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
schedule_nr_mib(module_idP, frame, slot, slots_per_frame[*scc->ssbSubcarrierSpacing]); schedule_nr_mib(module_idP, frame, slot, slots_per_frame[*scc->ssbSubcarrierSpacing]);
// This schedules SIB1 // This schedules SIB1
if ( (get_softmodem_params()->phy_test == 0) & (get_softmodem_params()->sa == 1) ) if ( get_softmodem_params()->sa == 1 )
schedule_nr_sib1(module_idP, frame, slot); schedule_nr_sib1(module_idP, frame, slot);
else if ( (get_softmodem_params()->phy_test == 1) & (get_softmodem_params()->sa == 1) )
LOG_W(MAC,"Remove --phy-test to transmit SIB1 in standalone mode\n");
// This schedule PRACH if we are not in phy_test mode // This schedule PRACH if we are not in phy_test mode
if (get_softmodem_params()->phy_test == 0) if (get_softmodem_params()->phy_test == 0)
......
...@@ -225,7 +225,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration ...@@ -225,7 +225,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
(NR_CellGroupConfig_t *)NULL (NR_CellGroupConfig_t *)NULL
); );
if (get_softmodem_params()->phy_test > 0 || get_softmodem_params()->do_ra > 0) { if (get_softmodem_params()->phy_test > 0 || get_softmodem_params()->do_ra > 0 || get_softmodem_params()->sa > 0) {
// This is for phytest only, emulate first X2 message if uecap.raw file is present // This is for phytest only, emulate first X2 message if uecap.raw file is present
FILE *fd; FILE *fd;
fd = fopen("uecap.raw","r"); fd = fopen("uecap.raw","r");
......
...@@ -98,7 +98,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc, ...@@ -98,7 +98,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
total_size = (enc_rval.encoded+7)>>3; total_size = (enc_rval.encoded+7)>>3;
FILE *fd; // file to be generated for nr-ue FILE *fd; // file to be generated for nr-ue
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0) { if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0 || get_softmodem_params()->sa == 1) {
// This is for phytest only, emulate first X2 message if uecap.raw file is present // This is for phytest only, emulate first X2 message if uecap.raw file is present
LOG_I(RRC,"Dumping NR_RRCReconfiguration message (%jd bytes)\n",(enc_rval.encoded+7)>>3); LOG_I(RRC,"Dumping NR_RRCReconfiguration message (%jd bytes)\n",(enc_rval.encoded+7)>>3);
for (int i=0; i<(enc_rval.encoded+7)>>3; i++) { for (int i=0; i<(enc_rval.encoded+7)>>3; i++) {
...@@ -123,7 +123,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc, ...@@ -123,7 +123,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0) { if (get_softmodem_params()->phy_test==1 || get_softmodem_params()->do_ra > 0 || get_softmodem_params()->sa == 1) {
LOG_I(RRC,"Dumping scg_RB_Config message (%jd bytes)\n",(enc_rval.encoded+7)>>3); LOG_I(RRC,"Dumping scg_RB_Config message (%jd bytes)\n",(enc_rval.encoded+7)>>3);
for (int i=0; i<(enc_rval.encoded+7)>>3; i++) { for (int i=0; i<(enc_rval.encoded+7)>>3; i++) {
......
...@@ -162,7 +162,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ...@@ -162,7 +162,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
NR_RRCReconfiguration_IEs_t *reconfig_ies=calloc(1,sizeof(NR_RRCReconfiguration_IEs_t)); NR_RRCReconfiguration_IEs_t *reconfig_ies=calloc(1,sizeof(NR_RRCReconfiguration_IEs_t));
ue_context_p->ue_context.reconfig->criticalExtensions.choice.rrcReconfiguration = reconfig_ies; ue_context_p->ue_context.reconfig->criticalExtensions.choice.rrcReconfiguration = reconfig_ies;
carrier->initial_csi_index[rrc->Nb_ue] = 0; carrier->initial_csi_index[rrc->Nb_ue] = 0;
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 || get_softmodem_params()->sa == 1){
ue_context_p->ue_context.rb_config = calloc(1,sizeof(NR_RRCReconfiguration_t)); ue_context_p->ue_context.rb_config = calloc(1,sizeof(NR_RRCReconfiguration_t));
fill_default_rbconfig(ue_context_p->ue_context.rb_config); fill_default_rbconfig(ue_context_p->ue_context.rb_config);
} }
......
...@@ -458,7 +458,7 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){ ...@@ -458,7 +458,7 @@ 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);
} }
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 || get_softmodem_params()->sa == 1) {
// read in files for RRCReconfiguration and RBconfig // read in files for RRCReconfiguration and RBconfig
FILE *fd; FILE *fd;
char filename[1024]; char filename[1024];
......
...@@ -284,7 +284,7 @@ int create_gNB_tasks(uint32_t gnb_nb) { ...@@ -284,7 +284,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
} }
} }
if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0)) { if (AMF_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0 && get_softmodem_params()->sa==0)) {
if (gnb_nb > 0) { if (gnb_nb > 0) {
if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) { if (itti_create_task (TASK_NGAP, ngap_gNB_task, NULL) < 0) {
LOG_E(S1AP, "Create task for NGAP failed\n"); LOG_E(S1AP, "Create task for NGAP failed\n");
......
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