Commit 3e7ec35e authored by Robert Schmidt's avatar Robert Schmidt

Delete scripts referencing targets/bin

parent 87f4b9e7
...@@ -5,4 +5,3 @@ common/utils/T/T_IDs.h ...@@ -5,4 +5,3 @@ common/utils/T/T_IDs.h
common/utils/T/T_messages.txt.h common/utils/T/T_messages.txt.h
common/utils/T/genids common/utils/T/genids
common/utils/T/genids.o common/utils/T/genids.o
targets/bin/
...@@ -8,7 +8,6 @@ cmake_targets/ran_build/ ...@@ -8,7 +8,6 @@ cmake_targets/ran_build/
cmake_targets/nas_sim_tools/build/ cmake_targets/nas_sim_tools/build/
log/ log/
lte_build_oai/ lte_build_oai/
targets/bin/
# vscode # vscode
.vscode .vscode
......
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# file build_test_epc_tools
# brief
# author Lionel Gauthier
# company Eurecom
# email: lionel.gauthier@eurecom.fr
#
################################
# include helper functions
################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/build_helper
function help()
{
echo_error " "
echo_error "Usage: build_test_epc_tools [OPTION]..."
echo_error "Build the executables for generating and running a test case for EPC."
echo_error " "
echo_error "Options:"
echo_error "Mandatory arguments to long options are mandatory for short options too."
echo_error " -c, --clean Clean the build generated files (build from scratch)"
echo_error " -d, --debug Compile with debug informations."
echo_error " -h, --help Print this help."
echo_error " -v, --verbose Build process verbose."
echo_error " "
}
function main()
{
local -i clean=0
local -i verbose=0
local cmake_args=" "
local make_args="-j $NUM_CPU"
local realm=""
until [ -z "$1" ]
do
case "$1" in
-c | --clean)
clean=1
echo "Clean the build generated files (build from scratch)"
shift;
;;
-d | --debug)
cmake_args="$cmake_args -DDEBUG=1"
echo "Compile with debug informations"
shift;
;;
-h | --help)
help
shift;
exit 0
;;
-v | --verbose)
echo "Make build process verbose"
cmake_args="$cmake_args -DCMAKE_VERBOSE_MAKEFILE=ON"
make_args="VERBOSE=1 $make_args"
verbose=1
shift;
;;
*)
echo "Unknown option $1"
help
exit 1
;;
esac
done
set_openair_env
if [[ $verbose -eq 1 ]]; then
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
fi
local dbin=$OPENAIR_DIR/targets/bin
local dlog=$OPENAIR_DIR/cmake_targets/log
local dconf=$OPENAIR_DIR/targets/bin
mkdir -m 777 -p $dbin $dlog
##############################################################################
# Compile userspace executable
##############################################################################
cd $OPENAIR_DIR/cmake_targets/epc_test
if [ $clean -ne 0 ]; then
if [[ $verbose -eq 1 ]]; then
echo "Cleaning TEST_EPC"
fi
rm -f $OPENAIR_DIR/targets/bin/test_epc_generate_scenario
rm -f $OPENAIR_DIR/targets/bin/test_epc_play_scenario
rm -Rf build 2>&1
mkdir -m 777 -p -v build
fi
##############################################################################
# Compile EPC
##############################################################################
cd $OPENAIR_DIR/cmake_targets/epc_test
if [ ! -d ./build ]; then
mkdir -m 777 -p -v build
fi
cmake_file=./CMakeLists.txt
cp $OPENAIR_DIR/cmake_targets/epc_test/CMakeLists.template $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd ./build
cmake $cmake_args ..
compilations \
epc_test test_epc_generate_scenario \
test_epc_generate_scenario $dbin/test_epc_generate_scenario
compilations \
epc_test test_epc_play_scenario \
test_epc_play_scenario $dbin/test_epc_play_scenario
$SUDO cp -upv test_epc_generate_scenario /usr/local/bin
$SUDO cp -upv test_epc_play_scenario /usr/local/bin
}
main "$@"
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# file init_nas_nos1
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
# author Florian Kaltenberger
#
#######################################
load_module()
{
mod_name=${1##*/}
mod_name=${mod_name%.*}
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
then
echo "module $mod_name already loaded: I remove it first"
sudo rmmod $mod_name
fi
echo loading $mod_name
sudo insmod $1
}
function main()
{
PCI=`lspci -m | grep Xilinx`
if [ -z "$PCI" ]; then
echo "No card found. Stopping!"
return
fi
## This part corrects the wrong configuration of the endpoint done by the bios in some machines
echo "$PCI" | while read config_reg; do
SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'`
sudo setpci -s $SLOT_NUMBER 60.b=10
done
load_module $OPENAIR_DIR/targets/bin/openair_rf.ko
sleep 1
if [ ! -e /dev/openair0 ]; then
sudo mknod /dev/openair0 c 127 0
sudo chmod a+rw /dev/openair0
fi
$OPENAIR_DIR/targets/bin/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10
}
main "$@"
This diff is collapsed.
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# file run_enb_s1_exmimo
# brief run script for eNB EXMIMO.
# author Lionel GAUTHIER
# company Eurecom
# email: lionel.gauthier@eurecom.fr
################################
# include helper functions
################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/build_helper
function help()
{
echo_error " "
echo_error "Usage: run_enb_s1_exmimo -c config_file [OPTION]..."
echo_error "Run the eNB executable, hardware target is EXMIMO."
echo_error " "
echo_error "Mandatory arguments:"
echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)"
echo_error " "
echo_error "Options:"
echo_error "Mandatory arguments to long options are mandatory for short options too."
echo_error " -g, --gdb Run with GDB."
echo_error " -h, --help Print this help."
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
echo_error " -M, --target-dl-mcs mcs Downlink target MCS."
echo_error " -V, --vcd Dump timings of processing in a GTKWave compliant file format."
echo_error " -S, --enable-missed-slot Continue execution in case of missed slot."
echo_error " -T, --target-ul-mcs mcs Uplink target MCS."
echo_error " -W, --wireshark-l2 Dump MAC frames for visualization with wireshark."
echo_error " You need to open Wireshark, open the preferences, and check try heuristics for the UDP protocol, MAC-LTE, RLC-LTE,"
echo_error " and PDCP-LTE. Then capture for all the interfaces with the following filters: s1ap or lte_rrc or mac-lte or rlc-lte"
echo_error " or pdcp-lte. Note the L2 pdus are transmitted to the local interface."
echo_error " -x, --xforms Run XFORMS scope windows."
}
function main()
{
local -i run_gdb=0
local exe_arguments=""
until [ -z "$1" ]
do
case "$1" in
-c | -C | --config-file)
CONFIG_FILE=$2
# may be relative path
if [ -f $(dirname $(readlink -f $0))/$CONFIG_FILE ]; then
CONFIG_FILE=$(dirname $(readlink -f $0))/$CONFIG_FILE
echo "setting config file to: $CONFIG_FILE"
CONFIG_FILE_ACCESS_OK=1
else
# may be absolute path
if [ -f $CONFIG_FILE ]; then
echo "setting config file to: $CONFIG_FILE"
else
echo_fatal "config file $CONFIG_FILE not found"
fi
fi
exe_arguments="$exe_arguments -O $CONFIG_FILE -F $THIS_SCRIPT_PATH/exmimo2_2arxg.lime"
shift 2;
;;
-g | --gdb)
run_gdb=1
echo "setting GDB flag to: $GDB"
shift;
;;
-h | --help)
help
shift;
exit 0
;;
-K | --itti-dump-file)
ITTI_DUMP_FILE=$2
# can omit file name if last arg on the line
if [ "x$ITTI_DUMP_FILE" = "x" ]; then
ITTI_DUMP_FILE="/tmp/enb_s1_exmimo_itti.log"
shift 1;
else
shift 2;
fi
echo "setting ITTI dump file to: $ITTI_DUMP_FILE"
exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
;;
-M | --target-dl-mcs)
echo "setting target dl MCS to $2"
exe_arguments="$exe_arguments -m $2"
shift 2;
;;
-V | --vcd)
"setting gtk-wave output"
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
shift ;
;;
-S | --enable-missed-slot)
echo "setting continue even if missed slot"
exe_arguments="$exe_arguments -S"
shift ;
;;
-T | --target-ul-mcs)
echo "setting target ul MCS to $2"
exe_arguments="$exe_arguments -t $2"
shift 2;
;;
-W | ----wireshark-l2)
echo "setting l2 pcap dump output"
exe_arguments="$exe_arguments -W"
shift ;
;;
-x | --xforms)
exe_arguments="$exe_arguments -d"
echo "setting xforms to: $XFORMS"
shift;
;;
*)
echo "Unknown option $1"
help
exit 0
;;
esac
done
set_openair_env
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem executable"
fi
if [ ! -e $OPENAIR_DIR/targets/bin/updatefw ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/updatefw executable"
fi
if [ ! -e $OPENAIR_DIR/targets/bin/openair_rf.ko ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/openair_rf.ko kernel module"
fi
for i in `seq 0 64`; do
have_rtfX=`ls /dev/ |grep -c rtf$i`;
if [ "$have_rtfX" -eq 0 ] ; then
$SUDO mknod -m 666 /dev/rtf$i c 150 $i;
fi;
done
$THIS_SCRIPT_PATH/init_exmimo2
if [ $run_gdb -eq 0 ]; then
exec $OPENAIR_DIR/targets/bin/lte-softmodem `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
else
touch ~/.gdb_lte_softmodem
chmod 777 ~/.gdb_lte_softmodem
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem" > ~/.gdb_lte_softmodem
echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
echo "run" >> ~/.gdb_lte_softmodem
cat ~/.gdb_lte_softmodem
gdb -n -x ~/.gdb_lte_softmodem 2>&1 > /tmp/gdb_lte_softmodem.stdout.txt
fi
}
main "$@"
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# file run_enb_s1_usrp
# brief run script for eNB USRP.
# author Lionel GAUTHIER and Navid Nikaein
# company Eurecom
# email: lionel.gauthier@eurecom.fr and navid.nikaein@eurecom.fr
################################
# include helper functions
################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
source $THIS_SCRIPT_PATH/build_helper
function help()
{
echo_error " "
echo_error "Usage: run_enb_s1_usrp -c config_file [OPTION]..."
echo_error "Run the eNB executable, hardware target is USRP."
echo_error " "
echo_error "Mandatory arguments:"
echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)"
echo_error " "
echo_error "Options:"
echo_error "Mandatory arguments to long options are mandatory for short options too."
echo_error " -g, --gdb Run with GDB."
echo_error " -h, --help Print this help."
echo_error " -e, --ulsch-max-errors num-errs maximum allowed number of uplink errors"
echo_error " -f, --rf-config-file filename RF specific configuration file"
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
echo_error " -M, --target-dl-mcs mcs Downlink target MCS."
echo_error " -n, --T-no-wait don't wait for tracer, start immediately"
echo_error " -p, --T-port port use given port"
echo_error " -s, --show-stdout Do not redirect stdout and stderr to file /tmp/lte_softmodem.stdout.txt."
echo_error " -S, --enable-missed-slot Continue execution in case of missed slot."
echo_error " -T, --target-ul-mcs mcs Uplink target MCS."
echo_error " -V, --vcd Dump timings of processing in a GTKWave compliant file format."
echo_error " -W, --wireshark-l2 Dump MAC frames for visualization with wireshark."
echo_error " You need to open Wireshark, open the preferences, and check try heuristics for the UDP protocol, MAC-LTE, RLC-LTE,"
echo_error " and PDCP-LTE. Then capture for all the interfaces with the following filters: s1ap or lte_rrc or mac-lte or rlc-lte"
echo_error " or pdcp-lte. Note the L2 pdus are transmitted to the local interface."
echo_error " -x, --xforms Run XFORMS scope windows."
}
function control_c()
# run if user hits control-c
{
echo_warning "\nExiting by ctrl+c\n"
exit $?
}
function main()
{
local -i run_gdb=0
local -i show_stdout=0
local exe_arguments=""
until [ -z "$1" ]
do
case "$1" in
-c | -C | --config-file)
CONFIG_FILE=$2
# may be relative path
if [ -f $(dirname $(readlink -f $0))/$CONFIG_FILE ]; then
CONFIG_FILE=$(dirname $(readlink -f $0))/$CONFIG_FILE
echo "setting config file to: $CONFIG_FILE"
CONFIG_FILE_ACCESS_OK=1
else
# may be absolute path
if [ -f $CONFIG_FILE ]; then
echo "setting config file to: $CONFIG_FILE"
else
echo_fatal "config file $CONFIG_FILE not found"
fi
fi
exe_arguments="$exe_arguments -O $CONFIG_FILE"
shift 2;
;;
-g | --gdb)
run_gdb=1
echo "setting GDB flag to: $run_gdb"
shift;
;;
-h | --help)
help
shift;
exit 0
;;
-e | --ulsch-max-errors)
ulsch_max_errors=$2
echo "setting --ulsch-max-errors to $ulsch_max_errors"
exe_arguments="$exe_arguments --ulsch-max-errors=$ulsch_max_errors"
shift 2;
;;
-f | --rf-config-file)
rf_config_file=$2
# can omit file name if last arg on the line
if [ "x$rf_config_file" = "x" ]; then
rf_config_file=null
shift 1;
else
shift 2;
fi
if [ "$rf_config_file" != "null" ]; then
echo "setting --rf-config-file to $rf_config_file"
exe_arguments="$exe_arguments --rf-config-file=$rf_config_file"
fi
;;
-M | --target-dl-mcs)
echo "setting target dl MCS to $2"
exe_arguments="$exe_arguments -m $2"
shift 2;
;;
-n | --T-no-wait)
echo "setting T tracer operation"
exe_arguments="$exe_arguments --T_nowait"
shift ;
;;
-p | --T-port)
echo "setting T tracer port"
exe_arguments="$exe_arguments --T_port $2"
shift 2;
;;
-V | --vcd)
echo "setting gtk-wave output"
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
shift ;
;;
-s | --show-stdout)
echo "setting show stdout"
show_stdout=1
shift ;
;;
-S | --enable-missed-slot)
echo "setting continue even if missed slot"
exe_arguments="$exe_arguments -S"
shift ;
;;
-T | --target-ul-mcs)
echo "setting target ul MCS to $2"
exe_arguments="$exe_arguments -t $2"
shift 2;
;;
-W | --wireshark-l2)
echo "setting l2 pcap dump output"
exe_arguments="$exe_arguments -W"
shift ;
;;
-x | --xforms)
exe_arguments="$exe_arguments -d"
echo "setting xforms"
shift;
;;
*)
echo "Unknown option $1"
help
exit 0
;;
esac
done
set_openair_env
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 executable"
fi
if [ $run_gdb -eq 0 ]; then
# trap keyboard interrupt (control-c)
trap control_c SIGINT
if [ $show_stdout -eq 0 ]; then
echo_warning "stdout/sderr of lte-softmodem executable redirected to /tmp/lte_softmodem.stdout.txt"
exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
else
exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 `echo $exe_arguments`
fi
else
# trap keyboard interrupt (control-c) is done by gdb
touch ~/.gdb_lte_softmodem
chmod 777 ~/.gdb_lte_softmodem
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10" > ~/.gdb_lte_softmodem
echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
echo "run" >> ~/.gdb_lte_softmodem
cat ~/.gdb_lte_softmodem
if [ $show_stdout -eq 0 ]; then
echo_warning "stdout/sderr of lte-softmodem executable redirected to /tmp/gdb_lte_softmodem.stdout.txt"
gdb -n -x ~/.gdb_lte_softmodem 2>&1 > /tmp/gdb_lte_softmodem.stdout.txt
else
gdb -n -x ~/.gdb_lte_softmodem
fi
fi
}
main "$@"
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# file start_enb_ue_virt_noS1
# brief
# author Lionel Gauthier
# company Eurecom
# email: lionel.gauthier@eurecom.fr
###########################################
# INPUT OF THIS SCRIPT:
# THE DIRECTORY WHERE ARE LOCATED THE CONFIGURATION FILES
#########################################
# This script start ENB+UE (all in one executable, on one host)
# eNB is in standalone mode, it does not require a MME.
###########################################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
. $THIS_SCRIPT_PATH/build_helper
###########################################################
function help()
{
echo_error " "
echo_error "Usage: start_enb_ue_virt_noS1 [OPTION]..."
echo_error "Run the eNB and/or UE executable with no hardware."
echo_error " "
echo_error "Options:"
echo_error "Mandatory arguments to long options are mandatory for short options too."
echo_error " -a, --abstraction enable phy abstraction mode"
echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)"
echo_error " Default eNB config file if not set is $1"
echo_error " -g, --gdb Run with GDB."
echo_error " -l, --log-level set the global log level (8:trace, 7:debug, 6:info, 4:warn, 3:error). Note that the log configuration is eNB config file is ignored for oaisim."
echo_error " -h, --help Print this help."
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
echo_error " -V, --vcd Dump timings of processing in a GTKWave compliant file format."
echo_error " -W, --wireshark-l2 Dump MAC frames for visualization with wireshark."
echo_error " You need to open Wireshark, open the preferences, and check try heuristics for the UDP protocol, MAC-LTE, RLC-LTE,"
echo_error " and PDCP-LTE. Then capture for all the interfaces with the following filters: s1ap or lte_rrc or mac-lte or rlc-lte"
echo_error " or pdcp-lte. Note the L2 pdus are transmitted to the local interface."
echo_error " -x, --xforms Run XFORMS scope windows."
echo_error " -n, --num-frames Set number of frames for simulation"
}
function main()
{
set_openair_env
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
local -i run_gdb=0
local exe_arguments=""
local DEFAULT_CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf
local CONFIG_FILE_ENB=$DEFAULT_CONFIG_FILE_ENB
local abstraction_flag=0
until [ -z "$1" ]
do
case "$1" in
-a | --abstraction )
abstraction_flag=1
echo "enabling abstraction mode"
exe_arguments="$exe_arguments -a"
shift;
;;
-c | -C | --config-file)
CONFIG_FILE_ENB=$2
# may be relative path
if [ -f $(dirname $(readlink -f $0))/$CONFIG_FILE ]; then
CONFIG_FILE_ENB=$(dirname $(readlink -f $0))/$CONFIG_FILE
echo "setting config file to: $CONFIG_FILE"
config_FILE_ACCESS_OK=1
else
# may be absolute path
if [ -f $CONFIG_FILE_ENB ]; then
echo "setting config file to: $CONFIG_FILE_ENB"
else
echo_fatal "config file $CONFIG_FILE_ENB not found"
fi
fi
shift 2;
;;
-g | --gdb)
run_gdb=1
echo "setting GDB flag to: $GDB"
shift;
;;
-l | --log-level)
echo "setting the log level to $2"
exe_arguments="$exe_arguments -l $2"
shift 2;
;;
-h | --help)
help $DEFAULT_CONFIG_FILE_ENB
shift;
exit 0
;;
-K | --itti-dump-file)
ITTI_DUMP_FILE=$2
# can omit file name if last arg on the line
if [ "x$ITTI_DUMP_FILE" = "x" ]; then
ITTI_DUMP_FILE="/tmp/itti_enb_ue_s1.log"
shift 1;
else
shift 2;
fi
echo "setting ITTI dump file to: $ITTI_DUMP_FILE"
exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
;;
# -u | --num-ue )
-V | --vcd)
echo "setting gtk-wave output"
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
shift ;
;;
-W | --wireshark-l2)
echo "setting l2 pcap dump output"
exe_arguments="$exe_arguments -P wireshark"
shift 1;
;;
-n | --num-frames)
echo "setting the number of frames in simulation to $2"
exe_arguments="$exe_arguments -n $2"
shift 2;
;;
-x | --xforms)
echo "running with xforms"
exe_arguments="$exe_arguments --xforms"
shift 1;
;;
*)
echo "Unknown option $1"
help
exit 0
;;
esac
done
# may use default config file
exe_arguments="$exe_arguments --enb-conf $CONFIG_FILE_ENB"
##################################################
# LAUNCH eNB + UE executable
##################################################
$SUDO pkill oaisim
$SUDO rmmod nasmesh > /dev/null 2>&1
echo_success "Bringup UE interface..."
$SUDO insmod $OPENAIR_DIR/targets/bin/nasmesh.ko
sync
echo "bring up oai0 interface for enb"
$SUDO ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
sync
echo "bring up oai1 interface for ue 1"
$SUDO ifconfig oai1 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255
sync
# enb -> ue1
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
# ue1 -> enb
$OPENAIR_DIR/targets/bin/rb_tool -a -c0 -i1 -z0 -s 10.0.2.2 -t 10.0.2.1 -r 1
if [ "$abstraction_flag" -eq "0" ] ; then
exe_arguments="$exe_arguments -s15 -AAWGN -b1 -u1"
else
exe_arguments="$exe_arguments -b1 -u1"
fi
cd $OPENAIR_DIR/targets/bin
if [ $run_gdb -eq 0 ]; then
exec $SUDO $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel14 $exe_arguments | tee /tmp/enb_ue_nos1.log.txt
else
touch ~/.gdb_enb_ue_nos1
chmod 777 ~/.gdb_enb_ue_nos1
echo "file $OPENAIR_DIR/targets/bin/oaisim_nos1.Rel14" > ~/.gdb_enb_ue_nos1
echo "set args $exe_arguments" >> ~/.gdb_enb_ue_nos1
echo "run" >> ~/.gdb_enb_ue_nos1
cat ~/.gdb_enb_ue_nos1
$SUDO gdb -n -x ~/.gdb_enb_ue_nos1
fi
}
main "$@"
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# file start_enb_ue_virt_s1
# brief
# author Lionel Gauthier
# company Eurecom
# email: lionel.gauthier@eurecom.fr
###########################################
# INPUT OF THIS SCRIPT:
# THE DIRECTORY WHERE ARE LOCATED THE CONFIGURATION FILES
#########################################
# This script start ENB+UE (all in one executable, on one host)
# MME+SP-GW executable have to be launched by your own (run_hss, run_epc) before this script is invoked.
#
###########################################################
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
. $THIS_SCRIPT_PATH/build_helper
###########################################################
function trim2()
{
local var=$@
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
echo -n "$var"
}
function is_tun_interface()
{
my_bool=1
for var in "$@"
do
if [ "a$var" == "a" ]; then
echo "0";
return;
fi
if [[ "$var" != *tun* ]]; then
echo "0";
return;
fi
done
echo "$my_bool"
}
function help()
{
echo_error " "
echo_error "Usage: start_enb_ue_virt_s1 [OPTION]..."
echo_error "Run the eNB and/or UE executable with no hardware."
echo_error " "
echo_error "Options:"
echo_error "Mandatory arguments to long options are mandatory for short options too."
echo_error " -a, --abstraction enable phy abstraction mode"
echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)"
echo_error " Default eNB config file if not set is $1"
echo_error " -l, --log-level set the global log level (8:trace, 7:debug, 6:info, 4:warn, 3:error). Note that the log configuration is eNB config file is ignored for oaisim."
echo_error " -g, --gdb Run with GDB."
echo_error " -h, --help Print this help."
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
echo_error " -V, --vcd Dump timings of processing in a GTKWave compliant file format."
echo_error " -W, --wireshark-l2 Dump MAC frames for visualization with wireshark."
echo_error " You need to open Wireshark, open the preferences, and check try heuristics for the UDP protocol, MAC-LTE, RLC-LTE,"
echo_error " and PDCP-LTE. Then capture for all the interfaces with the following filters: s1ap or lte_rrc or mac-lte or rlc-lte"
echo_error " or pdcp-lte. Note the L2 pdus are transmitted to the local interface."
echo_error " -x, --xforms Run XFORMS scope windows."
echo_error " "
echo_error " A simple data traffic test example: ping -m 1 -I oip1 192.168.12.100"
}
function main()
{
set_openair_env
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
local -i run_gdb=0
local exe_arguments=""
local DEFAULT_CONFIG_FILE_ENB=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_mme.conf
local CONFIG_FILE_ENB=$DEFAULT_CONFIG_FILE_ENB
until [ -z "$1" ]
do
case "$1" in
-a | --abstraction )
abstraction_flag=1
echo "enabling abstraction mode"
exe_arguments="$exe_arguments -a"
shift;
;;
-c | -C | --config-file)
CONFIG_FILE_ENB=$2
# may be relative path
if [ -f $(dirname $(readlink -f $0))/$CONFIG_FILE ]; then
CONFIG_FILE_ENB=$(dirname $(readlink -f $0))/$CONFIG_FILE
echo "setting config file to: $CONFIG_FILE"
CONFIG_FILE_ACCESS_OK=1
else
# may be absolute path
if [ -f $CONFIG_FILE_ENB ]; then
echo "setting config file to: $CONFIG_FILE_ENB"
else
echo_fatal "config file $CONFIG_FILE_ENB not found"
fi
fi
shift 2;
;;
-l | --log-level)
echo "setting the log level to $2"
exe_arguments="$exe_arguments -l $2"
shift 2;
;;
-g | --gdb)
run_gdb=1
echo "setting GDB flag to: $GDB"
shift;
;;
-h | --help)
help $DEFAULT_CONFIG_FILE_ENB
shift;
exit 0
;;
-K | --itti-dump-file)
ITTI_DUMP_FILE=$2
# can omit file name if last arg on the line
if [ "x$ITTI_DUMP_FILE" = "x" ]; then
ITTI_DUMP_FILE="/tmp/itti_enb_ue_s1.log"
shift 1;
else
shift 2;
fi
echo "setting ITTI dump file to: $ITTI_DUMP_FILE"
exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
;;
-V | --vcd)
echo "setting gtk-wave output"
exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
shift ;
;;
-W | ----wireshark-l2)
echo "setting l2 pcap dump output"
exe_arguments="$exe_arguments -P wireshark"
shift 2;
;;
-x | --xforms)
echo "running with xforms"
exe_arguments="$exe_arguments --xforms"
shift 1;
;;
*)
echo "Unknown option $1"
help
exit 0
;;
esac
done
# may use default config file
exe_arguments="$exe_arguments --enb-conf $CONFIG_FILE_ENB"
#######################################################
# SOURCE CONFIG FILE
#######################################################
rm -f /tmp/source.txt
VARIABLES="
ENB_INTERFACE_NAME_FOR_S1_MME\|\
ENB_IPV4_ADDRESS_FOR_S1_MME\|\
ENB_INTERFACE_NAME_FOR_S1U\|\
ENB_IPV4_ADDRESS_FOR_S1U"
VARIABLES=$(echo $VARIABLES | sed -e 's/\\r//g')
VARIABLES=$(echo $VARIABLES | tr -d ' ')
cat $CONFIG_FILE_ENB | grep -w "$VARIABLES"| tr -d " " | tr -d ";" > /tmp/source.txt
source /tmp/source.txt
declare ENB_IPV4_NETMASK_FOR_S1_MME=$( echo $ENB_IPV4_ADDRESS_FOR_S1_MME | cut -f2 -d '/')
declare ENB_IPV4_NETMASK_FOR_S1U=$( echo $ENB_IPV4_ADDRESS_FOR_S1U | cut -f2 -d '/')
ENB_IPV4_ADDRESS_FOR_S1_MME=$( echo $ENB_IPV4_ADDRESS_FOR_S1_MME | cut -f1 -d '/')
ENB_IPV4_ADDRESS_FOR_S1U=$( echo $ENB_IPV4_ADDRESS_FOR_S1U | cut -f1 -d '/')
is_tun=`is_tun_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_INTERFACE_NAME_FOR_S1U`
# if [ $is_tun = "1" ]; then
# openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync
# ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync
# echo_success "Configured local eNB S1 tun interfaces"
# else
# echo_success "eNB S1 tun interfaces should be ethernet interfaces (no tunnels configured)"
# fi
##################################################
# LAUNCH eNB + UE executable
##################################################
pkill oaisim
rmmod ue_ip > /dev/null 2>&1
echo_success "Bringup UE interface..."
insmod $OPENAIR_DIR/targets/bin/ue_ip.ko
ip route flush cache
# Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then
echo "200 lte " >> /etc/iproute2/rt_tables
fi
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
cd $OPENAIR_DIR/targets/bin
if [ $run_gdb -eq 0 ]; then
exec $OPENAIR_DIR/targets/bin/oaisim.Rel14 $exe_arguments | tee /tmp/enb_ue_s1.log.txt
else
touch ~/.gdb_enb_ue_s1
chmod 777 ~/.gdb_enb_ue_s1
echo "file $OPENAIR_DIR/targets/bin/oaisim.Rel14" > ~/.gdb_enb_ue_s1
echo "set args $exe_arguments" >> ~/.gdb_enb_ue_s1
echo "run" >> ~/.gdb_enb_ue_s1
cat ~/.gdb_enb_ue_s1
gdb -n -x ~/.gdb_enb_ue_s1
fi
}
sudo echo
is_sudo=$?
if [[ "$is_sudo" -ne 0 ]]; then
echo_error "This script must be run by root or a sudo'er"
echo
exit 1
fi
main "$@"
#!/bin/bash
# Carrier frequency in Hz
#FREQ=2660000000 #FDD
FREQ=2350000000 #TDD
NRB=50
TA=0
#9:trace, 8/7:debug, 6:info, 4:warn, 3:error
LOGLEVEL=6
#enable or disable soft scope
#SCOPE=''
SCOPE='-d'
#enable or disable VCD logging
VCD=''
#VCD='-V'
ISTDD='-T'
#ISTDD=''
#use external clock
ECLK="--external-clock"
#ECLK=""
#UE scan carrier
#ISSCAN="--ue-scan-carrier"
ISSCAN=""
sudo sh -c './init_nas_s1 UE'
cd ../../targets/bin/
sudo -E ./lte-softmodem.Rel10 -U -C$FREQ -r$NRB $ISSCAN --ue-txgain 70 --ue-rxgain 80 -A $TA $ECLK -W $ISTDD -g $LOGLEVEL $SCOPE 2>&1 | sudo tee /tmp/UE.log
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# \author Navid Nikaein, Rohit Gupta
echo "This script stops exmimo2 as it might be transmitting signal by itself if lte-softmodem terminates incorrectly"
if [ "$OPENAIR_DIR" == "" ]; then
echo "Is the OPENAIR_DIR path set correctly? Exiting now"
exit
fi
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches'
exmimo_mod=`lsmod |grep openair_rf`
#load the module only if absent to avoid kernel crashes
if [ -z "$exmimo_mod" ]
then
sudo -E $OPENAIR_DIR/cmake_targets/tools/init_exmimo2
fi
#now we stop the card from transmitting anything
cd $OPENAIR_DIR/targets/bin
sudo -E octave -H --no-gui $OPENAIR_DIR/cmake_targets/tools/exmimo_stop_octave.m
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