Blog

Featured

All in one OpenAirInterface

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

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.

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
  • Build in two steps
source oaienv  
./cmake_targets/build_oai -I  # install SW packages from internet
./cmake_targets/build_oai -w USRP --eNB --UE # compile eNB and UE

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

  1. 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 :

Commercial UEs tests

This page groups reported tests in 5G SA open source systems with commercial UEs

Please comment on this page, the moderator will integrate your input in the page

 

 

 

Starting point

A UICC, with Milenage authentication, HSS/UDR with same data: IMSI, Ki, OPc

The DNN is to set in the phone, according to the DNN in the 5GC

All UEs should work with any USIM, any PLMN, any UE HW supported bands, see Ericsson paper:

https://www.ericsson.com/en/blog/2020/1/5g-security-sim-card

These Rel 99+ USIMs can be used to access every generation of mobile networks, including 5G. Such backward and forward compatibility is achieved by the carefully designed offloading of some computations and storage to mobile phones.

It is E/// above document and 3GPP standard: any card should work, except the pure GSM ones (before 1999)

Now, we can face difficulties with today smartphones, that are NOT COMPLIANT (shame on them)

Voice over xxx

Many phones try to connect to IMS server: open a second PDU session on “ims” DNN/APN name.

Then connect to a IMS/SIP server (with open cells cards, see the FAQ for the SIP identifiers in 3GPP).

But, if this fails, some UEs simply abort all the radio link, including the default PDU session to internet.

So, if this is available in the phone menu, disable voice over xxx is a good idea for 99% of our use cases.

UEs table

Model type firmware frequency bands plmn gNB 5GC
sim type comment
Huawei
P40, P40 pro
smartp all 78 all OAI/develop OAI, free5GC open-cells Recent firmware  require cyphering

in OAI core config files – INT_ALGO_LIST=[“NIA1” , “NIA2”]
– CIPH_ALGO_LIST=[“NEA1” , “NEA2”]

Seems also to need to run a ISM server (Asterix is fine)

Huawei E6878-870 CPE all 78 all OAI/develop OAI, free5GC open-cells works
Quectel RM500Q-GL M.2 RM500QGL

ABR11A06M4G

Need firmware (AT+QGMR command)

For SA, at least

RM500QGLABR11A06M4G_01.001.01.001

For SA + mobility, handovers (neighbor measurements)

RM500QGLABR11A06M4G_02.200.02.200
78, 38, 41 all OAI/develop OAI, free5GC open-cells firmware before A06 doesn’t work

Windows driver works
band 38: 20MHz only

MBIM mode works much better for high throughput

PLMN restriction lists can be used  with AT+QMBNCFG=”Select”,”ROW_Commercial”

but it can’t be a void list

 

Quectel RM520N-GL M.2 RM520NGLAAR01A06M4G ? ? OAI SA gNB: tag: 2023.w16 OAI SA Core: tag: 2023.w04b open-cells works
Quectel RM502Q-AE M.2 ? ? 001/01 OAI OAI sysmocom works with IMS
tested up to 80MHz
Teltonika RUTX50 Industrial 5G router  RUTX_R_00.07.04.1
internal modem: Quectel RG501Q-EU
quectel version RG501QEUAAR12A07M4G_04.001.04.001
n78 001/01 OAI SA gNB: tag: 2023.w16 OAI SA Core: tag: 2023.w04b open-cells works
SIMCom SIM8262E-M2 Qualcomm Snapdragon X62 2212B03V03X62M44A-M2 n78 208/99 OAI/develop (wk40/22 but also newer versions) OAI/develop open-cells trigger PDU-Session establishment with at+netopen
SIM8200EA-M2 qualcomm SIM8200M44A-M2_B02V05_201201 n78 208.01 OAI/develop OAI CN open-cells Not working well

initial connection seems low, no success with 001/01.

AT commands: trigger PDU-Session establishment with at+netopen

google pixel

4a, 5, 5a, 6, 6a

smartp Android 12

Stock Google OS/GrapheneOS

another test:

pixel 4a, RQ2A.210305.006

6a: android 13 (graphenOS)

 

41, 78 001/01

reported not working with 209/99

OAI/develop open5GS open-cells optional:

*#*#4636*#*# menu, network type to NR only

OnePlus 9 smartp LE2115 41,78 001/01 OAI/develop open5gs open-cells works on Android 11. On Android 12, the UE first sends a PDU Session Establishment request with ims dnn before sending a second request with the regular OAI dnn– did not work when I tested previously (before multiple PDU session support was added to OAI)
OnePlus 9 pro 5G smartp LE2123

LE2123_11_C.61

? ? OAI/develop ? ? reported not working
Sierra Wireless EM9191 M.2 Generic 41,78 001/01 OAI/develop open5gs open-cells works with generic firmware, carrier-specific firmware not tested
Sierra Wireless EM9291 M.2 Generic 41,78 001/01 OAI/develop open5gs open-cells work well with ModemManager. AT commands are not needed for establishing PDU sessions
Moto G 5G (XT2113-3 ? ? ? ? OAI/develop ? ? reported working
Motorola Edge 2022 (Mediatek) smartp Android 12 n41 and n78 001-01 OAI/develop open5gs open-cells works
Motorola Edge+ 2022 (Qualcomm) smartp Android 12 n41 and n78 001-01 OAI/develop open5gs open-cells works
Dial *#*#4636#*#* code on the Motorola and switch to NR only, and make sure that the APN is set up and enabled (in Network Settings). Also, disable VoLTE/4G calling. It should initiate RA with the gNB in a few minutes (for the first time).
OnePlus Nord CE2 smartp Dimensity 900 Octa-core
Model: IV2201
android 11
78 ? OAI/develop oai open-cells reported working

may need to set NAS Integrity Protect 1

OnePlus Nord CE 5G smartp Snapdragon 750G
Model: EB2101
Android version: 11
? ? OAI/develop oai open-cells reported to work, but very slow to find the network
OpenPlus Nord N10 5G smartp Processor: Qualcomm Snapdragon 690
Model: BE2029
Android version: 11
n78 208/99 OAI/develop oai open-cells works fine, finds network fast
Oneplus Nord smartp AC2003 andEB2101

processor snapdragon 750G

n78 001/01

not working  209/99

oai/develop oai open-cells works only on 001/01
OPPO Reno7 Pro 5G smartp Dimensity 1200-Max Octa-core
Model: CPH2293
Android version: 11
n78 ? OAI/develop oai open-cells works
OPPO A54 ROM: Color OS 12.1, Android 12
Model: CPH2195
SRSran Open5GC sysmocom SJA2 can detect n1, n3, n7, n28

n78 not working. same device + SIM to see a live commercial 5G SA cell on n78 so the issue in this case is most likley either one or more of the TDD 15khz item, the need for a better GPSDO or possibly I need a better antenna for the band

Oppo Reno 5G

Snapdragon 765G Andriod V11.1 ? 001/01 OAI/develop (2023.w10b but also older versions), USRP B210, SA Open5GS/main, c0a61fb71, build from source

?

For UE, VoLTE Call should be enabled and 5G Network Mode should be SA+NSA even the gNB and 5GC are both in SA mode. The 5G Network Mode can be found in developer setting. It seems like it does not work with PLMN other than 00101.
Tested NOT work with 00102, 00201, 20893The UE connects to DNN “internet”

Telit FN908m

? ? ? ? OAI/develop OAI 5GC

sysmoUSIM-SJS1

not working

Telit FN990A40

M.2 all 41, 78 001/01 OAI/develop open5GS

open cells

work well with ModemManager. AT commands are not needed for establishing PDU sessions

Telit FN990A28

M.2 all 41, 78 001/01 OAI/develop open5GS

open cells

work well with ModemManager. AT commands are not needed for establishing PDU sessions

telit FN980

M.2 ? ? ? OAI/develop

 

?

?

tested with qmicli and AT commands to set before the APN/DNN
wwan0 as raw IP configurationReported issues with reconect procedure that still fails in OAI version of septemebr 2023
Sierra Wireless XR90 M.2 all/generic 78 208/99 OAI/develop Open5GS

open-cells

works
Samsung A33 5G smartp Processor: Exynos 1280
Model: SM-A336E/DS
Android version: 12
78 ? OAI/develop OAI 5GC

?

works
Samsung Galaxy A52S 5G sma Processor: Snapdragon 778G
Model: SM-A528B/DS
Android version: 11
78 ? OAI/develop OAI 5GC

?

works
galaxy S22+ smartp SM-S906B/DS 78 001/01 OAI/develop OAI 5GC open cells works
Samsung S23 smartp ? 001/01 and voLTE enabled OAI/develop OAI 5GC

sysmocom

BW up to 80MHz
VoLTE enabled.
sysmocom sim card with disabled 5G security calculations on simcard./pySim-shell.py -p0
verify_adm
select MF
select ADF.USIM
select EF.UST
ust_service_deactivate 124
Xperia 10 IV smartp Android 12 (stock) 41 and 78 001/01 OAI/develop Open5GS

open-cells

works

M.2 modules based on Qualcomm, usage with Linux

Access to AT commands

sudo screen /dev/ttyUSB2

Linux connection

sudo ip link set wwan0 down
echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip
sudo ip link set wwan0 up
sudo qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-set-operating-mode=low-power
sudo qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-set-operating-mode=online
sudo qmicli --device=/dev/cdc-wdm0 --device-open-proxy --wds-start-network="ip-type=4,apn=oai" --client-no-release-cid
sudo udhcpc -q -f -n -i wwan0

Swap airplane/normal mode

Add a data bearer to DNN “oai”

query the module to add IP address on the interface

SRSlte project page can help

 

RF simulator, 1 eNB, 2 UEs, all-in-one

This tutorial explains how to connect 2 UEs to a eNB, with simulated RF board, on same machine.

It reuse the other tutorials we published in a quite complex IP addresses configuration

Constrains

  1. 50 RB (10MHz) as it seems current commit in develop branch doesn’t work well on 100RB
  2. Full mode, with EPC: the noS1 mode seems to not work with two UEs

Let’s go

RF simulator and OAI UE tutorial

Do this tutorial, with the UE on same machine option.

To install EPC, eNB, use all-in-one tuto, with latest commit in develop branch

      • you can add –ninja on ./build_oai … and replace all “make” by “ninja” that will be faster compilation for same result

you should reach one UE in traffic, all on one machine

Now, we will add the second UE

Make a second SIM

The UE always use the current directory files for SIM files
( hidden files: .usim.nvram0,  .ue.nvram0, .ue_emm.nvram0)

so we make a second directory and create the files in this directory

cd ..
mkdir build2
cd build2
cp ~/opencells-mods/sim.conf sim2.conf
# edit the file: change only the msin: MSIN="0100001112";
../../nas_sim_tools/build/conf2uedata -c sim2.conf -o .

Make a second network namespace

sudo ip netns delete ueNameSpace2
sudo ip link delete v-eth2
sudo ip netns add ueNameSpace2
sudo ip link add v-eth2 type veth peer name v-ue2
sudo ip link set v-ue2 netns ueNameSpace2
sudo ip addr add 10.201.1.1/24 dev v-eth2
sudo ip link set v-eth2 up
sudo iptables -t nat -A POSTROUTING -s 10.201.1.0/255.255.255.0 -o enp0s31f6 -j MASQUERADE
sudo iptables -A FORWARD -i enp0s31f6 -o v-eth2 -j ACCEPT
sudo iptables -A FORWARD -o enp0s31f6 -i v-eth2 -j ACCEPT
sudo ip netns exec ueNameSpace2 ip link set dev lo up
sudo ip netns exec ueNameSpace2 ip addr add 10.201.1.2/24 dev v-ue2
sudo ip netns exec ueNameSpace2 ip link set v-ue2 up
sudo ip netns exec ueNameSpace2 bash

Run the second UE

cd build2
ip netns exec ueNameSpace2 bash
./lte-uesoftmodem -C 2685000000 -r 50 --rfsim --rfsimulator.serveraddr 10.201.1.1

Traffic test

In one more window, launch some traffic in the second UE

ip netns exec ueNameSpace2 bash
ping -I oaitun_ue1 10.201.1.1

 

5G OpenAir first run

version: update July, 23rd 2020

Tutorial to run 5G OpenAir, from current develop branch.

OAI 5G is very partial, only a fixed scheduler, for one UE, no network entry (no radio network entry, no upper layers network entry).

We can use “phy-test” mode, that hard code a permanent UL and DL shared channel (means a data channel dedicated to one UE in 3GPP jargon).

Of course there is no core network in this very special “phy-test” mode and some upper layer pieces are still 4G (PDCP for example).

Please read the 4G tutorial for more information on how to make initial installation of OpenAir.

Then, you can compile and run 5G tests

To compile:

./build_oai --gNB --nrUE

Run the gNB in one windows

sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf --parallel-config PARALLEL_SINGLE_THREAD --rfsim --phy-test --rfsimulator.serveraddr server --noS1 -d

If you use the same machine for the UE, we have the same IP address problem as in 4G (see our post rf-simulator-and-oai-ue-tutorial)

so, create a new Linux namespace as in this tutorial

In the namespace, run

sudo ./nr-uesoftmodem -d --rrc_config_path . --nokrnmod --phy-test --rfsim --rfsimulator.serveraddr 10.200.1.1 --noS1

If it runs fine, you should see this graph:

If the graph doesn’t show working PDSCH, restart the UE as there is a random bug in UE initial synchronization.

Then, open one more text window and set it in the UE network name space

sudo ip netns exec ueNameSpace bash

It is now possible to ping the gNB output interface

ping -I oaitun_ue1 10.0.1.1 -s 1000

Sends in both directions packets of 1000 bytes.

Ping also checks the packet content is the same.

What is today available on top of this simple tutorial:

  • If you make IP routing configuration, any IP traffic can get through the pair UE+gNB
  • if you run the UE on another machine, it is also fine (no need of network namespaces)
  • Ettus RF board may also work, if the machine is fast enough

RF simulator and OAI UE tutorial

Version 0: initial writing

This tutorial explains how to run OpenAir EPC+eNB+UE with a RF card simulator.

Starting point: the all-in-one tutorial has been run, so the system is installed and running.

Setup the UE

The all-in-one tutorial already compiled the UE, even if we didn’t use it yet.

Our patch file also contains the needed configuration files.

We need now to add a virtual SIM card in binary form to our directory:

../../nas_sim_tools/build/conf2uedata -c ~/opencells-mods/sim.conf -o .

conf2uedata command compiles a OpenAir ascii description of a SIM card into binary files that the OpenAir UE can read.

The hss dump file we provided contains the same SIM card.

Two machines: UE on a second machine

Assuming here you have a separate machine for the UE, you have to install OAI again, nevertheless the next step is easy.

On eNB machine, run the eNB as with RF board, but adding “–rfsim” and some parameters in the configuration file (see “rfsimulator” section we added in ~/opencells-mods/enb.10MHz.b200).

sudo ./lte-softmodem –rfsim -O ~/opencells-mods/enb.10MHz.b200 –log_config.hw_log_level error

“–log_config.hw_log_level error” is there to show how you can change the log level per component on the command line. This is possible for all parameters. We will use the same for UE, because the UE doesn’t have a configuration file.

Lets’ run the UE on the second machine

./lte-uesoftmodem -C 2685000000 -r 50 --rfsim --rfsimulator.serveraddr a.b.c.d

a.b.s.d is the eNB machine IP address.

The UE is now running, any IP traffic can be routed by the LTE network: UE+eNB+EPC

One machine UE + SGi interface

3GPP networks tunnel the UE IP address to the SGi.

SGi is in the PGW for regular LTE, maybe in the eNB in OpenAir noS1 mode.

The UE can’t run directly on the same “machine” because both UE and the 3GPP network border (PGW, or eNB in all cases where eNB performs local connection to internet (OAI nS1, LIPA, SIPTO, …)) will try to route the same IP address.

One solution is to run the UE in a virtual machine.

A lighter solution is to create only a network namespace for the UE (a component of a “virtual machine”)

In case of previous trails, delete the already created network namespaces

assuming enp0s31f6 is your network interface to internet, and that network 10.200.1.0 can be used freely in your intranet.

ip netns delete ueNameSpace
ip link delete v-eth1
ip netns add ueNameSpace  
ip link add v-eth1 type veth peer name v-ue1
ip link set v-ue1 netns ueNameSpace
ip addr add 10.200.1.1/24 dev v-eth1  
ip link set v-eth1 up  
iptables -t nat -A POSTROUTING -s 10.200.1.0/255.255.255.0 -o enp0s31f6 -j MASQUERADE  
iptables -A FORWARD -i enp0s31f6 -o v-eth1 -j ACCEPT  
iptables -A FORWARD -o enp0s31f6 -i v-eth1 -j ACCEPT 
ip netns exec ueNameSpace ip link set dev lo up   
ip netns exec ueNameSpace ip addr add 10.200.1.2/24 dev v-ue1  
ip netns exec ueNameSpace ip link set v-ue1 up 

Set your window in the new namespace:

ip netns exec ueNameSpace bash

Run the UE

./lte-uesoftmodem -C 2685000000 -r 50 --rfsim --rfsimulator.serveraddr 10.200.1.1

you need now to transfer all ip packets in the namespace to the IP interface created by the OpenAir UE

route add default oaitun_ue1

Now, you can run any application in the UE namespace: all IP traffic will go through the UE+eNB+EPC

ip netns exec ueNameSpace bash
ping 8.8.8.8

DNS in the UE namespace

DNS resolv is convenient to use in the UE namespace.

If your DNS configuration uses a gateway on lo (a address starting by 127.0.0 as do Ubuntu by default), resolv won’t work because you have another lo interface inside the network namespace (so the DNS query won’t reach the resolver outside of the namespace).

The simplest is to add a routable DNS server in your Linux configuration for also this namespace, example using the google DNS server:

sudo echo 'nameserver 8.8.8.8' >> /etc/resolv.conf

dielectric duplexers

Dielectric duplexers

We consider to make dielectric duplexers.

We would like some feedback on this post from interested future customers (no commitment).

The early prototype is like this with SMA connectors

This is much cheaper and smaller than cavity duplexers.

The technical specifications are also a bit lower: insertion loss is about 2dB, rejection between channels is around 50dB, maximum power near 2 watts

Target price would be 50€/piece,
shipping will also be low cost as the device is small.

We consider these 3 bands

Band3:1710-1785/1805-1880MHz
Band7:2500-2570/2620-2690MHz
Band13:777-787/746-756MHz

Connectors can be SMA or U.FL (we will supply also the cables if needed).

We actually need some feedback to decide to produce these devices

If you need some other devices on top of USRP, Lime, … you can also feedback in this post.

LimeSDR new set of tests

We use the latest commit in https://github.com/myriadrf/LimeSuite.git

Ubuntu 18.04

LimeSDR (HW: V1.4) flashed with latest firmware (Limeutil –update)

Scope: LTE SISO downlink signal

We use a custom OpenAirInterface version

The LimeSDR interface code is:

LMS_Open(&lms_device,list[0],NULL);
 LMS_Init(lms_device);
 LMS_Reset(lms_device);

LMS_EnableCalibCache(lms_device,false);
 LMS_LoadConfig(lms_device, );
 LMS_SetSampleRate(lms_device,4), “”); //rate is LTE standard one, so a division of 30720MS/s
 LMS_SetLOFrequency(lms_device,LMS_CH_RX, 0); // several feq tested 700MHz-3600MHz
 LMS_SetLOFrequency(lms_device,LMS_CH_TX, 0); // Tx/Rx freq are different, gap is defined by 3GPP
 LMS_SetGaindB(lms_device, LMS_CH_TX, 0, MyGain);
 LMS_SetGaindB(lms_device, LMS_CH_RX, 0, MyGain);
 //value is 0…70, we saw the today limitation: it is not actually in dB, but still the range is 0…70
 LMS_SetLPFBW(lms_device,LMS_CH_RX,0,ChosenLTEBand); // 5MHz or 10MHz or 20MHz
 LMS_SetLPFBW(lms_device,LMS_CH_TX,0,ChosenLTEBand);
 LMS_Calibrate(lms_device,LMS_CH_RX,0,ChosenLTEBand,0);
 LMS_Calibrate(lms_device,LMS_CH_TX,i,ChosenLTEBand,0)

First observation is: the API calls often fails: calibration reports failures

With some ini files, it is simply impossible to run successfully the above sequence.

With “good” ini files, we have to power-off the board before each trial.

The key problem is to make a decent .ini file, that is good only in a specific case: RF band, modulated band, power, …

Then, even with a good ini file, the result of the calibration is not repeatable, and often fails randomly (need to power off the LimeSDR board).

Measuring this DL signal

A USRP B210 output:

The best of LimeSDR can be close to this

Even in this best result, the DC offset is not well calibrated

Also it is not repeatable, and depend heavily of the .ini file we use

or non repeatable results

At lower frequency, LimeSDR is globally better

Support page

We released our software to program UICC/SIM/USIM cards.

We tested and support it only with our cards and our card reader, nevertheless it is GPL license open source.

Please provide us with enhancements source code, as per GPL license rules

uicc-software

We offer support as comments on this blog page, and a FAQ

(if your question is very confidential, send us a mail)

kernel module in UEFI secure boot

Signed kernel module: how to

  • Compilation of a kernel module like this example
    • cd opencells-mods/gtp_mod
    • make -C /lib/modules/$(uname -r)/build M=$PWD
    • sudo cp gtp.ko /lib/modules/$(uname -r)/kernel/drivers/net/gtp.ko
  • But, despite we just compiled it successfully,  the module can’t be loaded
    • modprobe gtp
    • ERROR: could not insert ‘gtp’: Operation not permitted

your kernel boot is in “secure boot”, the module can’t be loaded

This issue occurs also with other modules in AOI, like ue_ip.kp

  • Solution 1
      • Remove “secure boot” entirely
      • depends on UEFI bios
      • Can be done by
      • sudo apt install mokutil
        
        sudo mokutil --disable-validation
      • After this, reboot  the computer, the UEFI bios should ask for the password you set with “mokutil”, then ask to accept to disable secure boot
  • Solution 2
    • Sign your modules
    • add you own signature to valid signatures
      • create ciphering keys
      • openssl req -new -x509 -newkey rsa:2048 -keyout OCP.priv -outform DER -out OCP.der -nodes -days 36500 -subj "/CN=OpenCells/"
      • keep the two files OCP.der, OCP.priv as you’ll need it to sign your kernel modules
      • import it in UEFI boot
      • sudo mokutil --import OCP.der
      • It asks for a password: put any string, you’ll need it once, at next reboot, to secure the new ciphering enrolling
      • You need to reboot the machine to enroll this new key
    • Now you can sign your modules
      • each time you compile a module, you have to sign it
      • (after: sudo cp gtp.ko /lib/modules/`uname -r`/kernel/drivers/net/gtp.ko)
    • sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./OCP.priv ./OCP.der $(modinfo -n gtp)
    • now “sudo modprobe gtp”  should not complain anymore
  • You’ll need to compile and update the module after each Ubuntu kernel upgrades