Commit 2c2a2c6a authored by gauthier's avatar gauthier

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7653 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent eebc9396
This diff is collapsed.
This diff is collapsed.
...@@ -276,8 +276,8 @@ function main() { ...@@ -276,8 +276,8 @@ function main() {
cmake .. cmake ..
echo_info "Compiling LTE softmodem (w/o S1 interface)" echo_info "Compiling LTE softmodem (w/o S1 interface)"
compilations \ compilations \
lte_noS1_build_oai lte-softmodem \ lte_noS1_build_oai lte-softmodem-nos1 \
lte-softmodem $dbin/lte-softmodem-nos1 lte-softmodem-nos1 $dbin/lte-softmodem-nos1
compilations \ compilations \
lte_noS1_build_oai nasmesh \ lte_noS1_build_oai nasmesh \
CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
......
...@@ -12,5 +12,5 @@ set(PDCP_USE_NETLINK_QUEUES False) ...@@ -12,5 +12,5 @@ set(PDCP_USE_NETLINK_QUEUES False)
set(LINUX True) set(LINUX True)
set(SECU False) set(SECU False)
set(NAS_UE False) set(NAS_UE False)
set(PACKAGE_NAME "\"lte-softmodem\"") set(PACKAGE_NAME "\"lte-softmodem-nos1\"")
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
...@@ -20,30 +20,30 @@ set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets) ...@@ -20,30 +20,30 @@ set(OPENAIR_TARGETS $ENV{OPENAIR_DIR}/targets)
# Add .h files for dependancies # Add .h files for dependancies
set(usim_SRC set(usim_SRC
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/usim_data.c ${OPENAIR_DIR}/openair-cn/NAS/TOOLS/usim_data.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.c ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.c ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.c
) )
set(usim_HDR set(usim_HDR
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/network.h ${OPENAIR_DIR}/openair-cn/NAS/TOOLS/network.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/usim_api.h ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/usim_api.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim/aka_functions.h ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM/aka_functions.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/OctetString.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/OctetString.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/TLVEncoder.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/TLVEncoder.h
) )
include_directories( include_directories(
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include ${OPENAIR_DIR}/openair-cn/NAS/COMMON
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/api/usim ${OPENAIR_DIR}/openair-cn/NAS/UE/API/USIM
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/ ${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/esm/ ${OPENAIR_DIR}/openair-cn/NAS/UE/ESM/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/ies/ ${OPENAIR_DIR}/openair-cn/NAS/COMMON/IES/
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL
) )
ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR}) ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
...@@ -51,15 +51,15 @@ ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR}) ...@@ -51,15 +51,15 @@ ADD_EXECUTABLE(usim ${usim_SRC} ${usim_HDR})
set(nvram_SRC set(nvram_SRC
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/tools/ue_data.c ${OPENAIR_DIR}/openair-cn/NAS/TOOLS/ue_data.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.c
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/nas_log.c ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/nas_log.c
) )
set(nvram_HDR set(nvram_HDR
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/emm/emmData.h ${OPENAIR_DIR}/openair-cn/NAS/UE/EMM/emmData.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/util/memory.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/UTIL/memory.h
${OPENAIR_DIR}/openair-cn/NAS/EURECOM-NAS/src/include/userDef.h ${OPENAIR_DIR}/openair-cn/NAS/COMMON/userDef.h
) )
ADD_EXECUTABLE(nvram ${nvram_SRC} ${nvram_HDR}) ADD_EXECUTABLE(nvram ${nvram_SRC} ${nvram_HDR})
......
...@@ -246,8 +246,8 @@ function main() ...@@ -246,8 +246,8 @@ function main()
$SUDO rm -f /usr/etc/freeDiameter/mme* 2>&1 $SUDO rm -f /usr/etc/freeDiameter/mme* 2>&1
$SUDO rm -f /usr/etc/freeDiameter/epc* 2>&1 $SUDO rm -f /usr/etc/freeDiameter/epc* 2>&1
$SUDO rm -f $OPENAIR_DIR/targets/bin/xt_GTPU*.ko 2>&1 $SUDO rm -f $OPENAIR_DIR/targets/bin/xt_GTPU*.ko 2>&1
(cd $OPENAIRCN_DIR/GTPV1-U/GTPUAH && $SUDO make clean) (cd $OPENAIRCN_DIR/GTPV1-U/GTPUSP && $SUDO make clean)
$SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPUAH/Bin/* 2>&1 $SUDO rm -f $OPENAIRCN_DIR/GTPV1-U/GTPUSP/Bin/* 2>&1
$SUDO rm -f /lib/xtables/libxt_GTPU*.so 2>&1 $SUDO rm -f /lib/xtables/libxt_GTPU*.so 2>&1
mkdir -m 777 -p -v build mkdir -m 777 -p -v build
fi fi
...@@ -274,16 +274,16 @@ function main() ...@@ -274,16 +274,16 @@ function main()
mme_gw $dbin/mme_gw.$REL mme_gw $dbin/mme_gw.$REL
# Only integrated mme+sgw+pgw is operational today # Only integrated mme+sgw+pgw is operational today
compilations \ compilations \
epc_build_oai xt_GTPUAH_lib \ epc_build_oai xt_GTPUSP_lib \
libxt_GTPUAH_lib.so $dbin libxt_GTPUSP_lib.so $dbin
compilations \ compilations \
epc_build_oai xt_GTPUAH \ epc_build_oai xt_GTPUSP \
CMakeFiles/xt_GTPUAH/xt_GTPUAH.ko $dbin CMakeFiles/xt_GTPUSP/xt_GTPUSP.ko $dbin
echo_info "Copying iptables libraries into system directory: /lib/xtables" echo_info "Copying iptables libraries into system directory: /lib/xtables"
if [ -f $dbin/libxt_GTPUAH_lib.so ] ; then if [ -f $dbin/libxt_GTPUSP_lib.so ] ; then
$SUDO rm -f /lib/xtables/libxt_GTPUAH.so $SUDO rm -f /lib/xtables/libxt_GTPUSP.so
$SUDO ln -s $dbin/libxt_GTPUAH_lib.so /lib/xtables/libxt_GTPUAH.so $SUDO ln -s $dbin/libxt_GTPUSP_lib.so /lib/xtables/libxt_GTPUSP.so
else else
echo_fatal "not installed GTP-U iptables: binaries not found" echo_fatal "not installed GTP-U iptables: binaries not found"
fi fi
......
...@@ -201,7 +201,7 @@ install_gnutls_from_source(){ ...@@ -201,7 +201,7 @@ install_gnutls_from_source(){
install_1.1.5_freediameter_from_source() { install_1.1.5_freediameter_from_source() {
cd /tmp cd /tmp
echo "Downloading 1.1.5 freeDiameter archive" echo "Downloading 1.1.5 freeDiameter archive"
rm -rf /tmp/1.1.5.tar.gz* /tmp/freeDiameter-1.1.5 rm -rf /tmp/1.1.5.tar.gz* /tmp/freeDiameter-1.1.5
wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz
tar xzf 1.1.5.tar.gz tar xzf 1.1.5.tar.gz
...@@ -251,6 +251,8 @@ install_latest_freediameter_from_source() { ...@@ -251,6 +251,8 @@ install_latest_freediameter_from_source() {
$SUDO make install $SUDO make install
rm -rf /tmp/freeDiameter rm -rf /tmp/freeDiameter
} }
check_install_usrp_uhd_driver(){ check_install_usrp_uhd_driver(){
v=$(lsb_release -cs) v=$(lsb_release -cs)
$SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" $SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
...@@ -295,7 +297,7 @@ check_install_oai_software() { ...@@ -295,7 +297,7 @@ check_install_oai_software() {
$SUDO apt-get update $SUDO apt-get update
$SUDO apt-get install -y \ $SUDO apt-get install -y \
autoconf \ autoconf \
automake \ automake \
bison \ bison \
build-essential \ build-essential \
...@@ -306,8 +308,9 @@ check_install_oai_software() { ...@@ -306,8 +308,9 @@ check_install_oai_software() {
texlive-latex-base\ texlive-latex-base\
ethtool \ ethtool \
flex \ flex \
gccxml \ gccxml \
gdb \ gdb \
git \
graphviz \ graphviz \
gtkwave \ gtkwave \
guile-2.0-dev \ guile-2.0-dev \
...@@ -326,7 +329,7 @@ check_install_oai_software() { ...@@ -326,7 +329,7 @@ check_install_oai_software() {
libgmp-dev \ libgmp-dev \
libgtk-3-dev \ libgtk-3-dev \
libidn2-0-dev \ libidn2-0-dev \
libidn11-dev \ libidn11-dev \
libmysqlclient-dev \ libmysqlclient-dev \
liboctave-dev \ liboctave-dev \
libpgm-5.1 \ libpgm-5.1 \
......
...@@ -86,7 +86,11 @@ function main() { ...@@ -86,7 +86,11 @@ function main() {
else else
echo_error "Bad mme fqdn found in cert file: $full_hostname fqdn is $fqdn" echo_error "Bad mme fqdn found in cert file: $full_hostname fqdn is $fqdn"
fi fi
else
echo_error "File $freediameter_path/etc/freeDiameter/mme.cert.pem not found"
fi fi
else
echo_error "Directory $freediameter_path/etc/freeDiameter not found"
fi fi
echo_error "MME S6A: Did not find valid certificate in $freediameter_path/etc/freeDiameter" echo_error "MME S6A: Did not find valid certificate in $freediameter_path/etc/freeDiameter"
echo_warning "MME S6A: generating new certificate in $freediameter_path/etc/freeDiameter..." echo_warning "MME S6A: generating new certificate in $freediameter_path/etc/freeDiameter..."
......
...@@ -62,7 +62,7 @@ MME : ...@@ -62,7 +62,7 @@ MME :
# max values = 999.999:65535 # max values = 999.999:65535
# maximum of 32 values, comma separated # maximum of 32 values, comma separated
TAI_LIST = ( TAI_LIST = (
{MCC="208" ; MNC="95"; TAC = "1"; } # YOUR PLMN CONFIG HERE {MCC="208" ; MNC="10"; TAC = "1"; } # YOUR PLMN CONFIG HERE
); );
}; };
......
...@@ -174,17 +174,17 @@ function main() ...@@ -174,17 +174,17 @@ function main()
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem ]; then if [ ! -e $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 ]; then
echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem executable" echo_fatal "Cannot find $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 executable"
fi fi
if [ $run_gdb -eq 0 ]; then if [ $run_gdb -eq 0 ]; then
exec $OPENAIR_DIR/targets/bin/lte-softmodem `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10 `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
else else
touch ~/.gdb_lte_softmodem touch ~/.gdb_lte_softmodem
chmod 777 ~/.gdb_lte_softmodem chmod 777 ~/.gdb_lte_softmodem
echo "file $OPENAIR_DIR/targets/bin/lte-softmodem" > ~/.gdb_lte_softmodem echo "file $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10" > ~/.gdb_lte_softmodem
echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
echo "run" >> ~/.gdb_lte_softmodem echo "run" >> ~/.gdb_lte_softmodem
cat ~/.gdb_lte_softmodem cat ~/.gdb_lte_softmodem
......
...@@ -214,12 +214,12 @@ function main() ...@@ -214,12 +214,12 @@ function main()
is_tun=`is_tun_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_INTERFACE_NAME_FOR_S1U` is_tun=`is_tun_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_INTERFACE_NAME_FOR_S1U`
# if [ $is_tun = "1" ]; then # if [ $is_tun = "1" ]; then
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync # openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# $SUDO openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync # openvpn --mktun --dev $ENB_INTERFACE_NAME_FOR_S1_MME;sync
# $SUDO 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_S1U/$ENB_IPV4_NETMASK_FOR_S1U dev $ENB_INTERFACE_NAME_FOR_S1U;sync
# $SUDO ip -4 addr add $ENB_IPV4_ADDRESS_FOR_S1_MME/$ENB_IPV4_NETMASK_FOR_S1_MME dev $ENB_INTERFACE_NAME_FOR_S1_MME;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
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync # ifconfig $ENB_INTERFACE_NAME_FOR_S1U up;sync
# $SUDO ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync # ifconfig $ENB_INTERFACE_NAME_FOR_S1_MME up;sync
# echo_success "Configured local eNB S1 tun interfaces" # echo_success "Configured local eNB S1 tun interfaces"
# else # else
# echo_success "eNB S1 tun interfaces should be ethernet interfaces (no tunnels configured)" # echo_success "eNB S1 tun interfaces should be ethernet interfaces (no tunnels configured)"
...@@ -228,21 +228,21 @@ function main() ...@@ -228,21 +228,21 @@ function main()
################################################## ##################################################
# LAUNCH eNB + UE executable # LAUNCH eNB + UE executable
################################################## ##################################################
$SUDO pkill oaisim pkill oaisim
$SUDO rmmod ue_ip > /dev/null 2>&1 rmmod ue_ip > /dev/null 2>&1
echo_success "Bringup UE interface..." echo_success "Bringup UE interface..."
$SUDO insmod $OPENAIR_DIR/targets/bin/ue_ip.ko insmod $OPENAIR_DIR/targets/bin/ue_ip.ko
$SUDO ip route flush cache ip route flush cache
# Check table 200 lte in /etc/iproute2/rt_tables # Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
$SUDO echo "200 lte " >> /etc/iproute2/rt_tables bash -c echo "200 lte " >> /etc/iproute2/rt_tables
fi fi
$SUDO ip rule add fwmark 1 table lte ip rule add fwmark 1 table lte