Commit 729a92e3 authored by matzakos's avatar matzakos

Minor modifications

parent 61276d87
...@@ -60,10 +60,10 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e ...@@ -60,10 +60,10 @@ void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char e
if (first_sync == 1 && !(mme_enabled == 1)) { if (first_sync == 1 && !(mme_enabled == 1)) {
//layer2_init_UE(module_idP); //layer2_init_UE(module_idP);
LOG_D(MAC, "Panos-D: dl_phy_sync_success 1 \n"); LOG_I(MAC, "Panos-D: dl_phy_sync_success 1 \n");
openair_rrc_ue_init(module_idP, eNB_index); openair_rrc_ue_init(module_idP, eNB_index);
} else { } else {
LOG_D(MAC, "Panos-D: dl_phy_sync_success 2 \n"); LOG_I(MAC, "Panos-D: dl_phy_sync_success 2 \n");
rrc_in_sync_ind(module_idP, frameP, eNB_index); rrc_in_sync_ind(module_idP, frameP, eNB_index);
} }
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
extern int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind); extern int oai_nfapi_crc_indication(nfapi_crc_indication_t *crc_ind);
extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind); extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind); extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
//extern static int rrc_set_state (module_id_t ue_mod_idP, Rrc_State_t state);
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port); void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
...@@ -87,6 +88,7 @@ void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND ...@@ -87,6 +88,7 @@ void fill_rx_indication_UE_MAC(module_id_t Mod_id,int frame,int subframe, UL_IND
void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint16_t rnti) { void fill_sr_indication_UE_MAC(int Mod_id,int frame,int subframe, UL_IND_t *UL_INFO, uint16_t rnti) {
LOG_I(MAC, "fill_sr_indication_UE_MAC() for Mod_Id: %d \n", Mod_id);
pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex); pthread_mutex_lock(&UE_mac_inst[Mod_id].UL_INFO_mutex);
...@@ -650,10 +652,12 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id) //, ...@@ -650,10 +652,12 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id) //,
} }
else if (dl_config_pdu_list[i].dci_dl_pdu.dci_dl_pdu_rel8.rnti_type == 2) { else if (dl_config_pdu_list[i].dci_dl_pdu.dci_dl_pdu_rel8.rnti_type == 2) {
dl_config_pdu_tmp = &dl_config_pdu_list[i+1]; dl_config_pdu_tmp = &dl_config_pdu_list[i+1];
//LOG_I(MAC, "Panos-D: Before decoding SIB1 1\n \n");
if(dl_config_pdu_tmp->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE && dl_config_pdu_list[i].dci_dl_pdu.dci_dl_pdu_rel8.rnti == 0xFFFF && UE_mac_inst[Mod_id].UE_mode[0] != NOT_SYNCHED){ //&& UE_mac_inst[Mod_id].UE_mode[0] != NOT_SYNCHED if(dl_config_pdu_tmp->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE && dl_config_pdu_list[i].dci_dl_pdu.dci_dl_pdu_rel8.rnti == 0xFFFF && UE_mac_inst[Mod_id].UE_mode[0] != NOT_SYNCHED){ //&& UE_mac_inst[Mod_id].UE_mode[0] != NOT_SYNCHED
if(dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index <= tx_req_num_elems -1){ if(dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index <= tx_req_num_elems -1){
//if(tx_request_pdu_list + dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index!= NULL){ //if(tx_request_pdu_list + dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index!= NULL){
//LOG_I(MAC, "Panos-D: Before decoding SIB1 2\n \n");
ue_decode_si(Mod_id, 0, sfn, 0, ue_decode_si(Mod_id, 0, sfn, 0,
tx_request_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data, tx_request_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_data,
tx_request_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_length); tx_request_pdu_list[dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index].segments[0].segment_length);
...@@ -717,12 +721,13 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id) //, ...@@ -717,12 +721,13 @@ int dl_config_req_UE_MAC(nfapi_dl_config_request_t* req, module_id_t Mod_id) //,
// for our case. // for our case.
//LOG_E(MAC,"dl_config_req_UE_MAC 4 Received MIB: sfn/sf: %d.%d \n", sfn, sf); //LOG_E(MAC,"dl_config_req_UE_MAC 4 Received MIB: sfn/sf: %d.%d \n", sfn, sf);
if(UE_mac_inst[Mod_id].UE_mode[0] == NOT_SYNCHED){ if(UE_mac_inst[Mod_id].UE_mode[0] == NOT_SYNCHED){
//rrc_set_state(Mod_id, RRC_STATE_IDLE);
dl_phy_sync_success(Mod_id,sfn,0, 1); dl_phy_sync_success(Mod_id,sfn,0, 1);
LOG_E(MAC,"dl_config_req_UE_MAC 5 Received MIB: UE_mode: %d, sfn/sf: %d.%d\n", UE_mac_inst[Mod_id].UE_mode[0], sfn, sf); LOG_E(MAC,"dl_config_req_UE_MAC 5 Received MIB: UE_mode: %d, sfn/sf: %d.%d\n", UE_mac_inst[Mod_id].UE_mode[0], sfn, sf);
UE_mac_inst[Mod_id].UE_mode[0]=PRACH; UE_mac_inst[Mod_id].UE_mode[0]=PRACH;
} }
else //else
dl_phy_sync_success(Mod_id,sfn,0, 0); //dl_phy_sync_success(Mod_id,sfn,0, 0);
} }
......
...@@ -159,6 +159,7 @@ mac_rrc_data_ind_ue( ...@@ -159,6 +159,7 @@ mac_rrc_data_ind_ue(
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
//LOG_I(RRC, "Panos-D: In mac_rrc_data_ind_ue() ITTI \n \n");
MessageDef *message_p; MessageDef *message_p;
int msg_sdu_size = sizeof(RRC_MAC_BCCH_DATA_IND (message_p).sdu); int msg_sdu_size = sizeof(RRC_MAC_BCCH_DATA_IND (message_p).sdu);
...@@ -182,6 +183,7 @@ mac_rrc_data_ind_ue( ...@@ -182,6 +183,7 @@ mac_rrc_data_ind_ue(
itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p); itti_send_msg_to_task (TASK_RRC_UE, ctxt.instance, message_p);
} }
#else #else
//LOG_I(RRC, "Panos-D: In mac_rrc_data_ind_ue() outside ITTI \n \n");
decode_BCCH_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t*)sduP,sdu_lenP, 0, 0); decode_BCCH_DLSCH_Message(&ctxt,eNB_indexP,(uint8_t*)sduP,sdu_lenP, 0, 0);
#endif #endif
} }
...@@ -396,6 +398,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) ...@@ -396,6 +398,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
LOG_I(RRC, "Panos-D: rrc_in_sync_ind 0 \n");
MessageDef *message_p; MessageDef *message_p;
//LOG_I(RRC,"sending a message to task_mac_ue\n"); //LOG_I(RRC,"sending a message to task_mac_ue\n");
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_IN_SYNC_IND); message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_IN_SYNC_IND);
...@@ -406,9 +409,8 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index) ...@@ -406,9 +409,8 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
} }
#else #else
UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0; UE_rrc_inst[Mod_idP].Info[eNB_index].N310_cnt=0;
if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) {
LOG_I(RRC, "Panos-D: rrc_in_sync_ind 1 \n"); LOG_I(RRC, "Panos-D: rrc_in_sync_ind 1 \n");
if (UE_rrc_inst[Mod_idP].Info[eNB_index].T310_active==1) {
UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++; UE_rrc_inst[Mod_idP].Info[eNB_index].N311_cnt++;
} }
......
...@@ -103,6 +103,8 @@ extern UE_MAC_INST *UE_mac_inst; ...@@ -103,6 +103,8 @@ extern UE_MAC_INST *UE_mac_inst;
extern void *bigphys_malloc(int); extern void *bigphys_malloc(int);
#endif #endif
extern uint8_t nfapi_mode;
//#define XER_PRINT //#define XER_PRINT
//extern int8_t dB_fixed2(uint32_t x,uint32_t y); //extern int8_t dB_fixed2(uint32_t x,uint32_t y);
...@@ -2988,6 +2990,11 @@ int decode_BCCH_DLSCH_Message( ...@@ -2988,6 +2990,11 @@ int decode_BCCH_DLSCH_Message(
return 0; return 0;
} }
// Temporary better solution should be found for nfapi_mode=3
if(UE_rrc_inst[ctxt_pP->module_id].RrcState == RRC_STATE_INACTIVE && nfapi_mode==3)
UE_rrc_inst[ctxt_pP->module_id].RrcState = RRC_STATE_IDLE;
//LOG_I(RRC, "decode_BCCH_DLSCH_Message before calling rrc_set_sub_state() \n");
rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_RECEIVING_SIB ); rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_RECEIVING_SIB );
asn_dec_rval_t dec_rval = uper_decode_complete( NULL, asn_dec_rval_t dec_rval = uper_decode_complete( NULL,
...@@ -4778,10 +4785,12 @@ void *rrc_ue_task( void *args_p ) ...@@ -4778,10 +4785,12 @@ void *rrc_ue_task( void *args_p )
if (UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].T310_active == 1) { if (UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].T310_active == 1) {
UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].N311_cnt++; UE_rrc_inst[ue_mod_id].Info[RRC_MAC_IN_SYNC_IND (msg_p).enb_index].N311_cnt++;
} }
//LOG_I(RRC, "In rrc_ue_task() received RRC_MAC_IN_SYNC_IND message through ITTI, UE RRC state: %d \n", rrc_get_state(ue_mod_id));
break; break;
case RRC_MAC_OUT_OF_SYNC_IND: case RRC_MAC_OUT_OF_SYNC_IND:
//LOG_I(RRC, "In rrc_ue_task() received RRC_MAC_OUT_OF_SYNC_IND message through ITTI, UE RRC state: %d \n", rrc_get_state(ue_mod_id));
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_OUT_OF_SYNC_IND (msg_p).frame, RRC_MAC_OUT_OF_SYNC_IND (msg_p).enb_index); RRC_MAC_OUT_OF_SYNC_IND (msg_p).frame, RRC_MAC_OUT_OF_SYNC_IND (msg_p).enb_index);
...@@ -4789,6 +4798,7 @@ void *rrc_ue_task( void *args_p ) ...@@ -4789,6 +4798,7 @@ void *rrc_ue_task( void *args_p )
break; break;
case RRC_MAC_BCCH_DATA_IND: case RRC_MAC_BCCH_DATA_IND:
//LOG_I(RRC, "In rrc_ue_task() received RRC_MAC_BCCH_DATA_IND message through ITTI, UE RRC state: %d \n", rrc_get_state(ue_mod_id));
LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name, LOG_D(RRC, "[UE %d] Received %s: frameP %d, eNB %d\n", ue_mod_id, msg_name,
RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index); RRC_MAC_BCCH_DATA_IND (msg_p).frame, RRC_MAC_BCCH_DATA_IND (msg_p).enb_index);
...@@ -4910,7 +4920,7 @@ void *rrc_ue_task( void *args_p ) ...@@ -4910,7 +4920,7 @@ void *rrc_ue_task( void *args_p )
/* NAS messages */ /* NAS messages */
case NAS_CELL_SELECTION_REQ: case NAS_CELL_SELECTION_REQ:
LOG_D(RRC, "[UE %d] Received %s: state %d, plmnID (%d%d%d.%d%d%d), rat %x\n", ue_mod_id, msg_name, rrc_get_state(ue_mod_id), LOG_I(RRC, "[UE %d] Received %s: state %d, plmnID (%d%d%d.%d%d%d), rat %x\n", ue_mod_id, msg_name, rrc_get_state(ue_mod_id),
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit1, NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit1,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit2, NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit2,
NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit3, NAS_CELL_SELECTION_REQ (msg_p).plmnID.MCCdigit3,
...@@ -4921,6 +4931,7 @@ void *rrc_ue_task( void *args_p ) ...@@ -4921,6 +4931,7 @@ void *rrc_ue_task( void *args_p )
if (rrc_get_state(ue_mod_id) == RRC_STATE_INACTIVE) { if (rrc_get_state(ue_mod_id) == RRC_STATE_INACTIVE) {
// have a look at MAC/main.c void dl_phy_sync_success(...) // have a look at MAC/main.c void dl_phy_sync_success(...)
LOG_I(RRC, "rrc_ue_task() in RRC_STATE_INACTIVE before openair_rrc_ue_init() \n");
openair_rrc_ue_init(ue_mod_id,0); openair_rrc_ue_init(ue_mod_id,0);
} }
...@@ -4941,6 +4952,7 @@ void *rrc_ue_task( void *args_p ) ...@@ -4941,6 +4952,7 @@ void *rrc_ue_task( void *args_p )
switch (rrc_get_state(ue_mod_id)) { switch (rrc_get_state(ue_mod_id)) {
case RRC_STATE_INACTIVE: { case RRC_STATE_INACTIVE: {
LOG_I(RRC, "Panos-D: rrc_ue_task() RRC state: RRC_STATE_INACTIVE \n");
/* Need to first activate lower layers */ /* Need to first activate lower layers */
MessageDef *message_p; MessageDef *message_p;
...@@ -4953,6 +4965,7 @@ void *rrc_ue_task( void *args_p ) ...@@ -4953,6 +4965,7 @@ void *rrc_ue_task( void *args_p )
} }
case RRC_STATE_IDLE: { case RRC_STATE_IDLE: {
LOG_I(RRC, "Panos-D: rrc_ue_task() RRC state: RRC_STATE_IDLE \n");
/* Ask to layer 1 to find a cell matching the criterion */ /* Ask to layer 1 to find a cell matching the criterion */
MessageDef *message_p; MessageDef *message_p;
......
...@@ -17,8 +17,8 @@ eNBs = ...@@ -17,8 +17,8 @@ eNBs =
mobile_country_code = "208"; mobile_country_code = "208";
#mobile_network_code = "93"; mobile_network_code = "93";
mobile_network_code = "92"; #mobile_network_code = "92";
tr_s_preference = "local_mac" tr_s_preference = "local_mac"
...@@ -177,7 +177,8 @@ eNBs = ...@@ -177,7 +177,8 @@ eNBs =
////////// MME parameters: ////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.1.78"; mme_ip_address = ( { ipv4 = "192.168.12.62";
#ipv4 = "192.168.1.78";
ipv6 = "192:168:30::17"; ipv6 = "192:168:30::17";
active = "yes"; active = "yes";
preference = "ipv4"; preference = "ipv4";
...@@ -186,11 +187,13 @@ eNBs = ...@@ -186,11 +187,13 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
#ENB_INTERFACE_NAME_FOR_S1_MME = "eno1";
#ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.1.28/24";
ENB_INTERFACE_NAME_FOR_S1_MME = "eno1"; ENB_INTERFACE_NAME_FOR_S1_MME = "enp0s31f6";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.1.28/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.188/24";
ENB_INTERFACE_NAME_FOR_S1U = "eno1"; ENB_INTERFACE_NAME_FOR_S1U = "enp0s31f6";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.1.28/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.188/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
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