Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
da24d54b
Commit
da24d54b
authored
Jun 25, 2014
by
Lionel Gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5431
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
50fd082c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
59 deletions
+39
-59
targets/PROJECTS/GENERIC-LTE-EPC/start_enb_and_ue_virt.bash
targets/PROJECTS/GENERIC-LTE-EPC/start_enb_and_ue_virt.bash
+39
-59
No files found.
targets/PROJECTS/GENERIC-LTE-EPC/start_enb_and_ue_virt.bash
View file @
da24d54b
...
@@ -40,31 +40,8 @@
...
@@ -40,31 +40,8 @@
# THE DIRECTORY WHERE ARE LOCATED THE CONFIGURATION FILES
# THE DIRECTORY WHERE ARE LOCATED THE CONFIGURATION FILES
#########################################
#########################################
# This script start ENB+UE (all in one executable, on one host)
# This script start ENB+UE (all in one executable, on one host)
# Depending on configuration files, it can be instanciated a virtual switch
# Depending on configuration files a VLAN setting.
# setting or a VLAN setting.
# MME+SP-GW executable have to be launched by your own (start_epc.bash) before this script is invoked.
# MME+SP-GW executable have to be launched on the same host by your own (start_epc.bash) before this script is invoked.
#
###########################################################################################################################
# VIRTUAL SWITCH SETTING
###########################################################################################################################
#
# hss.eur
# |
# +-----------+ +------+ +-----------+ v +----------+
# | eNB +------+ | ovs | VLAN 1+------+ MME +----+ +---+ HSS |
# | |cpenb0+------------------+cpmme0| | +------+ | |
# | +------+ |bridge| +------+ +----+ +---+ |
# | |upenb0+-------+ | | | +----------+
# +-----------+------+ | | | +-----------+
# +---|--+ | router.eur
# | +-----------+ | +--------------+
# | | S+P-GW | v | ROUTER |
# | VLAN2 +------+ +-------+ +----+ +----+
# +----------+upsgw0| |sgi +-...-+ | | +---...Internet
# +------+ +-------+ +----+ +----+
# | | 11 VLANS | |
# +-----------+ ids=[5..15] +--------------+
#
#
#
###########################################################################################################################
###########################################################################################################################
# VLAN SETTING
# VLAN SETTING
...
@@ -104,7 +81,9 @@ declare UE_IPv4_CIDR=$UE_IPv4"/24"
...
@@ -104,7 +81,9 @@ declare UE_IPv4_CIDR=$UE_IPv4"/24"
###########################################################
###########################################################
THIS_SCRIPT_PATH
=
$(
dirname
$(
readlink
-f
$0
))
THIS_SCRIPT_PATH
=
$(
dirname
$(
readlink
-f
$0
))
source
$THIS_SCRIPT_PATH
/utils.bash
.
$THIS_SCRIPT_PATH
/utils.bash
.
$THIS_SCRIPT_PATH
/interfaces.bash
.
$THIS_SCRIPT_PATH
/networks.bash
###########################################################
###########################################################
if
[
$#
-eq
1
]
;
then
if
[
$#
-eq
1
]
;
then
declare
-x
CONFIG_FILE_DIR
=
$1
declare
-x
CONFIG_FILE_DIR
=
$1
...
@@ -156,48 +135,49 @@ declare ENB_IPV4_NETMASK_FOR_S1U=$( echo $ENB_IPV4_ADDRESS_FOR_S1U
...
@@ -156,48 +135,49 @@ declare ENB_IPV4_NETMASK_FOR_S1U=$( echo $ENB_IPV4_ADDRESS_FOR_S1U
ENB_IPV4_ADDRESS_FOR_S1_MME
=
$(
echo
$ENB_IPV4_ADDRESS_FOR_S1_MME
|
cut
-f1
-d
'/'
)
ENB_IPV4_ADDRESS_FOR_S1_MME
=
$(
echo
$ENB_IPV4_ADDRESS_FOR_S1_MME
|
cut
-f1
-d
'/'
)
ENB_IPV4_ADDRESS_FOR_S1U
=
$(
echo
$ENB_IPV4_ADDRESS_FOR_S1U
|
cut
-f1
-d
'/'
)
ENB_IPV4_ADDRESS_FOR_S1U
=
$(
echo
$ENB_IPV4_ADDRESS_FOR_S1U
|
cut
-f1
-d
'/'
)
is_openvswitch_interface
$ENB_INTERFACE_NAME_FOR_S1_MME
\
$ENB_INTERFACE_NAME_FOR_S1U
if
[
$?
-eq
1
]
;
then
is_vlan_interface
$ENB_INTERFACE_NAME_FOR_S1_MME
\
echo_success
"Found open-vswitch network configuration"
else
is_vlan_interface
$ENB_INTERFACE_NAME_FOR_S1_MME
\
$ENB_INTERFACE_NAME_FOR_S1U
$ENB_INTERFACE_NAME_FOR_S1U
if
[
$?
-eq
1
]
;
then
if
[
$?
-eq
1
]
;
then
echo_success
"Found VLAN network configuration"
echo_success
"Found VLAN network configuration"
clean_enb_vlan_network
clean_enb_vlan_network
build_enb_vlan_network
build_enb_vlan_network
test_enb_vlan_network
test_enb_vlan_network
else
echo_error
"Cannot find open-vswitch network configuration or VLAN network configuration"
exit
1
fi
fi
fi
#######################################################
#######################################################
# USIM, NVRAM files
# USIM, NVRAM files
#######################################################
#######################################################
export
NVRAM_DIR
=
$THIS_SCRIPT_PATH
export
NVRAM_DIR
=
$THIS_SCRIPT_PATH
if
[
!
-f
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/ue_data
]
;
then
if
[
!
-f
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/ue_data
]
;
then
if
[
!
-f
/tmp/nas_cleaned
]
;
then
echo_success
"make --directory=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS veryveryclean"
make
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS veryveryclean
make
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS veryveryclean
make
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS
PROCESS
=
UE
fi
echo_success
"make --directory=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS PROCESS=UE"
make
-v
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS
-f
Makefile
PROCESS
=
UE
rm
.ue.nvram
rm
.ue.nvram
touch
/tmp/nas_cleaned
fi
fi
if
[
!
-f
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/usim_data
]
;
then
if
[
!
-f
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/usim_data
]
;
then
if
[
!
-f
/tmp/nas_cleaned
]
;
then
echo_success
"make --directory=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS veryveryclean"
make
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS veryveryclean
make
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS veryveryclean
fi
echo_success
"make --directory=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS PROCESS=UE"
make
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS
PROCESS
=
UE
make
--directory
=
$OPENAIRCN_DIR
/NAS/EURECOM-NAS
PROCESS
=
UE
rm
.usim.nvram
rm
.usim.nvram
fi
fi
if
[
!
-f
.ue.nvram
]
;
then
if
[
!
-f
.ue.nvram
]
;
then
# generate .ue_emm.nvram .ue.nvram
echo_success
"generate .ue_emm.nvram .ue.nvram"
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/ue_data
--gen
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/ue_data
--gen
fi
fi
if
[
!
-f
.usim.nvram
]
;
then
if
[
!
-f
.usim.nvram
]
;
then
# generate .usim.nvram
echo_success
"generate .usim.nvram"
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/usim_data
--gen
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/usim_data
--gen
fi
fi
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/ue_data
--print
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/ue_data
--print
...
@@ -206,19 +186,20 @@ $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print
...
@@ -206,19 +186,20 @@ $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/usim_data --print
##################################################
##################################################
# LAUNCH eNB + UE executable
# LAUNCH eNB + UE executable
##################################################
##################################################
echo
"Bringup UE interface"
pkill oaisim
pkill oaisim
bash_exec
"rmmod
$IP_DRIVER_NAME
"
>
/dev/null 2>&1
bash_exec
"rmmod
$IP_DRIVER_NAME
"
>
/dev/null 2>&1
cecho
"make
$MAKE_IP_DRIVER_TARGET
$MAKE_LTE_ACCESS_STRATUM_TARGET
....."
$green
echo_success
"make
$MAKE_IP_DRIVER_TARGET
$MAKE_LTE_ACCESS_STRATUM_TARGET
....."
#bash_exec "make --directory=$OPENAIR2_DIR $MAKE_IP_DRIVER_TARGET "
#bash_exec "make --directory=$OPENAIR2_DIR $MAKE_IP_DRIVER_TARGET "
make
--directory
=
$OPENAIR2_DIR
$MAKE_IP_DRIVER_TARGET
||
exit
1
make
--directory
=
$OPENAIR2_DIR
$MAKE_IP_DRIVER_TARGET
||
exit
1
echo_success
"make --debug=b --directory=
$OPENAIR_TARGETS
/SIMU/USER
$MAKE_LTE_ACCESS_STRATUM_TARGET
|| exit 1"
#bash_exec "make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET "
#bash_exec "make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET "
#make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET -j`grep -c ^processor /proc/cpuinfo ` || exit 1
#make --directory=$OPENAIR_TARGETS/SIMU/USER $MAKE_LTE_ACCESS_STRATUM_TARGET -j`grep -c ^processor /proc/cpuinfo ` || exit 1
make
--debug
=
b
--directory
=
$OPENAIR_TARGETS
/SIMU/USER
$MAKE_LTE_ACCESS_STRATUM_TARGET
||
exit
1
make
--debug
=
b
--directory
=
$OPENAIR_TARGETS
/SIMU/USER
$MAKE_LTE_ACCESS_STRATUM_TARGET
||
exit
1
echo_success
"Bringup UE interface..."
bash_exec
"insmod
$OPENAIR2_DIR
/NETWORK_DRIVER/UE_IP/
$IP_DRIVER_NAME
.ko"
bash_exec
"insmod
$OPENAIR2_DIR
/NETWORK_DRIVER/UE_IP/
$IP_DRIVER_NAME
.ko"
bash_exec
"ip route flush cache"
bash_exec
"ip route flush cache"
...
@@ -248,25 +229,24 @@ fi
...
@@ -248,25 +229,24 @@ fi
ip rule add fwmark 5 table lte
ip rule add fwmark 5 table lte
ip route add default dev
$LTEIF
table lte
ip route add default dev
$LTEIF
table lte
ITTI_LOG_FILE
=
./OUTPUT/itti_enb_ue.
$HOSTNAME
.log
cd
$THIS_SCRIPT_PATH
/OUTPUT/
$HOSTNAME
ITTI_LOG_FILE
=
itti_enb_ue.
$HOSTNAME
.log
rotate_log_file
$ITTI_LOG_FILE
rotate_log_file
$ITTI_LOG_FILE
STDOUT_LOG_FILE
=
./OUTPUT/stdout_enb_ue.log
STDOUT_LOG_FILE
=
stdout_enb_ue.
$HOSTNAME
.log
rotate_log_file
$STDOUT_LOG_FILE
rotate_log_file
$STDOUT_LOG_FILE
rotate_log_file
$STDOUT_LOG_FILE
.filtered
rotate_log_file
$STDOUT_LOG_FILE
.filtered
rotate_log_file
./OUTPUT/tshark_enb_ue
.pcap
rotate_log_file
tshark_enb_ue.
$HOSTNAME
.pcap
cd
$THIS_SCRIPT_PATH
cd
$THIS_SCRIPT_PATH
nohup
tshark
-i
$ENB_INTERFACE_NAME_FOR_S1_MME
-i
$ENB_INTERFACE_NAME_FOR_S1U
-w
tshark
.pcap &
nohup
tshark
-i
$ENB_INTERFACE_NAME_FOR_S1_MME
-i
$ENB_INTERFACE_NAME_FOR_S1U
-w
OUTPUT/
$HOSTNAME
/tshark_enb_ue.
$HOSTNAME
.pcap &
nohup
xterm
-e
$OPENAIRCN_DIR
/NAS/EURECOM-NAS/bin/UserProcess &
#
nohup xterm -e $OPENAIRCN_DIR/NAS/EURECOM-NAS/bin/UserProcess &
gdb
--args
$OPENAIR_TARGETS
/SIMU/USER/oaisim
-a
-u1
-l9
-K
$ITTI_LOG_FILE
--enb-conf
$CONFIG_FILE_ENB
2>&1 |
tee
$STDOUT_LOG_FILE
gdb
--args
$OPENAIR_TARGETS
/SIMU/USER/oaisim
-a
-u1
-l9
-K
OUTPUT/
$HOSTNAME
/
$ITTI_LOG_FILE
--enb-conf
$CONFIG_FILE_ENB
2>&1 |
tee
OUTPUT/
$HOSTNAME
/
$STDOUT_LOG_FILE
pkill tshark
pkill tshark
cat
$STDOUT_LOG_FILE
|
grep
-v
'[PHY]'
|
grep
-v
'[MAC]'
|
grep
-v
'[EMU]'
|
\
cat
OUTPUT/
$HOSTNAME
/
$STDOUT_LOG_FILE
| |grep
'RRC\|S1AP\|SCTP\|PDCP'
>
OUTPUT/
$HOSTNAME
/
$STDOUT_LOG_FILE
.filtered
grep
-v
'[OCM]'
|
grep
-v
'[OMG]'
|
\
grep
-v
'RLC not configured'
|
grep
-v
'check if serving becomes'
|
\
grep
-v
'mac_rrc_data_req'
|
grep
-v
'BCCH request =>'
>
$STDOUT_LOG_FILE
.filtered
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment