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 = \ ...@@ -50,7 +50,6 @@ CFLAGS = \
-Wall \ -Wall \
-DENB_MODE \ -DENB_MODE \
-DENABLE_USE_MME \ -DENABLE_USE_MME \
-DEMIT_ASN_DEBUG=1 \
-DUSER_MODE \ -DUSER_MODE \
-I./MESSAGES \ -I./MESSAGES \
-I$(OUTDIR) \ -I$(OUTDIR) \
......
#ifndef S1AP_ENB_DEFAULT_VALUES_H_ #ifndef S1AP_ENB_DEFAULT_VALUES_H_
#define 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_MCC (208)
#define ENB_MNC (34) #define ENB_MNC (92)
#define ENB_NAME "Eurecom ENB" #define ENB_NAME "Eurecom ENB"
#define ENB_NAME_FORMAT (ENB_NAME" %u") #define ENB_NAME_FORMAT (ENB_NAME" %u")
......
...@@ -103,7 +103,7 @@ endif ...@@ -103,7 +103,7 @@ endif
EXTRA_CFLAGS += -I/usr/include -I/usr/realtime/include EXTRA_CFLAGS += -I/usr/include -I/usr/realtime/include
EXTRA_CFLAGS += -I$(OPENAIR1_DIR) 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)/SCHED/Makefile.inc
include $(OPENAIR1_DIR)/PHY/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 ...@@ -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 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) { 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", 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]); 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 ...@@ -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); 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; phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors[harq_pid]=0;
} }
#endif //#endif
} }
} // ulsch in error } // ulsch in error
else { else {
......
...@@ -149,12 +149,16 @@ static void enb_config_display(void) { ...@@ -149,12 +149,16 @@ static void enb_config_display(void) {
printf( "----------------------------------------------------------------------\n"); printf( "----------------------------------------------------------------------\n");
for (i = 0; i < enb_properties.number; i++) { for (i = 0; i < enb_properties.number; i++) {
printf( "ENB CONFIG no %u:\n\n", i); printf( "ENB CONFIG no %u:\n\n", i);
printf( "\teNB name: \t%s:\n",enb_properties.properties[i]->eNB_name); 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( "\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( "\tTAC: \t%u:\n",enb_properties.properties[i]->tac);
printf( "\tMCC: \t%u:\n",enb_properties.properties[i]->mcc); printf( "\tMCC: \t%u:\n",enb_properties.properties[i]->mcc);
printf( "\tMNC: \t%u:\n",enb_properties.properties[i]->mnc); 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"); printf( "\n--------------------------------------------------------\n");
} }
} }
...@@ -233,8 +237,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -233,8 +237,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
long int tdd_config_s; long int tdd_config_s;
const char* prefix_type; const char* prefix_type;
long int eutra_band; long int eutra_band;
double downlink_frequency; long long downlink_frequency;
double uplink_frequency_offset; long long uplink_frequency_offset;
char* ipv4 = NULL; char* ipv4 = NULL;
char* ipv6 = NULL; char* ipv6 = NULL;
char* active = NULL; char* active = NULL;
...@@ -271,7 +275,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -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 defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
if( (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) { if( (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) {
if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) { if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
asn_debug = 1; asn_debug = 0;
asn1_xer_print = 0; asn1_xer_print = 0;
} else if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) { } else if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
asn_debug = 1; asn_debug = 1;
...@@ -329,6 +333,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -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_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_MOBILE_NETWORK_CODE, &mnc)
&& config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_DEFAULT_PAGING_DRX, &default_drx) && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_DEFAULT_PAGING_DRX, &default_drx)
) )
) { ) {
AssertError (0, parse_errors ++, AssertError (0, parse_errors ++,
...@@ -423,14 +428,13 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -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 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)) { if(config_setting_lookup_int64(setting_enb, ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, &downlink_frequency)) {
enb_properties.properties[enb_properties_index]->downlink_frequency = downlink_frequency; enb_properties.properties[enb_properties_index]->downlink_frequency = (unsigned int) downlink_frequency;
} else { } else {
enb_properties.properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency enb_properties.properties[enb_properties_index]->downlink_frequency = 2680000000UL; // Default downlink frequency
} }
if(config_setting_lookup_int64(setting_enb, ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, &uplink_frequency_offset)) {
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 = (unsigned int) uplink_frequency_offset;
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = uplink_frequency_offset;
} else { } else {
// Default uplink frequency offset // Default uplink frequency offset
if (enb_properties.properties[enb_properties_index]->frame_type == FDD) { if (enb_properties.properties[enb_properties_index]->frame_type == FDD) {
...@@ -439,7 +443,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) { ...@@ -439,7 +443,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP) {
enb_properties.properties[enb_properties_index]->uplink_frequency_offset = 0; enb_properties.properties[enb_properties_index]->uplink_frequency_offset = 0;
} }
} }
parse_errors += enb_check_band_frequencies(lib_config_file_name_pP, parse_errors += enb_check_band_frequencies(lib_config_file_name_pP,
enb_properties_index, enb_properties_index,
enb_properties.properties[enb_properties_index]->eutra_band, enb_properties.properties[enb_properties_index]->eutra_band,
......
...@@ -256,7 +256,7 @@ void terminate_ra_proc(module_id_t module_idP,frame_t frameP,rnti_t rnti,unsigne ...@@ -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); 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", LOG_D(MAC,"[eNB %d][RAPROC] Frame %d Received CCCH: length %d, offset %d\n",
module_idP,frameP,rx_lengths[0],payload_ptr-msg3); 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); 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", LOG_D(MAC,"[eNB %d][RAPROC] Frame %d Received CCCH: length %d, offset %d\n",
module_idP,frameP,rx_lengths[0],payload_ptr-msg3); module_idP,frameP,rx_lengths[0],payload_ptr-msg3);
...@@ -496,11 +496,15 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header, ...@@ -496,11 +496,15 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
num_ces++; num_ces++;
mac_header_ptr++; mac_header_ptr++;
if (lcid==LONG_BSR) if (lcid==LONG_BSR)
ce_len+=4; ce_len+=3;
else if (lcid==CRNTI) else if (lcid==CRNTI)
ce_len+=2; ce_len+=2;
else if ((lcid==POWER_HEADROOM) || (lcid==TRUNCATED_BSR)|| (lcid== SHORT_BSR)) else if ((lcid==POWER_HEADROOM) || (lcid==TRUNCATED_BSR)|| (lcid== SHORT_BSR))
ce_len++; ce_len++;
else {
LOG_E(MAC,"unknown CE %d \n", lcid);
exit(-1);
}
} }
} }
} }
......
...@@ -273,8 +273,8 @@ boolean_t pdcp_data_req( ...@@ -273,8 +273,8 @@ boolean_t pdcp_data_req(
#if defined(ENABLE_SECURITY) #if defined(ENABLE_SECURITY)
if ((pdcp_p->security_activated != 0) && if ((pdcp_p->security_activated != 0) &&
((pdcp_p->cipheringAlgorithm) != 0) && (((pdcp_p->cipheringAlgorithm) != 0) ||
((pdcp_p->integrityProtAlgorithm) != 0)) { ((pdcp_p->integrityProtAlgorithm) != 0))) {
if (enb_flagP == ENB_FLAG_NO) if (enb_flagP == ENB_FLAG_NO)
start_meas(&eNB_pdcp_stats[enb_mod_idP].apply_security); start_meas(&eNB_pdcp_stats[enb_mod_idP].apply_security);
...@@ -289,6 +289,13 @@ boolean_t pdcp_data_req( ...@@ -289,6 +289,13 @@ boolean_t pdcp_data_req(
else else
stop_meas(&UE_pdcp_stats[ue_mod_idP].apply_security); 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 #endif
/* Print octets of outgoing data in hexadecimal form */ /* Print octets of outgoing data in hexadecimal form */
......
...@@ -444,7 +444,7 @@ public_pdcp(pdcp_stats_t UE_pdcp_stats[NUMBER_OF_UE_MAX];) ...@@ -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];) 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_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_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];) protected_pdcp(pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][maxDRB];)
#if defined(Rel10) #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 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, ...@@ -108,12 +108,12 @@ int pdcp_apply_security(pdcp_t *pdcp_entity, rb_id_t rb_id,
/* SRBs */ /* SRBs */
uint8_t *mac_i; uint8_t *mac_i;
LOG_D(PDCP, "[OSA][RB %d] %s Applying control-plane security\n", LOG_D(PDCP, "[OSA][RB %d] %s Applying control-plane security %d \n",
rb_id, (pdcp_entity->is_ue != 0) ? "UE -> eNB" : "eNB -> UE"); rb_id, (pdcp_entity->is_ue != 0) ? "UE -> eNB" : "eNB -> UE", pdcp_entity->integrityProtAlgorithm);
encrypt_params.message = pdcp_pdu_buffer; encrypt_params.message = pdcp_pdu_buffer;
encrypt_params.blength = (pdcp_header_len + sdu_buffer_size) << 3; 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]; 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, ...@@ -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, stream_compute_integrity(pdcp_entity->integrityProtAlgorithm, &encrypt_params,
mac_i); mac_i);
encrypt_params.key = pdcp_entity->kRRCenc + 128; encrypt_params.key = pdcp_entity->kRRCenc; // + 128 // bit key
} else { } else {
LOG_D(PDCP, "[OSA][RB %d] %s Applying user-plane security\n", LOG_D(PDCP, "[OSA][RB %d] %s Applying user-plane security\n",
rb_id, (pdcp_entity->is_ue != 0) ? "UE -> eNB" : "eNB -> UE"); 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]; 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, ...@@ -170,11 +170,11 @@ int pdcp_validate_security(pdcp_t *pdcp_entity, rb_id_t rb_id,
if (rb_id < DTCH) { if (rb_id < DTCH) {
LOG_D(PDCP, "[OSA][RB %d] %s Validating control-plane security\n", LOG_D(PDCP, "[OSA][RB %d] %s Validating control-plane security\n",
rb_id, (pdcp_entity->is_ue != 0) ? "eNB -> UE" : "UE -> eNB"); 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 { } else {
LOG_D(PDCP, "[OSA][RB %d] %s Validating user-plane security\n", LOG_D(PDCP, "[OSA][RB %d] %s Validating user-plane security\n",
rb_id, (pdcp_entity->is_ue != 0) ? "eNB -> UE" : "UE -> eNB"); 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 */ /* Uncipher the block */
...@@ -184,7 +184,7 @@ int pdcp_validate_security(pdcp_t *pdcp_entity, rb_id_t rb_id, ...@@ -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 */ /* Now check the integrity of the complete PDU */
decrypt_params.message = pdcp_pdu_buffer; decrypt_params.message = pdcp_pdu_buffer;
decrypt_params.blength = sdu_buffer_size << 3; 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, if (stream_check_integrity(pdcp_entity->integrityProtAlgorithm,
&decrypt_params, &pdcp_pdu_buffer[sdu_buffer_size]) != 0) &decrypt_params, &pdcp_pdu_buffer[sdu_buffer_size]) != 0)
......
...@@ -306,7 +306,7 @@ void mac_rlc_data_ind ( ...@@ -306,7 +306,7 @@ void mac_rlc_data_ind (
rlc_mode = rlc_union_p->mode; rlc_mode = rlc_union_p->mode;
} else { } else {
rlc_mode = RLC_MODE_NONE; 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); struct mac_data_ind data_ind = mac_rlc_deserialize_tb(buffer_pP, tb_sizeP, num_tbP, crcs_pP);
switch (rlc_mode) { switch (rlc_mode) {
......
This diff is collapsed.
...@@ -32,7 +32,7 @@ Address : EURECOM, ...@@ -32,7 +32,7 @@ Address : EURECOM,
/*! \file rrc_eNB_S1AP.c /*! \file rrc_eNB_S1AP.c
* \brief rrc S1AP procedures for eNB * \brief rrc S1AP procedures for eNB
* \author Laurent Winckel * \author Laurent Winckel and Navid Nikaein
* \date 2013 * \date 2013
* \version 1.0 * \version 1.0
* \company Eurecom * \company Eurecom
...@@ -50,11 +50,16 @@ Address : EURECOM, ...@@ -50,11 +50,16 @@ Address : EURECOM,
# include "asn1_conversions.h" # include "asn1_conversions.h"
# include "intertask_interface.h" # include "intertask_interface.h"
# include "pdcp.h" # include "pdcp.h"
# include "pdcp_primitives.h"
# include "s1ap_eNB.h" # include "s1ap_eNB.h"
# else # else
# include "../../S1AP/s1ap_eNB.h" # include "../../S1AP/s1ap_eNB.h"
# endif # endif
#if defined(ENABLE_SECURITY)
# include "UTIL/OSA/osa_defs.h"
#endif
/* Value to indicate an invalid UE initial id */ /* Value to indicate an invalid UE initial id */
static const uint16_t UE_INITIAL_ID_INVALID = 0; static const uint16_t UE_INITIAL_ID_INVALID = 0;
...@@ -69,8 +74,12 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x2; ...@@ -69,8 +74,12 @@ static const uint16_t S1AP_INTEGRITY_EIA2_MASK = 0x2;
#ifdef Rel10 #ifdef Rel10
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920 # define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia0_v920
#else #else
#ifdef EXMIMO_IOT
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_eia2
#else
# define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_reserved # define INTEGRITY_ALGORITHM_NONE SecurityAlgorithmConfig__integrityProtAlgorithm_reserved
#endif #endif
#endif
# if defined(ENABLE_ITTI) # if defined(ENABLE_ITTI)
/*! \fn uint16_t get_next_ue_initial_id(uint8_t mod_id) /*! \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 ...@@ -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. *\return the selected algorithm.
*/ */
static e_SecurityAlgorithmConfig__cipheringAlgorithm rrc_eNB_select_ciphering(uint16_t algorithms) { static e_SecurityAlgorithmConfig__cipheringAlgorithm rrc_eNB_select_ciphering(uint16_t algorithms) {
if (algorithms & S1AP_ENCRYPTION_EEA2_MASK) { if (algorithms & S1AP_ENCRYPTION_EEA2_MASK) {
return SecurityAlgorithmConfig__cipheringAlgorithm_eea2; return SecurityAlgorithmConfig__cipheringAlgorithm_eea2;
} }
...@@ -193,6 +203,7 @@ static e_SecurityAlgorithmConfig__cipheringAlgorithm rrc_eNB_select_ciphering(ui ...@@ -193,6 +203,7 @@ static e_SecurityAlgorithmConfig__cipheringAlgorithm rrc_eNB_select_ciphering(ui
*\return the selected algorithm. *\return the selected algorithm.
*/ */
static e_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_integrity(uint16_t algorithms) { static e_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_integrity(uint16_t algorithms) {
if (algorithms & S1AP_INTEGRITY_EIA2_MASK) { if (algorithms & S1AP_INTEGRITY_EIA2_MASK) {
return SecurityAlgorithmConfig__integrityProtAlgorithm_eia2; return SecurityAlgorithmConfig__integrityProtAlgorithm_eia2;
} }
...@@ -234,8 +245,8 @@ static int rrc_eNB_process_security (uint8_t mod_id, uint8_t ue_index, security_ ...@@ -234,8 +245,8 @@ static int rrc_eNB_process_security (uint8_t mod_id, uint8_t ue_index, security_
changed = TRUE; changed = TRUE;
} }
LOG_I (RRC, "[eNB %d][UE %d] Selected security algorithms: %x, %x, %s", LOG_I (RRC, "[eNB %d][UE %d] Selected security algorithms (%x): %x, %x, %s\n",
mod_id, ue_index, cipheringAlgorithm, integrityProtAlgorithm, changed ? "changed" : "same"); mod_id, ue_index, security_capabilities, cipheringAlgorithm, integrityProtAlgorithm, changed ? "changed" : "same");
return changed; return changed;
} }
...@@ -259,10 +270,78 @@ static void process_eNB_security_key (uint8_t mod_id, uint8_t ue_index, uint8_t ...@@ -259,10 +270,78 @@ static void process_eNB_security_key (uint8_t mod_id, uint8_t ue_index, uint8_t
} }
ascii_buffer[2 * i] = '\0'; 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 #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
}
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
void rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(uint8_t mod_id, uint8_t ue_index) { void rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(uint8_t mod_id, uint8_t ue_index) {
eNB_RRC_UE_INFO *UE_info = &eNB_rrc_inst[mod_id].Info.UE[ue_index]; eNB_RRC_UE_INFO *UE_info = &eNB_rrc_inst[mod_id].Info.UE[ue_index];
...@@ -508,11 +587,18 @@ int rrc_eNB_process_S1AP_DOWNLINK_NAS(MessageDef *msg_p, const char *msg_name, i ...@@ -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) { 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; 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) */
/* Create message for PDCP (DLInformationTransfer_t) */
length = do_DLInformationTransfer (instance, &buffer, rrc_eNB_get_next_transaction_identifier (instance), 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.length,
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer); 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 */ /* Transfer data to PDCP */
pdcp_rrc_data_req (instance, ue_index, 0 /* TODO put frame number ! */, 1, DCCH, *rrc_eNB_mui++, 0, pdcp_rrc_data_req (instance, ue_index, 0 /* TODO put frame number ! */, 1, DCCH, *rrc_eNB_mui++, 0,
length, buffer, 1); length, buffer, 1);
...@@ -590,15 +676,22 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char ...@@ -590,15 +676,22 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
process_eNB_security_key (instance, ue_index, S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_key); process_eNB_security_key (instance, ue_index, S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_key);
{ {
uint8_t send_security_mode_command = TRUE; uint8_t send_security_mode_command = TRUE;
if ((eNB_rrc_inst[instance].ciphering_algorithm[ue_index] == SecurityAlgorithmConfig__cipheringAlgorithm_eea0) #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)) { && (eNB_rrc_inst[instance].integrity_algorithm[ue_index] == INTEGRITY_ALGORITHM_NONE)) {
send_security_mode_command = FALSE; send_security_mode_command = FALSE;
} }
#endif
rrc_pdcp_config_security(instance, ue_index,send_security_mode_command);
if (send_security_mode_command) { if (send_security_mode_command) {
rrc_eNB_generate_SecurityModeCommand (instance, 0 /* TODO put frame number ! */, ue_index);
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 { else {
rrc_eNB_generate_UECapabilityEnquiry (instance, 0 /* TODO put frame number ! */, ue_index); rrc_eNB_generate_UECapabilityEnquiry (instance, 0 /* TODO put frame number ! */, ue_index);
......
...@@ -153,7 +153,7 @@ int logInit (void) ...@@ -153,7 +153,7 @@ int logInit (void)
g_log->log_component[RRC].flag = LOG_MED; g_log->log_component[RRC].flag = LOG_MED;
g_log->log_component[RRC].interval = 1; g_log->log_component[RRC].interval = 1;
g_log->log_component[RRC].fd = 0; 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[RRC].filelog_name = "/tmp/rrc.log";
g_log->log_component[NAS].name = "NAS"; g_log->log_component[NAS].name = "NAS";
...@@ -627,10 +627,12 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, ...@@ -627,10 +627,12 @@ void logRecord_mt(const char *file, const char *func, int line, int comp,
// do not apply filtering for LOG_F // 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 // 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 > c->level) ||
(level > g_log->level) || (level > g_log->level) ||
( c->level > g_log->level))) { ( c->level > g_log->level))) {
*/
return; return;
} }
......
...@@ -61,7 +61,7 @@ int stream_compute_integrity_eia2(stream_cipher_t *stream_cipher, uint8_t out[4] ...@@ -61,7 +61,7 @@ int stream_compute_integrity_eia2(stream_cipher_t *stream_cipher, uint8_t out[4]
stream_cipher->blength, zero_bit); stream_cipher->blength, zero_bit);
for (i = 0; i < sizeof(m); i++) for (i = 0; i < sizeof(m); i++)
index += sprintf(&payload[index], "0x%02x ", 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 #endif
...@@ -86,7 +86,8 @@ int stream_compute_integrity(uint8_t algorithm, stream_cipher_t *stream_cipher, ...@@ -86,7 +86,8 @@ 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"); LOG_E(OSA, "SNOW-3G algorithms are currently not implemented for integrity\n");
return -1; return -1;
} else if (algorithm == EIA2_128_ALG_ID) { } else if (algorithm == EIA2_128_ALG_ID) {
return stream_compute_integrity_eia2(stream_cipher, out); 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); LOG_E(OSA, "Provided integrity algorithm is currently not supported = %u\n", algorithm);
return -1; return -1;
......
...@@ -67,7 +67,8 @@ LIBS += $(UDP_OBJ_DIR)/libudp.a $(GTPV1U_OBJ_DIR)/libgtpv1u.a ...@@ -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 #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 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 ) openair_cn_available = $(shell if [ -d "$(UE_NAS_DIR)" ]; then echo "0" ; else echo "1" ; fi )
ifeq ($(openair_cn_available), 0) ifeq ($(openair_cn_available), 0)
...@@ -198,4 +199,4 @@ common-cleanall: ...@@ -198,4 +199,4 @@ common-cleanall:
@if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB cleanall OUTDIR=$(SCTP_OBJ_DIR); fi @if [ -d $(SCTP_OBJ_DIR) ]; then $(MAKE) -C $(SCTP_DIR) -f Makefile.eNB cleanall OUTDIR=$(SCTP_OBJ_DIR); fi
@if [ -d $(UDP_OBJ_DIR) ]; then $(MAKE) -C $(UDP_DIR) -f Makefile.eNB cleanall OUTDIR=$(UDP_OBJ_DIR); fi @if [ -d $(UDP_OBJ_DIR) ]; then $(MAKE) -C $(UDP_DIR) -f Makefile.eNB cleanall OUTDIR=$(UDP_OBJ_DIR); fi
@if [ -d $(GTPV1U_OBJ_DIR) ]; then $(MAKE) -C $(GTPV1U_DIR) -f Makefile.eNB cleanall OUTDIR=$(GTPV1U_OBJ_DIR); fi @if [ -d $(GTPV1U_OBJ_DIR) ]; then $(MAKE) -C $(GTPV1U_DIR) -f Makefile.eNB cleanall OUTDIR=$(GTPV1U_OBJ_DIR); fi
\ No newline at end of file
//Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3");
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs = eNBs =
( (
...@@ -23,102 +24,28 @@ eNBs = ...@@ -23,102 +24,28 @@ eNBs =
default_paging_drx = "PAGING_DRX_256"; default_paging_drx = "PAGING_DRX_256";
////////// Physical parameters: ////////// Physical parameters:
frame_type = "FDD"; frame_type = "FDD";
prefix_type = "NORMAL"; prefix_type = "NORMAL";
downlink_frequency = 2680000000; eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.13.11"; mme_ip_address = ( { ipv4 = "192.168.13.11";
ipv6 = "2192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; 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: NETWORK_INTERFACES :
// Default Paging DRX of the eNB as defined in TS 36.304 {
default_paging_drx = "PAGING_DRX_256"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
////////// Physical parameters:
frame_type = "FDD"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
prefix_type = "NORMAL"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
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";
}
);
},
{
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";
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";
}
);
} }
); );
...@@ -3,9 +3,6 @@ Active_eNBs = ( "eNB_Eurecom_0"); ...@@ -3,9 +3,6 @@ Active_eNBs = ( "eNB_Eurecom_0");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
eNBs = eNBs =
( (
{ {
......
Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3"); //Active_eNBs = ( "eNB_Eurecom_0", "eNB_Eurecom_1", "eNB_Eurecom_2", "eNB_Eurecom_3");
//Active_eNBs = ( "eNB_Eurecom_0"); Active_eNBs = ( "eNB_Eurecom_0");
eNBs = eNBs =
( (
...@@ -12,11 +12,11 @@ eNBs = ...@@ -12,11 +12,11 @@ eNBs =
eNB_name = "eNB_Eurecom_0"; eNB_name = "eNB_Eurecom_0";
// Tracking area code, 0x0000 and 0xfffe are reserved values // 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: ////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304 // Default Paging DRX of the eNB as defined in TS 36.304
...@@ -48,12 +48,12 @@ eNBs = ...@@ -48,12 +48,12 @@ eNBs =
eNB_name = "eNB_Eurecom_1"; eNB_name = "eNB_Eurecom_1";
// Tracking area code, 0x0000 and 0xfffe are reserved values // 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: ////////// Channel parameters:
// Default Paging DRX of the eNB as defined in TS 36.304 // Default Paging DRX of the eNB as defined in TS 36.304
...@@ -85,12 +85,11 @@ eNBs = ...@@ -85,12 +85,11 @@ eNBs =
eNB_name = "eNB_Eurecom_2"; eNB_name = "eNB_Eurecom_2";
// Tracking area code, 0x0000 and 0xfffe are reserved values // 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 of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256"; default_paging_drx = "PAGING_DRX_256";
...@@ -108,12 +107,11 @@ eNBs = ...@@ -108,12 +107,11 @@ eNBs =
eNB_name = "eNB_Eurecom_3"; eNB_name = "eNB_Eurecom_3";
// Tracking area code, 0x0000 and 0xfffe are reserved values // 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 of the eNB as defined in TS 36.304
default_paging_drx = "PAGING_DRX_256"; default_paging_drx = "PAGING_DRX_256";
......
Active_eNBs = ( "eNB_Eurecom_0"); Active_eNBs = ( "eNB_Eurecom_0");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs = eNBs =
( (
{ {
...@@ -42,6 +43,16 @@ eNBs = ...@@ -42,6 +43,16 @@ eNBs =
preference = "ipv4"; 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: ////////// Identification parameters:
...@@ -79,6 +90,14 @@ eNBs = ...@@ -79,6 +90,14 @@ eNBs =
preference = "ipv4"; 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: ////////// Identification parameters:
...@@ -116,6 +135,14 @@ eNBs = ...@@ -116,6 +135,14 @@ eNBs =
preference = "ipv4"; 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: ////////// Identification parameters:
...@@ -142,5 +169,14 @@ eNBs = ...@@ -142,5 +169,14 @@ eNBs =
active = "yes"; active = "yes";
preference = "ipv4"; 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 @@ ...@@ -95,7 +95,7 @@
# Parameters # Parameters
########################################################### ###########################################################
declare EMULATION_DEV_INTERFACE="eth2" 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)) THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
########################################################### ###########################################################
# Parameters # 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 MAKE_IP_DRIVER_TARGET="ue_ip.ko"
declare IP_DRIVER_NAME="ue_ip" declare IP_DRIVER_NAME="ue_ip"
declare LTEIF="oip1" declare LTEIF="oip1"
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
# Parameters # Parameters
########################################################### ###########################################################
declare -x EMULATION_DEV_INTERFACE="eth1" 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 MAKE_IP_DRIVER_TARGET="ue_ip.ko"
declare IP_DRIVER_NAME="ue_ip" declare IP_DRIVER_NAME="ue_ip"
declare LTEIF="oip1" declare LTEIF="oip1"
......
...@@ -201,7 +201,7 @@ static char UE_flag=0; ...@@ -201,7 +201,7 @@ static char UE_flag=0;
static uint8_t eNB_id=0,UE_id=0; static uint8_t eNB_id=0,UE_id=0;
uint32_t carrier_freq[4] = {1907600000,1907600000,1907600000,1907600000}; /* For UE! */ uint32_t carrier_freq[4] = {1907600000,1907600000,1907600000,1907600000}; /* For UE! */
static uint32_t downlink_frequency[4] = {1907600000,1907600000,1907600000,1907600000}; static uint32_t downlink_frequency[4] = {1907600000,1907600000,1907600000,1907600000};
static int32_t uplink_frequency_offset[4]= {-120000000,-120000000,-120000000,-120000000}; static int32_t uplink_frequency_offset[4]= {-120000000,-120000000,-120000000,-120000000};
static char *conf_config_file_name = NULL; static char *conf_config_file_name = NULL;
...@@ -569,6 +569,7 @@ void *l2l1_task(void *arg) ...@@ -569,6 +569,7 @@ void *l2l1_task(void *arg)
switch (ITTI_MSG_ID(message_p)) { switch (ITTI_MSG_ID(message_p)) {
case INITIALIZE_MESSAGE: case INITIALIZE_MESSAGE:
/* Start eNB thread */ /* Start eNB thread */
LOG_D(EMU, "L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p));
start_eNB = 1; start_eNB = 1;
break; break;
...@@ -1281,6 +1282,7 @@ static void get_options (int argc, char **argv) ...@@ -1281,6 +1282,7 @@ static void get_options (int argc, char **argv)
frame_parms->tdd_config_S = enb_properties->properties[0]->tdd_config_s; frame_parms->tdd_config_S = enb_properties->properties[0]->tdd_config_s;
for (i = 0 ; i < (sizeof(downlink_frequency) / sizeof (downlink_frequency[0])); i++) { for (i = 0 ; i < (sizeof(downlink_frequency) / sizeof (downlink_frequency[0])); i++) {
downlink_frequency[i] = enb_properties->properties[0]->downlink_frequency; 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; uplink_frequency_offset[i] = enb_properties->properties[0]->uplink_frequency_offset;
} }
} }
...@@ -1367,15 +1369,18 @@ int main(int argc, char **argv) { ...@@ -1367,15 +1369,18 @@ int main(int argc, char **argv) {
#endif #endif
set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1); set_comp_log(MAC, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RLC, 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(OTG, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1); set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
set_comp_log(EMU, LOG_INFO, LOG_MED, 1); set_comp_log(EMU, LOG_INFO, LOG_MED, 1);
# if defined(ENABLE_USE_MME) # 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); set_comp_log(SCTP, LOG_INFO, LOG_HIGH, 1);
# endif # endif
#if defined(ENABLE_SECURITY)
set_comp_log(OSA, LOG_DEBUG, LOG_HIGH, 1);
#endif
#endif #endif
set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1);; set_comp_log(ENB_APP, LOG_INFO, LOG_HIGH, 1);;
} }
...@@ -1565,7 +1570,7 @@ int main(int argc, char **argv) { ...@@ -1565,7 +1570,7 @@ int main(int argc, char **argv) {
NB_INST=1; NB_INST=1;
openair_daq_vars.ue_dl_rb_alloc=0x1fff; 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.ue_ul_nb_rb=6;
openair_daq_vars.target_ue_ul_mcs=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