Commit 7525238f authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'enhancement-10-harmony' of...

Merge branch 'enhancement-10-harmony' of https://gitlab.eurecom.fr/oai/openairinterface5g into enhancement-10-harmony
parents 1309358b a4b60098
......@@ -8,6 +8,8 @@ job1:
- echo $EXTERNAL_SHARE_DIR
- echo $SHELL
- echo $OAI_TEST_CASE_GROUP
- echo $MACHINELIST
- echo $MACHINELISTGENERIC
- git rev-parse --abbrev-ref HEAD
- git_repo=`git config --get remote.origin.url`
- git_head=`git rev-parse HEAD`
......@@ -25,8 +27,8 @@ job1:
- echo $NRUNS_LTE_SOFTMODEM
- echo $TIMEOUT_CMD
- mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepo $git_repo -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS $OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP">& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepo $git_repo -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" --nrun_lte_softmodem $NRUNS_LTE_SOFTMODEM --timeout_cmd $TIMEOUT_CMD >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepo $git_repo -MachineList "$MACHINELIST" -MachineListGeneric "$MACHINELISTGENERIC" -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS $OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP">& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepo $git_repo -MachineList "$MACHINELIST" -MachineListGeneric "$MACHINELISTGENERIC" -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" --nrun_lte_softmodem $NRUNS_LTE_SOFTMODEM --timeout_cmd $TIMEOUT_CMD >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
- mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log
- mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
......
......@@ -126,6 +126,7 @@ endmacro(add_list_string_option)
if (CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif()
message("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
add_list_string_option(CMAKE_BUILD_TYPE "RelWithDebInfo" "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." Debug Release RelWithDebInfo MinSizeRel)
Message("Architecture is ${CMAKE_SYSTEM_PROCESSOR}")
......@@ -922,7 +923,14 @@ add_library(SECU_CN ${SECU_CN_SRC})
# Scheduler
################################"
file(GLOB SCHED_SRC ${OPENAIR1_DIR}/SCHED/*.c)
set(SCHED_SRC
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_eNb.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED/phy_mac_stub.c
${OPENAIR1_DIR}/SCHED/pucch_pc.c
${OPENAIR1_DIR}/SCHED/pusch_pc.c
)
add_library(SCHED_LIB ${SCHED_SRC})
# Layer 1
......@@ -1624,10 +1632,9 @@ target_link_libraries (lte-softmodem -ldl
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES})
target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES} -lboost_system) #Added manually as it is not found for some reason for USRP
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem ${T_LIB})
......@@ -1662,7 +1669,7 @@ target_link_libraries (lte-softmodem-nos1
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES} -lboost_system) #Added manually as it is not found for some reason for USRP
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${T_LIB})
......@@ -1685,7 +1692,7 @@ target_link_libraries(rrh_gw
UTIL LFDS
-Wl,--end-group )
target_link_libraries (rrh_gw rt pthread m )
target_link_libraries (rrh_gw ${option_HW_lib} ${option_TP_lib} ${LIBBOOST_LIBRARIES} )
target_link_libraries (rrh_gw ${option_HW_lib} ${option_TP_lib} ${LIBBOOST_LIBRARIES} -lboost_system ) #Added manually as it is not found for some reason for USRP
target_link_libraries (rrh_gw ${LIB_LMS_LIBRARIES})
target_link_libraries (rrh_gw ${T_LIB})
......
......@@ -16,17 +16,22 @@ Obj.# Case# Test# Description
01 01 20 Build lte-softmodem.USRP.Rel10
01 01 21 Build lte-softmodem.EXMIMO.Rel10
01 01 22 Build lte-softmodem.BLADERF.Rel10
01 01 23 Build lte-softmodem.ETHERNET.Rel10
01 01 23 Build lte-softmodem.ETHERNET.Rel10 (RCC)
01 01 24 Build lte-softmodem.LMSSDR.Rel10
01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10
secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10
secu_knas.Rel10 secu_knas_encrypt_eea1.Rel10 kdf.Rel10 aes128_cmac_encrypt.Rel10 secu_knas_encrypt_eia2.Rel10)
01 01 40 Build RRH Gateway for USRP (Rel 10)
01 01 41 Build RRH Gateway for EXMIMO (Rel 10)
01 01 42 Build RRH Gateway for BLADERF (Rel 10)
01 01 43 Build RRH Gateway for LMSSDR (Rel 10)
01 01 40 Build RRH Gateway (time domain) for USRP (Rel 10)
01 01 41 Build RRH Gateway (time domain) for EXMIMO (Rel 10)
01 01 42 Build RRH Gateway (time domain) for BLADERF (Rel 10)
01 01 43 Build RRH Gateway (time domain) for LMSSDR (Rel 10)
01 01 50 Build RRU (NGFI) for USRP (Rel 10) w/ ETHERNET transport
01 01 51 Build RRU (NGFI) for EXMIMO (Rel 10) w/ ETHERNET transport
01 01 52 Build RRU (NGFI) for BLADERF (Rel 10) w/ ETHERNET transport
01 01 53 Build RRU (NGFI) for LMSSDR (Rel 10) w/ ETHERNET transport
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
......@@ -249,4 +254,4 @@ Obj.# Case# Test# Description
#TODO: Add test cases for 10,20 MHz
#TODO: Add test cases for TDD/FDD
#TODO: Test and compile seperately for Rel8/Rel10
#TODO: Case03.py eMBMS test case
\ No newline at end of file
#TODO: Case03.py eMBMS test case
......@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd
# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo):
cmd = 'killall -9 -q -r ' + programList
cmd = 'sudo -E killall -9 -q -r ' + programList
result = oai.send(cmd, True)
print "Killing old programs..." + result
programArray = programList.split()
......@@ -1020,6 +1020,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(Thread_Busy)'
#If there is Segmentation fault, we mark the test case as failure as most likely eNB crashed
cmd = "grep -ilr \"segmentation fault\" " + logdir_local_testcase + " | cat "
cmd_out = subprocess.check_output ([cmd], shell=True)
if len(cmd_out) !=0:
run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(SEGFAULT)'
run_result_string = run_result_string + tput_run_string
test_result=test_result & run_result
......@@ -1261,7 +1268,8 @@ except KeyError:
sys.exit(1)
print "Killing zombie ssh sessions from earlier sessions..."
cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 '
cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"| awk \'{print $2}\' | sudo xargs kill -9 '
os.system(cmd)
if flag_start_testcase == False:
......@@ -1426,13 +1434,25 @@ for oai in oai_list:
setuplogfile = logdir + '/setup_log_' + MachineList[index] + '_.txt'
setup_script = locallogdir + '/setup_script_' + MachineList[index] + '_.txt'
#Sometimes git fails so the script below retries in that case
localfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/git-retry.sh')
remotefile = logdir + '/git-retry.sh'
paramList=[]
port=22
paramList.append ( {"operation":'put', "localfile":localfile, "remotefile":remotefile} )
sftp_log = os.path.expandvars(locallogdir + '/sftp_module.log')
sftp_module (user, pw, MachineList[index], port, paramList, sftp_log)
cmd = ' ( \n'
#cmd = cmd + 'rm -fR ' + logdir + '\n'
#cmd = cmd + 'mkdir -p ' + logdir + '\n'
cmd = cmd + 'cd '+ logdir + '\n'
cmd = cmd + 'git config --global http.sslVerify false \n'
cmd = cmd + 'git clone '+ GitOAI5GRepo +' \n'
cmd = cmd + 'git clone '+ GitOpenaircnRepo + ' \n'
cmd = cmd + 'sudo apt-get install -y git \n'
cmd = cmd + 'chmod 700 ' + logdir + '/git-retry.sh \n'
cmd = cmd + logdir + '/git-retry.sh clone '+ GitOAI5GRepo +' \n'
cmd = cmd + logdir + '/git-retry.sh clone '+ GitOpenaircnRepo + ' \n'
cmd = cmd + 'cd ' + logdirOAI5GRepo + '\n'
cmd = cmd + 'git checkout ' + GitOAI5GRepoBranch + '\n'
#cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion + '\n'
......
This diff is collapsed.
#!/bin/bash
#Simple script to retry git clone in case of failure
REALGIT=/usr/bin/git
RETRIES=10
DELAY=10
COUNT=1
while [ $COUNT -lt $RETRIES ]; do
$REALGIT $* >> git-clone-`hostname`-log.txt 2>&1
if [ $? -eq 0 ]; then
RETRIES=0
break
fi
let COUNT=$COUNT+1
sleep $DELAY
done
#!/bin/bash
#$1 programs to be killed and checked
var=`ps -A |grep -E -i $1`
echo "removing old programs..."
echo "args = $1"
echo "script name = $0"
filename=$(basename "$0")
echo "filename = $filename"
echo "programs to be killed...$1"
echo "bash PID = $$"
pid="$$"
echo "pid = $pid"
echo "Killing programs now..."
ps -aux |grep -E -i -w "$1"
var=`ps -aux |grep -E -i -w "$1" |awk '{print $2}'| tr '\n' ' ' | sed "s/$pid/ /"`
echo "Killing processes...$var"
#var=`ps -aux |grep -E -i '$1' |awk '{print $2}'| tr '\n' ' ' | sed "s/$pid/ /"`
#echo $var
if [ -n "$var" ] ; then sudo kill -9 $var ; fi
#| sudo xargs kill -9
echo "checking for old programs..."
var=`ps -aux |grep -E -i -w '$1' |grep -Ev 'grep' | grep -Ev '$filename'`
echo $var
if [ -n "$var" ]; then echo 'Match found'; else echo 'Match not found' ;fi
#!/bin/bash
#arg0 -> Name of executable
#args[1...N] -> arguments to be passed to executable
if [ -z "$OPENAIR_DIR" ]
then
echo "OPENAIR_DIR environment not set. Exiting.."
exit
fi
source $OPENAIR_DIR/cmake_targets/tools/build_helper
args=($*)
exec_name=${args[0]}
exe_args=(${args[@]:1})
gdb_file=$OPENAIR_DIR/targets/bin/gdb_file
gdb_log=$OPENAIR_DIR/targets/bin/gdb_log.bt
echo "args = ${args[@]}"
echo "exec_name = $exec_name"
echo "exe_args = ${exe_args[@]}"
echo "gdb log file = $gdb_log"
$SUDO rm -fr $gdb_file $gdb_log
$SUDO touch $gdb_file $gdb_log
$SUDO chmod 777 $gdb_file $gdb_log
$SUDO echo "file $exec_name" >> $gdb_file
$SUDO echo "set args ${exe_args[@]}" >> $gdb_file
$SUDO echo "run" >> $gdb_file
$SUDO echo "set logging overwrite on" >> $gdb_file
$SUDO echo "set logging file $gdb_log" >> $gdb_file
$SUDO echo "set logging on" >> $gdb_file
$SUDO echo "set pagination off" >> $gdb_file
$SUDO echo "handle SIG33 pass nostop noprint" >> $gdb_file
$SUDO echo "echo backtrace:\n" >> $gdb_file
$SUDO echo "backtrace full" >> $gdb_file
$SUDO echo "echo \n\nVariables:\n" >> $gdb_file
$SUDO echo "info variables" >> $gdb_file
$SUDO echo "echo \n\nlocals:\n" >> $gdb_file
$SUDO echo "info locals" >> $gdb_file
$SUDO echo "echo \n\nregisters:\n" >> $gdb_file
$SUDO echo "info registers" >> $gdb_file
$SUDO echo "echo \n\ncurrent instructions:\n" >> $gdb_file
$SUDO echo "x/16i \$pc" >> $gdb_file
$SUDO echo "echo \n\nthreads backtrace:\n" >> $gdb_file
$SUDO echo "thread apply all backtrace" >> $gdb_file
$SUDO echo "set logging off" >> $gdb_file
$SUDO echo "quit" >> $gdb_file
echo "Contents of gdb_file...start"
$SUDO cat $gdb_file
echo "Contents of gdb_file...finish"
$SUDO gdb -n -x $gdb_file 2>&1
......@@ -61,6 +61,7 @@ TEST_CASE_GROUP=""
BUILD_DOXYGEN=0
T_TRACER="False"
DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE=""
trap handle_ctrl_c INT
function print_help() {
......@@ -82,7 +83,7 @@ Options
--install-optional-packages
Install useful but not mandatory packages such as valgrind
-g | --run-with-gdb
Add debugging symbols to compilation directives
Add debugging symbols to compilation directives. It also disables any compiler optimization.
-h | --help
Print this help
--eNB
......@@ -170,7 +171,8 @@ function main() {
shift;;
-g | --run-with-gdb)
GDB=1
echo_info "Will Compile with gdb symbols"
CMAKE_BUILD_TYPE="Debug"
echo_info "Will Compile with gdb symbols and disable compiler optimization"
shift;;
--eNB)
eNB=1
......@@ -443,6 +445,7 @@ function main() {
if [ "$NOS1" = "1" ] ; then
cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
fi
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
......@@ -568,6 +571,8 @@ function main() {
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
fi
# oaisim compilation
###############
if [ "$oaisim" = "1" ] ; then
dconf=$OPENAIR_DIR/targets/bin
if [ "$NOS1" = "1" ] ; then
......@@ -581,6 +586,7 @@ function main() {
echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
......@@ -649,9 +655,10 @@ function main() {
cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
echo "set(XFORMS $XFORMS )" >> $cmake_file
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
#[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_mme_build_oai/build
......@@ -676,13 +683,14 @@ function main() {
mkdir -p $DIR/$rrh_build_dir/build
cmake_file=$DIR/$rrh_build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set(ENABLE_ITTI False )" >> $cmake_file
echo "set(RF_BOARD \"${HW}\")" >> $cmake_file
echo "set(TRANSP_PRO \"${TP}\")" >> $cmake_file
echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
echo "set (DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( ENABLE_ITTI False )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
echo 'set ( PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$rrh_build_dir/build
......
......@@ -369,7 +369,6 @@ check_install_oai_software() {
libxml2 \
libxml2-dev \
libxslt1-dev \
linux-headers-`uname -r` \
mscgen \
octave \
octave-signal \
......@@ -385,6 +384,8 @@ check_install_oai_software() {
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
#Sometimes linux headers are not available in apt-get if kernel is custom or new
$SUDO apt-get install linux-headers-`uname -r` || true
# First we remove gnutls/nettle installation and then install from sources
$SUDO apt-get remove -y libgnutls-dev nettle-dev nettle-bin
install_nettle_from_source
......@@ -397,13 +398,9 @@ install_asn1c_from_source(){
asn1_install_log=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
(
$SUDO rm -rf /tmp/asn1c-r1516
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516
cd /tmp/asn1c-r1516
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_3.p0
$SUDO rm -rf /tmp/asn1c
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
cd /tmp/asn1c
./configure
make -j`nproc`
$SUDO make install
......
......@@ -252,7 +252,7 @@ function main()
# Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then
bash -c echo "200 lte " >> /etc/iproute2/rt_tables
echo "200 lte " >> /etc/iproute2/rt_tables
fi
ip rule add fwmark 1 table lte
ifconfig oip1 up
......
......@@ -9,4 +9,5 @@ tracer/record
tracer/replay
tracer/textlog
tracer/vcd
tracer/macpdu2wireshark
tracee/tracee
......@@ -5,7 +5,7 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I.
LIBS=-lX11 -lm -lpng -lXft
all: record replay extract_config textlog enb vcd
all: record replay extract_config textlog enb vcd macpdu2wireshark
record: utils.o record.o database.o config.o
$(CC) $(CFLAGS) -o record $^ $(LIBS)
......@@ -31,6 +31,10 @@ vcd: utils.o vcd.o database.o event.o handler.o config.o \
filter/filter.a
$(CC) $(CFLAGS) -o vcd $^ $(LIBS)
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
config.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
gui/gui.a:
......@@ -50,7 +54,7 @@ filter/filter.a:
clean:
rm -f *.o core tracer_remote textlog enb vcd record replay
rm -f extract_config
rm -f extract_config macpdu2wireshark
cd gui && make clean
cd view && make clean
cd logger && make clean
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "database.h"
#include "event.h"
#include "handler.h"
#include "config.h"
#include "utils.h"
#include "packet-mac-lte.h"
#define DEFAULT_IP "127.0.0.1"
#define DEFAULT_PORT 9999
typedef struct {
int socket;
struct sockaddr_in to;
OBUF buf;
/* ul */
int ul_rnti;
int ul_frame;
int ul_subframe;
int ul_data;
/* dl */
int dl_rnti;
int dl_frame;
int dl_subframe;
int dl_data;
} ev_data;
void ul(void *_d, event e)
{
ev_data *d = _d;
ssize_t ret;
int fsf;
int i;
d->buf.osize = 0;
PUTS(&d->buf, MAC_LTE_START_STRING);
PUTC(&d->buf, FDD_RADIO);
PUTC(&d->buf, DIRECTION_UPLINK);
PUTC(&d->buf, C_RNTI);
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (e.e[d->ul_rnti].i>>8) & 255);
PUTC(&d->buf, e.e[d->ul_rnti].i & 255);
/* for newer version of wireshark? */
fsf = (e.e[d->ul_frame].i << 4) + e.e[d->ul_subframe].i;
/* for older version? */
fsf = e.e[d->ul_subframe].i;
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
PUTC(&d->buf, (fsf>>8) & 255);
PUTC(&d->buf, fsf & 255);
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
for (i = 0; i < e.e[d->ul_data].bsize; i++)
PUTC(&d->buf, ((char*)e.e[d->ul_data].b)[i]);
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
if (ret != d->buf.osize) abort();
}
void dl(void *_d, event e)
{
ev_data *d = _d;
ssize_t ret;
int fsf;
int i;
d->buf.osize = 0;
PUTS(&d->buf, MAC_LTE_START_STRING);
PUTC(&d->buf, FDD_RADIO);
PUTC(&d->buf, DIRECTION_DOWNLINK);
PUTC(&d->buf, C_RNTI);
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (e.e[d->dl_rnti].i>>8) & 255);
PUTC(&d->buf, e.e[d->dl_rnti].i & 255);
/* for newer version of wireshark? */
fsf = (e.e[d->dl_frame].i << 4) + e.e[d->dl_subframe].i;
/* for older version? */
fsf = e.e[d->dl_subframe].i;
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
PUTC(&d->buf, (fsf>>8) & 255);
PUTC(&d->buf, fsf & 255);
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
for (i = 0; i < e.e[d->dl_data].bsize; i++)
PUTC(&d->buf, ((char*)e.e[d->dl_data].b)[i]);
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
if (ret != d->buf.osize) abort();
}
void setup_data(ev_data *d, void *database, int ul_id, int dl_id)
{
database_event_format f;
int i;
d->ul_rnti = -1;
d->ul_frame = -1;
d->ul_subframe = -1;
d->ul_data = -1;
d->dl_rnti = -1;
d->dl_frame = -1;
d->dl_subframe = -1;
d->dl_data = -1;
#define G(var_name, var_type, var) \
if (!strcmp(f.name[i], var_name)) { \
if (strcmp(f.type[i], var_type)) goto error; \
var = i; \
continue; \
}
/* ul: rnti, frame, subframe, data */
f = get_format(database, ul_id);
for (i = 0; i < f.count; i++) {
G("rnti", "int", d->ul_rnti);
G("frame", "int", d->ul_frame);
G("subframe", "int", d->ul_subframe);
G("data", "buffer", d->ul_data);
}
if (d->ul_rnti == -1 || d->ul_frame == -1 || d->ul_subframe == -1 ||
d->ul_data == -1) goto error;
/* dl: rnti, frame, subframe, data */
f = get_format(database, dl_id);
for (i = 0; i < f.count; i++) {
G("rnti", "int", d->dl_rnti);
G("frame", "int", d->dl_frame);
G("subframe", "int", d->dl_subframe);
G("data", "buffer", d->dl_data);
}
if (d->dl_rnti == -1 || d->dl_frame == -1 || d->dl_subframe == -1 ||
d->dl_data == -1) goto error;
#undef G
return;
error:
printf("bad T_messages.txt\n");
abort();
}
void *receiver(void *_d)
{
ev_data *d = _d;
int s;
char buf[100000];
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s == -1) { perror("socket"); abort(); }
if (bind(s, (struct sockaddr *)&d->to, sizeof(struct sockaddr_in)) == -1)
{ perror("bind"); abort(); }
while (1) {
if (recv(s, buf, 100000, 0) <= 0) abort();
}
return 0;
}
void usage(void)
{
printf(
"options:\n"
" -d <database file> this option is mandatory\n"
" -in <dump file> read events from this dump file\n"
" -ip <IP address> send packets to this IP address (default %s)\n"
" -p <port> send packets to this port (default %d)\n",
DEFAULT_IP,
DEFAULT_PORT
);
exit(1);
}
int main(int n, char **v)
{
char *database_filename = NULL;
char *input_filename = NULL;
void *database;
event_handler *h;
int in;
int i;
int ul_id, dl_id;
ev_data d;
char *ip = DEFAULT_IP;
int port = DEFAULT_PORT;
memset(&d, 0, sizeof(ev_data));
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
if (!strcmp(v[i], "-d"))
{ if (i > n-2) usage(); database_filename = v[++i]; continue; }
if (!strcmp(v[i], "-in"))
{ if (i > n-2) usage(); input_filename = v[++i]; continue; }
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
if (!strcmp(v[i], "-p")) {if(i>n-2)usage(); port=atoi(v[++i]); continue; }
usage();
}
if (database_filename == NULL) {
printf("ERROR: provide a database file (-d)\n");
exit(1);
}
if (input_filename == NULL) {
printf("ERROR: provide an input file (-i)\n");
exit(1);
}
in = open(input_filename, O_RDONLY);
if (in == -1) { perror(input_filename); return 1; }
database = parse_database(database_filename);
load_config_file(database_filename);
h = new_handler(database);
ul_id = event_id_from_name(database, "ENB_MAC_UE_UL_PDU_WITH_DATA");
dl_id = event_id_from_name(database, "ENB_MAC_UE_DL_PDU_WITH_DATA");
setup_data(&d, database, ul_id, dl_id);
register_handler_function(h, ul_id, ul, &d);
register_handler_function(h, dl_id, dl, &d);
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
if (d.socket == -1) { perror("socket"); exit(1); }
d.to.sin_family = AF_INET;
d.to.sin_port = htons(port);
d.to.sin_addr.s_addr = inet_addr(ip);
new_thread(receiver, &d);
/* read messages */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(in, v, database);
if (e.type == -1) break;
if (!(e.type == ul_id || e.type == dl_id)) continue;
handle_event(h, e);
}
return 0;
}
This diff is collapsed.
......@@ -68,6 +68,7 @@
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "T.h"
void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,unsigned char Msg3_subframe)
{
......@@ -644,6 +645,9 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
&eNB->common_channels[CC_id].CCCH_pdu.payload[0],
rrc_sdu_length);
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(RA_template->rnti), T_INT(frameP), T_INT(subframeP),
T_INT(0 /*harq_pid always 0?*/), T_BUFFER(&eNB->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TBsize));
if (opt_enabled==1) {
trace_pdu(1, (uint8_t *)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0],
rrc_sdu_length, UE_id, 3, UE_RNTI(module_idP, UE_id),
......
Index: skeletons/per_opentype.c
===================================================================
--- skeletons/per_opentype.c (revision 1516)
+++ skeletons/per_opentype.c (working copy)
@@ -277,7 +306,7 @@
(void)constraints;
(void)sptr;
- while(per_get_few_bits(pd, 24) >= 0);
+ while(per_get_few_bits(pd, 1 /*24*/) >= 0);
rv.code = RC_OK;
rv.consumed = pd->moved;
......@@ -60,6 +60,8 @@
#endif
#include "msc.h"
#include "UERadioAccessCapabilityInformation.h"
#include "gtpv1u_eNB_task.h"
#include "RRC/LITE/rrc_eNB_GTPV1U.h"
......@@ -584,29 +586,42 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
//------------------------------------------------------------------------------
{
UECapabilityInformation_t *ueCapabilityInformation = &ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation;
if ((ueCapabilityInformation->criticalExtensions.present == UECapabilityInformation__criticalExtensions_PR_c1)
&& (ueCapabilityInformation->criticalExtensions.choice.c1.present
== UECapabilityInformation__criticalExtensions__c1_PR_ueCapabilityInformation_r8)
&& (ueCapabilityInformation->criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.count > 0)) {
UE_CapabilityRAT_ContainerList_t* ue_CapabilityRAT_ContainerList =
&ueCapabilityInformation->criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList;
MessageDef *msg_p;
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_UE_CAPABILITIES_IND);
S1AP_UE_CAPABILITIES_IND (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
S1AP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.length = ue_CapabilityRAT_ContainerList->list.array[0]->ueCapabilityRAT_Container.size;
S1AP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.buffer = ue_CapabilityRAT_ContainerList->list.array[0]->ueCapabilityRAT_Container.buf;
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
if (ue_CapabilityRAT_ContainerList->list.count > 1) {
LOG_W (RRC,"[eNB %d][UE %x] can only handle 1 UE capability RAT item for now (%d)\n",
ctxt_pP->module_id,
ue_context_pP->ue_context.rnti,
ue_CapabilityRAT_ContainerList->list.count);
}
/* 4096 is arbitrary, should be big enough */
unsigned char buf[4096];
unsigned char *buf2;
UERadioAccessCapabilityInformation_t rac;
if (ueCapabilityInformation->criticalExtensions.present != UECapabilityInformation__criticalExtensions_PR_c1
|| ueCapabilityInformation->criticalExtensions.choice.c1.present != UECapabilityInformation__criticalExtensions__c1_PR_ueCapabilityInformation_r8) {
LOG_E(RRC, "[eNB %d][UE %x] bad UE capabilities\n", ctxt_pP->module_id, ue_context_pP->ue_context.rnti);
return;
}
asn_enc_rval_t ret = uper_encode_to_buffer(&asn_DEF_UECapabilityInformation, ueCapabilityInformation, buf, 4096);
if (ret.encoded == -1) abort();
memset(&rac, 0, sizeof(UERadioAccessCapabilityInformation_t));
rac.criticalExtensions.present = UERadioAccessCapabilityInformation__criticalExtensions_PR_c1;
rac.criticalExtensions.choice.c1.present = UERadioAccessCapabilityInformation__criticalExtensions__c1_PR_ueRadioAccessCapabilityInformation_r8;
rac.criticalExtensions.choice.c1.choice.ueRadioAccessCapabilityInformation_r8.ue_RadioAccessCapabilityInfo.buf = buf;
rac.criticalExtensions.choice.c1.choice.ueRadioAccessCapabilityInformation_r8.ue_RadioAccessCapabilityInfo.size = (ret.encoded+7)/8;
rac.criticalExtensions.choice.c1.choice.ueRadioAccessCapabilityInformation_r8.nonCriticalExtension = NULL;
/* 8192 is arbitrary, should be big enough */
buf2 = malloc16(8192);
if (buf2 == NULL) abort();
ret = uper_encode_to_buffer(&asn_DEF_UERadioAccessCapabilityInformation, &rac, buf2, 8192);
if (ret.encoded == -1) abort();
MessageDef *msg_p;
msg_p = itti_alloc_new_message (TASK_RRC_ENB, S1AP_UE_CAPABILITIES_IND);
S1AP_UE_CAPABILITIES_IND (msg_p).eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
S1AP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.length = (ret.encoded+7)/8;
S1AP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.buffer = buf2;
itti_send_msg_to_task (TASK_S1AP, ctxt_pP->instance, msg_p);
}
//------------------------------------------------------------------------------
......
......@@ -77,7 +77,8 @@ Description Implements the API used by the NAS layer to read/write
* Subscriber authentication security key
*/
#define USIM_API_K_SIZE 16
#define USIM_API_K_VALUE "fec86ba6eb707ed08905757b1bb44b8f"
//#define USIM_API_K_VALUE "fec86ba6eb707ed08905757b1bb44b8f"
#define USIM_API_K_VALUE "8BAF473F2F8FD09487CCCBD7097C6862"
static uint8_t _usim_api_k[USIM_API_K_SIZE];
......
This diff is collapsed.
--- skeletons/OCTET_STRING.c.orig 2015-04-28 10:40:04.036970492 +0200
+++ skeletons/OCTET_STRING.c 2015-04-28 10:40:09.619970869 +0200
@@ -159,7 +159,7 @@
}
static struct _stack *
-_new_stack() {
+_new_stack(void) {
return (struct _stack *)CALLOC(1, sizeof(struct _stack));
}
--- skeletons/converter-sample.c.orig 2015-04-28 10:40:32.164972391 +0200
+++ skeletons/converter-sample.c 2015-04-28 10:40:37.140972727 +0200
@@ -353,7 +353,7 @@
} DynamicBuffer;
static void
-buffer_dump() {
+buffer_dump(void) {
uint8_t *p = DynamicBuffer.data + DynamicBuffer.offset;
uint8_t *e = p + DynamicBuffer.length - (DynamicBuffer.unbits ? 1 : 0);
if(!opt_debug) return;
This diff is collapsed.
......@@ -668,6 +668,8 @@ int s1ap_eNB_ue_capabilities(instance_t instance,
return -1;
}
free(ue_cap_info_ind_p->ue_radio_cap.buffer);
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
......
......@@ -45,7 +45,7 @@
#include <complex>
#include <fstream>
#include <cmath>
#include <time.h>
#include "common_lib.h"
#ifdef __SSE4_1__
# include <smmintrin.h>
......@@ -172,7 +172,13 @@ static void trx_usrp_end(openair0_device *device)
*/
static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags)
{
int ret;
static long long int loop=0;
static long time_min=0, time_max=0, time_avg=0;
struct timespec tp_start, tp_end;
long time_diff;
clock_gettime(CLOCK_MONOTONIC_RAW, &tp_start);
int ret=0, ret_i=0;
usrp_state_t *s = (usrp_state_t*)device->priv;
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
......@@ -196,7 +202,21 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
if (ret != nsamps) {
printf("[xmit] tx samples %d != %d\n",ret,nsamps);
}
clock_gettime(CLOCK_MONOTONIC_RAW, &tp_end);
time_diff = (tp_end.tv_sec - tp_start.tv_sec) *1E09 + (tp_end.tv_nsec - tp_start.tv_nsec);
if (time_min==0 ||loop==1 || time_min > time_diff)
time_min=time_diff;
if (time_max==0 ||loop==1 || time_max < time_diff)
time_max=time_diff;
if (time_avg ==0 ||loop==1)
time_avg= time_diff;
else
time_avg=(time_diff+time_avg) /2.0;
if ( loop%10000 ==0)
printf("\n usrp_write: min(ns)=%d, max(ns)=%d, avg(ns)=%d", (int)time_min, (int)time_max,(int)time_avg);
loop++;
return ret;
}
......@@ -213,6 +233,11 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
*/
static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc)
{
static long long int loop=0;
static long time_min=0, time_max=0, time_avg=0;
struct timespec tp_start, tp_end;
long time_diff;
clock_gettime(CLOCK_MONOTONIC_RAW, &tp_start);
usrp_state_t *s = (usrp_state_t*)device->priv;
int samples_received=0,i,j;
int nsamps2; // aligned to upper 32 or 16 byte boundary
......@@ -293,7 +318,20 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
s->rx_timestamp = s->rx_md.time_spec.to_ticks(s->sample_rate);
*ptimestamp = s->rx_timestamp;
return samples_received;
clock_gettime(CLOCK_MONOTONIC_RAW, &tp_end);
time_diff = (tp_end.tv_sec - tp_start.tv_sec) *1E09 + (tp_end.tv_nsec - tp_start.tv_nsec);
if (time_min==0 ||loop==1 || time_min > time_diff)
time_min=time_diff;
if (time_max==0 || loop==1|| time_max < time_diff)
time_max=time_diff;
if (time_avg ==0 ||loop==1)
time_avg= time_diff;
else
time_avg=(time_diff+time_avg) /2.0;
if ( loop % 10000==0)
printf("\n usrp_read: min(ns)=%d, max(ns)=%d, avg(ns)=%d", (int)time_min, (int)time_max,(int)time_avg);
loop++;
return samples_received;
}
/*! \brief Get current timestamp of USRP
......@@ -500,6 +538,7 @@ extern "C" {
// Initialize USRP device
device->openair0_cfg = openair0_cfg;
std::string args = "type=b200";
......@@ -523,6 +562,8 @@ extern "C" {
// workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate
args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock);
args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096";
uhd::device_addrs_t device_adds = uhd::device::find(args);
if(device_adds.size() == 0)
......@@ -554,25 +595,25 @@ extern "C" {
switch ((int)openair0_cfg[0].sample_rate) {
case 30720000:
// from usrp_time_offset
openair0_cfg[0].samples_per_packet = 2048;
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 15;
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
break;
case 15360000:
openair0_cfg[0].samples_per_packet = 2048;
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 45;
openair0_cfg[0].tx_bw = 10e6;
openair0_cfg[0].rx_bw = 10e6;
break;
case 7680000:
openair0_cfg[0].samples_per_packet = 1024;
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 50;
openair0_cfg[0].tx_bw = 5e6;
openair0_cfg[0].rx_bw = 5e6;
break;
case 1920000:
openair0_cfg[0].samples_per_packet = 256;
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg[0].tx_sample_advance = 50;
openair0_cfg[0].tx_bw = 1.25e6;
openair0_cfg[0].rx_bw = 1.25e6;
......@@ -585,7 +626,7 @@ extern "C" {
} else {
printf("Found USRP B200");
args += ",num_recv_frames=256" ;
args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=4096, recv_frame_size=4096" ;
s->usrp = uhd::usrp::multi_usrp::make(args);
// s->usrp->set_rx_subdev_spec(rx_subdev);
......@@ -611,30 +652,35 @@ extern "C" {
switch ((int)openair0_cfg[0].sample_rate) {
case 30720000:
s->usrp->set_master_clock_rate(30.72e6);
//openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 115;
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
break;
case 23040000:
s->usrp->set_master_clock_rate(23.04e6); //to be checked
//openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 113;
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
break;
case 15360000:
s->usrp->set_master_clock_rate(30.72e06);
//openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 103;
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
break;
case 7680000:
s->usrp->set_master_clock_rate(30.72e6);
//openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 80;
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
break;
case 1920000:
s->usrp->set_master_clock_rate(30.72e6);
//openair0_cfg[0].samples_per_packet = 1024;
openair0_cfg[0].tx_sample_advance = 40;
openair0_cfg[0].tx_bw = 20e6;
openair0_cfg[0].rx_bw = 20e6;
......@@ -758,7 +804,8 @@ extern "C" {
device->trx_stop_func = trx_usrp_stop;
device->trx_set_freq_func = trx_usrp_set_freq;
device->trx_set_gains_func = trx_usrp_set_gains;
device->openair0_cfg = openair0_cfg;
s->sample_rate = openair0_cfg[0].sample_rate;
// TODO:
// init tx_forward_nsamps based usrp_time_offset ex
......
......@@ -188,7 +188,7 @@ static inline void thread_top_init(char *thread_name,
if (sched_setattr(0, &attr, flags) < 0 ) {
perror("[SCHED] eNB tx thread: sched_setattr failed\n");
return &eNB_thread_rxtx_status;
exit_fun("Error setting deadline scheduler");
}
LOG_I( HW, "[SCHED] eNB %s deadline thread (TID %ld) started on CPU %d\n", gettid(), thread_name,sched_getcpu() );
......
......@@ -382,7 +382,8 @@ void help (void) {
printf(" --ue-txgain set UE TX gain\n");
printf(" --ue-scan_carrier set UE to scan around carrier\n");
printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n");
printf(" --mmapped-dma sets flag for improved EXMIMO UE performance\n");
printf(" --mmapped-dma sets flag for improved EXMIMO UE performance\n");
printf(" --single-thread runs lte-softmodem in only one thread\n");
printf(" -C Set the downlink frequency for all component carriers\n");
printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n");
printf(" -F Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n");
......
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