Difference between revisions of "OpenAirInterface-CN: Install"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "penAirInterface November 28th 2019: fix from user review September 23rd 2019: minor fix of warnings September 2019, large rework and update to latest eNB June 21st 2019: re...")
 
Line 1: Line 1:
penAirInterface
 
November 28th 2019: fix from user review
 
 
September 23rd 2019: minor fix of warnings
 
 
September 2019, large rework and update to latest eNB
 
 
June 21st 2019: replace ubuntu 17.04 by ubuntu 18.04
 
 
Sept 7th 2017: small update for more recent eNB git commit version in develop branch
 
 
Starting condition:
 
Ubuntu 18.04 all packages upgraded, uhd last commit, OAI last commit
 
 
Modifications
 
 
Latest commits
 
Fix a issue in mme that crash mme with some phones in the attach-request procedure
 
If you want to fix only this issue, pick files:
 
src/nas/emm/Attach.c
 
src/nas/ies/SupportedCodecList.c
 
in the hereafter tar file
 
The issue is: mme wrong decoding of smartphone codec list
 
Full re-test, from disk install of Ubuntu 17.04 to commercial UEs throughput measurement (Android 5 and Android 6)
 
This document explains how to install and configure OAI EPC+eNB on one single Ubuntu 18.04 64 bits machine connected with a regular UE, routing the UE traffic to internet.
 
 
The description uses a USRP B210 board.
 
 
We also explain how to simplify, fix existing issues, to make a single computer as a full LTE network: EPC+eNB.
 
 
Known limitations fixed in the hereafter description
 
 
GTP UDP ports are in conflict for eNB and SGW
 
Useless link between OAI and the Ubuntu/Linux hostname removed
 
Several simplifications and precisions to make easier and reliable installations
 
Install Ubuntu
 
Prepare a machine: a 4 actual cores, no hyper-threading.
 
All other configuration in OAI Wiki (C1 states, …) describes is about useless.
 
Download Ubuntu 18.04 64 bits version iso file
 
create a usb key to boot on it
 
install Ubuntu: choose to install Third party SW, and to upgrade all packages while installing
 
do: apt update; apt upgrade until the machine is up-to-date
 
install git and configure your identification in git:
 
sudo apt install git
 
git config --global user.name "Laurent"
 
git config --global user.email "laurent.thomas@open-cells.com"
 
Add the OAI repository as authorized remote system
 
echo -n | openssl s_client -showcerts -connect gitlab.eurecom.fr:443 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt
 
if you are upset with sudo password, add this line in /etc/sudoers
 
xxxxxx ALL=(ALL) NOPASSWD: ALL (xxxxxx is your login name)
 
sudo will not ask anymore for a password
 
Install USRP drivers
 
We prefer to use UHD driver from source:
 
 
sudo apt-get install libboost-all-dev libusb-1.0-0-dev python-mako doxygen python-docutils python-requests python3-pip cmake build-essential
 
pip3 install mako numpy
 
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
 
Download our modifications
 
download and extract the data:
 
 
cd ~
 
wget https://open-cells.com/opencells-mods-20190923.tgz
 
tar xf opencells-mods-20190923.tgz
 
 
Download and patch EPC
 
Download and patch EPC
 
Clone OAI EPC:
 
Clone OAI EPC:
  
# maybe go back to home directory (leave openairinterface5g directory)
+
# maybe go back to home directory (leave openairinterface5g directory)
git clone https://gitlab.eurecom.fr/oai/openair-cn.git
+
git clone https://gitlab.eurecom.fr/oai/openair-cn.git
cd openair-cn
+
cd openair-cn
git checkout develop
+
git checkout develop
We tested with commit: 724542d0b59797b010af8c5df15af7f669c1e838
+
 
 +
We tested with commit: 724542d0b59797b010af8c5df15af7f669c1e838
  
 
The Eurecom gitlab require now a login, if you don’t have one, a copy of the git repository is in:openair-cn extract the tar with
 
The Eurecom gitlab require now a login, if you don’t have one, a copy of the git repository is in:openair-cn extract the tar with
  
tar xf openair-cn.tgz
+
tar xf openair-cn.tgz
cd openair-cn
+
cd openair-cn
git checkout develop
+
git checkout develop
 +
 
 
This is the last commit for OAI EPC on this development tree. Active OpenAir EPC is now another project on github. We use here this legacy EPC because the installation is quite easy (the new project uses Cassandra, al LOT of virtual machines, OpenVswitch and complex dependancies).
 
This is the last commit for OAI EPC on this development tree. Active OpenAir EPC is now another project on github. We use here this legacy EPC because the installation is quite easy (the new project uses Cassandra, al LOT of virtual machines, OpenVswitch and complex dependancies).
  
Line 98: Line 31:
 
separate ASN.1 compiler installation to be compatible with other OpenAir components on the same machine (ans1c version is different for eNB and gNB)
 
separate ASN.1 compiler installation to be compatible with other OpenAir components on the same machine (ans1c version is different for eNB and gNB)
 
Install third party SW for EPC
 
Install third party SW for EPC
cd openair-cn; source oaienv; cd scripts
+
cd openair-cn; source oaienv; cd scripts
./build_hss -i
+
./build_hss -i
 
Answer yes to install: freeDiameter 1.2.0
 
Answer yes to install: freeDiameter 1.2.0
 
phpmyadmin:
 
phpmyadmin:
Line 106: Line 39:
 
For ubuntu 18.04, we set back the legacy mysql security level
 
For ubuntu 18.04, we set back the legacy mysql security level
  
sudo mysql -u root << END
+
sudo mysql -u root << END
USE mysql;
+
USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
+
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
+
FLUSH PRIVILEGES;
END
+
END
  
sudo systemctl restart mysql.service
+
sudo systemctl restart mysql.service
  
sudo mysql_secure_installation
+
sudo mysql_secure_installation
 
The last command will ask a few questions:
 
The last command will ask a few questions:
  
Line 124: Line 57:
 
Reload privilege tables now: yes
 
Reload privilege tables now: yes
 
Install 3PP SW for mme and spgw
 
Install 3PP SW for mme and spgw
./build_mme -i
+
./build_mme -i
 
Do you want to install freeDiameter 1.2.0: no
 
Do you want to install freeDiameter 1.2.0: no
 
Do you want to install asn1c rev 1516 patched? <y/N>: yes
 
Do you want to install asn1c rev 1516 patched? <y/N>: yes
Line 134: Line 67:
 
No difficulty found in this phase.
 
No difficulty found in this phase.
  
cd openair-cn; source oaienv; cd scripts
+
cd openair-cn; source oaienv; cd scripts
./build_hss
+
./build_hss
./build_mme
+
./build_mme
 
./build_spgw
 
./build_spgw
 
If you face compilation issues, the log files are in openair-cn/build/log
 
If you face compilation issues, the log files are in openair-cn/build/log
  
 
In there files, look for “error:” string.
 
In there files, look for “error:” string.

Revision as of 08:42, 28 October 2022

Download and patch EPC Clone OAI EPC:

# maybe go back to home directory (leave openairinterface5g directory)
git clone https://gitlab.eurecom.fr/oai/openair-cn.git
cd openair-cn
git checkout develop
We tested with commit: 724542d0b59797b010af8c5df15af7f669c1e838

The Eurecom gitlab require now a login, if you don’t have one, a copy of the git repository is in:openair-cn extract the tar with

tar xf openair-cn.tgz
cd openair-cn
git checkout develop

This is the last commit for OAI EPC on this development tree. Active OpenAir EPC is now another project on github. We use here this legacy EPC because the installation is quite easy (the new project uses Cassandra, al LOT of virtual machines, OpenVswitch and complex dependancies).

Apply the patch:

git apply ~/opencells-mods/EPC.patch The new version of the source files are also in the tar, if you want to merge with another version of OpenAir EPC

What is in the patch file:

Add Ubuntu 18.04 for compilation and fix some bugs Remove link between Linux host name and LTE diameter protocol configuration Add usage of the input address for the SGW input socket modify the freediameter S6a interface to fix a wrong OAI parameter No kernel module patch is required: generic Ubuntu kernel 18.04 works fine with OAI separate ASN.1 compiler installation to be compatible with other OpenAir components on the same machine (ans1c version is different for eNB and gNB) Install third party SW for EPC

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

Answer yes to install: freeDiameter 1.2.0 phpmyadmin: We don’t use phpmyadmin later in this procedure to update the MySQL database We removed the installation of phpmyadmin (of course you can use it if you prefer) For ubuntu 18.04, we set back the legacy mysql security level

sudo mysql -u root << END
USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
END
sudo systemctl restart mysql.service
sudo mysql_secure_installation

The last command will ask a few questions:

password: set your password (linux is set in our default config files) VALIDATE PASSWORD PLUGIN: no Remove anonymous users: yes Disallow root login remotely: yes Remove test database and access to it: yes Reload privilege tables now: yes Install 3PP SW for mme and spgw

./build_mme -i

Do you want to install freeDiameter 1.2.0: no Do you want to install asn1c rev 1516 patched? <y/N>: yes Do you want to install libgtpnl ? <y/N>: yes wireshark permissions: as you prefer

./build_spgw -i

Do you want to install libgtpnl ? <y/N>: no Compile the EPC nodes No difficulty found in this phase.

cd openair-cn; source oaienv; cd scripts
./build_hss
./build_mme

./build_spgw If you face compilation issues, the log files are in openair-cn/build/log

In there files, look for “error:” string.