Commit e3d34c8b authored by Melissa's avatar Melissa Committed by Michael Cook

Fixed multiple UE EPC integration by resetting user->ueid=0;. Lots of logs in...

Fixed multiple UE EPC integration by resetting user->ueid=0;. Lots of logs in this commit, will remove later
parent e5fac31f
......@@ -189,9 +189,9 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "ctrl0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "172.16.1.1";
ENB_IPV4_ADDRESS_FOR_S1_MME = "172.16.0.1";
ENB_INTERFACE_NAME_FOR_S1U = "ctrl0";
ENB_IPV4_ADDRESS_FOR_S1U = "172.16.1.1";
ENB_IPV4_ADDRESS_FOR_S1U = "172.16.0.1";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C = "0.0.0.0";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
......
......@@ -27,7 +27,7 @@ L1s = (
remote_n_portc = 50001;
local_n_portd = 50010;
remote_n_portd = 50011;
}
}
);
RUs = (
......
......@@ -350,6 +350,7 @@ typedef enum {
FOREACH_TASK(TASK_ENUM)
} task_id_t;
extern uint16_t ue_idx_standalone;
typedef task_id_t thread_id_t;
......
......@@ -2521,7 +2521,7 @@ int decode_BCCH_DLSCH_Message(
memcpy( (void *)sib1,
(void *)&bcch_message->message.choice.c1.choice.systemInformationBlockType1,
sizeof(LTE_SystemInformationBlockType1_t) );
LOG_D( RRC, "[UE %"PRIu8"] Decoding First SIB1\n", ctxt_pP->module_id );
LOG_D( RRC, "[UE %"PRIu8"] Decoding First SIB1\n", ctxt_pP->module_id);
decode_SIB1( ctxt_pP, eNB_index, rsrq, rsrp );
}
}
......
......@@ -29,7 +29,7 @@ PLMN: {
PLMN4: {
FULLNAME="OAI LTEBOX";
SHORTNAME="OAIALU";
MNC="93";
MNC="95";
MCC="208";
};
PLMN5: {
......@@ -74,9 +74,52 @@ PLMN: {
MNC="04";
MCC="262";
};
PLMN12: {
FULLNAME="Vodafone Germ";
SHORTNAME="VODAFONE";
MNC="230";
MCC="320";
};
};
UE0:
{
USER: {
IMEI="356113022094148";
MANUFACTURER="EURECOM";
MODEL="LTE Android PC";
PIN="0000";
};
SIM: {
MSIN="100000025";
USIM_API_K="0c0a34601d4f07677303652c0462535b";
OPC="ba05688178e398bedc100674071002cb";
MSISDN="1011234561024";
};
# Home PLMN Selector with Access Technology
HPLMN= "320230";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
# Operator PLMN List
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20895", "310280", "310028", "320230");
# Operator controlled PLMN Selector with Access Technology
OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204");
# Forbidden plmns
FPLMN_LIST = ();
# List of Equivalent HPLMNs
#TODO: UE does not connect if set, to be fixed in the UE
# EHPLMN_LIST= ("20811", "20813");
EHPLMN_LIST= ();
};
UE1:
{
USER: {
IMEI="356113022094149";
......@@ -86,20 +129,168 @@ UE0:
};
SIM: {
MSIN="0100001111";
USIM_API_K="8baf473f2f8fd09487cccbd7097c6862";
OPC="e734f8734007d6c5ce7a0508809e7e9c";
MSISDN="33611123456";
MSIN="100000166";
USIM_API_K="0c0a34601d4f07677303652c0462535b";
OPC="ba05688178e398bedc100674071002cb";
MSISDN="1011234561165";
};
# Home PLMN Selector with Access Technology
HPLMN= "320230";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
# Operator PLMN List
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20895", "310280", "310028", "320230");
# Operator controlled PLMN Selector with Access Technology
OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204");
# Forbidden plmns
FPLMN_LIST = ();
# List of Equivalent HPLMNs
#TODO: UE does not connect if set, to be fixed in the UE
# EHPLMN_LIST= ("20811", "20813");
EHPLMN_LIST= ();
};
UE2:
{
USER: {
IMEI="356113022094150";
MANUFACTURER="EURECOM";
MODEL="LTE Android PC";
PIN="0000";
};
SIM: {
MSIN="100000012";
USIM_API_K="0c0a34601d4f07677303652c0462535b";
OPC="ba05688178e398bedc100674071002cb";
MSISDN="1011234561011";
};
# Home PLMN Selector with Access Technology
HPLMN= "320230";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
# Operator PLMN List
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20895", "310280", "310028", "320230");
# Operator controlled PLMN Selector with Access Technology
OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204");
# Forbidden plmns
FPLMN_LIST = ();
# List of Equivalent HPLMNs
#TODO: UE does not connect if set, to be fixed in the UE
# EHPLMN_LIST= ("20811", "20813");
EHPLMN_LIST= ();
};
UE3:
{
USER: {
IMEI="356113022094151";
MANUFACTURER="EURECOM";
MODEL="LTE Android PC";
PIN="0000";
};
SIM: {
MSIN="100000064";
USIM_API_K="0c0a34601d4f07677303652c0462535b";
OPC="ba05688178e398bedc100674071002cb";
MSISDN="1011234561063";
};
# Home PLMN Selector with Access Technology
HPLMN= "320230";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
# Operator PLMN List
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20895", "310280", "310028", "320230");
# Operator controlled PLMN Selector with Access Technology
OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204");
# Forbidden plmns
FPLMN_LIST = ();
# List of Equivalent HPLMNs
#TODO: UE does not connect if set, to be fixed in the UE
# EHPLMN_LIST= ("20811", "20813");
EHPLMN_LIST= ();
};
UE4:
{
USER: {
IMEI="356113022094152";
MANUFACTURER="EURECOM";
MODEL="LTE Android PC";
PIN="0000";
};
SIM: {
MSIN="100000082";
USIM_API_K="0c0a34601d4f07677303652c0462535b";
OPC="ba05688178e398bedc100674071002cb";
MSISDN="1011234561081";
};
# Home PLMN Selector with Access Technology
HPLMN= "320230";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
# Operator PLMN List
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20895", "310280", "310028", "320230");
# Operator controlled PLMN Selector with Access Technology
OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204");
# Forbidden plmns
FPLMN_LIST = ();
# List of Equivalent HPLMNs
#TODO: UE does not connect if set, to be fixed in the UE
# EHPLMN_LIST= ("20811", "20813");
EHPLMN_LIST= ();
};
UE5:
{
USER: {
IMEI="356113022094153";
MANUFACTURER="EURECOM";
MODEL="LTE Android PC";
PIN="0000";
};
SIM: {
MSIN="100000011";
USIM_API_K="0c0a34601d4f07677303652c0462535b";
OPC="ba05688178e398bedc100674071002cb";
MSISDN="1011234561010";
};
# Home PLMN Selector with Access Technology
HPLMN= "20893";
HPLMN= "320230";
# User controlled PLMN Selector with Access Technology
UCPLMN_LIST = ();
# Operator PLMN List
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20893", "310280", "310028");
OPLMN_LIST = ("00101", "20810", "20811", "20813", "20895", "310280", "310028", "320230");
# Operator controlled PLMN Selector with Access Technology
OCPLMN_LIST = ("22210", "21401", "21406", "26202", "26204");
......
......@@ -24,7 +24,7 @@
# include "intertask_interface.h"
# include "nas_ue_task.h"
# include "common/utils/LOG/log.h"
# include "vendor_ext.h"
# include "user_defs.h"
# include "user_api.h"
# include "nas_parser.h"
......@@ -95,41 +95,89 @@ void *nas_ue_task(void *args_p)
itti_mark_task_ready (TASK_NAS_UE);
MSC_START_USE();
LOG_I(NAS, "ue_idx_standalone val:: %u\n", ue_idx_standalone);
/* Initialize UE NAS (EURECOM-NAS) */
for (int i=0; i < users->count; i++)
// Intead of for loop for standalone mode
if (ue_idx_standalone == 0xFFFF)
{
nas_user_t *user = &users->item[i];
user->ueid=i;
for (int i = 0; i < users->count; i++)
{
nas_user_t *user = &users->item[i];
user->ueid = i;
/* Get USIM data application filename */ //
user->usim_data_store = memory_get_path_from_ueid(USIM_API_NVRAM_DIRNAME, USIM_API_NVRAM_FILENAME, user->ueid);
if (user->usim_data_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM data application filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get USIM data application filename */
user->usim_data_store = memory_get_path_from_ueid(USIM_API_NVRAM_DIRNAME, USIM_API_NVRAM_FILENAME, user->ueid);
if ( user->usim_data_store == NULL ) {
LOG_E(NAS, "[UE %d] - Failed to get USIM data application filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get UE's data pathname */
user->user_nvdata_store = memory_get_path_from_ueid(USER_NVRAM_DIRNAME, USER_NVRAM_FILENAME, user->ueid);
if (user->user_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get UE's data pathname */
user->user_nvdata_store = memory_get_path_from_ueid(USER_NVRAM_DIRNAME, USER_NVRAM_FILENAME, user->ueid);
if ( user->user_nvdata_store == NULL ) {
LOG_E(NAS, "[UE %d] - Failed to get USIM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get EMM data pathname */
user->emm_nvdata_store = memory_get_path_from_ueid(EMM_NVRAM_DIRNAME, EMM_NVRAM_FILENAME, user->ueid);
if (user->emm_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get EMM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get EMM data pathname */
user->emm_nvdata_store = memory_get_path_from_ueid(EMM_NVRAM_DIRNAME, EMM_NVRAM_FILENAME, user->ueid);
if ( user->emm_nvdata_store == NULL ) {
LOG_E(NAS, "[UE %d] - Failed to get EMM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
/* Initialize user interface (to exchange AT commands with user process) */
nas_user_api_id_initialize(user);
/* allocate needed structures */
user->user_at_commands = calloc_or_fail(sizeof(user_at_commands_t));
user->at_response = calloc_or_fail(sizeof(at_response_t));
user->lowerlayer_data = calloc_or_fail(sizeof(lowerlayer_data_t));
/* Initialize NAS user */
nas_user_initialize(user, &user_api_emm_callback, &user_api_esm_callback, FIRMWARE_VERSION);
}
/* Initialize user interface (to exchange AT commands with user process) */
nas_user_api_id_initialize(user);
/* allocate needed structures */
user->user_at_commands = calloc_or_fail(sizeof(user_at_commands_t));
user->at_response = calloc_or_fail(sizeof(at_response_t));
user->lowerlayer_data = calloc_or_fail(sizeof(lowerlayer_data_t));
/* Initialize NAS user */
nas_user_initialize (user, &user_api_emm_callback, &user_api_esm_callback, FIRMWARE_VERSION);
}
else
{
// use new parameter passed into lte-uesoftmodem which instead of looping
// calls functions on specific UE index.
nas_user_t *user = &users->item[0];
user->ueid = ue_idx_standalone;
LOG_I(NAS, "[UE %d] Configuring\n", user->ueid);
/* Get USIM data application filename */ //
user->usim_data_store = memory_get_path_from_ueid(USIM_API_NVRAM_DIRNAME, USIM_API_NVRAM_FILENAME, user->ueid);
if (user->usim_data_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM data application filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get UE's data pathname */
user->user_nvdata_store = memory_get_path_from_ueid(USER_NVRAM_DIRNAME, USER_NVRAM_FILENAME, user->ueid);
if (user->user_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get USIM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Get EMM data pathname */
user->emm_nvdata_store = memory_get_path_from_ueid(EMM_NVRAM_DIRNAME, EMM_NVRAM_FILENAME, user->ueid);
if (user->emm_nvdata_store == NULL)
{
LOG_E(NAS, "[UE %d] - Failed to get EMM nvdata filename", user->ueid);
exit(EXIT_FAILURE);
}
/* Initialize user interface (to exchange AT commands with user process) */
nas_user_api_id_initialize(user);
/* allocate needed structures */
user->user_at_commands = calloc_or_fail(sizeof(user_at_commands_t));
user->at_response = calloc_or_fail(sizeof(at_response_t));
user->lowerlayer_data = calloc_or_fail(sizeof(lowerlayer_data_t));
/* Initialize NAS user */
nas_user_initialize(user, &user_api_emm_callback, &user_api_esm_callback, FIRMWARE_VERSION);
user->ueid = 0;
}
/* Set UE activation state */
......
......@@ -103,7 +103,6 @@ pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint16_t sf_ahead=4;
pthread_cond_t sync_cond;
......@@ -181,6 +180,7 @@ eth_params_t *eth_params;
double cpuf;
int oaisim_flag=0;
uint16_t ue_idx_standalone = 0xFFFF;
/* forward declarations */
......
......@@ -115,7 +115,8 @@
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200",TYPE_STRING, 0}, \
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"A", CONFIG_HLP_TADV, 0, iptr:&(timingadv), defintval:0, TYPE_INT, 0} \
{"A", CONFIG_HLP_TADV, 0, iptr:&(timingadv), defintval:0, TYPE_INT, 0}, \
{"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0}, \
}
/*-----------------------------------------------------------------------------------------------------------------------------*/
......
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