Professional Documents
Culture Documents
OAI Installation Tutorial
OAI Installation Tutorial
OAI Installation Tutorial
Table of Contents
Introduction 0
Chapter 1 - Environment setup 1
Chapter 2 - Installation 2
Chapter 3 - EPC Installation 3
Chapter 4 - HSS Installation 4
Chapter 5 - ENB Installation 5
Chapter 6 - Configure OAI 6
Chapter 7 - Run OAI 7
Chapter 8 - Trouble shooting 8
Appendix A - Performance 9
2
Tutorial for Open Air Interface
Introduction
This tutorial is focusing on setup the OAI Core Network (OAI-CN: EPC+HSS) and OAI ENB
based on latest git version.
Introduction 3
Tutorial for Open Air Interface
Chapter 1 - Requirement
Hardware
At least 2 physical machines
At least 4 CPU cores running at least at 2.7GHz ( for ENB )
Intel Architecture
Huawei Dongle E3372 (E3276)
Blank USIM cards
Ettus USRP B210 and Antenna
Software
Ubuntu 14.04 ( 64-bit recommended )
ubuntu low-latency kernel > 3.19 or Preemptive_rt kernel > 3.19
5. You can check your settings with cpufreq-info It will show a block of information for
every core your processor has. Just check if all of them are in performance mode, and
at the maximum speed of your processor.
Chapter 2 - Installation
Chapter 2 - Installation 6
Tutorial for Open Air Interface
EPC installation
Following section shows how to build EPC and HSS on same host. If you are using your
own MNC configuration, please check your MNC and MCC are listed in the
{openair_dir}/openair-cn/UTILS/mcc_mnc_itu.c. (See trouble shooting)
Environment (FQDN)
You need to configure the FQDN value in /etc/host for S6A Authentication by adding the
following entries EX. 127.0.1.1 EPC.HOSTNAME.realm EPC.HOSTNAME
Example
127.0.0.1 localhost
127.0.1.1 cran.oai.nmsl cran
Build
Go to your OAI directory
cd {openair_dir}/cmake_targets/
sudo ./build_oai -I --install-system-files --install-optional-packages
cd {openair_dir}/openair-cn/SCRIPTS
sudo ./build_epc -j
3. Install EPC
cd {openair_dir}/openair-cn/SCRIPTS
sudo ./build_epc -c -l
Build
cd {openair_dir}/openair-cn/SCRIPTS
sudo ./build_hss -c -l
Build ENB
Before you build the ENB components, you have to turn off the power saving features and
maximize the CPU performance. (See Reqirement)
Build
cd {openair_dir}/cmake_targets/
sudo ./build_oai -I --install-system-files --install-optional-packages
Configure ENB
The available configurations are under {oai_dir}/targets/PROJECTS/GENERIC-LTE-
EPC/CONF/
tracking_area_code = "1";
mobile_country_code = "466";
mobile_network_code = "68";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.1.3/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
Configure EPC
The EPC configured file is under /usr/local/etc/oai/epc.conf Make sure the interfaces of MME
and S-GW are connected with ENB.
TAI_LIST = (
{MCC="466" ; MNC="68"; TAC = "1"; } # YOUR PLMN CONFIG HERE
);
2. Add network configuration in MME (MME is responsible for connecting ENB via S1)
NETWORK_INTERFACES :
{
MME_INTERFACE_NAME_FOR_S1_MME = "eth0";
MME_IPV4_ADDRESS_FOR_S1_MME = "192.168.1.2/24";
MME_INTERFACE_NAME_FOR_S11_MME = "none";
MME_IPV4_ADDRESS_FOR_S11_MME = "0.0.0.0/24";
};
3. Add network configuration in S-GW (SGW is responsible for data transmission with
SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP = "eth0";
SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP = "192.168.1.2/24";
SGW_IPV4_PORT_FOR_S1U_S12_S4_UP = 2152;
PGW_INTERFACE_NAME_FOR_SGI = "eth2";
PGW_IPV4_ADDRESS_FOR_SGI = "140.114.XX.XX/24"; #Your Public IP
Configure HSS
You need to add user date and MME information in the MySQL database . Login into
phpmyadmin via browser.(optional) (Default: http://127.0.0.1/phpmyadmin)
Table : APN
Table : mmeidentity
In this table, you need to configure the same FQDN(hostname.realm) of your EPC machine
In this example, mmehost is cran-cn.oai.nmsl and mmerealm is oai.nmsl
ICCID: 89886500000745809013
IMSI: 466680000000001
KI: 8BAF473F2F8FD09487CCCBD7097C6862
OP: 11111111111111111111111111111111
Table : PGW
Add new entry with your P-GW interface setting (IP address)
PDN Table:
In this table, you need to configure the users_imsi , apn , pgw_id. “APN” should be matched
with the one in apn table. Pgw_id should be consistent with your pgw set up (pgw table).
Other values can be remained the same.
Users Table:
Run EPC
Go to your OAI directory
cd {oai-dir}/openair-cn/SCRIPTS
sudo ./run_epc
Run HSS
Go to your OAI directory
cd {oai-dir}/openair-cn/SCRIPTS
sudo ./run_hss
When your EPC connect to HSS , you should see the “STATE_OPEN” message on both
EPC and HSS. After then, you can turn on the ENB. Note: If you fail to established the
connection you may check your FQDN setting in /etc/hosts and the freediameter files ,which
locate at /usr/etc/freediameter/mme_fd.conf and /usr/etc/freediameter/hss_fd.conf. The host
name should be match to FQDN and the realm should be match to your configuration. If not,
you should rebuild your EPC and HSS with the right configuration. DO NOT MODIFY
DIRECTLY.
Run ENB
Go to your OAI directory
cd {oai-dir}/cmake_targets/lte_build_oai/build
sudo ./lte-softmodem -d -m 26 -t 16 -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.u
Remove –d if you run ENB on the server(without GUI). -V is optional When you see the
message “Entering ITTI signals handler”. Then, your UE should be able to connect with OAI.
reference : http://ananmxw.blog.163.com/blog/static/2111441192013732399686/
The quick fix is to compare MAC values only when EPC's own MAC is not 0. You may change Line 317
from
if (mac != header->message_authentication_code) {
to
if ((mac != 0) && (mac != header->message_authentication_code)) {
make sure that you have at least 4 CPU cores running at least at 2.7GHz without the
freq scaling (watch grep \"cpu MHz\" /proc/cpuinfo), see
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/OpenAirKernelMainSetup
make sure that you are running 64-bit lowlatency kernel, uname -a
rebuild the lte-softmodem, ./build_oai --eNB -C, optionally add -I to check the packages
use sudo with option -E
use chrt to change the process priority, i.e. sudo -E chrt 99 -E ./lte-softmodem ...
Appendix A - Performance
Appendix A - Performance 19