Commit cb0d7c3d authored by Xue Song's avatar Xue Song

modify F1 Setup Request

parent f09c6fbd
......@@ -383,7 +383,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 setup response\n");
return -1;
}
......@@ -469,7 +469,7 @@ int CU_send_F1_SETUP_FAILURE(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 setup failure\n");
return -1;
}
......@@ -876,7 +876,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, module_id_t du_mod_
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 gNB-CU CONFIGURATION UPDATE\n");
return -1;
}
......
......@@ -303,7 +303,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 DL RRC MESSAGE TRANSFER \n");
return -1;
}
......
......@@ -72,10 +72,10 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_ipv4_address = RC.rrc[instance]->eth_params_s.my_addr,
.local_port = RC.rrc[instance]->eth_params_s.my_portd,
.remote_ipv4_address = RC.rrc[instance]->eth_params_s.remote_addr,
.remote_port = RC.rrc[instance]->eth_params_s.remote_portd
.local_ipv4_address = RC.nrrrc[instance]->eth_params_s.my_addr,
.local_port = RC.nrrrc[instance]->eth_params_s.my_portd,
.remote_ipv4_address = RC.nrrrc[instance]->eth_params_s.remote_addr,
.remote_port = RC.nrrrc[instance]->eth_params_s.remote_portd
};
AssertFatal(proto_agent_start(instance, &params) == 0,
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
......
......@@ -750,7 +750,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 UE CONTEXT SETUP REQUEST\n");
return -1;
}
......@@ -1505,7 +1505,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 UE CONTEXT_MODIFICATION REQUEST\n");
return -1;
}
......
......@@ -1021,7 +1021,7 @@ int DU_send_gNB_DU_CONFIGURATION_UPDATE(instance_t instance,
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 gNB-DU CONFIGURATION UPDATE\n");
return -1;
}
......
......@@ -771,7 +771,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 UL RRC MESSAGE TRANSFER\n");
return -1;
}
......@@ -868,7 +868,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 INITIAL UL RRC MESSAGE TRANSFER\n");
return -1;
}
......
......@@ -103,10 +103,10 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_ipv4_address = RC.mac[instance]->eth_params_n.my_addr,
.local_port = RC.mac[instance]->eth_params_n.my_portd,
.remote_ipv4_address = RC.mac[instance]->eth_params_n.remote_addr,
.remote_port = RC.mac[instance]->eth_params_n.remote_portd
.local_ipv4_address = RC.nrmac[instance]->eth_params_n.my_addr,
.local_port = RC.nrmac[instance]->eth_params_n.my_portd,
.remote_ipv4_address = RC.nrmac[instance]->eth_params_n.remote_addr,
.remote_port = RC.nrmac[instance]->eth_params_n.remote_portd
};
AssertFatal(proto_agent_start(instance, &params) == 0,
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
......
......@@ -521,7 +521,7 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 UE CONTEXT SETUP RESPONSE\n");
return -1;
}
......@@ -1191,7 +1191,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance) {
/* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 setup request\n");
LOG_E(F1AP, "Failed to encode F1 UE CONTEXT MODIFICATION RESPONSE\n");
return -1;
}
......
......@@ -84,7 +84,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
// configure F1AP here for F1C
LOG_I(GNB_APP,"ngran_gNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
msg_p = itti_alloc_new_message (TASK_GNB_APP, F1AP_SETUP_REQ);
RCconfig_DU_F1(msg_p, gnb_id);
RCconfig_NR_DU_F1(msg_p, gnb_id);
LOG_I(GNB_APP,"[gNB %d] gNB_app_register via F1AP for instance %d\n", gnb_id, GNB_MODULE_ID_TO_INSTANCE(gnb_id));
itti_send_msg_to_task (TASK_DU_F1, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
......@@ -200,7 +200,7 @@ void *gNB_app_task(void *args_p)
// configure F1AP here for F1C
LOG_I(GNB_APP,"ngran_gNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
msg_p = itti_alloc_new_message (TASK_GNB_APP, F1AP_SETUP_REQ);
RCconfig_DU_F1(msg_p, gnb_id);
RCconfig_NR_DU_F1(msg_p, gnb_id);
itti_send_msg_to_task (TASK_DU_F1, GNB_MODULE_ID_TO_INSTANCE(gnb_id), msg_p);
}
......
......@@ -1353,11 +1353,41 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i) {
// rrc->configuration.mnc[0] = F1AP_SETUP_REQ (msg_p).mnc[k];
// rrc->configuration.tac = F1AP_SETUP_REQ (msg_p).tac[k];
rrc->nr_cellid = F1AP_SETUP_REQ (msg_p).nr_cellid[k];
// F1AP_SETUP_REQ (msg_p).nr_pci[k] = rrc->carrier.physCellId;
F1AP_SETUP_REQ (msg_p).nr_pci[k] = 0;
F1AP_SETUP_REQ (msg_p).num_ssi[k] = 0;
LOG_I(GNB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k);
F1AP_SETUP_REQ (msg_p).fdd_flag = 0;
if (0) {
LOG_I(GNB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k);
F1AP_SETUP_REQ (msg_p).fdd_flag = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_arfcn = 26200UL;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.scs = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nrb = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_band[0] = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0;
} else {
// for test
LOG_I(GNB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k);
F1AP_SETUP_REQ (msg_p).fdd_flag = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn = 26200UL;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_arfcn = 26200UL;
// For LTE use scs field to carry prefix type and number of antennas
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_scs = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_scs = 0;
// use nrb field to hold LTE N_RB_DL (0...5)
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = 3;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = 3;
// RK: we need to check there value for FDD's frequency_bands DL/UL
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_band[0] = 7;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_band[0] = 7;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_num_sul_frequency_bands = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_sul_band[0] = 7;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_num_sul_frequency_bands = 0;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_sul_band[0] = 7;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0;
}
F1AP_SETUP_REQ (msg_p).measurement_timing_information[k] = "0";
F1AP_SETUP_REQ (msg_p).ranac[k] = 0;
......
......@@ -30,6 +30,8 @@
#define PROTO_AGENT_H_
#include "ENB_APP/enb_config.h" // for enb properties
#include "proto_agent_common.h"
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "RRC/NR/nr_rrc_defs.h"
void *proto_agent_receive(void *args);
......
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