msc for mme_gw
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7658 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -62,7 +62,7 @@ MME :
|
|||||||
# max values = 999.999:65535
|
# max values = 999.999:65535
|
||||||
# maximum of 32 values, comma separated
|
# maximum of 32 values, comma separated
|
||||||
TAI_LIST = (
|
TAI_LIST = (
|
||||||
{MCC="208" ; MNC="10"; TAC = "1"; } # YOUR PLMN CONFIG HERE
|
{MCC="208" ; MNC="95"; TAC = "1"; } # YOUR PLMN CONFIG HERE
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+36
-21
@@ -39,6 +39,8 @@
|
|||||||
################################
|
################################
|
||||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||||
source $THIS_SCRIPT_PATH/build_helper
|
source $THIS_SCRIPT_PATH/build_helper
|
||||||
|
global -i g_run_msc_gen=0
|
||||||
|
global g_msc_dir="/tmp"
|
||||||
|
|
||||||
set_openair_env
|
set_openair_env
|
||||||
|
|
||||||
@@ -62,17 +64,39 @@ function help()
|
|||||||
echo_error " 2 -> ASN1 XER printf on and ASN1 debug on"
|
echo_error " 2 -> ASN1 XER printf on and ASN1 debug on"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function do_msc_gen()
|
||||||
|
{
|
||||||
|
cd $g_msc_dir
|
||||||
|
last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||||
|
$OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
|
||||||
|
sync
|
||||||
|
last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
|
||||||
|
|
||||||
|
if [ x"$last_created_file" != x"$last_created_file2" ]; then
|
||||||
|
if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then
|
||||||
|
command -v eog 2>/dev/null && eog ./$last_created_file2/oai_mscgen_page_0.png
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function control_c()
|
||||||
|
# run if user hits control-c
|
||||||
|
{
|
||||||
|
echo_warning "\nExiting by ctrl+c\n"
|
||||||
|
if [ $g_run_msc_gen -eq 1 ]; then
|
||||||
|
do_msc_gen
|
||||||
|
fi
|
||||||
|
exit $?
|
||||||
|
}
|
||||||
|
|
||||||
function main()
|
function main()
|
||||||
{
|
{
|
||||||
local -i run_gdb=0
|
local -i run_gdb=0
|
||||||
local -i run_mscgen=0
|
|
||||||
local exe_arguments=" "
|
local exe_arguments=" "
|
||||||
local -i epc_local=0
|
local -i epc_local=0
|
||||||
local -r epc_default_config_file="$OPENAIR_TARGETS/bin/epc.conf"
|
local -r epc_default_config_file="$OPENAIR_TARGETS/bin/epc.conf"
|
||||||
local epc_config_file=$epc_default_config_file
|
local epc_config_file=$epc_default_config_file
|
||||||
local MSC_DIR="/tmp"
|
|
||||||
|
|
||||||
until [ -z "$1" ]
|
until [ -z "$1" ]
|
||||||
do
|
do
|
||||||
@@ -103,11 +127,11 @@ function main()
|
|||||||
shift;
|
shift;
|
||||||
;;
|
;;
|
||||||
-m | --mscgen)
|
-m | --mscgen)
|
||||||
MSC_DIR=$2
|
g_msc_dir=$2
|
||||||
# can omit file name if last arg on the line
|
# can omit file name if last arg on the line
|
||||||
if [ -d "$MSC_DIR" ]; then
|
if [ -d "$g_msc_dir" ]; then
|
||||||
echo "setting mscgen log files to dir: $MSC_DIR"
|
echo "setting mscgen log files to dir: $g_msc_dir"
|
||||||
run_mscgen=1
|
g_run_msc_gen=1
|
||||||
exe_arguments="-m $exe_arguments"
|
exe_arguments="-m $exe_arguments"
|
||||||
shift 2;
|
shift 2;
|
||||||
else
|
else
|
||||||
@@ -141,15 +165,18 @@ function main()
|
|||||||
epc_config_file="$OPENAIR_DIR/targets/bin/epc.local.enb.conf"
|
epc_config_file="$OPENAIR_DIR/targets/bin/epc.local.enb.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $run_mscgen -eq 1 ]; then
|
if [ $g_run_msc_gen -eq 1 ]; then
|
||||||
rm -f /tmp/openair.msc.*
|
rm -f /tmp/openair.msc.*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exe_arguments="-O $epc_config_file $exe_arguments"
|
exe_arguments="-O $epc_config_file $exe_arguments"
|
||||||
|
|
||||||
if [ $run_gdb -eq 0 ]; then
|
if [ $run_gdb -eq 0 ]; then
|
||||||
|
# trap keyboard interrupt (control-c)
|
||||||
|
trap control_c SIGINT
|
||||||
$OPENAIR_DIR/targets/bin/mme_gw.Rel10 `echo $exe_arguments` 2>&1
|
$OPENAIR_DIR/targets/bin/mme_gw.Rel10 `echo $exe_arguments` 2>&1
|
||||||
else
|
else
|
||||||
|
# trap keyboard interrupt (control-c) is done by gdb
|
||||||
touch ~/.gdb_mme_gw
|
touch ~/.gdb_mme_gw
|
||||||
chmod 777 ~/.gdb_mme_gw
|
chmod 777 ~/.gdb_mme_gw
|
||||||
echo "file $OPENAIR_DIR/targets/bin/mme_gw.Rel10" > ~/.gdb_mme_gw
|
echo "file $OPENAIR_DIR/targets/bin/mme_gw.Rel10" > ~/.gdb_mme_gw
|
||||||
@@ -157,22 +184,10 @@ function main()
|
|||||||
echo "run" >> ~/.gdb_mme_gw
|
echo "run" >> ~/.gdb_mme_gw
|
||||||
cat ~/.gdb_mme_gw
|
cat ~/.gdb_mme_gw
|
||||||
gdb -n -x ~/.gdb_mme_gw
|
gdb -n -x ~/.gdb_mme_gw
|
||||||
fi
|
if [ $g_run_msc_gen -eq 1 ]; then
|
||||||
|
do_msc_gen
|
||||||
if [ $run_mscgen -eq 1 ]; then
|
|
||||||
cd $MSC_DIR
|
|
||||||
last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
|
|
||||||
$OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
|
|
||||||
sync
|
|
||||||
last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
|
|
||||||
|
|
||||||
if [ x"$last_created_file" != x"$last_created_file2" ]; then
|
|
||||||
if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then
|
|
||||||
command -v eog 2>/dev/null && eog ./$last_created_file2/oai_mscgen_page_0.png
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sudo echo
|
sudo echo
|
||||||
|
|||||||
Reference in New Issue
Block a user