Commit 547a3a65 authored by winckel's avatar winckel

Modified eNB configuration.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4963 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b150244c
......@@ -126,12 +126,6 @@ static uint32_t eNB_app_register()
hash = s1ap_generate_eNB_id ();
g_enb_properties[eNB_id]->eNB_id = eNB_id + (hash & 0xFFFF8);
if (EPC_MODE_ENABLED)
{
/* Overwrite default IP v4 address by value from command line */
g_enb_properties[eNB_id]->mme_ip_address[0].ipv4_address = EPC_MODE_MME_ADDRESS;
}
/* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
......@@ -191,9 +185,9 @@ void *eNB_app_task(void *args_p)
# if defined(ENABLE_USE_MME)
# if defined(OAI_EMU)
enb_nb = oai_emulation.info.nb_enb_local;
enb_config_init(g_conf_config_file_name);
# endif
# endif
enb_config_init(g_conf_config_file_name);
configure_rrc();
......
......@@ -34,6 +34,10 @@
#include "log.h"
#include "assertions.h"
#include "enb_config.h"
#if defined(OAI_EMU)
# include "OCG.h"
# include "OCG_extern.h"
#endif
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
# if defined(ENABLE_USE_MME)
......@@ -76,14 +80,22 @@ int enb_config_init(char* lib_config_file_name_pP) {
config_init(&cfg);
if(lib_config_file_name_pP != NULL)
{
/* Read the file. If there is an error, report it and exit. */
if(! config_read_file(&cfg, lib_config_file_name_pP))
{
LOG_E(ENB_APP, "%s:%d - %s\n", lib_config_file_name_pP, config_error_line(&cfg), config_error_text(&cfg));
config_destroy(&cfg);
AssertFatal (1 == 0, "Failed to parse config file %s!\n", lib_config_file_name_pP);
AssertFatal (1 == 0, "Failed to parse eNB configuration file %s!\n", lib_config_file_name_pP);
}
}
else
{
LOG_E(ENB_APP, "No eNB configuration file provided!\n");
config_destroy(&cfg);
AssertFatal (0, "No eNB configuration file provided!\n");
}
// Get list of active eNBs, (only these will be configured)
g_num_enb_properties = 0;
......@@ -123,7 +135,7 @@ int enb_config_init(char* lib_config_file_name_pP) {
) {
parse_error = 1;
AssertFatal (parse_error == 0,
"Failed to parse config file %s, %u th enb\n",
"Failed to parse eNB configuration file %s, %u th enb\n",
lib_config_file_name_pP, i);
}
// search if in active list
......@@ -138,7 +150,7 @@ int enb_config_init(char* lib_config_file_name_pP) {
g_enb_properties[enb_properties_index]->cell_type = CELL_HOME_ENB;
} else {
AssertFatal (1 == 0,
"Failed to parse config file %s, enb %d unknown value for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
"Failed to parse eNB configuration file %s, enb %d unknown value for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
lib_config_file_name_pP, i);
}
g_enb_properties[enb_properties_index]->eNB_name = strdup(enb_name);
......@@ -156,10 +168,10 @@ int enb_config_init(char* lib_config_file_name_pP) {
g_enb_properties[enb_properties_index]->default_drx = PAGING_DRX_256;
} else {
AssertFatal (1 == 0,
"Failed to parse config file %s, enb %d unknown value for default_drx choice: PAGING_DRX_32..PAGING_DRX_256 !\n",
"Failed to parse eNB configuration file %s, enb %d unknown value for default_drx choice: PAGING_DRX_32..PAGING_DRX_256 !\n",
lib_config_file_name_pP, i);
}
AssertFatal (parse_error == 0, "Failed to parse config file %s, enb %d\n", lib_config_file_name_pP, i);
AssertFatal (parse_error == 0, "Failed to parse eNB configuration file %s, enb %d\n", lib_config_file_name_pP, i);
setting_mme_addresses = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_MME_IP_ADDRESS);
num_mme_address = config_setting_length(setting_mme_addresses);
......@@ -175,7 +187,7 @@ int enb_config_init(char* lib_config_file_name_pP) {
) {
parse_error = 1;
AssertFatal (parse_error == 0,
"Failed to parse config file %s, %u th enb %u th mme address\n",
"Failed to parse eNB configuration file %s, %u th enb %u th mme address\n",
lib_config_file_name_pP, i, j);
}
g_enb_properties[enb_properties_index]->nb_mme += 1;
......@@ -184,6 +196,9 @@ int enb_config_init(char* lib_config_file_name_pP) {
g_enb_properties[enb_properties_index]->mme_ip_address[j].ipv6_address = strdup(ipv6);
if (strcmp(active, "yes") == 0) {
g_enb_properties[enb_properties_index]->mme_ip_address[j].active = 1;
#if defined(ENABLE_USE_MME)
EPC_MODE_ENABLED = 1;
#endif
} // else { (calloc)
if (strcmp(preference, "ipv4") == 0) {
......@@ -202,7 +217,7 @@ int enb_config_init(char* lib_config_file_name_pP) {
}
}
AssertFatal (enb_properties_index == g_num_enb_properties,
"Failed to parse config file %s, mismatch between %u active eNBs and %u corresponding defined eNBs!\n",
"Failed to parse eNB configuration file %s, mismatch between %u active eNBs and %u corresponding defined eNBs!\n",
lib_config_file_name_pP, g_num_enb_properties, enb_properties_index);
return 0;
}
......@@ -726,7 +726,9 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration (u8 Mod_id, u32
DRB_config = CALLOC (1, sizeof (*DRB_config));
DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
*(DRB_config->eps_BearerIdentity) = 5L; // LW: set to first value, allowed value 5..15
*(DRB_config->eps_BearerIdentity) = 5L; // LW set to first value, allowed value 5..15
// DRB_config->drb_Identity = (DRB_Identity_t) 1; //allowed values 1..32
// NN: this is the 1st DRB for this ue, so set it to 1
// NN: this is the 1st DRB for this ue, so set it to 1
DRB_config->drb_Identity = (DRB_Identity_t) 1; // (UE_index+1); //allowed values 1..32
DRB_config->logicalChannelIdentity = CALLOC (1, sizeof (long));
......@@ -734,6 +736,7 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration (u8 Mod_id, u32
DRB_rlc_config = CALLOC (1, sizeof (*DRB_rlc_config));
DRB_config->rlc_Config = DRB_rlc_config;
#ifdef EXMIMO_IOT
DRB_rlc_config->present = RLC_Config_PR_am;
DRB_rlc_config->choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
......@@ -769,7 +772,6 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration (u8 Mod_id, u32
DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
PDCP_rlc_UM->pdcp_SN_Size = PDCP_Config__rlc_UM__pdcp_SN_Size_len12bits;
#endif
DRB_pdcp_config->headerCompression.present = PDCP_Config__headerCompression_PR_notUsed;
DRB_lchan_config = CALLOC (1, sizeof (*DRB_lchan_config));
......@@ -2174,7 +2176,6 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete (u8 Mod_id, u32 frame,
derive_key_rrc_int(eNB_rrc_inst[Mod_id].integrity_algorithm[UE_index],
eNB_rrc_inst[Mod_id].kenb[UE_index], &kRRCint);
#endif
#ifdef ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
......@@ -2205,7 +2206,6 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete (u8 Mod_id, u32 frame,
}
#endif
// Refresh SRBs/DRBs
rrc_pdcp_config_asn1_req (Mod_id, UE_index, frame, 1,
SRB_configList,
......@@ -2496,17 +2496,7 @@ char openair_rrc_lite_eNB_init (u8 Mod_id)
#if defined(ENABLE_USE_MME)
/* Connect eNB to MME */
if (EPC_MODE_ENABLED > 0)
{
# if !defined(ENABLE_ITTI)
if (s1ap_eNB_init (EPC_MODE_MME_ADDRESS, Mod_id) < 0)
{
mac_xface->macphy_exit ("");
return -1;
}
# endif
}
else
if (EPC_MODE_ENABLED <= 0)
#endif
{
/* Init security parameters */
......
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