Add 802.21 in oaisim exe, work in progress.
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4658 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -3,7 +3,7 @@ all: oaisim naslite_netlink_ether
|
||||
userclean: clean oaisim naslite_netlink_ether
|
||||
|
||||
oaisim:
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1)
|
||||
(cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) NAS=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 Rel10=1)
|
||||
|
||||
naslite_netlink_ether:
|
||||
(cd $(OPENAIR2_DIR) && $(MAKE) naslite_netlink_ether.ko)
|
||||
|
||||
@@ -30,6 +30,7 @@ declare -x OPENAIR1_DIR=""
|
||||
declare -x OPENAIR2_DIR=""
|
||||
declare -x OPENAIR3_DIR=""
|
||||
declare -x OPENAIR_TARGETS=""
|
||||
declare -x EMULATION_DEV_INTERFACE="eth2"
|
||||
###########################################################
|
||||
|
||||
set_openair
|
||||
@@ -91,13 +92,16 @@ bash_exec "ip route flush cache"
|
||||
ip rule add fwmark 5 table lte
|
||||
ip route add default dev $LTEIF table lte
|
||||
|
||||
ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
|
||||
|
||||
|
||||
# start MIH-F
|
||||
xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone.conf &
|
||||
#xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone.conf &
|
||||
|
||||
wait_process_started odtone-mihf
|
||||
#wait_process_started odtone-mihf
|
||||
|
||||
|
||||
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l7 -u0 -M0 -p2 -g1 -D eth2 \
|
||||
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u0 -M0 -p2 -g1 -D $EMULATION_DEV_INTERFACE \
|
||||
--enb-ral-listening-port 1234\
|
||||
--enb-ral-link-id enb_lte_link\
|
||||
--enb-ral-ip-address 127.0.0.1\
|
||||
|
||||
@@ -16,6 +16,7 @@ declare -x OPENAIR1_DIR=""
|
||||
declare -x OPENAIR2_DIR=""
|
||||
declare -x OPENAIR3_DIR=""
|
||||
declare -x OPENAIR_TARGETS=""
|
||||
declare -x EMULATION_DEV_INTERFACE="eth1"
|
||||
###########################################################
|
||||
|
||||
set_openair
|
||||
@@ -78,12 +79,14 @@ ip rule add fwmark 5 table lte
|
||||
ip -4 route add default dev $LTEIF table lte
|
||||
ip -6 route add default dev $LTEIF table lte
|
||||
|
||||
ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
|
||||
|
||||
# start MIH-F
|
||||
xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone.conf &
|
||||
|
||||
wait_process_started odtone-mihf
|
||||
|
||||
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l7 -u1 -b0 -M1 -p2 -g1 -D eth2 \
|
||||
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u1 -b0 -M1 -p2 -g1 -D $EMULATION_DEV_INTERFACE \
|
||||
--ue-ral-listening-port 1234\
|
||||
--ue-ral-link-id ue_lte_link\
|
||||
--ue-ral-ip-address 127.0.0.1\
|
||||
|
||||
@@ -5,11 +5,11 @@ default: oaisim
|
||||
|
||||
include $(OPENAIR_TARGETS)/Makefile.common
|
||||
|
||||
TOP_DIR = $(OPENAIR1_DIR)
|
||||
OPENAIR1_TOP = $(OPENAIR1_DIR)
|
||||
OPENAIR2_TOP = $(OPENAIR2_DIR)
|
||||
OPENAIR3_TOP = $(OPENAIR3_DIR)
|
||||
OPENAIR3 = $(OPENAIR3_DIR)
|
||||
TOP_DIR = $(OPENAIR1_DIR)
|
||||
OPENAIR1_TOP = $(OPENAIR1_DIR)
|
||||
OPENAIR2_TOP = $(OPENAIR2_DIR)
|
||||
OPENAIR3_TOP = $(OPENAIR3_DIR)
|
||||
OPENAIR3 = $(OPENAIR3_DIR)
|
||||
|
||||
CPUFLAGS = -mmmx -msse -msse2 -msse4.1 -march=native
|
||||
# FORCE ssse3 for compilation of openair on User Mode Linux
|
||||
@@ -131,6 +131,14 @@ CFLAGS += -DRel8
|
||||
#endif
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_RAL), 1)
|
||||
CFLAGS += -DENABLE_RAL
|
||||
endif
|
||||
|
||||
ifeq ($(MIH_C_MEDIEVAL_EXTENSIONS), 1)
|
||||
CFLAGS += -DMIH_C_MEDIEVAL_EXTENSIONS
|
||||
endif
|
||||
|
||||
ifeq ($(NAS), 1)
|
||||
CFLAGS += -DNAS_NETLINK -DLINUX
|
||||
NAS_FLAG=1
|
||||
@@ -185,6 +193,7 @@ include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
|
||||
include $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/RRC/NAS/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/UTIL/Makefile.inc
|
||||
include $(OPENAIR3_DIR)/RAL-LTE/Makefile.inc
|
||||
include $(OPENAIR2_DIR)/ENB_APP/Makefile.inc
|
||||
|
||||
INCLUDES += -I$(TOP_DIR)
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#include "UTIL/OTG/otg.h"
|
||||
#include "UTIL/OTG/otg_vars.h"
|
||||
#include "oml.h"
|
||||
#ifdef ENABLE_RAL
|
||||
#include "lteRALenb.h"
|
||||
#include "lteRALue.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface_init.h"
|
||||
@@ -400,7 +404,10 @@ void oaisim_config() {
|
||||
}
|
||||
}
|
||||
// init other comps
|
||||
|
||||
#ifdef ENABLE_RAL
|
||||
mRAL_init_default_values();
|
||||
eRAL_init_default_values();
|
||||
#endif
|
||||
olg_config();
|
||||
ocg_config_emu();
|
||||
ocg_config_env();// mobility gen
|
||||
@@ -444,27 +451,30 @@ int olg_config() {
|
||||
oai_emulation.info.g_log_level,
|
||||
oai_emulation.info.g_log_verbosity,
|
||||
oai_emulation.emulation_config.log_emu.interval);
|
||||
/*
|
||||
|
||||
// if perf eval then reset the otg log level
|
||||
set_comp_log(PHY, LOG_NONE, 0x15,1);
|
||||
set_comp_log(EMU, LOG_FULL, 0x15,1);
|
||||
set_comp_log(OCG, LOG_NONE, 0x15,1);
|
||||
set_comp_log(OCM, LOG_NONE, 0x15,1);
|
||||
set_comp_log(OTG, LOG_NONE, 0x15,1);
|
||||
set_comp_log(MAC, LOG_NONE, 0x15,1);
|
||||
set_comp_log(OMG, LOG_NONE, 0x15,1);
|
||||
set_comp_log(OPT, LOG_ERR, 0x15,1); */
|
||||
/*
|
||||
set_log(OCG, LOG_DEBUG, 1);
|
||||
set_log(EMU, LOG_INFO, 20);
|
||||
set_log(MAC, LOG_DEBUG, 1);
|
||||
set_comp_log(PHY, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(EMU, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(OCG, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(OCM, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(OTG, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(MAC, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(OMG, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(OPT, LOG_EMERG, 0x15,1);
|
||||
set_comp_log(PDCP, LOG_TRACE, LOG_MED,1);
|
||||
set_comp_log(RLC, LOG_TRACE, LOG_MED,1);
|
||||
set_comp_log(RRC, LOG_TRACE, LOG_MED,1);
|
||||
|
||||
//set_log(OCG, LOG_DEBUG, 1);
|
||||
//set_log(EMU, LOG_INFO, 20);
|
||||
//set_log(MAC, LOG_DEBUG, 1);
|
||||
set_log(RLC, LOG_TRACE, 1);
|
||||
set_log(PHY, LOG_DEBUG, 1);
|
||||
//set_log(PHY, LOG_DEBUG, 1);
|
||||
set_log(PDCP, LOG_TRACE, 1);
|
||||
set_log(RRC, LOG_DEBUG, 1);
|
||||
set_log(OCM, LOG_INFO, 20);
|
||||
set_log(OTG, LOG_INFO, 1);
|
||||
set_comp_log(OCG, LOG_ERR, 0x15,1);
|
||||
//set_log(OCM, LOG_INFO, 20);
|
||||
//set_log(OTG, LOG_INFO, 1);
|
||||
/* set_comp_log(OCG, LOG_ERR, 0x15,1);
|
||||
set_comp_log(EMU, LOG_ERR, 0x15,20);
|
||||
set_comp_log(MAC, LOG_ERR, 0x15,1);
|
||||
set_comp_log(RLC, LOG_INFO, 0x15,1);
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "UTIL/OTG/otg_config.h"
|
||||
#include "UTIL/OTG/otg_tx.h"
|
||||
#include "lteRALenb.h"
|
||||
#include "lteRALue.h"
|
||||
|
||||
#include "cor_SF_sim.h"
|
||||
|
||||
@@ -74,6 +76,7 @@ Node_list ue_node_list = NULL;
|
||||
Node_list enb_node_list = NULL;
|
||||
int pdcp_period, omg_period;
|
||||
|
||||
|
||||
// time calibration for soft realtime mode
|
||||
struct timespec time_spec;
|
||||
unsigned long time_last, time_now;
|
||||
@@ -114,8 +117,22 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
char c;
|
||||
int option_index;
|
||||
static struct option long_options[] = {
|
||||
{"pdcp_period", 1, 0, 0},
|
||||
{"omg_period", 1, 0, 0},
|
||||
{"pdcp_period", 1, 0, 0},
|
||||
{"omg_period", 1, 0, 0},
|
||||
{"enb-ral-listening-port", required_argument, 0, 0},
|
||||
{"enb-ral-ip-address", required_argument, 0, 0},
|
||||
{"enb-ral-link-id", required_argument, 0, 0},
|
||||
{"enb-ral-link-address", required_argument, 0, 0},
|
||||
{"enb-mihf-remote-port", required_argument, 0, 0},
|
||||
{"enb-mihf-ip-address", required_argument, 0, 0},
|
||||
{"enb-mihf-id", required_argument, 0, 0},
|
||||
{"ue-ral-listening-port", required_argument, 0, 0},
|
||||
{"ue-ral-ip-address", required_argument, 0, 0},
|
||||
{"ue-ral-link-id", required_argument, 0, 0},
|
||||
{"ue-ral-link-address", required_argument, 0, 0},
|
||||
{"ue-mihf-remote-port", required_argument, 0, 0},
|
||||
{"ue-mihf-ip-address", required_argument, 0, 0},
|
||||
{"ue-mihf-id", required_argument, 0, 0},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
@@ -128,10 +145,80 @@ void get_simulation_options(int argc, char *argv[]) {
|
||||
printf("PDCP period is %d\n", pdcp_period);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "omg_period")) {
|
||||
if (optarg) {
|
||||
omg_period = atoi(optarg);
|
||||
printf("OMG period is %d\n", omg_period);
|
||||
}
|
||||
if (optarg) {
|
||||
omg_period = atoi(optarg);
|
||||
printf("OMG period is %d\n", omg_period);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "enb-ral-listening-port")) {
|
||||
if (optarg) {
|
||||
g_conf_enb_ral_listening_port = strdup(optarg);
|
||||
printf("eNB RAL listening port is %s\n", g_conf_enb_ral_listening_port);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "enb-ral-ip-address")) {
|
||||
if (optarg) {
|
||||
g_conf_enb_ral_ip_address = strdup(optarg);
|
||||
printf("eNB RAL IP address is %s\n", g_conf_enb_ral_ip_address);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "enb-ral-link-address")) {
|
||||
if (optarg) {
|
||||
g_conf_enb_ral_link_address = strdup(optarg);
|
||||
printf("eNB RAL link address is %s\n", g_conf_enb_ral_link_address);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "enb-mihf-remote-port")) {
|
||||
if (optarg) {
|
||||
g_conf_enb_mihf_remote_port = strdup(optarg);
|
||||
printf("eNB MIH-F remote port is %s\n", g_conf_enb_mihf_remote_port);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "enb-mihf-ip-address")) {
|
||||
if (optarg) {
|
||||
g_conf_enb_mihf_ip_address = strdup(optarg);
|
||||
printf("eNB MIH-F IP address is %s\n", g_conf_enb_mihf_ip_address);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "enb-ral-link-id")) {
|
||||
if (optarg) {
|
||||
g_conf_enb_ral_link_id = strdup(optarg);
|
||||
printf("eNB RAL link id is %s\n", g_conf_enb_ral_link_id);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "enb-mihf-id")) {
|
||||
if (optarg) {
|
||||
g_conf_enb_mihf_id = strdup(optarg);
|
||||
printf("eNB MIH-F id is %s\n", g_conf_enb_mihf_id);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "ue-ral-listening-port")) {
|
||||
if (optarg) {
|
||||
g_conf_ue_ral_listening_port = strdup(optarg);
|
||||
printf("UE RAL listening port is %s\n", g_conf_ue_ral_listening_port);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "ue-ral-ip-address")) {
|
||||
if (optarg) {
|
||||
g_conf_ue_ral_ip_address = strdup(optarg);
|
||||
printf("UE RAL IP address is %s\n", g_conf_ue_ral_ip_address);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "ue-ral-link-address")) {
|
||||
if (optarg) {
|
||||
g_conf_ue_ral_link_address = strdup(optarg);
|
||||
printf("UE RAL link address is %s\n", g_conf_ue_ral_link_address);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "ue-mihf-remote-port")) {
|
||||
if (optarg) {
|
||||
g_conf_ue_mihf_remote_port = strdup(optarg);
|
||||
printf("UE MIH-F remote port is %s\n", g_conf_ue_mihf_remote_port);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "ue-mihf-ip-address")) {
|
||||
if (optarg) {
|
||||
g_conf_ue_mihf_ip_address = strdup(optarg);
|
||||
printf("UE MIH-F IP address is %s\n", g_conf_ue_mihf_ip_address);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "ue-ral-link-id")) {
|
||||
if (optarg) {
|
||||
g_conf_ue_ral_link_id = strdup(optarg);
|
||||
printf("UE RAL link id is %s\n", g_conf_ue_ral_link_id);
|
||||
}
|
||||
} else if (! strcmp(long_options[option_index].name, "ue-mihf-id")) {
|
||||
if (optarg) {
|
||||
g_conf_ue_mihf_id = strdup(optarg);
|
||||
printf("UE MIH-F id is %s\n", g_conf_ue_mihf_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'L': // set FDD
|
||||
@@ -603,9 +690,38 @@ void init_openair2() {
|
||||
}
|
||||
|
||||
mac_xface->macphy_exit = exit_fun;
|
||||
|
||||
#ifdef ENABLE_RAL
|
||||
init_802_21_link_saps();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void init_802_21_link_saps() {
|
||||
#ifdef ENABLE_RAL
|
||||
#ifdef OPENAIR2
|
||||
#if defined(ENABLE_ITTI)
|
||||
if (NB_eNB_INST > 0) {
|
||||
if (itti_create_task (TASK_RAL_ENB, eRAL_task, NULL) < 0) {
|
||||
LOG_E(EMU, "Create task failed");
|
||||
LOG_D(EMU, "Initializing RAL eNB task interface: FAILED\n");
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
|
||||
if (NB_UE_INST > 0) {
|
||||
if (itti_create_task (TASK_RAL_UE, mRAL_task, NULL) < 0) {
|
||||
LOG_E(EMU, "Create task failed");
|
||||
LOG_D(EMU, "Initializing RAL UE task interface: FAILED\n");
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void init_ocm() {
|
||||
s32 UE_id, eNB_id;
|
||||
/* Added for PHY abstraction */
|
||||
|
||||
@@ -20,6 +20,8 @@ void init_openair1();
|
||||
|
||||
void init_openair2();
|
||||
|
||||
void init_802_21_link_saps();
|
||||
|
||||
void init_ocm();
|
||||
|
||||
void init_otg_pdcp_buffer();
|
||||
|
||||
@@ -437,6 +437,8 @@ void run(int argc, char *argv[]) {
|
||||
pdcp_period = 1;
|
||||
omg_period = 10;
|
||||
|
||||
mRAL_init_default_values(); //Default values
|
||||
eRAL_init_default_values(); //Default values
|
||||
|
||||
init_oai_emulation(); //Default values
|
||||
|
||||
|
||||
Reference in New Issue
Block a user