OAI All in One 配置文档

安装Ubuntu 16.04

现有OAI平台不支持Ubuntu 18.x

Ubuntu系统安装完成后执行以下命令

sudo apt update
sudo apt upgrade
sudo apt install git

安装USRP驱动

sudo apt-get install libboost-all-dev libusb-1.0-0-dev python-mako doxygen python-docutils python-requests cmake build-essential

git clone git://github.com/EttusResearch/uhd.git
cd uhd
mkdir host/build
cd host/build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install
sudo ldconfig
sudo /usr/lib/uhd/utils/uhd_images_downloader.py

测试安装是否成功:

//查找设备
sudo uhd_find_devices 

//查看设备信息
sudo uhd_usrp_probe

安装流程也可参考网页

下载&编译 eNB on 16.04

//下载是否能成功与网速有关,网速太慢可能很难成功。可以将之前下载的打包备用,以后不用每次下载
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git

cd openairinterface5g
git checkout develop
git reset --hard 7580d021d
git log

//检查版本号 7580d021d387cc63fcf6ecbb97a87b816676a06f

//设置环境
source oaienv

// 安装第三方软件包,直到出现下面界面表示安装完成
./cmake_targets/build_oai -I

// compile eNB
./cmake_targets/build_oai  -w USRP --eNB

下载编译EPC

git clone https://gitlab.eurecom.fr/oai/openair-cn.git
cd openair-cn
git checkout develop
git reset --hard 67180ca07c
git log

//检查版本号 67180ca07c3f543fb6efde13bfdd88ec153185c7

为 EPC 安装第三方软件包

cd openair-cn
source oaienv
cd scripts
./build_hss -i

安装过程中会提示一些软件是否需要安装,如果没有选择yes,安装过的可选no跳过

Do you want to install freeDiameter 1.2.0 ?: yes

set your MySQL password and remember it! password

phpmyadmin:

choose light or apache as you prefer

Configure database for phpmyadmin with dbconfig-common: yes

password: same as MySQL for simplicity password

We don't use phpmyadmin later in this procedure, nevertheless we tested successfully also with it

修改添加hosts

cat /etc/hostname

oai-01



sudo gedit /etc/hosts

127.0.0.1    localhost

127.0.1.1    oai-01.openair4G.eur   oai-01

127.0.1.1    hss.openair4G.eur    hss

sudo reboot

配置eNB

sudo gedit openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf

racking_area_code = "1";

mobile_country_code = "208";

mobile_network_code = "92";

////////// MME parameters:

mme_ip_address = ( { ipv4 = "127.0.1.10";

ipv6 = "192:168:30::17";

active = "yes";

preference = "ipv4";

}

);

NETWORK_INTERFACES :

{

ENB_INTERFACE_NAME_FOR_S1_MME = "lo";

ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.1.2/8";

ENB_INTERFACE_NAME_FOR_S1U = "lo";

ENB_IPV4_ADDRESS_FOR_S1U = "127.0.6.2/8";

ENB_PORT_FOR_S1U = 2142; # Spec 2152

};

配置epc

sudo mkdir -p /usr/local/etc/oai/freeDiameter
sudo cp ~/openair-cn/etc/mme.conf /usr/local/etc/oai
sudo cp ~/openair-cn/etc/hss.conf /usr/local/etc/oai
sudo cp ~/openair-cn/etc/spgw.conf /usr/local/etc/oai
sudo cp ~/openair-cn/etc/acl.conf /usr/local/etc/oai/freeDiameter
sudo cp ~/openair-cn/etc/mme_fd.conf /usr/local/etc/oai/freeDiameter
sudo cp ~/openair-cn/etc/hss_fd.conf /usr/local/etc/oai/freeDiameter

把附件里的epc配置相关文件分别放入/usr/local/etc/oai/以及/usr/local/etc/oai/freeDiameter/中,替换相应文件

Running eNB, EPC and HSS

Install certificates:

cd ~/openair-cn/scripts
./check_hss_s6a_certificate /usr/local/etc/oai/freeDiameter/ hss.openair4G.eur
./check_mme_s6a_certificate /usr/local/etc/oai/freeDiameter/ oai-01.openair4G.eur

Compile & Run HSS (ALWAYS RUN HSS FIRST):

cd ~/openair-cn
cd scripts
./build_hss -c

//只有第一次跑一次
./run_hss -i ~/openair-cn/src/oai_hss/db/oai_db.sql 

//Run this for all subsequent runs
./run_hss  

Compile & Run MME:

cd ~/openair-cn/scripts
./build_mme -c
./run_mme

Compile & Run SP-GW:

cd ~/openair-cn
cd scripts
./build_spgw -c
./run_spgw

Compile & Run eNB:

cd ~/openairinterface5g
source oaienv
./cmake_targets/build_oai -w USRP -x -c --eNB
cd cmake_targets/lte_build_oai/build
sudo -E ./lte-softmodem -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf -d

//to see help options
sudo -E ./lte-softmodem -h 

Last updated

Was this helpful?