Difference between revisions of "4G: OpenAirInterface dari OpenCell"

From OnnoWiki
Jump to navigation Jump to search
(Created page with "Sumber: https://open-cells.com/index.php/2019/09/22/all-in-one-openairinterface/ November 28th 2019: fix from user review September 23rd 2019: minor fix of warnings Sept...")
 
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Sumber: https://open-cells.com/index.php/2019/09/22/all-in-one-openairinterface/
 
Sumber: https://open-cells.com/index.php/2019/09/22/all-in-one-openairinterface/
  
 +
Yang digunakan
  
 +
* Ubuntu 18.04 64bit
 +
* Ettus B210 (kalau ada), kalau tidak ada kita coba simulasi physical.
  
 +
==Download Source OAI EPC==
  
November 28th 2019: fix from user review
+
sudo apt install git
  
September 23rd 2019: minor fix of warnings
 
  
September 2019, large rework and update to latest eNB
+
Sebagai user biasa, download config mods dari opencells
  
June 21st 2019: replace ubuntu 17.04 by ubuntu 18.04
+
cd ~
 +
wget https://open-cells.com/opencells-mods-20190923.tgz
 +
tar xf opencells-mods-20190923.tgz
  
Sept 7th 2017: small update for more recent eNB git commit version in develop branch
+
Download and patch EPC
  
Starting condition:
+
cd ~
Ubuntu 18.04 all packages upgraded, uhd last commit, OAI last commit
+
wget https://open-cells.com/d5138782a8739209ec5760865b1e53b0/openair-cn.tgz
 +
tar xf openair-cn.tgz
 +
cd openair-cn
 +
git checkout develop
  
Modifications
+
Apply the patch:
  
Latest commits
+
git apply ~/opencells-mods/EPC.patch
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.
+
What is in the patch file:
  
Known limitations fixed in the hereafter description
+
* 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)
  
GTP UDP ports are in conflict for eNB and SGW
+
Install third party SW for EPC
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
+
cd ~/openair-cn
pip3 install mako numpy
+
source oaienv
git clone git://github.com/EttusResearch/uhd.git
+
cd scripts
cd uhd; mkdir host/build; cd host/build
+
./build_hss -i
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 ~
+
Do you want to install freeDiameter 1.2.0: yes
wget https://open-cells.com/opencells-mods-20190923.tgz
 
tar xf opencells-mods-20190923.tgz
 
Download and patch EPC
 
Clone OAI EPC:
 
  
# maybe go back to home directory (leave openairinterface5g directory)
+
Jika ada kesalahan, coba
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
+
sudo apt --fix-broken install
 +
cd ~/openair-cn
 +
source oaienv
 +
cd scripts
 +
./build_hss -i
  
tar xf openair-cn.tgz
+
Untuk ubuntu 18.04, set back legacy mysql security level
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:
+
sudo mysql -u root
 +
USE mysql;
 +
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
 +
FLUSH PRIVILEGES;
 +
quit
  
git apply ~/opencells-mods/EPC.patch
+
sudo systemctl restart mysql.service
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:
+
Default username root, password "kosong"
  
Add Ubuntu 18.04 for compilation and fix some bugs
+
Install 3PP SW untuk mme dan spgw
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
+
sudo apt fix-broken install
USE mysql;
+
cd ~/openair-cn
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
+
source oaienv
FLUSH PRIVILEGES;
+
cd scripts
END
+
./build_mme -i
  
sudo systemctl restart mysql.service
+
Do you want to install freeDiameter 1.2.0 <y/N>: yes
 +
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
  
sudo mysql_secure_installation
 
The last command will ask a few questions:
 
  
password: set your password (linux is set in our default config files)
+
cd ~/openair-cn
VALIDATE PASSWORD PLUGIN: no
+
source oaienv
Remove anonymous users: yes
+
cd scripts
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
 
  ./build_spgw -i
Do you want to install libgtpnl ? <y/N>: no
+
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
+
==Compile the EPC nodes==
./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.
+
Kalau gagal di ulang lagi saja.
 +
 
 +
cd ~/openair-cn
 +
source oaienv
 +
cd scripts
 +
./build_hss
 +
./build_mme
 +
./build_spgw
 +
 
 +
Jika ada masalah compile, cek string "error:" di,
 +
 
 +
openair-cn/build/log
 +
 
 +
==Download & Compile the eNB on 18.04==
 +
 
 +
cd ~
 +
git config --global user.name "Onno"
 +
git config --global user.email "onno@indo.net.id"
 +
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
 +
cd ~/openairinterface5g
 +
git checkout develop
  
Download & Compile the eNB on 18.04
 
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
 
cd openairinterface5g
 
git checkout develop
 
 
We tested with commit edb74831dabf79686eb5a92fbf8fc06e6b267d35
 
We tested with commit edb74831dabf79686eb5a92fbf8fc06e6b267d35
 
Build in two steps
 
Build in two steps
source oaienv   
+
 
./cmake_targets/build_oai -I  # install SW packages from internet
+
sudo apt -y install libuhd-dev libuhd003 uhd-host
./cmake_targets/build_oai -w USRP --eNB --UE # compile eNB and UE
+
source oaienv   
Our Network setup description
+
./cmake_targets/build_oai -I  # install SW packages from internet
 +
./cmake_targets/build_oai -I
 +
 
 +
./cmake_targets/build_oai -I -w USRP --eNB
 +
./cmake_targets/build_oai -I -w USRP --eNB --UE # compile eNB and UE
 +
 
 +
./cmake_targets/build_oai -I --eNB -x --install-system-files -w USRP
 +
./cmake_targets/build_oai -I --eNB -x --install-system-files -w EXMIMO
 +
./cmake_targets/build_oai -I --eNB -x --install-system-files -w BLADERF
 +
 
 +
==Our Network setup description==
 +
 
 
I’ve made a simple configuration for this all-in-one setup.
 
I’ve made a simple configuration for this all-in-one setup.
  
 
Each node is on a separate IP address, this address is used for all it’s interfaces. In our case of all-in-one, we take addresses on the loopback: this will be fine on all your machines.
 
Each node is on a separate IP address, this address is used for all it’s interfaces. In our case of all-in-one, we take addresses on the loopback: this will be fine on all your machines.
  
HSS is on localhost: 127.0.0.1
+
HSS is on localhost: 127.0.0.1
eNB is on 127.0.0.10
+
eNB is on 127.0.0.10
MME is on 127.0.0.20
+
MME is on 127.0.0.20
SPGW is on 127.0.0.30
+
SPGW is on 127.0.0.30
 +
 
 
The LTE diameter configuration is now isolated from Linux hostname.
 
The LTE diameter configuration is now isolated from Linux hostname.
  
realm for our EPC: “OpenAir5G.Alliance”, so, full distinguish names (FQDN) are: hss.OpenAir5G.Alliance, mme.OpenAir5G.Alliance
+
realm for our EPC: “OpenAir5G.Alliance”, so, full distinguish names (FQDN) are:
 +
hss.OpenAir5G.Alliance,
 +
mme.OpenAir5G.Alliance
 +
 
 +
==Install this configuration for eNB==
  
Install this configuration for eNB
 
 
In your eNB configuration file, the network is now fixed, as lo interface always exists and our computer internal addresses also:
 
In your eNB configuration file, the network is now fixed, as lo interface always exists and our computer internal addresses also:
  
////////// MME parameters:
+
  ////////// MME parameters:
mme_ip_address = ( { ipv4 = "127.0.0.20";
+
  mme_ip_address = ( { ipv4 = "127.0.0.20";
ipv6 = "192:168:30::17";
+
  ipv6 = "192:168:30::17";
active = "yes";
+
  active = "yes";
preference = "ipv4";
+
  preference = "ipv4";
  }
+
  }
  );
+
  );
 +
 +
  NETWORK_INTERFACES :
 +
  {
 +
  ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
 +
  ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.10/8";
 +
   
 +
  ENB_INTERFACE_NAME_FOR_S1U = "lo";
 +
  ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.10/8";
 +
  ENB_PORT_FOR_S1U = 2152; # Spec 2152
 +
  };
  
NETWORK_INTERFACES :
 
{
 
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
 
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.10/8";
 
 
ENB_INTERFACE_NAME_FOR_S1U = "lo";
 
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.10/8";
 
ENB_PORT_FOR_S1U = 2152; # Spec 2152
 
};
 
 
In the eNB config file, you need also to set the MCC and MNC as per your SIM card:
 
In the eNB config file, you need also to set the MCC and MNC as per your SIM card:
  
tracking_area_code = “1”;
+
tracking_area_code = “1”;
mobile_country_code = “208”;
+
mobile_country_code = “208”;
mobile_network_code = “92”;
+
mobile_network_code = “92”;
  
 
And obviously, your radio parameters.
 
And obviously, your radio parameters.
  
Wwe tested with USRP B210 20MHz band, Huawei E3272 UE, a cavity duplexer a simple antenna, about 1 meter distance UE/eNB antenna with this file: ~/opencells-mods/enb.10MHz.b200
+
Wwe tested with USRP B210 20MHz band, Huawei E3272 UE, a cavity duplexer a simple antenna, about 1 meter distance UE/eNB antenna with this file:  
 +
 
 +
~/opencells-mods/enb.10MHz.b200
  
 
if you use the OpenAir UE, a sim card file that match our hss database example: opencells-mods/sim.conf. We will make another tutorial to use together OpenAir UE and rf board simulation
 
if you use the OpenAir UE, a sim card file that match our hss database example: opencells-mods/sim.conf. We will make another tutorial to use together OpenAir UE and rf board simulation
Line 203: Line 183:
 
For the EPC, we install in OAI default directory: /usr/local/etc/oai
 
For the EPC, we install in OAI default directory: /usr/local/etc/oai
  
sudo mkdir -p /usr/local/etc/oai
+
sudo mkdir -p /usr/local/etc/oai
sudo cp -rp ~/opencells-mods/config_epc/* /usr/local/etc/oai
+
sudo cp -rp ~/opencells-mods/config_epc/* /usr/local/etc/oai
cd openair-cn; source oaienv; cd scripts
+
cd openair-cn; source oaienv; cd scripts
./check_hss_s6a_certificate /usr/local/etc/oai/freeDiameter hss.OpenAir5G.Alliance
+
./check_hss_s6a_certificate /usr/local/etc/oai/freeDiameter hss.OpenAir5G.Alliance
./check_mme_s6a_certificate /usr/local/etc/oai/freeDiameter mme.OpenAir5G.Alliance
+
./check_mme_s6a_certificate /usr/local/etc/oai/freeDiameter mme.OpenAir5G.Alliance
 +
 
 
Only the SGi output to internet need to be configured.
 
Only the SGi output to internet need to be configured.
 +
 
In /usr/local/etc/oai/spgw.conf,
 
In /usr/local/etc/oai/spgw.conf,
 
your should set the Ethernet interface that is connected to Internet, and,
 
your should set the Ethernet interface that is connected to Internet, and,
Line 215: Line 197:
 
  PGW_INTERFACE_NAME_FOR_SGI = "enp3s0";  
 
  PGW_INTERFACE_NAME_FOR_SGI = "enp3s0";  
 
  PGW_MASQUERADE_SGI = "yes";
 
  PGW_MASQUERADE_SGI = "yes";
For the SIM card, you’ll have more to do:
 
  
SIM MCC/MNC should be duplicated in a couple of files
+
For the SIM card, you’ll have more to do: 
eNB: See above in eNB configuration chapter
+
 
MME file: /usr/local/etc/oai/mme.conf to update
+
* SIM MCC/MNC should be duplicated in a couple of files
GUMMEI_LIST = ( MCC="208" ; MNC="92"; MME_GID="4" ; MME_CODE="1"; } );
+
* eNB: See above in eNB configuration chapter
TAI_LIST = ({MCC="208" ; MNC="92"; TAC = "1"; } );
+
* MME file: /usr/local/etc/oai/mme.conf to update
HSS
+
GUMMEI_LIST = ( MCC="208" ; MNC="92"; MME_GID="4" ; MME_CODE="1"; } );
 +
TAI_LIST = ({MCC="208" ; MNC="92"; TAC = "1"; } );
 +
HSS
 +
 
 
Configure the password for MySQL
 
Configure the password for MySQL
 
in /usr/local/etc/oai/hss.conf, set password as the password you created during MySQL installation
 
in /usr/local/etc/oai/hss.conf, set password as the password you created during MySQL installation
Line 228: Line 212:
 
We don’t use phpmyadmin: we load the database from a ascii file
 
We don’t use phpmyadmin: we load the database from a ascii file
 
It is pre-configured with the
 
It is pre-configured with the
mme id
+
 
 +
mme id
 +
 
 
10 users is network 208/92 (a French test network) are also created (don’t use 3GPP test network: 001/01: the mme fails when MCC starts by “0”)
 
10 users is network 208/92 (a French test network) are also created (don’t use 3GPP test network: 001/01: the mme fails when MCC starts by “0”)
 +
 
Each time you import this db, it erases the entire database
 
Each time you import this db, it erases the entire database
 
(example: you set mysql password to “linux”)
 
(example: you set mysql password to “linux”)
Line 237: Line 224:
 
but, if you prefer, usage of http://localhost/phpmyadmin is fine.
 
but, if you prefer, usage of http://localhost/phpmyadmin is fine.
 
if you modified the hss db directly, we offer a export script:
 
if you modified the hss db directly, we offer a export script:
~/opencells-mods/hss_export
+
 
 +
~/opencells-mods/hss_export
 +
 
 
The important values to set are:
 
The important values to set are:
table pdn:
+
* table pdn:
 
all IMSI are listed, with the APN: these values are in UE/USIM
 
all IMSI are listed, with the APN: these values are in UE/USIM
table users:
+
* table users:
 
all IMSI, key (Ki) and OPc must be the same in USIM card
 
all IMSI, key (Ki) and OPc must be the same in USIM card
 
Sqn increments automatically  when the UE authenticate in both USIM and HSS DB: it should be set as per USIM internal incrementation
 
Sqn increments automatically  when the UE authenticate in both USIM and HSS DB: it should be set as per USIM internal incrementation
 +
 
SIM card update
 
SIM card update
 
Open cells UICC and card reader will  be supported
 
Open cells UICC and card reader will  be supported
Line 250: Line 240:
  
 
in each window
 
in each window
cd openair-cn; source oaienv; cd scripts; ./run_hss
+
 
cd openair-cn; source oaienv; cd scripts; ./run_mme
+
cd openair-cn; source oaienv; cd scripts; ./run_hss
cd openair-cn; source oaienv; cd scripts; sudo -E ./run_spgw
+
cd openair-cn; source oaienv; cd scripts; ./run_mme
sudo bash
+
cd openair-cn; source oaienv; cd scripts; sudo -E ./run_spgw
cd ~/openairinterface5g; source oaienv
+
sudo bash
cd cmake_targets/lte_build_oai/build
+
cd ~/openairinterface5g; source oaienv
 +
cd cmake_targets/lte_build_oai/build
 
./lte-softmodem -O ~/opencells-mods/enb.10MHz.b200
 
./lte-softmodem -O ~/opencells-mods/enb.10MHz.b200
 +
 
Connect the UE, it should attach to network and be able to reach internet through OAI network.
 
Connect the UE, it should attach to network and be able to reach internet through OAI network.
  
Line 266: Line 258:
 
The first case is to verify the USRP dialogs over USB3 (not USB2): the process must report:
 
The first case is to verify the USRP dialogs over USB3 (not USB2): the process must report:
  
Found USRP B200
+
Found USRP B200
-- Detected Device: B200
+
-- Detected Device: B200
-- Operating over USB 3.
+
-- Operating over USB 3.
 +
 
 
For OAI source code, we wrote improvements and some hints for UE performance last year. The Linux/Ubuntu advises can be applied to the eNB:
 
For OAI source code, we wrote improvements and some hints for UE performance last year. The Linux/Ubuntu advises can be applied to the eNB:
  
https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/setup-for-real-time-performance
+
https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/setup-for-real-time-performance
  
 
We may make later a post for eNB (OAI/eNB can reach much better performance than today develop branch, but it require to enhance parts of the source code).
 
We may make later a post for eNB (OAI/eNB can reach much better performance than today develop branch, but it require to enhance parts of the source code).
Line 278: Line 271:
  
 
On the i5-6600K, we obtained stable performance at maximum traffic over 20MHz, transmission mode 1 (SISO), duplexer, antenna, E3372 UE (one single UE) over-the-air 10 cm distance :
 
On the i5-6600K, we obtained stable performance at maximum traffic over 20MHz, transmission mode 1 (SISO), duplexer, antenna, E3372 UE (one single UE) over-the-air 10 cm distance :
 
 
 
 
 
  
 
==Referensi==
 
==Referensi==
  
 
* https://open-cells.com/index.php/2019/09/22/all-in-one-openairinterface/
 
* https://open-cells.com/index.php/2019/09/22/all-in-one-openairinterface/

Latest revision as of 11:28, 7 October 2022

Sumber: https://open-cells.com/index.php/2019/09/22/all-in-one-openairinterface/

Yang digunakan

  • Ubuntu 18.04 64bit
  • Ettus B210 (kalau ada), kalau tidak ada kita coba simulasi physical.

Download Source OAI EPC

sudo apt install git


Sebagai user biasa, download config mods dari opencells

cd ~
wget https://open-cells.com/opencells-mods-20190923.tgz
tar xf opencells-mods-20190923.tgz

Download and patch EPC

cd ~
wget https://open-cells.com/d5138782a8739209ec5760865b1e53b0/openair-cn.tgz
tar xf openair-cn.tgz
cd openair-cn
git checkout develop

Apply the patch:

git apply ~/opencells-mods/EPC.patch


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
Do you want to install freeDiameter 1.2.0: yes

Jika ada kesalahan, coba

sudo apt --fix-broken install
cd ~/openair-cn
source oaienv
cd scripts
./build_hss -i

Untuk ubuntu 18.04, set back legacy mysql security level

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

Default username root, password "kosong"

Install 3PP SW untuk mme dan spgw

sudo apt fix-broken install
cd ~/openair-cn
source oaienv
cd scripts
./build_mme -i
Do you want to install freeDiameter 1.2.0 <y/N>: yes
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


cd ~/openair-cn
source oaienv
cd scripts
./build_spgw -i
Do you want to install libgtpnl ? <y/N>: no

Compile the EPC nodes

Kalau gagal di ulang lagi saja.

cd ~/openair-cn
source oaienv
cd scripts
./build_hss
./build_mme
./build_spgw

Jika ada masalah compile, cek string "error:" di,

openair-cn/build/log

Download & Compile the eNB on 18.04

cd ~
git config --global user.name "Onno"
git config --global user.email "onno@indo.net.id"
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd ~/openairinterface5g
git checkout develop

We tested with commit edb74831dabf79686eb5a92fbf8fc06e6b267d35 Build in two steps

sudo apt -y install libuhd-dev libuhd003 uhd-host
source oaienv  
./cmake_targets/build_oai -I  # install SW packages from internet
./cmake_targets/build_oai -I 
./cmake_targets/build_oai -I -w USRP --eNB
./cmake_targets/build_oai -I -w USRP --eNB --UE # compile eNB and UE
./cmake_targets/build_oai -I --eNB -x --install-system-files -w USRP
./cmake_targets/build_oai -I --eNB -x --install-system-files -w EXMIMO
./cmake_targets/build_oai -I --eNB -x --install-system-files -w BLADERF

Our Network setup description

I’ve made a simple configuration for this all-in-one setup.

Each node is on a separate IP address, this address is used for all it’s interfaces. In our case of all-in-one, we take addresses on the loopback: this will be fine on all your machines.

HSS is on localhost: 127.0.0.1
eNB is on 127.0.0.10
MME is on 127.0.0.20
SPGW is on 127.0.0.30

The LTE diameter configuration is now isolated from Linux hostname.

realm for our EPC: “OpenAir5G.Alliance”, so, full distinguish names (FQDN) are:

hss.OpenAir5G.Alliance,
mme.OpenAir5G.Alliance

Install this configuration for eNB

In your eNB configuration file, the network is now fixed, as lo interface always exists and our computer internal addresses also:

 ////////// MME parameters:
 mme_ip_address = ( { ipv4 = "127.0.0.20";
 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.0.10/8"; 

 ENB_INTERFACE_NAME_FOR_S1U = "lo";
 ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.10/8";
 ENB_PORT_FOR_S1U = 2152; # Spec 2152
 };

In the eNB config file, you need also to set the MCC and MNC as per your SIM card:

tracking_area_code = “1”;
mobile_country_code = “208”;
mobile_network_code = “92”;

And obviously, your radio parameters.

Wwe tested with USRP B210 20MHz band, Huawei E3272 UE, a cavity duplexer a simple antenna, about 1 meter distance UE/eNB antenna with this file:

~/opencells-mods/enb.10MHz.b200

if you use the OpenAir UE, a sim card file that match our hss database example: opencells-mods/sim.conf. We will make another tutorial to use together OpenAir UE and rf board simulation

Install this configuration for EPC For the EPC, we install in OAI default directory: /usr/local/etc/oai

sudo mkdir -p /usr/local/etc/oai
sudo cp -rp ~/opencells-mods/config_epc/* /usr/local/etc/oai
cd openair-cn; source oaienv; cd scripts
./check_hss_s6a_certificate /usr/local/etc/oai/freeDiameter hss.OpenAir5G.Alliance
./check_mme_s6a_certificate /usr/local/etc/oai/freeDiameter mme.OpenAir5G.Alliance

Only the SGi output to internet need to be configured.

In /usr/local/etc/oai/spgw.conf, your should set the Ethernet interface that is connected to Internet, and, to tell to the PGW to implement NAPT for the UE traffic

PGW_INTERFACE_NAME_FOR_SGI = "enp3s0"; 
PGW_MASQUERADE_SGI = "yes";

For the SIM card, you’ll have more to do:

  • SIM MCC/MNC should be duplicated in a couple of files
  • eNB: See above in eNB configuration chapter
  • MME file: /usr/local/etc/oai/mme.conf to update
GUMMEI_LIST = ( MCC="208" ; MNC="92"; MME_GID="4" ; MME_CODE="1"; } );
TAI_LIST = ({MCC="208" ; MNC="92"; TAC = "1"; } );
HSS

Configure the password for MySQL in /usr/local/etc/oai/hss.conf, set password as the password you created during MySQL installation A HSS database in text is in: ~/opencells-mods/opencells_db.sql We don’t use phpmyadmin: we load the database from a ascii file It is pre-configured with the

mme id

10 users is network 208/92 (a French test network) are also created (don’t use 3GPP test network: 001/01: the mme fails when MCC starts by “0”)

Each time you import this db, it erases the entire database (example: you set mysql password to “linux”) ~/opencells-mods/hss_import 127.0.0.1 root linux oai_db ~/opencells-mods/opencells_db.sql We use to modify the db by updating this file with regular text editor, then we re-load the entire database, but, if you prefer, usage of http://localhost/phpmyadmin is fine. if you modified the hss db directly, we offer a export script:

~/opencells-mods/hss_export

The important values to set are:

  • table pdn:

all IMSI are listed, with the APN: these values are in UE/USIM

  • table users:

all IMSI, key (Ki) and OPc must be the same in USIM card Sqn increments automatically when the UE authenticate in both USIM and HSS DB: it should be set as per USIM internal incrementation

SIM card update Open cells UICC and card reader will be supported Final test and verification open 4 terminal windows

in each window

cd openair-cn; source oaienv; cd scripts; ./run_hss
cd openair-cn; source oaienv; cd scripts; ./run_mme
cd openair-cn; source oaienv; cd scripts; sudo -E ./run_spgw
sudo bash
cd ~/openairinterface5g; source oaienv
cd cmake_targets/lte_build_oai/build

./lte-softmodem -O ~/opencells-mods/enb.10MHz.b200

Connect the UE, it should attach to network and be able to reach internet through OAI network.

If the UE attaches, but you don’t have internet access, verify phone configuration: enable data in config->sim and verify the APN value

Issues related to CPU power If you reach performance issues: USRP/UHD prints “LLLLL” or the process exits “problem with samples”, OVERFLOW, …

The first case is to verify the USRP dialogs over USB3 (not USB2): the process must report:

Found USRP B200
-- Detected Device: B200
-- Operating over USB 3.

For OAI source code, we wrote improvements and some hints for UE performance last year. The Linux/Ubuntu advises can be applied to the eNB:

https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/setup-for-real-time-performance

We may make later a post for eNB (OAI/eNB can reach much better performance than today develop branch, but it require to enhance parts of the source code).

We re-built this procedure from scratch and tested i5-6600K.

On the i5-6600K, we obtained stable performance at maximum traffic over 20MHz, transmission mode 1 (SISO), duplexer, antenna, E3372 UE (one single UE) over-the-air 10 cm distance :

Referensi