Updates
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4789 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -11,6 +11,7 @@ echo_success "# Check installed utils and libs"
|
||||
echo_success "###############################"
|
||||
test_command_install_package "gccxml" "gccxml" "--force-yes"
|
||||
test_command_install_package "iptables" "iptables"
|
||||
test_command_install_package "ebtables" "ebtables"
|
||||
test_command_install_package "ip" "iproute"
|
||||
test_install_package "openssl"
|
||||
test_install_package "libblas-dev"
|
||||
@@ -25,6 +26,8 @@ test_install_package "libatlas-base-dev"
|
||||
test_install_package "libpgm-5.1-0" "--force-yes"
|
||||
test_install_package "libpgm-dev" "--force-yes"
|
||||
test_install_package linux-headers-`uname -r`
|
||||
# for ODTONE git clone
|
||||
test_install_package "git"
|
||||
|
||||
test_install_asn1c_4_rrc_cellular
|
||||
|
||||
@@ -57,14 +60,14 @@ echo_success "\n###############################"
|
||||
echo_success "# COMPILE MIH-F"
|
||||
echo_success "###############################"
|
||||
cd $ODTONE_ROOT
|
||||
b2 --boost-root=$BOOST_ROOT
|
||||
b2 --boost-root=$BOOST_ROOT linkflags=-lpthread
|
||||
|
||||
|
||||
echo_success "\n###############################"
|
||||
echo_success "# COMPILE MIH-USER"
|
||||
echo_success "###############################"
|
||||
cd $ODTONE_ROOT/app/lte_test_user/
|
||||
b2 --boost-root=$BOOST_ROOT linkflags=-lrt
|
||||
b2 --boost-root=$BOOST_ROOT linkflags=-lrt linkflags=-lpthread
|
||||
|
||||
|
||||
echo_success "\n###############################"
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
#####################################################
|
||||
# VARIABLES TO BE FILLED WITH RIGHT VALUES:
|
||||
#####################################################
|
||||
export BOOST_ROOT=/usr/local/src/boost_1_48_0
|
||||
export ODTONE_ROOT=/usr/local/src/odtone_spectra_v1
|
||||
export BOOST_ROOT=/usr/local/src/boost_1_49_0
|
||||
#export ODTONE_ROOT=/usr/local/src/odtone_spectra_v1
|
||||
export ODTONE_ROOT=/usr/local/src/ODTONE
|
||||
#####################################################
|
||||
|
||||
|
||||
@@ -23,6 +24,11 @@ fi
|
||||
ENV_SCRIPT_STARTED="yes"
|
||||
source $THIS_SCRIPT_PATH/utils.bash
|
||||
|
||||
if [ -d $ODTONE_ROOT ]; then
|
||||
echo_success "ODTONE_ROOT = $ODTONE_ROOT." >&2
|
||||
else
|
||||
echo_error "ODTONE_ROOT variable was not set correctly, please update ($ODTONE_ROOT)." >&2
|
||||
fi
|
||||
if [ ! -d $BOOST_ROOT ]; then
|
||||
echo_error "BOOST_ROOT variable was not set correctly, please update (may be you also need to install boost), exiting."
|
||||
ENV_SCRIPT_ERRORS="yes"
|
||||
@@ -41,7 +47,7 @@ else
|
||||
fi
|
||||
command -v $BOOST_ROOT/b2 >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo_success "Program b2 is now reachable by the PATH variable." >&2
|
||||
echo_success "Program b2 is now reachable by the PATH variable during the execution of this script." >&2
|
||||
else
|
||||
echo_error "Built of b2 failed. Please help yourself" >&2
|
||||
fi
|
||||
|
||||
@@ -1,22 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# +-----------+ +------+ +-----------+
|
||||
# | eNB +------+ | ovs | VLAN 1+------+ MME |
|
||||
# | |cpenb0+------------------+cpmme0| |
|
||||
# | +------+ |bridge| +------+ |
|
||||
# | |upenb0+-------+ | | |
|
||||
# +-----------+------+ | | | +-----------+
|
||||
# +---|--+ |
|
||||
# | +-----------+
|
||||
# | | S+P-GW |
|
||||
# | VLAN2 +------+ +-------+
|
||||
# +----------+upsgw0| |eth0 +---Internet access
|
||||
# +------+ +-------+
|
||||
# | |
|
||||
# +-----------+
|
||||
#
|
||||
|
||||
###########################################################
|
||||
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
|
||||
source $THIS_SCRIPT_PATH/env_802dot21.bash
|
||||
@@ -40,6 +24,13 @@ cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
|
||||
cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
|
||||
cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
|
||||
|
||||
bash_exec "/sbin/iptables -t mangle -F"
|
||||
bash_exec "/sbin/iptables -t nat -F"
|
||||
bash_exec "/sbin/iptables -t raw -F"
|
||||
bash_exec "/sbin/iptables -t filter -F"
|
||||
bash_exec "/sbin/ip6tables -t mangle -F"
|
||||
bash_exec "/sbin/ip6tables -t filter -F"
|
||||
bash_exec "/sbin/ip6tables -t raw -F"
|
||||
|
||||
##################################################
|
||||
# LAUNCH eNB executable
|
||||
@@ -88,26 +79,41 @@ assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
|
||||
|
||||
bash_exec "ip route flush cache"
|
||||
|
||||
# please add table 200 lte in/etc/iproute2/rt_tables
|
||||
ip rule add fwmark 5 table lte
|
||||
# please add table 200 lte in /etc/iproute2/rt_tables
|
||||
ip rule add fwmark 3 table lte
|
||||
ip route add default dev $LTEIF table lte
|
||||
|
||||
ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
|
||||
|
||||
/sbin/ebtables -t nat -A POSTROUTING -p arp -j mark --mark-set 3
|
||||
|
||||
/sbin/ip6tables -A OUTPUT -t mangle -o oai0 -m pkttype --pkt-type multicast -j MARK --set-mark 3
|
||||
/sbin/iptables -A OUTPUT -t mangle -o oai0 -m pkttype --pkt-type broadcast -j MARK --set-mark 3
|
||||
/sbin/iptables -A OUTPUT -t mangle -o oai0 -m pkttype --pkt-type multicast -j MARK --set-mark 3
|
||||
|
||||
/sbin/ip6tables -A POSTROUTING -t mangle -o oai0 -m pkttype --pkt-type multicast -j MARK --set-mark 3
|
||||
/sbin/iptables -A POSTROUTING -t mangle -o oai0 -m pkttype --pkt-type broadcast -j MARK --set-mark 3
|
||||
/sbin/iptables -A POSTROUTING -t mangle -o oai0 -m pkttype --pkt-type multicast -j MARK --set-mark 3
|
||||
|
||||
#All other traffic is sent on the RAB you want (mark = RAB ID)
|
||||
/sbin/ip6tables -A POSTROUTING -t mangle -o oai0 -m pkttype --pkt-type unicast -j MARK --set-mark 3
|
||||
/sbin/ip6tables -A OUTPUT -t mangle -o oai0 -m pkttype --pkt-type unicast -j MARK --set-mark 3
|
||||
/sbin/iptables -A POSTROUTING -t mangle -o oai0 -m pkttype --pkt-type unicast -j MARK --set-mark 3
|
||||
/sbin/iptables -A OUTPUT -t mangle -o oai0 -m pkttype --pkt-type unicast -j MARK --set-mark 3
|
||||
|
||||
# start MIH-F
|
||||
#xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone.conf &
|
||||
#xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone_enb.conf &
|
||||
|
||||
#wait_process_started odtone-mihf
|
||||
|
||||
|
||||
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u0 -M0 -p2 -g1 -D $EMULATION_DEV_INTERFACE \
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u0 -M0 -p2 -g1 -D $EMULATION_DEV_INTERFACE \
|
||||
--enb-ral-listening-port 1234\
|
||||
--enb-ral-link-id enb_lte_link\
|
||||
--enb-ral-ip-address 127.0.0.1\
|
||||
--enb-mihf-remote-port 1025\
|
||||
--enb-mihf-ip-address 127.0.0.1\
|
||||
--enb-mihf-id mihf1_enb
|
||||
--enb-mihf-id mihf1_enb
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -82,17 +82,33 @@ ip -6 route add default dev $LTEIF table lte
|
||||
ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
|
||||
|
||||
# start MIH-F
|
||||
xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone.conf &
|
||||
|
||||
xterm -hold -e $ODTONE_ROOT/dist/odtone-mihf --log 4 --conf.file $ODTONE_ROOT/dist/odtone_ue.conf &
|
||||
wait_process_started odtone-mihf
|
||||
sleep 3
|
||||
|
||||
gdb --args $OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u1 -b0 -M1 -p2 -g1 -D $EMULATION_DEV_INTERFACE \
|
||||
NOW=$(date +"%Y-%m-%d.%Hh_%Mm_%Ss")
|
||||
LOG_FILE="/tmp/oai_sim_ue_$NOW.log"
|
||||
|
||||
$OPENAIR_TARGETS/SIMU/USER/oaisim -a -l9 -u1 -b0 -M1 -p2 -g1 -D $EMULATION_DEV_INTERFACE \
|
||||
--ue-ral-listening-port 1234\
|
||||
--ue-ral-link-id ue_lte_link\
|
||||
--ue-ral-ip-address 127.0.0.1\
|
||||
--ue-mihf-remote-port 1025\
|
||||
--ue-mihf-ip-address 127.0.0.1\
|
||||
--ue-mihf-id mihf2_ue
|
||||
--ue-mihf-id mihf2_ue &
|
||||
wait_process_started oaisim
|
||||
|
||||
sleep 5
|
||||
#echo_warning "Press enter to continue..."
|
||||
#read KEY
|
||||
|
||||
|
||||
# start MIH-USER
|
||||
xterm -hold -e $ODTONE_ROOT/dist/ue_lte_user --conf.file $ODTONE_ROOT/dist/ue_lte_user.conf &
|
||||
wait_process_started ue_lte_user
|
||||
|
||||
sleep 100000
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user