adding CA support to run_lte.sh and adopt readme

master
Andre Puschmann 5 years ago
parent ac1d4d994b
commit 0e221f1317

@ -25,7 +25,9 @@
SET(CTEST_OUTPUT_ON_FAILURE TRUE)
if (ZEROMQ_FOUND AND ENABLE_ZMQ_TEST)
foreach (cell_n_prb 6 15 25 50 75 100)
add_test(e2e_${cell_n_prb}prb ${CMAKE_CURRENT_SOURCE_DIR}/run_lte.sh ${CMAKE_CURRENT_BINARY_DIR}/../ ${cell_n_prb})
endforeach (cell_n_prb)
endif (ZEROMQ_FOUND AND ENABLE_ZMQ_TEST)
foreach (num_cc 1 2)
foreach (cell_n_prb 6 15 25 50 75 100)
add_test(e2e_${cell_n_prb}prb_${num_cc}cc ${CMAKE_CURRENT_SOURCE_DIR}/run_lte.sh ${CMAKE_CURRENT_BINARY_DIR}/../ ${cell_n_prb} ${num_cc})
endforeach (cell_n_prb)
endforeach (num_cc)
endif (ZEROMQ_FOUND AND ENABLE_ZMQ_TEST)

@ -4,16 +4,15 @@ End-to-End LTE Tests
This folder contains a basic shell script that allows a quick end-to-end LTE test
using srsUE, srsENB, and srsEPC. The script has minimal requirements and should
only take less then 30 seconds for each configuration. Currently the script
only allows to configure the cell bandwidth.
only allows to configure the cell bandwidth and the number of component carrier in the eNB.
The script launches all components and puts the UE into a different network namespace
in order to allow IP connectivity to srsEPC on a single machine. It therefore
requires root privelages at the moment.
It then launches, one after another, uplink and downlink ping as well as a quick UDP
downlink session. Between those experiments, the UE transits between RRC Idle and Connected
states multiple times and is either put into Connected through pending UL traffic or
pending DL traffic (using paging).
downlink session. Between those experiments, the UE stays connected to the eNB/EPC
the entire time.
After the experiments are finished, all components are torn down and the log files
are analyzed.
@ -23,10 +22,11 @@ Single Execution
----------------
The script can be executed manually. It expects the srsLTE build directory as
the first argument and the cell bandwidth as the second.
the first argument, the cell bandwidth as the second, and, optionally the number
of component carrier as the third.
```
$ sudo ./run_lte.sh ~/src/srsLTE/build 50
$ sudo ./run_lte.sh ~/src/srsLTE/build 50 1
```
Testing all Bandwidths
@ -35,6 +35,7 @@ Testing all Bandwidths
You can also test all bandwidths by letting CTest iterate over all possible PRB sizes.
```
$ cmake -DENABLE_ZMQ_TEST=True ..
$ cd test
$ sudo make test
```
@ -48,4 +49,4 @@ before running again:
```
$ sudo ip netns delete ue1
```
```

@ -25,8 +25,8 @@ enb_pid=0
ue_pid=0
print_use(){
echo "Please call script with srsLTE build path as first argument and number of PRBs as second"
echo "E.g. ./run_lte.sh [build_path] [nof_prb]"
echo "Please call script with srsLTE build path as first argument and number of PRBs as second (number of component carrier is optional)"
echo "E.g. ./run_lte.sh [build_path] [nof_prb] [num_cc]"
exit -1
}
@ -79,7 +79,6 @@ valid_num_prb()
esac
}
# check if build path has been passed
if ([ ! $1 ])
then
@ -96,12 +95,24 @@ then
fi
nof_prb="$2"
# check number of CC
num_cc="1"
if ([ $3 ])
then
num_cc="$3"
fi
echo "Using $num_cc component carrier(s) in srsENB"
base_srate="23.04e6"
if ([ "$nof_prb" == "75" ])
then
base_srate="15.36e6"
fi
if ([ "$nof_prb" == "15" ])
then
base_srate="3.84e6"
fi
# Check for LTE binaries in build path
if [ ! -x "$build_path/srsenb/src/srsenb" ]; then
@ -138,22 +149,32 @@ epc_args="$build_path/../srsepc/epc.conf.example \
--log.filename=./${nof_prb}prb_epc.log"
enb_args="$build_path/../srsenb/enb.conf.example \
--enb_files.sib_config=$build_path/../srsenb/sib.conf.example \
--enb_files.rr_config=$build_path/../srsenb/rr.conf.example \
--enb_files.drb_config=$build_path/../srsenb/drb.conf.example \
--rf.device_name=zmq \
--rf.device_args=\"fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,base_srate=${base_srate}\" \
--expert.nof_phy_threads=1 \
--expert.rrc_inactivity_timer=1500 \
--expert.rrc_inactivity_timer=5000 \
--enb.n_prb=$nof_prb \
--log.filename=./${nof_prb}prb_enb.log"
ue_args="$build_path/../srsue/ue.conf.example \
--rf.device_name=zmq \
--rf.device_args=\"tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,id=ue,base_srate=${base_srate}\" \
--phy.nof_phy_threads=1 \
--gw.netns=$ue_netns \
--log.filename=./${nof_prb}prb_ue.log \
--pcap.enable=true \
--pcap.filename=./${nof_prb}prb_ue.pcap"
if ([ "$num_cc" == "2" ])
then
enb_args="$enb_args --enb_files.rr_config=$build_path/../srsenb/rr_2ca.conf.example \
--rf.device_args=\"fail_on_disconnect=true,base_srate=${base_srate},id=enb,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,tx_port2=tcp://*:2002,rx_port2=tcp://localhost:2003,tx_freq=2630e6,rx_freq=2510e6,tx_freq2=2636e6,rx_freq2=2516e6\""
ue_args="$ue_args --rf.dl_earfcn=2850,2910 --rf.nof_carriers=2 --rrc.ue_category=7 --rrc.release=10 \
--rf.device_args=\"tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,tx_port2=tcp://*:2003,rx_port2=tcp://localhost:2002,id=ue,base_srate=${base_srate},tx_freq=2510e6,rx_freq=2630e6,tx_freq2=2516e6,rx_freq2=2636e6\""
else
enb_args="$enb_args --enb_files.rr_config=$build_path/../srsenb/rr.conf.example \
--rf.device_args=\"fail_on_disconnect=true,tx_port=tcp://*:2000,rx_port=tcp://localhost:2001,id=enb,base_srate=${base_srate}\""
ue_args="$ue_args --rf.device_args=\"tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,id=ue,base_srate=${base_srate}\""
fi
# Remove existing log files
log_files=$(ls -l | grep ${nof_prb}prb_)
@ -165,7 +186,7 @@ fi
# Run srsEPC
echo "Starting srsEPC"
screen -S srsepc -dm -L -Logfile ./${nof_prb}prb_screenlog_srsepc.log $build_path/srsepc/src/srsepc $epc_args
sleep 3
sleep 2
epc_pid=$(pgrep srsepc)
if [ -z "$epc_pid" ]
then
@ -237,9 +258,6 @@ screen -S srsue -X stuff "t$(printf \\r)"
# Run tests now
# sleep 3s to get RRC connection release
sleep 1.5
# run UL ping test
echo "Run UL ping"
ip netns exec $ue_netns screen -dm -L -Logfile ./${nof_prb}prb_screenlog_ping_ul.log ping $mme_ip -c 3
@ -250,7 +268,7 @@ echo "Run DL ping"
screen -dm -L -Logfile ./${nof_prb}prb_screenlog_ping_dl.log ping $ip -c 3
sleep 4
# run UDP DL (rate must not be more than max DL rate for 6 PRB
# run UDP DL (rate must not be more than max DL rate for 6 PRB)
echo "Run DL iperf"
screen -dm -L -Logfile ./${nof_prb}prb_screenlog_iperf_dl.log iperf -c $ip -u -t 1 -i 1 -b 1M
sleep 3
@ -291,9 +309,9 @@ if [ "$last_line" != "Closing log" ]; then
fi
# Check PRACH results
num_prach=$(cat ./${nof_prb}prb_screenlog_srsenb.log | grep RACH | wc -l)
if [ "$num_prach" != "5" ] 2>/dev/null; then
echo "Error. Detected $num_prach PRACH(s). But should be 5."
num_prach=$(cat ./${nof_prb}prb_screenlog_srsenb.log | grep RACH: | wc -l)
if [ "$num_prach" != "1" ] 2>/dev/null; then
echo "Error. Detected $num_prach PRACH(s). But should be only 1."
exit 1
fi

Loading…
Cancel
Save