Merge branch 'develop' into feature-34-test_framework
This commit is contained in:
@@ -171,13 +171,13 @@ set(CMAKE_CXX_FLAGS
|
||||
|
||||
|
||||
#########################
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${OPENAIR_TARGETS}/bin")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CURRENT_BINARY_DIR}")
|
||||
#########################
|
||||
# set a flag for changes in the source code
|
||||
# these changes are related to hardcoded path to include .h files
|
||||
add_definitions(-DCMAKER)
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
|
||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O3")
|
||||
|
||||
|
||||
set(GIT_BRANCH "UNKNOWN")
|
||||
|
||||
@@ -4638,7 +4638,7 @@
|
||||
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_PORT_FOR_S1U 2152</eNB_config_file>
|
||||
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||
<eNB_compile_prog_args>--eNB -w BLADERF -x -c </eNB_compile_prog_args>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash ; sudo -E $OPENAIR_DIR/cmake_targets/tools/start_bladerf.py</eNB_pre_exec>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash </eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf -W </eNB_main_exec_args>
|
||||
@@ -4714,7 +4714,7 @@
|
||||
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_PORT_FOR_S1U 2152</eNB_config_file>
|
||||
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||
<eNB_compile_prog_args>--eNB -w BLADERF -x -c </eNB_compile_prog_args>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash ; sudo -E $OPENAIR_DIR/cmake_targets/tools/start_bladerf.py</eNB_pre_exec>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash </eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf -W </eNB_main_exec_args>
|
||||
@@ -4789,7 +4789,7 @@
|
||||
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_PORT_FOR_S1U 2152</eNB_config_file>
|
||||
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||
<eNB_compile_prog_args>--eNB -w BLADERF -x -c </eNB_compile_prog_args>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash ; sudo -E $OPENAIR_DIR/cmake_targets/tools/start_bladerf.py</eNB_pre_exec>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash </eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf -W </eNB_main_exec_args>
|
||||
@@ -4864,7 +4864,7 @@
|
||||
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_PORT_FOR_S1U 2152</eNB_config_file>
|
||||
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||
<eNB_compile_prog_args>--eNB -w BLADERF -x -c </eNB_compile_prog_args>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash ; sudo -E $OPENAIR_DIR/cmake_targets/tools/start_bladerf.py</eNB_pre_exec>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash </eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf -W </eNB_main_exec_args>
|
||||
@@ -4938,7 +4938,7 @@
|
||||
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_PORT_FOR_S1U 2152</eNB_config_file>
|
||||
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||
<eNB_compile_prog_args>--eNB -w BLADERF -x -c </eNB_compile_prog_args>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash ; sudo -E $OPENAIR_DIR/cmake_targets/tools/start_bladerf.py</eNB_pre_exec>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash </eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf -W </eNB_main_exec_args>
|
||||
@@ -5012,7 +5012,7 @@
|
||||
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf ENB_PORT_FOR_S1U 2152</eNB_config_file>
|
||||
<eNB_compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</eNB_compile_prog>
|
||||
<eNB_compile_prog_args>--eNB -w BLADERF -x -c </eNB_compile_prog_args>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash ; sudo -E $OPENAIR_DIR/cmake_targets/tools/start_bladerf.py</eNB_pre_exec>
|
||||
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash </eNB_pre_exec>
|
||||
<eNB_pre_exec_args></eNB_pre_exec_args>
|
||||
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
|
||||
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf -W </eNB_main_exec_args>
|
||||
|
||||
@@ -132,10 +132,21 @@ compilations() {
|
||||
############################################
|
||||
|
||||
install_nettle_from_source() {
|
||||
nettle_install_log=$OPENAIR_DIR/cmake_targets/log/nettle_install_log.txt
|
||||
echo_info "\nInstalling Nettle. The log file for nettle installation is here: $nettle_install_log "
|
||||
(
|
||||
cd /tmp
|
||||
echo "Downloading nettle archive"
|
||||
rm -rf /tmp/nettle-2.5.tar.gz* /tmp/nettle-2.5
|
||||
wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz
|
||||
$SUDO rm -rf /tmp/nettle-2.5.tar.gz* /tmp/nettle-2.5
|
||||
wget https://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz
|
||||
if [ $? -ne 0 ]; then
|
||||
wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz
|
||||
fi
|
||||
if [ ! -f nettle-2.5.tar.gz ]; then
|
||||
echo_error "Could not download nettle source files"
|
||||
cd -
|
||||
return
|
||||
fi
|
||||
tar -xzf nettle-2.5.tar.gz
|
||||
cd nettle-2.5/
|
||||
./configure --disable-openssl --enable-shared --prefix=/usr
|
||||
@@ -143,21 +154,32 @@ install_nettle_from_source() {
|
||||
make -j`nproc`
|
||||
make check
|
||||
$SUDO make install
|
||||
rm -rf /tmp/nettle-2.5.tar.gz /tmp/nettle-2.5
|
||||
) >& $nettle_install_log
|
||||
}
|
||||
|
||||
install_gnutls_from_source(){
|
||||
gnutls_install_log=$OPENAIR_DIR/cmake_targets/log/gnutls_install_log.txt
|
||||
echo_info "\nInstalling Gnutls. The log file for Gnutls installation is here: $gnutls_install_log "
|
||||
(
|
||||
cd /tmp
|
||||
echo "Downloading gnutls archive"
|
||||
rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23
|
||||
wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz
|
||||
tar -xzf gnutls-3.1.23.tar.xz
|
||||
$SUDO rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23
|
||||
wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz
|
||||
if [ $? -ne 0 ]; then
|
||||
wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz
|
||||
fi
|
||||
if [ ! -f gnutls-3.1.23.tar.xz ]; then
|
||||
echo_error "Could not download gnutls source files"
|
||||
cd -
|
||||
return
|
||||
fi
|
||||
tar -xJf gnutls-3.1.23.tar.xz
|
||||
cd gnutls-3.1.23/
|
||||
./configure --prefix=/usr
|
||||
echo "Compiling gnutls"
|
||||
make -j`nproc`
|
||||
$SUDO make install
|
||||
rm -rf /tmp/gnutls-3.1.23.tar.xz /tmp/gnutls-3.1.23
|
||||
)>& $gnutls_install_log
|
||||
}
|
||||
|
||||
|
||||
@@ -274,12 +296,12 @@ check_install_oai_software() {
|
||||
android-tools-adb
|
||||
|
||||
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
|
||||
if [ `lsb_release -rs` = '12.04' ] ; then
|
||||
install_nettle_from_source
|
||||
install_gnutls_from_source
|
||||
else
|
||||
$SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin
|
||||
fi
|
||||
|
||||
# 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
|
||||
install_gnutls_from_source
|
||||
|
||||
$SUDO pip install paramiko
|
||||
$SUDO pip install pyroute2
|
||||
install_asn1c_from_source
|
||||
@@ -288,8 +310,8 @@ check_install_oai_software() {
|
||||
}
|
||||
|
||||
install_asn1c_from_source(){
|
||||
asn1_install_dir=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt
|
||||
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_dir "
|
||||
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
|
||||
mkdir -p /tmp/asn1c-r1516
|
||||
@@ -303,7 +325,7 @@ install_asn1c_from_source(){
|
||||
./configure
|
||||
make -j`nproc`
|
||||
$SUDO make install
|
||||
) > $asn1_install_dir 2>&1
|
||||
) > $asn1_install_log 2>&1
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
||||
@@ -71,6 +71,7 @@ function help()
|
||||
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"
|
||||
}
|
||||
|
||||
|
||||
@@ -165,6 +166,11 @@ function main()
|
||||
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;
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option $1"
|
||||
help
|
||||
|
||||
@@ -81,8 +81,10 @@ function help()
|
||||
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)"
|
||||
@@ -114,8 +116,14 @@ function main()
|
||||
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
|
||||
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
|
||||
@@ -131,6 +139,11 @@ function main()
|
||||
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"
|
||||
@@ -241,7 +254,8 @@ function main()
|
||||
if [ $? -ne 0 ]; then
|
||||
bash -c echo "200 lte " >> /etc/iproute2/rt_tables
|
||||
fi
|
||||
ip rule add fwmark 1 table lte
|
||||
ip rule add fwmark 1 table lte
|
||||
ifconfig oip1 up
|
||||
ip route add default dev oip1 table lte
|
||||
|
||||
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
|
||||
|
||||
@@ -755,26 +755,26 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
||||
if (phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa]) {
|
||||
switch (phy_vars_ue->lte_frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
idft128((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][LTE_CE_OFFSET],
|
||||
idft128((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
idft512((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][LTE_CE_OFFSET],
|
||||
idft512((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft1024((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][LTE_CE_OFFSET],
|
||||
idft1024((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 75:
|
||||
idft1536((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][LTE_CE_OFFSET],
|
||||
idft1536((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa]);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][LTE_CE_OFFSET],
|
||||
idft2048((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
@@ -2057,7 +2057,7 @@ void process_HARQ_feedback(uint8_t UE_id,
|
||||
// then Increment DLSCH round index
|
||||
dlsch_harq_proc->round++;
|
||||
|
||||
if (dlsch_harq_proc->round == 1/*dlsch->Mdlharq*/) {
|
||||
if (dlsch_harq_proc->round == dlsch->Mdlharq) {
|
||||
// This was the last round for DLSCH so reset round and increment l2_error counter
|
||||
#ifdef DEBUG_PHY_PROC
|
||||
LOG_W(PHY,"[eNB %d][PDSCH %x/%d] DLSCH retransmissions exhausted, dropping packet\n",phy_vars_eNB->Mod_id,
|
||||
|
||||
@@ -128,7 +128,7 @@ int main(int argc, char **argv)
|
||||
|
||||
char c;
|
||||
|
||||
int i,l,aa,aarx,k;
|
||||
int i,l,l2,aa,aarx,k;
|
||||
double sigma2, sigma2_dB=0,SNR,snr0=-2.0,snr1=0.0;
|
||||
uint8_t snr1set=0;
|
||||
double snr_step=1,input_snr_step=1;
|
||||
@@ -337,7 +337,11 @@ int main(int argc, char **argv)
|
||||
else
|
||||
sprintf(fname,"embms_awgn_%d_%d.m",mcs,N_RB_DL);
|
||||
|
||||
fd = fopen(fname,"w");
|
||||
if (!(fd = fopen(fname,"w"))) {
|
||||
printf("Cannot open %s, check permissions\n",fname);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
if (awgn_flag==0)
|
||||
fprintf(fd,"SNR_%d_%d=[];errs_mch_%d_%d=[];mch_trials_%d_%d=[];\n",
|
||||
@@ -538,11 +542,25 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rx_pmch(PHY_vars_UE,
|
||||
0,
|
||||
subframe%10,
|
||||
l);
|
||||
|
||||
if (l==6)
|
||||
for (l2=2;l2<7;l2++)
|
||||
rx_pmch(PHY_vars_UE,
|
||||
0,
|
||||
subframe%10,
|
||||
l2);
|
||||
if (l==6)
|
||||
for (l2=2;l2<7;l2++)
|
||||
rx_pmch(PHY_vars_UE,
|
||||
0,
|
||||
subframe%10,
|
||||
l2);
|
||||
if (l==11)
|
||||
for (l2=7;l2<12;l2++)
|
||||
rx_pmch(PHY_vars_UE,
|
||||
0,
|
||||
subframe%10,
|
||||
l2);
|
||||
}
|
||||
|
||||
PHY_vars_UE->dlsch_ue_MCH[0]->harq_processes[0]->G = get_G(&PHY_vars_UE->lte_frame_parms,
|
||||
|
||||
@@ -484,7 +484,7 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
ctxt.enb_flag = ENB_FLAG_NO;
|
||||
ctxt.module_id = pdcp_read_header_g.inst - oai_emulation.info.nb_enb_local + oai_emulation.info.first_ue_local;
|
||||
ctxt.rnti = pdcp_UE_UE_module_id_to_rnti[ctxt.module_id];
|
||||
rab_id = pdcp_read_header_g.rb_id;
|
||||
rab_id = pdcp_read_header_g.rb_id % maxDRB;
|
||||
}
|
||||
|
||||
CHECK_CTXT_ARGS(&ctxt);
|
||||
|
||||
@@ -520,7 +520,7 @@ rrc_rx_tx(
|
||||
} else { // eNB
|
||||
check_handovers(ctxt_pP);
|
||||
// counetr, and get the value and aggregate
|
||||
#ifdef LOCALIZATION
|
||||
#ifdef RRC_LOCALIZATION
|
||||
|
||||
/* for the localization, only primary CC_id might be relevant*/
|
||||
gettimeofday(&ts, NULL);
|
||||
|
||||
@@ -515,7 +515,7 @@ int init_opt(char *path, char *ip, char *port, radio_type_t radio_type_p)
|
||||
strncpy( in_path, path, sizeof(in_path) );
|
||||
in_path[sizeof(in_path) - 1] = 0; // terminate string
|
||||
} else {
|
||||
strcpy( in_path, "/tmp/oai_opt.pcap" );
|
||||
strcpy( in_path, "/tmp/opt.pcap" );
|
||||
}
|
||||
|
||||
if (ip != NULL) {
|
||||
|
||||
@@ -181,6 +181,35 @@ int esm_send_pdn_connectivity_request(int pti, int is_emergency, int pdn_type,
|
||||
}
|
||||
}
|
||||
|
||||
/* Add PCO */
|
||||
# define CONFIGURATION_PROTOCOL_PPP 0
|
||||
# define PROTOCOL_ID_IPCP 0x8021
|
||||
# define PROTOCOL_ID_DNS_SERVER_IPV4_ADDRESS 0x000D
|
||||
# define PROTOCOL_ID_IP_ADDR_NAS_SIGNALING 0x000A
|
||||
|
||||
msg->presencemask |= PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT;
|
||||
msg->protocolconfigurationoptions.configurationprotol = CONFIGURATION_PROTOCOL_PPP;
|
||||
msg->protocolconfigurationoptions.num_protocol_id_or_container_id = 3;
|
||||
msg->protocolconfigurationoptions.protocolid[0] = PROTOCOL_ID_IPCP;
|
||||
msg->protocolconfigurationoptions.lengthofprotocolid[0] = 16; /* Size of PROTOCOL_ID_IPCP */
|
||||
msg->protocolconfigurationoptions.protocolidcontents[0].value = (uint8_t *)
|
||||
/* PROTOCOL_ID_IPCP data */
|
||||
/* the format is as of RFC 1331 (see page 27) */
|
||||
"\x01" /* Configure-Request */
|
||||
"\x00" /* Indentifier (set to 0) */
|
||||
"\x00\x10" /* Length (16 bytes) */
|
||||
"\x81" /* Type = Primary DNS - see RFC 1877 */
|
||||
"\x06" /* length */
|
||||
"\x00\x00\x00\x00" /* IP address set to 0 */
|
||||
"\x83" /* Type = Secondary DNS - see RFC 1877 */
|
||||
"\x06" /* length */
|
||||
"\x00\x00\x00\x00"; /* IP address set to 0 */
|
||||
msg->protocolconfigurationoptions.protocolidcontents[0].length = 16;
|
||||
msg->protocolconfigurationoptions.protocolid[1] = PROTOCOL_ID_DNS_SERVER_IPV4_ADDRESS;
|
||||
msg->protocolconfigurationoptions.lengthofprotocolid[1] = 0x00;
|
||||
msg->protocolconfigurationoptions.protocolid[2] = PROTOCOL_ID_IP_ADDR_NAS_SIGNALING;
|
||||
msg->protocolconfigurationoptions.lengthofprotocolid[2] = 0x00;
|
||||
|
||||
LOG_TRACE(INFO, "ESM-SAP - Send PDN Connectivity Request message "
|
||||
"(pti=%d, ebi=%d)",
|
||||
msg->proceduretransactionidentity, msg->epsbeareridentity);
|
||||
|
||||
@@ -597,10 +597,10 @@ extern "C" {
|
||||
openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38;
|
||||
bw_gain_adjust=1;
|
||||
}
|
||||
|
||||
switch ((int)openair0_cfg[0].sample_rate) {
|
||||
case 30720000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
// from usrp_time_offset
|
||||
openair0_cfg[0].samples_per_packet = 4096;
|
||||
openair0_cfg[0].tx_sample_advance = 115;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
@@ -608,7 +608,7 @@ extern "C" {
|
||||
openair0_cfg[0].tx_scheduling_advance = 11*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
case 23040000:
|
||||
s->usrp->set_master_clock_rate(46.08e6);
|
||||
s->usrp->set_master_clock_rate(23.04e6); //to be checked
|
||||
openair0_cfg[0].samples_per_packet = 2048;
|
||||
openair0_cfg[0].tx_sample_advance = 113;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
@@ -616,27 +616,27 @@ extern "C" {
|
||||
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
case 15360000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
s->usrp->set_master_clock_rate(30.72e06);
|
||||
openair0_cfg[0].samples_per_packet = 2048;
|
||||
openair0_cfg[0].tx_sample_advance = 113;
|
||||
openair0_cfg[0].tx_bw = 10e6;
|
||||
openair0_cfg[0].rx_bw = 10e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
|
||||
openair0_cfg[0].tx_sample_advance = 103;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
openair0_cfg[0].rx_bw = 20e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 10240;
|
||||
break;
|
||||
case 7680000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
openair0_cfg[0].samples_per_packet = 1024;
|
||||
openair0_cfg[0].tx_sample_advance = 70;//103;
|
||||
openair0_cfg[0].tx_bw = 5e6;
|
||||
openair0_cfg[0].rx_bw = 5e6;
|
||||
openair0_cfg[0].tx_sample_advance = 80;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
openair0_cfg[0].rx_bw = 20e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
case 1920000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
s->usrp->set_master_clock_rate(7.68e6);
|
||||
openair0_cfg[0].samples_per_packet = 256;
|
||||
openair0_cfg[0].tx_sample_advance = 40;
|
||||
openair0_cfg[0].tx_bw = 1.25e6;
|
||||
openair0_cfg[0].rx_bw = 1.25e6;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
openair0_cfg[0].rx_bw = 20e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
default:
|
||||
@@ -655,8 +655,8 @@ extern "C" {
|
||||
for(i=0;i<s->usrp->get_rx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].rx_num_channels) {
|
||||
s->usrp->set_rx_rate(openair0_cfg[0].sample_rate,i);
|
||||
s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
|
||||
printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
|
||||
//s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
|
||||
//printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
|
||||
s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i);
|
||||
set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust);
|
||||
|
||||
@@ -676,8 +676,8 @@ extern "C" {
|
||||
for(i=0;i<s->usrp->get_tx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].tx_num_channels) {
|
||||
s->usrp->set_tx_rate(openair0_cfg[0].sample_rate,i);
|
||||
s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i);
|
||||
printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6);
|
||||
//s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i);
|
||||
//printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6);
|
||||
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i);
|
||||
s->usrp->set_tx_gain(openair0_cfg[0].tx_gain[i],i);
|
||||
}
|
||||
@@ -686,6 +686,8 @@ extern "C" {
|
||||
|
||||
// display USRP settings
|
||||
std::cout << boost::format("Actual master clock: %fMHz...") % (s->usrp->get_master_clock_rate()/1e6) << std::endl;
|
||||
|
||||
sleep(1);
|
||||
|
||||
// create tx & rx streamer
|
||||
uhd::stream_args_t stream_args_rx("sc16", "sc16");
|
||||
@@ -704,6 +706,20 @@ extern "C" {
|
||||
std::cout << boost::format("tx_max_num_samps %u") % (s->tx_stream->get_max_num_samps()) << std::endl;
|
||||
|
||||
|
||||
/* Setting TX/RX BW after streamers are created due to USRP calibration issue */
|
||||
for(i=0;i<s->usrp->get_tx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].tx_num_channels) {
|
||||
s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i);
|
||||
printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6);
|
||||
}
|
||||
}
|
||||
for(i=0;i<s->usrp->get_rx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].rx_num_channels) {
|
||||
s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
|
||||
printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
|
||||
}
|
||||
}
|
||||
|
||||
s->usrp->set_time_now(uhd::time_spec_t(0.0));
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ eNBs =
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 132;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
|
||||
Reference in New Issue
Block a user