Commit d6dd4c25 authored by Boris Djalal's avatar Boris Djalal

Add pinging the UE from the eNB.

Successful tests: eNB sync, UE sync, pinging the eNB from the UE and the UE from the eNB.
Signed-off-by: default avatarBoris Djalal <boris.djalal@eurecom.fr>
parent 0bc4e282
......@@ -84,11 +84,12 @@ function start_basic_sim_enb {
echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/basic_simulator" >> $1
echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $1
echo "cd /home/ubuntu/tmp/cmake_targets/basic_simulator/enb/" >> $1
echo "echo \"ulimit -c unlimited && tdbuf -o0 /lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE\" > ./my-lte-softmodem-run.sh " >> $1
echo "echo \"ulimit -c unlimited && ./lte-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE\" > ./my-lte-softmodem-run.sh " >> $1
echo "chmod 775 ./my-lte-softmodem-run.sh" >> $1
echo "cat ./my-lte-softmodem-run.sh" >> $1
echo "if [ -e /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ]; then sudo sudo rm -f /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE; fi" >> $1
echo "sudo -E daemon --inherit --unsafe --name=enb_daemon --chdir=/home/ubuntu/tmp/cmake_targets/basic_simulator/enb -o /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ./my-lte-softmodem-run.sh" >> $1
ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1
sleep 10
rm $1
......@@ -140,32 +141,39 @@ function get_ue_ip_addr {
}
function ping_ue_ip_addr {
echo "CALL ping_ue_ip_addr"
#echo '$@' $@
echo "echo \"ping -c 20 $3\"" > $1
echo "echo \"COMMAND IS: ping -c 20 $3\" > $4" > $1
echo "ping -c 20 $UE_IP_ADDR | tee -a $4" >> $1
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
rm -f $1
}
function ping_nos1_ue_ip_addr {
echo "CALL ping_nos1_ue_ip_addr"
#echo '$@' $@
echo "echo \"COMMAND IS: ping -I oai0 -c 20 $3\" > $4" > $1
echo "rm -f $4" >> $1
echo "echo \"ping -c 20 $3\"" >> $1
echo "ping -c 20 $UE_REAL_IP_ADDR | tee -a $4" >> $1
echo "command generated by ping_ue_ip_addr:"
echo "ping -I oai0 -c 20 $UE_REAL_IP_ADDR | tee -a $4" >> $1
echo "command generated by ping_nos1_ue_ip_addr:"
cat $1
echo "end of command generated by ping_ue_ip_addr"
echo "end of command generated by ping_nos1_ue_ip_addr"
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
rm -f $1
echo "END ping_ue_ip_addr"
echo "END ping_nos1_ue_ip_addr"
}
function ping_no_s1_ue_ip_addr {
echo "CALL ping_ue_ip_addr"
function ping_nos1_enb_ip_addr {
echo "CALL ping_nos1_enb_ip_addr"
#echo '$@' $@
echo "echo \"COMMAND IS: ping -I oai0 -c 20 $3\" > $4" > $1
echo "rm -f $4" >> $1
echo "ping -I oai0 -c 20 $UE_REAL_IP_ADDR | tee -a $4" >> $1
echo "command generated by ping_ue_ip_addr:"
echo "ping -I oai0 -c 20 $ENB_REAL_IP_ADDR | tee -a $4" >> $1
echo "command generated by ping_nos1_enb_ip_addr:"
cat $1
echo "end of command generated by ping_ue_ip_addr"
echo "end of command generated by ping_nos1_enb_ip_addr"
ssh -o StrictHostKeyChecking=no ubuntu@$2 < $1
rm -f $1
echo "END ping_ue_ip_addr"
echo "END ping_nos1_enb_ip_addr"
}
function ping_epc_ip_addr {
......@@ -346,11 +354,7 @@ function start_nos1_sim_enb {
echo "log file path = /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE"
ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1
sleep 15
echo "if [ -e /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ]; then echo \"FILE EXISTS\"; else echo \"FILE DOES NOT EXIST\"; fi" > $LOC_ENB_VM_CMDS
ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1
# Check that marker is "eNB L1 are configured"
echo "ls /home/ubuntu/tmp/cmake_targets/log" > $LOC_ENB_VM_CMDS
ssh -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1
echo "egrep -c \"eNB L1 are configured\" /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE" > $LOC_ENB_VM_CMDS
cat $LOC_ENB_VM_CMDS
local i="0"
......@@ -366,14 +370,14 @@ function start_nos1_sim_enb {
fi
done
if [ $i -eq 100 ]
then
if [ $i -eq 100 ]
then
echo "Syncro succeeded"
SYNC=1
else
else
echo "Syncro failed"
SYNC=0
fi
fi
rm $1
}
......@@ -423,17 +427,11 @@ function start_nos1_sim_ue {
echo "cd /home/ubuntu/tmp/cmake_targets/lte_noS1_build_oai/build/" >> $1
echo "echo \"ulimit -c unlimited && ./lte-uesoftmodem-nos1 -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE -r $LOC_NB_RBS --siml1\" | sudo tee ./my-lte-uesoftmodem-run.sh " >> $1
echo "sudo chmod 775 ./my-lte-uesoftmodem-run.sh" >> $1
# echo "cat ./my-lte-uesoftmodem-run.sh" >> $1
# echo "BEGIN start_nos1_sim_ue command"
# cat $1
# echo "END start_nos1_sim_ue command"
echo "sudo rm -f /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE" >> $1
echo "sudo -E daemon --inherit --unsafe --name=ue_daemon --chdir=/home/ubuntu/tmp/cmake_targets/lte_noS1_build_oai/build -o /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE ./my-lte-uesoftmodem-run.sh" >> $1
ssh -o StrictHostKeyChecking=no ubuntu@$LOC_UE_IP_ADDR < $1
echo " ========================================================"
sleep 40
sleep 30
rm $1
echo " ========================================================"
# Check that marker is "Generating RRCConnectionReconfigurationComplete"
echo "egrep -c \"Generating RRCConnectionReconfigurationComplete\" /home/ubuntu/tmp/cmake_targets/log/$LOC_LOG_FILE" > $LOC_UE_VM_CMDS
cat $LOC_UE_VM_CMDS
......@@ -1572,6 +1570,9 @@ function run_test_on_vm {
echo "UE_VM_IP_ADDR = $UE_VM_IP_ADDR"
echo "CURRENT_ENB_LOG_FILE = $CURRENT_ENB_LOG_FILE"
start_nos1_sim_enb $ENB_VM_CMDS $ENB_VM_IP_ADDR $UE_VM_IP_ADDR $CURRENT_ENB_LOG_FILE 25 rcc.band7.nos1.simulator.conf
echo "ifconfig oai0 | egrep \"inet addr\" | sed -e 's#^.*addr:##' -e 's# Bcast.*##'" > $ENB_VM_CMDS
ENB_REAL_IP_ADDR=`ssh -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR < $ENB_VM_CMDS`
echo "ENB oai0 interface IP addr: $ENB_REAL_IP_ADDR"
echo "############################################################"
echo "Starting the UE in FDD-5MHz mode"
......@@ -1584,22 +1585,33 @@ function run_test_on_vm {
echo "UE oai0 interface IP addr: $UE_REAL_IP_ADDR"
echo "############################################################"
echo "Pinging the UE from eNB"
echo "Pinging the UE from the eNB"
echo "############################################################"
PING_LOG_FILE=fdd_05MHz_ping_ue.txt
ping_nos1_ue_ip_addr $ENB_VM_CMDS $ENB_VM_IP_ADDR $UE_REAL_IP_ADDR $PING_LOG_FILE
#ping_ue_ip_addr $UE_CMDS $UE_VM_IP_ADDR $REAL_UE_IP_ADDR $PING_LOG_FILE
scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
echo "############################################################"
echo "END OF Pinging the UE from the eNB"
echo "############################################################"
echo "############################################################"
echo "Pinging the eNB from the UE"
echo "############################################################"
PING_LOG_FILE=fdd_05MHz_ping_enb.txt
echo "UE_VM_CMDS = $UE_VM_CMDS"
echo "UE_VM_IP_ADDR = $UE_VM_IP_ADDR"
echo "UE_IP_ADDR = $UE_IP_ADDR"
echo "PING_LOG_FILE = $PING_LOG_FILE"
ping_no_s1_ue_ip_addr $ENB_VM_CMDS $ENB_VM_IP_ADDR $UE_REAL_IP_ADDR $PING_LOG_FILE
ping_nos1_enb_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR $ENB_REAL_IP_ADDR $PING_LOG_FILE
#ping_ue_ip_addr $UE_CMDS $UE_VM_IP_ADDR $REAL_UE_IP_ADDR $PING_LOG_FILE
scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
echo "############################################################"
echo "END OF Pinging the UE from eNB"
echo "END OF Pinging the eNB from the UE"
echo "############################################################"
sleep 30
echo "############################################################"
echo "Stopping the UE in FDD-5MHz mode"
echo "############################################################"
......
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