Commit 95774e5b authored by Navid Nikaein's avatar Navid Nikaein

* fix the mac header parser when receving long BSR

* update the ciphering and integrity handling at the eNB
* add SECU complication directive to lte-softmodem  makefile
* update the config files, revert the log.c (modif by LG)
* pre-ci tests passed except for eMBMS


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5287 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 9c194d17
......@@ -50,7 +50,6 @@ CFLAGS = \
-Wall \
-DENB_MODE \
-DENABLE_USE_MME \
-DEMIT_ASN_DEBUG=1 \
-DUSER_MODE \
-I./MESSAGES \
-I$(OUTDIR) \
......
#ifndef S1AP_ENB_DEFAULT_VALUES_H_
#define S1AP_ENB_DEFAULT_VALUES_H_
#define ENB_TAC (0)
#define ENB_TAC (1)
#define ENB_MCC (208)
#define ENB_MNC (34)
#define ENB_MNC (92)
#define ENB_NAME "Eurecom ENB"
#define ENB_NAME_FORMAT (ENB_NAME" %u")
......
......@@ -103,7 +103,7 @@ endif
EXTRA_CFLAGS += -I/usr/include -I/usr/realtime/include
EXTRA_CFLAGS += -I$(OPENAIR1_DIR)
EXTRA_CFLAGS += -DEMIT_ASN_DEBUG=0
#EXTRA_CFLAGS += -DEMIT_ASN_DEBUG=0
include $(OPENAIR1_DIR)/SCHED/Makefile.inc
include $(OPENAIR1_DIR)/PHY/Makefile.inc
......
......@@ -3060,7 +3060,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui
}
// If we've dropped the UE, go back to PRACH mode for this UE
#if !defined(EXMIMO_IOT)
//#if !defined(EXMIMO_IOT)
if (phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid] == 20) {
LOG_I(PHY,"[eNB %d] frame %d, subframe %d, UE %d: ULSCH consecutive error count reached %u, removing UE\n",
phy_vars_eNB->Mod_id,frame,last_slot>>1, i, phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid]);
......@@ -3073,7 +3073,7 @@ void phy_procedures_eNB_RX(unsigned char last_slot,PHY_VARS_eNB *phy_vars_eNB,ui
remove_ue(phy_vars_eNB->eNB_UE_stats[i].crnti,phy_vars_eNB,abstraction_flag);
phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid]=0;
}
#endif
//#endif
}
} // ulsch in error
else {
......
......@@ -151,10 +151,14 @@ static void enb_config_display(void) {
printf( "ENB CONFIG no %u:\n\n", i);
printf( "\teNB name: \t%s:\n",enb_properties.properties[i]->eNB_name);
printf( "\teNB ID: \t%u:\n",enb_properties.properties[i]->eNB_id);
printf( "\tCell type:\t%s:\n",enb_properties.properties[i]->cell_type == CELL_MACRO_ENB ? "CELL_MACRO_ENB":"CELL_HOME_ENB");
printf( "\tCell type: \t%s:\n",enb_properties.properties[i]->cell_type == CELL_MACRO_ENB ? "CELL_MACRO_ENB":"CELL_HOME_ENB");
printf( "\tTAC: \t%u:\n",enb_properties.properties[i]->tac);
printf( "\tMCC: \t%u:\n",enb_properties.properties[i]->mcc);
printf( "\tMNC: \t%u:\n",enb_properties.properties[i]->mnc);
printf( "\teutra band: \t%d:\n",enb_properties.properties[i]->eutra_band);
printf( "\tdownlink freq:\t%u:\n",enb_properties.properties[i]->downlink_frequency);
printf( "\tuplink freq: \t%d:\n",enb_properties.properties[i]->uplink_frequency_offset);
printf( "\n--------------------------------------------------------\n");
}
}
......@@ -233,8 +237,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
long int tdd_config_s;
const char* prefix_type;
long int eutra_band;
double downlink_frequency;
double uplink_frequency_offset;
long long downlink_frequency;
long long uplink_frequency_offset;
char* ipv4 = NULL;
char* ipv6 = NULL;
char* active = NULL;
......@@ -271,7 +275,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
if( (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) {
if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
asn_debug = 1;
asn_debug = 0;
asn1_xer_print = 0;
} else if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
asn_debug = 1;
......@@ -329,6 +333,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, &mnc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_DEFAULT_PAGING_DRX, &default_drx)
)
) {
AssertError (0, parse_errors ++,
......@@ -423,14 +428,13 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
enb_properties.properties[enb_properties_index]->eutra_band = 7; // Default band
}
if(config_setting_lookup_float(setting_enb, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)) {
enb_properties.properties[enb_properties_index]->downlink_frequency = downlink_frequency;
if(config_setting_lookup_int64(setting_enb, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)) {
enb_properties.properties[enb_properties_index]->downlink_frequency = (unsigned int) downlink_frequency;
} else {
enb_properties.properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency
}
if(config_setting_lookup_float(setting_enb, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)) {
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = uplink_frequency_offset;
if(config_setting_lookup_int64(setting_enb, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)) {
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = (unsigned int) uplink_frequency_offset;
} else {
// Default uplink frequency offset
if (enb_properties.properties[enb_properties_index]->frame_type == FDD) {
......
......@@ -256,7 +256,7 @@ void terminate_ra_proc(module_id_t module_idP,frame_t frameP,rnti_t rnti,unsigne
payload_ptr = parse_ulsch_header(msg3,&num_ce,&num_sdu,rx_ces,rx_lcids,rx_lengths,msg3_len);
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d Received CCCH: length %d, offset %d\n",
module_idP,frameP,rx_lengths[0],payload_ptr-msg3);
if ((num_ce == 0) && (num_sdu==1) && (rx_lcids[0] == CCCH)) { // This is an RRCConnectionRequest/Restablishment
if (/*(num_ce == 0) &&*/ (num_sdu==1) && (rx_lcids[0] == CCCH)) { // This is an RRCConnectionRequest/Restablishment
memcpy(&eNB_mac_inst[module_idP].RA_template[i].cont_res_id[0],payload_ptr,6);
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d Received CCCH: length %d, offset %d\n",
module_idP,frameP,rx_lengths[0],payload_ptr-msg3);
......@@ -496,11 +496,15 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
num_ces++;
mac_header_ptr++;
if (lcid==LONG_BSR)
ce_len+=4;
ce_len+=3;
else if (lcid==CRNTI)
ce_len+=2;
else if ((lcid==POWER_HEADROOM) || (lcid==TRUNCATED_BSR)|| (lcid== SHORT_BSR))
ce_len++;
else {
LOG_E(MAC,"unknown CE %d \n", lcid);
exit(-1);
}
}
}
}
......
......@@ -273,8 +273,8 @@ boolean_t pdcp_data_req(
#if defined(ENABLE_SECURITY)
if ((pdcp_p->security_activated != 0) &&
((pdcp_p->cipheringAlgorithm) != 0) &&
((pdcp_p->integrityProtAlgorithm) != 0)) {
(((pdcp_p->cipheringAlgorithm) != 0) ||
((pdcp_p->integrityProtAlgorithm) != 0))) {
if (enb_flagP == ENB_FLAG_NO)
start_meas(&eNB_pdcp_stats[enb_mod_idP].apply_security);
......@@ -289,6 +289,13 @@ boolean_t pdcp_data_req(
else
stop_meas(&UE_pdcp_stats[ue_mod_idP].apply_security);
}
LOG_D(PDCP,"MAC_I is %02x.%02x.%02x.%02x\n",
pdcp_pdu_p->data[pdcp_header_len + sdu_buffer_sizeP ],
pdcp_pdu_p->data[pdcp_header_len + sdu_buffer_sizeP +1],
pdcp_pdu_p->data[pdcp_header_len + sdu_buffer_sizeP +2],
pdcp_pdu_p->data[pdcp_header_len + sdu_buffer_sizeP +3]);
#endif
/* Print octets of outgoing data in hexadecimal form */
......
......@@ -444,7 +444,7 @@ public_pdcp(pdcp_stats_t UE_pdcp_stats[NUMBER_OF_UE_MAX];)
public_pdcp(pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];)
protected_pdcp(pdcp_t pdcp_array_srb_ue[NUMBER_OF_UE_MAX][2];)
protected_pdcp(pdcp_t pdcp_array_drb_ue[NUMBER_OF_UE_MAX][maxDRB];)
protected_pdcp(pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][2];)
public_pdcp(pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][2];)
protected_pdcp(pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][maxDRB];)
#if defined(Rel10)
public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
......
......@@ -108,12 +108,12 @@ int pdcp_apply_security(pdcp_t *pdcp_entity, rb_id_t rb_id,
/* SRBs */
uint8_t *mac_i;
LOG_D(PDCP, "[OSA][RB %d] %s Applying control-plane security\n",
rb_id, (pdcp_entity->is_ue != 0) ? "UE -> eNB" : "eNB -> UE");
LOG_D(PDCP, "[OSA][RB %d] %s Applying control-plane security %d \n",
rb_id, (pdcp_entity->is_ue != 0) ? "UE -> eNB" : "eNB -> UE", pdcp_entity->integrityProtAlgorithm);
encrypt_params.message = pdcp_pdu_buffer;
encrypt_params.blength = (pdcp_header_len + sdu_buffer_size) << 3;
encrypt_params.key = pdcp_entity->kRRCint + 128;
encrypt_params.key = pdcp_entity->kRRCint + 16; // + 128;
mac_i = &pdcp_pdu_buffer[pdcp_header_len + sdu_buffer_size];
......@@ -122,12 +122,12 @@ int pdcp_apply_security(pdcp_t *pdcp_entity, rb_id_t rb_id,
stream_compute_integrity(pdcp_entity->integrityProtAlgorithm, &encrypt_params,
mac_i);
encrypt_params.key = pdcp_entity->kRRCenc + 128;
encrypt_params.key = pdcp_entity->kRRCenc; // + 128 // bit key
} else {
LOG_D(PDCP, "[OSA][RB %d] %s Applying user-plane security\n",
rb_id, (pdcp_entity->is_ue != 0) ? "UE -> eNB" : "eNB -> UE");
encrypt_params.key = pdcp_entity->kUPenc + 128;
encrypt_params.key = pdcp_entity->kUPenc;// + 128;
}
encrypt_params.message = &pdcp_pdu_buffer[pdcp_header_len];
......@@ -170,11 +170,11 @@ int pdcp_validate_security(pdcp_t *pdcp_entity, rb_id_t rb_id,
if (rb_id < DTCH) {
LOG_D(PDCP, "[OSA][RB %d] %s Validating control-plane security\n",
rb_id, (pdcp_entity->is_ue != 0) ? "eNB -> UE" : "UE -> eNB");
decrypt_params.key = pdcp_entity->kRRCenc + 128;
decrypt_params.key = pdcp_entity->kRRCenc;// + 128;
} else {
LOG_D(PDCP, "[OSA][RB %d] %s Validating user-plane security\n",
rb_id, (pdcp_entity->is_ue != 0) ? "eNB -> UE" : "UE -> eNB");
decrypt_params.key = pdcp_entity->kUPenc + 128;
decrypt_params.key = pdcp_entity->kUPenc;// + 128;
}
/* Uncipher the block */
......@@ -184,7 +184,7 @@ int pdcp_validate_security(pdcp_t *pdcp_entity, rb_id_t rb_id,
/* Now check the integrity of the complete PDU */
decrypt_params.message = pdcp_pdu_buffer;
decrypt_params.blength = sdu_buffer_size << 3;
decrypt_params.key = pdcp_entity->kRRCint + 128;
decrypt_params.key = pdcp_entity->kRRCint + 16;// 128;
if (stream_check_integrity(pdcp_entity->integrityProtAlgorithm,
&decrypt_params, &pdcp_pdu_buffer[sdu_buffer_size]) != 0)
......
......@@ -306,7 +306,7 @@ void mac_rlc_data_ind (
rlc_mode = rlc_union_p->mode;
} else {
rlc_mode = RLC_MODE_NONE;
AssertFatal (0 , "%s RLC not configured rb id %u lcid %u module %u!\n", __FUNCTION__, rb_id, channel_idP, ue_module_idP);
//AssertFatal (0 , "%s RLC not configured rb id %u lcid %u module %u!\n", __FUNCTION__, rb_id, channel_idP, ue_module_idP);
}
struct mac_data_ind data_ind = mac_rlc_deserialize_tb(buffer_pP, tb_sizeP, num_tbP, crcs_pP);
switch (rlc_mode) {
......
......@@ -537,6 +537,13 @@ void rrc_eNB_generate_SecurityModeCommand(
eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP],
eNB_rrc_inst[enb_mod_idP].integrity_algorithm[ue_mod_idP]);
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC Security Mode Command\n");
for (i = 0; i < size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
LOG_F(RRC,"\n");
#endif
LOG_I(RRC,
"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d, UE id %d)\n",
enb_mod_idP, frameP, size, ue_mod_idP);
......@@ -714,7 +721,7 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
DRB_config->rlc_Config = DRB_rlc_config;
#ifdef EXMIMO_IOT
#ifndef EXMIMO_IOT
DRB_rlc_config->present = RLC_Config_PR_am;
DRB_rlc_config->choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
DRB_rlc_config->choice.am.ul_AM_RLC.pollPDU = PollPDU_p16;
......@@ -731,16 +738,12 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
DRB_pdcp_config = CALLOC(1, sizeof(*DRB_pdcp_config));
DRB_config->pdcp_Config = DRB_pdcp_config;
#ifdef EXMIMO_IOT
DRB_pdcp_config->discardTimer = CALLOC(1, sizeof(long));
*DRB_pdcp_config->discardTimer = PDCP_Config__discardTimer_infinity;
#else
DRB_pdcp_config->discardTimer = NULL;
#endif
DRB_pdcp_config->rlc_AM = NULL;
DRB_pdcp_config->rlc_UM = NULL;
#ifdef EXMIMO_IOT
#ifndef EXMIMO_IOT
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
PDCP_rlc_AM->statusReportRequired = FALSE;
......@@ -1075,7 +1078,7 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
for (i = 0; i < UE_info->nb_of_e_rabs; i++) {
if (UE_info->e_rab[i].param.nas_pdu.buffer != NULL) {
dedicatedInfoNas = CALLOC(1, sizeof(DedicatedInfoNAS_t));
memset(dedicatedInfoNas, 0, sizeof(OCTET_STRING_t));
OCTET_STRING_fromBuf(dedicatedInfoNas, (char *)UE_info->e_rab[i].param.nas_pdu.buffer,
UE_info->e_rab[i].param.nas_pdu.length);
ASN_SEQUENCE_ADD(&dedicatedInfoNASList->list, dedicatedInfoNas);
......@@ -1101,17 +1104,28 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
memset(buffer, 0, RRC_BUF_SIZE);
size = do_RRCConnectionReconfiguration(enb_mod_idP, buffer, ue_mod_idP, rrc_eNB_get_next_transaction_identifier(enb_mod_idP), //Transaction_id,
SRB_configList2, *DRB_configList, NULL, // DRB2_list,
NULL, // *sps_Config,
physicalConfigDedicated[ue_mod_idP], MeasObj_list, ReportConfig_list,
quantityConfig,
#ifdef EXMIMO_IOT
NULL,
#else
MeasId_list,
SRB_configList2,
#endif
*DRB_configList, NULL, // DRB2_list,
NULL, // *sps_Config,
#ifdef EXMIMO_IOT
NULL, NULL, NULL, NULL,NULL,
#else
physicalConfigDedicated[ue_mod_idP], MeasObj_list, ReportConfig_list, quantityConfig, MeasId_list,
#endif
mac_MainConfig, NULL, NULL, Sparams, rsrp, cba_RNTI, dedicatedInfoNASList);
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC Connection Reconfiguration\n");
for (i = 0; i < size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
LOG_F(RRC,"\n");
////////////////////////////////////////
#endif
#if defined(ENABLE_ITTI)
/* Free all NAS PDUs */
for (i = 0; i < UE_info->nb_of_e_rabs; i++) {
......@@ -2207,6 +2221,7 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
eNB_rrc_inst[enb_mod_idP].kenb[ue_mod_idP], &kRRCenc);
derive_key_rrc_int(eNB_rrc_inst[enb_mod_idP].integrity_algorithm[ue_mod_idP],
eNB_rrc_inst[enb_mod_idP].kenb[ue_mod_idP], &kRRCint);
#endif
#ifdef ENABLE_RAL
{
......@@ -2237,13 +2252,17 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
itti_send_msg_to_task(TASK_RAL_ENB, enb_mod_idP, message_ral_p);
}
#endif
// Refresh SRBs/DRBs
rrc_pdcp_config_asn1_req(enb_mod_idP, ue_mod_idP, frameP, ENB_FLAG_YES,
SRB_configList,
DRB_configList, (DRB_ToReleaseList_t *) NULL,
eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP] |
(eNB_rrc_inst[enb_mod_idP].integrity_algorithm[ue_mod_idP] << 4), kRRCenc, kRRCint, kUPenc
/*eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP] |
(eNB_rrc_inst[enb_mod_idP].integrity_algorithm[ue_mod_idP] << 4),
*/
0xff, // already configured during the securitymodecommand
kRRCenc,
kRRCint,
kUPenc
#ifdef Rel10
, (PMCH_InfoList_r9_t *) NULL
#endif
......@@ -2414,6 +2433,14 @@ void rrc_eNB_generate_RRCConnectionSetup(
mac_xface->lte_frame_parms,
SRB_configList, &eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP]);
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC Connection Setup\n");
for (cnt = 0; cnt < eNB_rrc_inst[Mod_id].Srb0.Tx_buffer.payload_size; cnt++)
LOG_F(RRC,"%02x ", ((uint8_t*)eNB_rrc_inst[Mod_id].Srb0.Tx_buffer.Payload)[cnt]);
LOG_F(RRC,"\n");
//////////////////////////////////
#endif
// configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
if (*SRB_configList != NULL) {
......@@ -2495,7 +2522,7 @@ char openair_rrc_lite_eNB_init(
{
/* Init security parameters */
for (j = 0; j < NUMBER_OF_UE_MAX; j++) {
eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[j] = SecurityAlgorithmConfig__cipheringAlgorithm_eea2;
eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[j] = SecurityAlgorithmConfig__cipheringAlgorithm_eea0;
eNB_rrc_inst[enb_mod_idP].integrity_algorithm[j] = SecurityAlgorithmConfig__integrityProtAlgorithm_eia2;
rrc_lite_eNB_init_security(enb_mod_idP, j);
}
......@@ -2590,7 +2617,7 @@ int rrc_eNB_decode_ccch(
//memset(ul_ccch_msg,0,sizeof(UL_CCCH_Message_t));
LOG_T(RRC, "[eNB %d] Frame %d: Decoding UL CCCH %x.%x.%x.%x.%x.%x (%p)\n",
LOG_D(RRC, "[eNB %d] Frame %d: Decoding UL CCCH %x.%x.%x.%x.%x.%x (%p)\n",
enb_mod_idP, frameP, ((uint8_t *) Srb_info->Rx_buffer.Payload)[0],
((uint8_t *) Srb_info->Rx_buffer.Payload)[1],
((uint8_t *) Srb_info->Rx_buffer.Payload)[2],
......@@ -2653,6 +2680,12 @@ int rrc_eNB_decode_ccch(
break;
case UL_CCCH_MessageType__c1_PR_rrcConnectionRequest:
#ifdef RRC_MSG_PRINT
LOG_F(RRC, "RRC Connection Request\n");
for (i = 0; i < Srb_info->Rx_buffer.payload_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Srb_info->Rx_buffer.Payload)[i]);
LOG_F(RRC,"\n");
#endif
LOG_D(RRC,
"[FRAME %05d][MAC_eNB][MOD %02d][][--- MAC_DATA_IND (rrcConnectionRequest on SRB0) -->][RRC_eNB][MOD %02d][]\n",
frameP, enb_mod_idP, enb_mod_idP);
......@@ -2863,10 +2896,17 @@ int rrc_eNB_decode_dcch(
break;
case UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete:
#ifdef RRC_MSG_PRINT
LOG_F(RRC," RRC Connection Reconfiguration Complete\n");
for (i = 0; i < sdu_size; i++)
LOF_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
LOG_F(RRC,"\n");
#endif
LOG_D(RRC,
"[FRAME %05d][RLC][MOD %02d][RB %02d][--- RLC_DATA_IND %d bytes "
"(RRCConnectionReconfigurationComplete) --->][RRC_eNB][MOD %02d][]\n",
frameP, enb_mod_idP, DCCH, sdu_sizeP, enb_mod_idP);
if (ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.criticalExtensions.
present ==
RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8)
......@@ -2889,13 +2929,25 @@ int rrc_eNB_decode_dcch(
break;
case UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete:
LOG_D(RRC,
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC Connection Reestablishment Complete\n");
for (i = 0; i < sdu_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
LOG_F(RRC,"\n");
#endif
LOG_I(RRC,
"[FRAME %05d][RLC][MOD %02d][RB %02d][--- RLC_DATA_IND %d bytes "
"(rrcConnectionReestablishmentComplete) --->][RRC_eNB][MOD %02d][]\n",
frameP, enb_mod_idP, DCCH, sdu_sizeP, enb_mod_idP);
break;
case UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete:
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC Connection SetupComplete\n");
for (i = 0; i < sdu_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
LOG_F(RRC,"\n");
#endif
LOG_D(RRC,
"[FRAME %05d][RLC][MOD %02d][RB %02d][--- RLC_DATA_IND %d bytes "
"(RRCConnectionSetupComplete) --->][RRC_eNB][MOD %02d][]\n",
......@@ -2920,6 +2972,12 @@ int rrc_eNB_decode_dcch(
break;
case UL_DCCH_MessageType__c1_PR_securityModeComplete:
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC Security Mode Complete\n");
for (i = 0; i < sdu_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
LOG_F(RRC,"\n");
#endif
LOG_I(RRC,
"[eNB %d] Frame %d received securityModeComplete on UL-DCCH %d from UE %d\n",
enb_mod_idP, frameP, DCCH, ue_mod_idP);
......@@ -2936,6 +2994,12 @@ int rrc_eNB_decode_dcch(
break;
case UL_DCCH_MessageType__c1_PR_securityModeFailure:
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC Security Mode Failure\n");
for (i = 0; i < sdu_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
LOG_F(RRC,"\n");
#endif
LOG_D(RRC,
"[FRAME %05d][RLC][MOD %02d][RB %02d][--- RLC_DATA_IND %d bytes "
"(securityModeFailure) --->][RRC_eNB][MOD %02d][]\n", frameP, enb_mod_idP, DCCH, sdu_sizeP, enb_mod_idP);
......@@ -2949,6 +3013,12 @@ int rrc_eNB_decode_dcch(
break;
case UL_DCCH_MessageType__c1_PR_ueCapabilityInformation:
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC UECapablility Information \n");
for (i = 0; i < sdu_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
LOG_F(RRC,"\n");
#endif
LOG_I(RRC,
"[eNB %d] Frame %d received ueCapabilityInformation on UL-DCCH %d from UE %d\n",
enb_mod_idP, frameP, DCCH, ue_mod_idP);
......@@ -2985,6 +3055,13 @@ int rrc_eNB_decode_dcch(
break;
case UL_DCCH_MessageType__c1_PR_ulInformationTransfer:
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC UL Information Transfer \n");
for (i = 0; i < sdu_size; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
LOG_F(RRC,"\n");
#endif
#if defined(ENABLE_USE_MME)
if (EPC_MODE_ENABLED == 1) {
rrc_eNB_send_S1AP_UPLINK_NAS(enb_mod_idP, ue_mod_idP, ul_dcch_msg);
......
......@@ -32,7 +32,7 @@ Address : EURECOM,
/*! \file rrc_eNB_S1AP.c
* \brief rrc S1AP procedures for eNB
* \author Laurent Winckel
* \author Laurent Winckel and Navid Nikaein
* \date 2013
* \version 1.0
* \company Eurecom
......@@ -50,11 +50,16 @@ Address : EURECOM,
# include "asn1_conversions.h"
# include "intertask_interface.h"
# include "pdcp.h"
# include "pdcp_primitives.h"
# include "s1ap_eNB.h"
# else
# include "../../S1AP/s1ap_eNB.h"
# endif
#if defined(ENABLE_SECURITY)
# include "UTIL/OSA/osa_defs.h"
#endif
/* Value to indicate an invalid UE initial id */
static const uint16_t UE_INITIAL_ID_INVALID = 0;
......@@ -69,8 +74,12 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x2;
#ifdef Rel10
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
#else
#ifdef EXMIMO_IOT
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia2
#else
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_reserved
#endif
#endif
# if defined(ENABLE_ITTI)
/*! \fn uint16_t get_next_ue_initial_id(uint8_t mod_id)
......@@ -174,6 +183,7 @@ static uint8_t get_UE_index_from_s1ap_ids(uint8_t mod_id, uint16_t ue_initial_id
*\return the selected algorithm.
*/
static e_SecurityAlgorithmConfig__cipheringAlgorithm rrc_eNB_select_ciphering(uint16_t algorithms) {
if (algorithms & S1AP_ENCRYPTION_EEA2_MASK) {
return SecurityAlgorithmConfig__cipheringAlgorithm_eea2;
}
......@@ -193,6 +203,7 @@ static e_SecurityAlgorithmConfig__cipheringAlgorithm rrc_eNB_select_ciphering(ui
*\return the selected algorithm.
*/
static e_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_integrity(uint16_t algorithms) {
if (algorithms & S1AP_INTEGRITY_EIA2_MASK) {
return SecurityAlgorithmConfig__integrityProtAlgorithm_eia2;
}
......@@ -234,8 +245,8 @@ static int rrc_eNB_process_security (uint8_t mod_id, uint8_t ue_index, security_
changed = TRUE;
}
LOG_I (RRC, "[eNB %d][UE %d] Selected security algorithms: %x, %x, %s",
mod_id, ue_index, cipheringAlgorithm, integrityProtAlgorithm, changed ? "changed" : "same");
LOG_I (RRC, "[eNB %d][UE %d] Selected security algorithms (%x): %x, %x, %s\n",
mod_id, ue_index, security_capabilities, cipheringAlgorithm, integrityProtAlgorithm, changed ? "changed" : "same");
return changed;
}
......@@ -259,7 +270,75 @@ static void process_eNB_security_key (uint8_t mod_id, uint8_t ue_index, uint8_t
}
ascii_buffer[2 * i] = '\0';
LOG_I (RRC, "[eNB %d][UE %d] Saved security key %s", mod_id, ue_index, ascii_buffer);
LOG_I (RRC, "[eNB %d][UE %d] Saved security key %s\n", mod_id, ue_index, ascii_buffer);
#endif
}
static void rrc_pdcp_config_security(uint8_t enb_mod_idP, uint8_t ue_mod_idP, uint8_t send_security_mode_command ){
#if defined(ENABLE_SECURITY)
SRB_ToAddModList_t *SRB_configList = eNB_rrc_inst[enb_mod_idP].SRB_configList[ue_mod_idP];
uint8_t *kRRCenc = NULL;
uint8_t *kRRCint = NULL;
uint8_t *kUPenc = NULL;
pdcp_t *pdcp_p = NULL;
static int print_keys= 1;
/* Derive the keys from kenb */
if (SRB_configList != NULL) {
derive_key_up_enc(eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP],
eNB_rrc_inst[enb_mod_idP].kenb[ue_mod_idP], &kUPenc);
}
derive_key_rrc_enc(eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP],
eNB_rrc_inst[enb_mod_idP].kenb[ue_mod_idP], &kRRCenc);
derive_key_rrc_int(eNB_rrc_inst[enb_mod_idP].integrity_algorithm[ue_mod_idP],
eNB_rrc_inst[enb_mod_idP].kenb[ue_mod_idP], &kRRCint);
#define DEBUG_SECURITY 1
#if defined (DEBUG_SECURITY)
#define msg printf
if (print_keys ==1 ) {
print_keys =0;
int i;
msg("\nKeNB:");
for(i = 0; i < 32; i++)
msg("%02x", eNB_rrc_inst[enb_mod_idP].kenb[ue_mod_idP][i]);
msg("\n");
msg("\nKRRCenc:");
for(i = 0; i < 32; i++)
msg("%02x", kRRCenc[i]);
msg("\n");
msg("\nKRRCint:");
for(i = 0; i < 32; i++)
msg("%02x", kRRCint[i]);
msg("\n");
}
#endif //DEBUG_SECURITY
pdcp_p = &pdcp_array_srb_eNB[enb_mod_idP][ue_mod_idP][DCCH-1];
pdcp_config_set_security(pdcp_p,
enb_mod_idP,
ue_mod_idP,
0,
ENB_FLAG_YES,
DCCH,
DCCH+2,
(send_security_mode_command == TRUE) ?
0 | (eNB_rrc_inst[enb_mod_idP].integrity_algorithm[ue_mod_idP] << 4) :
(eNB_rrc_inst[enb_mod_idP].ciphering_algorithm[ue_mod_idP] ) |
(eNB_rrc_inst[enb_mod_idP].integrity_algorithm[ue_mod_idP] << 4),
kRRCenc,
kRRCint,
kUPenc);
#endif
}
......@@ -508,11 +587,18 @@ int rrc_eNB_process_S1AP_DOWNLINK_NAS(MessageDef *msg_p, const char *msg_name, i
if (eNB_rrc_inst[instance].Info.UE[ue_index].eNB_ue_s1ap_id == 0) {
eNB_rrc_inst[instance].Info.UE[ue_index].eNB_ue_s1ap_id = S1AP_DOWNLINK_NAS (msg_p).eNB_ue_s1ap_id;
}
/* Create message for PDCP (DLInformationTransfer_t) */
length = do_DLInformationTransfer (instance, &buffer, rrc_eNB_get_next_transaction_identifier (instance),
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.length,
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer);
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"RRC DL Information Transfer\n");
for (i = 0; i < length; i++)
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
LOG_F(RRC,"\n");
#endif
/* Transfer data to PDCP */
pdcp_rrc_data_req (instance, ue_index, 0 /* TODO put frame number ! */, 1, DCCH, *rrc_eNB_mui++, 0,
length, buffer, 1);
......@@ -592,13 +678,20 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
{
uint8_t send_security_mode_command = TRUE;
#ifndef EXMIMO_IOT
if ((eNB_rrc_inst[instance].ciphering_algorithm[ue_index] == SecurityAlgorithmConfig__cipheringAlgorithm_eea0)
&& (eNB_rrc_inst[instance].integrity_algorithm[ue_index] == INTEGRITY_ALGORITHM_NONE)) {
send_security_mode_command = FALSE;
}
#endif
rrc_pdcp_config_security(instance, ue_index,send_security_mode_command);
if (send_security_mode_command) {
rrc_eNB_generate_SecurityModeCommand (instance, 0 /* TODO put frame number ! */, ue_index);
send_security_mode_command = FALSE;
// apply ciphering after RRC security command mode
rrc_pdcp_config_security(instance, ue_index,send_security_mode_command);
}
else {
rrc_eNB_generate_UECapabilityEnquiry (instance, 0 /* TODO put frame number ! */, ue_index);
......
......@@ -153,7 +153,7 @@ int logInit (void)
g_log->log_component[RRC].flag = LOG_MED;
g_log->log_component[RRC].interval = 1;
g_log->log_component[RRC].fd = 0;
g_log->log_component[RRC].filelog = 0;
g_log->log_component[RRC].filelog = 1;
g_log->log_component[RRC].filelog_name = "/tmp/rrc.log";
g_log->log_component[NAS].name = "NAS";
......@@ -627,10 +627,12 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
// do not apply filtering for LOG_F
// only log messages which are enabled and are below the global log level and component's level threshold
if ((level != LOG_FILE) &&
if ((level != LOG_FILE) && ((level > c->level) && (level > g_log->level))) {
/* if ((level != LOG_FILE) &&
((level > c->level) ||
(level > g_log->level) ||
( c->level > g_log->level))) {
*/
return;
}
......
......@@ -61,7 +61,7 @@ int stream_compute_integrity_eia2(stream_cipher_t *stream_cipher, uint8_t out[4]
stream_cipher->blength, zero_bit);
for (i = 0; i < sizeof(m); i++)
index += sprintf(&payload[index], "0x%02x ", m[i]);
LOG_T(OSA, "Payload: %s\n", payload);
LOG_D(OSA, "Payload: %s\n", payload);
}
#endif
......@@ -86,6 +86,7 @@ int stream_compute_integrity(uint8_t algorithm, stream_cipher_t *stream_cipher,
LOG_E(OSA, "SNOW-3G algorithms are currently not implemented for integrity\n");
return -1;
} else if (algorithm == EIA2_128_ALG_ID) {
LOG_D(OSA, "EIA2 algorithm applied for integrity\n");
return stream_compute_integrity_eia2(stream_cipher, out);
}
LOG_E(OSA, "Provided integrity algorithm is currently not supported = %u\n", algorithm);
......
......@@ -67,7 +67,8 @@ LIBS += $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
#LG SHARED_DEPENDENCIES += $(UE_NAS_OBJ_DIR)/libuenas.a $(X2AP_OBJ_DIR)/libx2ap.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
SHARED_DEPENDENCIES += $(UE_NAS_OBJ_DIR)/libuenas.a $(S1AP_OBJ_DIR)/libs1ap.a $(SCTP_OBJ_DIR)/libsctp.a $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a
COMMON_CFLAGS += -DLOG_NO_THREAD -DEMIT_ASN_DEBUG
COMMON_CFLAGS += -DLOG_NO_THREAD
#-DEMIT_ASN_DEBUG
openair_cn_available = $(shell if [ -d "$(UE_NAS_DIR)" ]; then echo "0" ; else echo "1" ; fi )
ifeq ($(openair_cn_available), 0)
......
//Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3");
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
......@@ -25,100 +26,26 @@ eNBs =
////////// Physical parameters:
frame_type = "FDD";
prefix_type = "NORMAL";
downlink_frequency = 2680000000;
eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.13.11";
ipv6 = "2192:168:30::17";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
},
{ ipv4 = "192.168.13.11";
ipv6 = "2192:168:30::18";
active = "no";
preference = "ipv4";
}
);
},
{
////////// Identification parameters:
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_1";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
////////// Physical parameters:
frame_type = "FDD";
prefix_type = "NORMAL";
downlink_frequency = 2680000000;
uplink_frequency_offset = -120000000;
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
},
{ ipv4 = "192.168.12.86";
ipv6 = "2192:168:30::18";
active = "no";
preference = "ipv4";
}
);
},
{
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_2";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
},
NETWORK_INTERFACES :
{
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_3";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
mobile_network_code = "92";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
};
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
mme_ip_address = ( { ipv4 = "192.168.12.170";
ipv6 = "2192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
}
);
......@@ -3,9 +3,6 @@ Active_eNBs = ( "eNB_Eurecom_0");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
......
Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3");
//Active_eNBs = ( "eNB_Eurecom_0");
//Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3");
Active_eNBs = ( "eNB_Eurecom_0");
eNBs =
(
......@@ -12,11 +12,11 @@ eNBs =
eNB_name = "eNB_Eurecom_0";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
tracking_area_code = "1";
mobile_country_code = 208;
mobile_country_code = "208";
mobile_network_code = 92;
mobile_network_code = "92";
////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304
......@@ -49,11 +49,11 @@ eNBs =
eNB_name = "eNB_Eurecom_1";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
tracking_area_code = "1";
mobile_country_code = 208;
mobile_country_code = "208";
mobile_network_code = 92;
mobile_network_code = "92";
////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304
......@@ -85,12 +85,11 @@ eNBs =
eNB_name = "eNB_Eurecom_2";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
tracking_area_code = "1";
mobile_country_code = 208;
mobile_country_code = "208";
// EXMIMO_IOT mobile_network_code = 92;
mobile_network_code = 92;
mobile_network_code = "92";
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
......@@ -108,12 +107,11 @@ eNBs =
eNB_name = "eNB_Eurecom_3";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
tracking_area_code = "1";
mobile_country_code = 208;
mobile_country_code = "208";
// EXMIMO_IOT mobile_network_code = 92;
mobile_network_code = 92;
mobile_network_code = "92";
// Default Paging DRX of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256";
......
Active_eNBs = ( "eNB_Eurecom_0");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
......@@ -42,6 +43,16 @@ eNBs =
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.31/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.31/24";
};
},
{
////////// Identification parameters:
......@@ -79,6 +90,14 @@ eNBs =
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.31/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.31/24";
};
},
{
////////// Identification parameters:
......@@ -116,6 +135,14 @@ eNBs =
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.31/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.31/24";
};
},
{
////////// Identification parameters:
......@@ -142,5 +169,14 @@ eNBs =
active = "yes";
preference = "ipv4";
};
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.31/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.31/24";
};
}
);
......@@ -95,7 +95,7 @@
# Parameters
###########################################################
declare EMULATION_DEV_INTERFACE="eth2"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1 ASN_DEBUG=1 EMIT_ASN_DEBUG=1"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1 "
###########################################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
......
......@@ -93,7 +93,7 @@
###########################################################
# Parameters
###########################################################
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1 ASN_DEBUG=1 EMIT_ASN_DEBUG=1"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 LINK_PDCP_TO_GTPV1U=1 NAS=1 Rel10=1"
declare MAKE_IP_DRIVER_TARGET="ue_ip.ko"
declare IP_DRIVER_NAME="ue_ip"
declare LTEIF="oip1"
......
......@@ -94,7 +94,7 @@
# Parameters
###########################################################
declare -x EMULATION_DEV_INTERFACE="eth1"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 NAS=1 Rel10=1 ASN_DEBUG=1 EMIT_ASN_DEBUG=1"
declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim DEBUG=1 ENABLE_ITTI=1 USE_MME=R10 NAS=1 Rel10=1"
declare MAKE_IP_DRIVER_TARGET="ue_ip.ko"
declare IP_DRIVER_NAME="ue_ip"
declare LTEIF="oip1"
......
......@@ -569,6 +569,7 @@ void *l2l1_task(void *arg)
switch (ITTI_MSG_ID(message_p)) {
case INITIALIZE_MESSAGE:
/* Start eNB thread */
LOG_D(EMU, "L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p));
start_eNB = 1;
break;
......@@ -1281,6 +1282,7 @@ static void get_options (int argc, char **argv)
frame_parms->tdd_config_S = enb_properties->properties[0]->tdd_config_s;
for (i = 0 ; i < (sizeof(downlink_frequency) / sizeof (downlink_frequency[0])); i++) {
downlink_frequency[i] = enb_properties->properties[0]->downlink_frequency;
printf("Downlink frequency set to %u\n", downlink_frequency[i]);
uplink_frequency_offset[i] = enb_properties->properties[0]->uplink_frequency_offset;
}
}
......@@ -1367,15 +1369,18 @@ int main(int argc, char **argv) {
#endif
set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RLC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(PDCP, LOG_INFO, LOG_HIGH, 1);
set_comp_log(PDCP, LOG_DEBUG, LOG_HIGH, 1);
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1);
#if defined(ENABLE_ITTI)
set_comp_log(EMU, LOG_INFO, LOG_MED, 1);
# if defined(ENABLE_USE_MME)
set_comp_log(S1AP, LOG_INFO, LOG_HIGH, 1);
set_comp_log(S1AP, LOG_DEBUG, LOG_HIGH, 1);
set_comp_log(SCTP, LOG_INFO, LOG_HIGH, 1);
# endif
#if defined(ENABLE_SECURITY)
set_comp_log(OSA, LOG_DEBUG, LOG_HIGH, 1);
#endif
#endif
set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1);;
}
......@@ -1565,7 +1570,7 @@ int main(int argc, char **argv) {
NB_INST=1;
openair_daq_vars.ue_dl_rb_alloc=0x1fff;
openair_daq_vars.target_ue_dl_mcs=20;
openair_daq_vars.target_ue_dl_mcs=16;
openair_daq_vars.ue_ul_nb_rb=6;
openair_daq_vars.target_ue_ul_mcs=6;
......
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