OpenAir, single machine Ubuntu 17.04, after major EPC update

(updated: 2017, July 10th)

Modifs since version on July 6th:

  • Latest commit
  • Fix lacking file in the tarball
    (non modified ones since the June version were missing)
  • improved code pieces formating in HTML, added automatic git patch
  • Full re-test, from disk install of Ubuntu 17.04 to UE throughput measurement

This document explains how to install and configure OAI EPC+eNB on one single Ubuntu 17.04 64 bits machine connected with a regular UE (a Huawei E3272), routing the UE traffic to internet.

We use EPC after a major contribution in May 2017: a lot of code has been modified, all directories names were changes, configuration parameters names/values changed.

The description uses a USRP B210 board, a Lime SDR page is provided separately.

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

  • OAI EPC require kernel >= 4.7, so we have to use Ubuntu 17.04
    • We already pushed some enhancements in OAI, nevertheless some more are required
  • 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 17.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

Ettus has not yet released their driver for Ubuntu 17.04, we take it from source:

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

Download our modifications

download: patches   extract the data:

tar xf opencells-mods-20170710.tgz

Download & Compile the eNB on 17.04

git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd openairinterface5g
git checkout develop
  • We tested with commit 08b8b3142df16831396a5283a015564ff56bf91c

We already merged in develop most of updates for Ubuntu 17.04, so we need only to add in build_helper file the Ubuntu 17.04 support

git apply opencells-mods/eNB.patch
  • Now, you should be able to build as usual the eNB
source oaienv  
./cmake_targets/build_oai -I       # install SW packages from internet
./cmake_targets/build_oai  -w USRP --eNB --UE # compile eNB

Download and patch EPC

Clone OAI EPC:

git clone https://gitlab.eurecom.fr/oai/openair-cn.git
cd openair-cn
git checkout develop

(we used: commit 5353b606662a6ae7eaadf6bc39cbf6452d298b0e)

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 17.04 for compilation and fix some bugs
    • build/tools/build_helper
    • src/common/common_defs.h
    • src/oai_hss/utils/hss_config.c
  • Remove link between Linux host name and LTE diameter protocol configuration
    • src/s6a/s6a_peer.c
  • Add usage of the input address for the SGW input socket
    • src/gtpv1-u/gtp_mod_kernel.c
    • src/gtpv1-u/gtp_mod_kernel.h
    • src/gtpv1-u/gtpv1u_task.c

No kernel module patch is required anymore: generic Ubuntu kernel 17.04 works fine with OAI

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
  • set your MySQL password and remember it!
  • Answer yes to install: freeDiameter 1.2.0
  • phpmyadmin:
    • choose light or apache as you prefer
    • Configure database for phpmyadmin with dbconfig-common: yes
    • password: same as MySQL for simplicity
    • We don’t use phpmyadmin later in this procedure, nevertheless we tested successfully also with it
  • 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>: no
  • 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

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 and two parameter files: 10MHz band, 20MHz band, Huawei E3272 UE, a cavity duplexer a simple antenna, about 1 meter distance UE/eNB antenna.

  • openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
  • openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf

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”)
./hss_db_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
        • 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
./cmake_targets/lte_build_oai/build/lte-softmodem -O <your config file>

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

We re-built this procedure from scratch and tested two machines: i5-4570 and i5-6600K.

On the i5-4570, at maximum traffic, the eNB is stable on 10MHz band at full user data speed.

On the i5-6600K, we obtain stable performance at maximum traffic over 20MHz, transmission mode 1 (SISO), one single UE over-the-air 1 meter distance:

45 thoughts on “OpenAir, single machine Ubuntu 17.04, after major EPC update”

  1. Hi Laurent –

    Thanks very much – much more usable setup having the entire network in one machine. I’ve gotten through the entire build process without a hitch, however now that I’m trying to run the lte-softmodem with a BladeRF, I am getting the following error:

    Entering ITTI signals handler
    got sync (eNB_thread_single)
    got sync (eNB_thread_synch)
    [DEBUG @ sync.c:485] Sample discontinuity detected @ buffer 86, message 1: Expected t=3512249, got t=3512282
    RX overrun (1475) is detected. t=3511997Got 252 samples. nsymps 7680
    [PHY][E]rx_rf: Asked for 7680 samples, got 252 from USRP
    /home/tom/openairinterface5g/targets/RT/USER/lte-softmodem.c exit_fun() Exiting OAI softmodem: problem receiving samples
    [DEBUG @ bladerf.c:352] Enable Module: RX – False
    [DEBUG @ bladerf.c:352] Enable Module: TX – False
    [UDP][W]Received TERMINATE_MESSAGE
    closing all tasks
    ready_tasks 0
    waiting for XFORMS thread
    stopping MODEM threads
    Killing eNB 0 processing threads
    Exiting eNB thread PRACH
    [DEBUG @ bladerf.c:352] Enable Module: RX – False

    I was just wondering if in making the appropriate patches, whether the lte-softmodem is now limited to only the USRP? I got the impression that the eNB thought it was connected to a USRP, despite being linked to a BladeRF. Everything else is working as expected.

    Thanks in advance –

    Tom

    1. Tom,

      We don’t have bladeRF (we have LimeSDR, USRP B2x0 and ExpressMIMO2).

      Nevertheless, the error you face is typical to all USB based boards: almost the same message can be obtained from USRP and LimeSDR.

      The eNB doesn’t read fast enough the Rx samples (or the board driver is buggy).

      I would say:
      1) verify the board is recognized as USB3.0
      (in the output of command “dmesg”, in bladeRF specific commands)
      2) try to reduce the modulated band
      in eNB configuration file, use N_RB_DL = 25; (for LTE over 5MHz band)
      3) Try a better computer
      Many people use Intel “U” processor, even expensive like i7-7200U, but it is only quite poor in term of performance as it is only 2 regular cores.
      Also, check the result of command “dmesg” after the error occurs: you may have thermal issues, usually traced like “PowerClamp”or similar messages

      Regards,
      Laurent

      1. Apologies – You were very right Laurent. USB 3.0 was not enabled in the BIOS.

        Sorry to keep bugging you, I am still having trouble after this to run the enodeb. I am using a quad core i7 machine at 2.7Ghz (a lenovo w530) which I believe to be powerful enough. I was using a dual core i5 at 2.6Ghz which was running lte-softmodem Release 10, however was a bit unstable – hence why I have upgraded to the quad-core i7 with lte-softmodem rel14. I have reduced the bandwidth to 1.4mhz (N_RB_DL=6), which seems to clear up the RX overrun issues, however I still keep running into some sync errors when trying to use the BladeRF as seen below.

        The error seems to be one of either : “Timeout (sent 0/7680)” (as below), OR, “RX : Expected ### samples, however got 0 from USRP”.

        Anshul Thankur helpfully noted that “sync_rx and sync_tx calls into bladeRF return 0 on success and a negative value on error. Contrast this to the way USRP code is built, where a send call returns the number of bytes/samples successfully sent (which is non-zero)”. Could this be a contributor to the problem somewhere in the code if the bladerf is treated as a USRP?

        Thanks and Warm Regards Laurent,

        Tom

        [DEBUG @ sync_worker.c:95] RX overrun @ buffer 122
        Sending sync to all threads
        got sync (eNB_thread_synch)
        got sync (eNB_thread_single)
        [DEBUG @ sync.c:704] Provided timestamp=26686718 is in past: current=26745598
        [PHY][E]TX : Timeout (sent 0/7680)
        /home/tom/openairinterface5g/targets/RT/USER/lte-softmodem.c exit_fun() Exiting OAI softmodem: problem transmitting samples
        [DEBUG @ bladerf.c:352] Enable Module: RX – False
        TYPE TO TERMINATE
        Entering ITTI signals handler
        [DEBUG @ bladerf.c:352] Enable Module: TX – False
        [UDP][W]Received TERMINATE_MESSAGE
        closing all tasks
        ready_tasks 0
        waiting for XFORMS thread
        stopping MODEM threads
        Killing eNB 0 processing threads
        Exiting eNB thread PRACH
        [DEBUG @ bladerf.c:352] Enable Module: RX – False

    1. Ynnop,

      Thanks

      This is my mistake: take the file opencells-mods/build/tools/build_helper, it is the right one.
      To improve the flexibility, i computed patch files instead of delivering a new version only.
      But, I made the patch file wrong, so please take directly the new version of this file.

      I’ll fix the entire application note later, grouping several fixes together

      Laurent

  2. Hello, it looks like the patch “opencells-mods/build/tools/build_helper.patch” in opencells-mods.tgz (18113f8ba3d97aaeafa9ae830bed6c6c39814978) is empty.

  3. Hello Laurent,

    I saw that ubuntu 1704 provides stock uhd packages. Why not use it instead of compiling from source (which provides version 3.11 though).

    dpkg -l|grep uhd
    ii libgnuradio-uhd3.7.10:amd64 3.7.10.1-2 amd64 gnuradio universal hardware driver functions
    ii libuhd003:amd64 3.9.5-2 amd64 universal hardware driver for Ettus Research products – library
    ii soapysdr0.5-2-module-uhd:amd64 0.3.2-1 amd64 UHD device support for SoapySDR
    ii uhd-host 3.9.5-2 amd64 universal hardware driver for Ettus Research products – host apps

  4. Hello,i have attempted your instructions on Ubuntu 17.04 ,but when i run ./build_hss,there is an error as fllows:
    root@zyl-ThinkStation-P310:/home/zyl/openair-cn/scripts# ./build_hss
    ./build_hss: 行 161: -DOPENAIRCN_DIR=/home/zyl/openair-cn: 没有那个文件或目录
    make: *** 没有指明目标并且找不到 makefile。 停止。
    cp: 无法获取’/home/zyl/openair-cn/build/hss/build/oai_hss’ 的文件状态(stat): 没有那个文件或目录
    i do not know how to resolve this problem,could you help me?Thank you very much

    1. Hello,I met the same problem. When I run ./build_hss -i ,the error is

      0 upgraded, 0 newly installed, 0 to remove and 142 not upgraded.
      HSS not compiled, to compile it, re-run build_hss without -i option
      Then I run ./build_hss, the error is
      ./build_hss: line 161: -DOPENAIRCN_DIR=/home/wjj/Downloads/openairinterface5g/openair-cn: No such file or directory
      make: *** No targets specified and no makefile found. Stop.
      cp: cannot stat ‘/home/wjj/Downloads/openairinterface5g/openair-cn/build/hss/build/oai_hss’: No such file or directory

  5. Hi Laurent,

    Thanks for the excellent post! I was wondering if it would be possible to see the complete contents of your enb.conf file? I have attempted to re-create this with the LimeSDR and everything compiled/patched/etc. just fine (I followed the steps on your Lime-specific post) but when I attempt to run lte_softmodem I get the following error:

    ==================================

    root@ubuntu:~/openairinterface5g# ./cmake_targets/lte_build_oai/build/lte-softmodem -d -O ./targets/PROJECTS/E-MBMS/enb.conf –rf-config-file ./targets/ARCH/LMSSDR/LimeSDR_above_1p8GHz_1v4.ini
    # /dev/cpu_dma_latency set to 0us
    log init done
    Running with XFORMS!
    WARNING: setting ‘tracking_area_code’ not found in configuration file

    Assertion (0) failed!
    In enb_config_init() /home/paul/openairinterface5g/openair2/ENB_APP/enb_config.c:797
    Failed to parse eNB configuration file ./targets/PROJECTS/E-MBMS/enb.conf, 0 th enb

    Exiting execution
    ============================

    The following is the contents of the enb.conf file I’m attempting to use:

    ============================

    Active_eNBs = ( “eNB_Eurecom_0”);

    eNBs =
    (
    {
    ////////// Identification parameters:
    eNB_ID = 347472;

    cell_type = “CELL_MACRO_ENB”;

    eNB_name = “eNB_Eurecom_0”;

    // Tracking area code, 0x0000 and 0xfffe are reserved values
    tracking_area_code = 1;

    mobile_country_code = 208;

    mobile_network_code = 92;

    ////////// Channel parameters:
    // Default Paging DRX of the eNB as defined in TS 36.304
    default_paging_drx = “PAGING_DRX_256”;

    ////////// Physical parameters:
    frame_type = “TDD”;
    prefix_type = “NORMAL”;
    eutra_band = 33;
    downlink_frequency = 1907.6e6;
    uplink_frequency_offset = 0.0;

    ////////// 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
    };
    }
    );

    ==============================
    I attempted to follow the instructions for modifying enb.conf, but this doesn’t seem to work. I also get the same error message when attempting to use the default enb.conf file. Any help/advice would be greatly appreciated! Thanks again for the great post!

    1. Hi Paul,

      With USRP B2x0, you can use the default file: targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
      this is the one we used (or 100PRB one for max throughput)

      For Lime, there is config files also, at least it will fix your issue about file syntax.

      But, you may face later radio issues:
      – TDD: i don’t know anybody that run good TDD with Lime (even USRP has issues, see openair mailing list)
      – FDD: we didn’t push performance results because it was quite poor and not reproducible

      The Lime calibration was not working well, we helped to fix it in Tx, now it is not perfect but good enough and stable.
      On Tx, we have good EVM near 700MHz decreasing slowly to quite bad EVM at 3.5GHz.
      Band 7 (2.6GHz) is still acceptable: EVM below 4% (measured with a new R&S LTE analyzer)
      On Rx, it seems the calibration is still not very stable.

      Currently we are working on our framework to run OAI.
      So, we will re-try by end of July a Lime tuning session.

      You can get some details on: https://discourse.myriadrf.org/ and on OpenAir mailing list.

      We invested in LimeSDR, so we are eager it reach good quality.
      It is progressing, but still not good enough.

      Some measurements:
      https://open-cells.com/RS-results/RS-snapshots-20170523.tgz
      Since these measurements, Lime fixed issues, we re-tested: the bad I/Q figures (like in the file named “funny”) were fixed: Tx calibration is now stable.

      Laurent

  6. Hi,

    I was following this tutorial and when i try to build the eNB i get the following message:

    joao@IDTS:~/IDTS/openairinterface5g$ ./cmake_targets/build_oai -I
    Will install external packages
    CMAKE_CMD=cmake ..
    RF HW set to None
    Flags for Deadline scheduler: False
    Flags for CPU Affinity: False
    2. Setting the OAI PATHS …
    OPENAIR_DIR = /home/joao/IDTS/openairinterface5g
    Installing packages
    ./cmake_targets/build_oai: line 457: check_install_oai_software: command not found

    Can you help me out please?

    1. Hi,
      I don’t know what you did.
      We missed to add unmodified files from June version.
      So, the file eNB build_helper was completely missing for the eNB in the patch file we made on July 6th.
      Whatever, the patch file of July 6th was not good and not fully tested.

      We retested today, from a fresh Ubuntu 17.04 installation to UE performance measurement.
      The patch file is re-built from this test.

      Regards,
      Laurent

  7. Hi Laurent, thank you for the help, I was able to build the eNB already, although had to install freeDiameter for myseld(don’t know if necessary for eNB). But now i am trying to apply the patch to the EPC and it does not apply.

    joao@idts:~/idts/openair-cn$ git apply ../opencells-mods/EPC.patch
    error: patch failed: build/tools/build_helper:99
    error: build/tools/build_helper: patch does not apply

    I used the commit you provided in this tutorial. Did i do something wrong?

    Thank you for your attention.

    Cumprimentos,
    João Amaral

  8. Hi Laurent,

    I believe that the commit hash for the EPC is not correct, i’ve downloaded the code from this commit and the patch is not appliable, whereas it is with the latest code, thank you.

  9. hi,laurent,
    Thank you for your such detailed steps,and now I can run EPC and ENB correctly.But i met some problem for find signal with phone(support for 4G ).I write my card with:
    IMSI:208920100001100
    KI:6874736969202073796d4b2079650a73
    opc:504f20634f6320504f50206363500a4f

    In phone:
    apn:ltebox

    that’s all setting.
    When insert the card,my phone can not find the signal.
    Should i forget some necessary steps?
    thank you.

    best regards
    John

    1. Hi John,

      I don’t see any error in what you describe.

      Could check if the phone detects the beacon: in the phone setup, choose option “select manually the network”.
      When the phone finish the RF scanning you should see the network 208/92 is the list of detected networks.

      If yes, then check the OAI component traces: you should see the phone trying to access the network (message RACH in eNB, that should be followed by mme and HSS authentication process).

      Let’s see this trial, then next step
      Laurent

  10. zb@ubuntu:~/openair-cn/scripts$ ./build_mme
    [sudo] password for zb:
    Build type is Debug
    Architecture is x86_64
    git found: /usr/bin/git
    NETTLE VERSION_INSTALLED = 3.3
    NETTLE_VERSION_MAJOR = 3
    NETTLE_VERSION_MINOR = 3
    mme compilation failed
    cp: cannot stat ‘/home/zb/openair-cn/build/mme/build/mme’: No such file or directory
    auth_request compilation failed
    cp: cannot stat ‘/home/zb/openair-cn/build/mme/build/auth_request’: No such file or directory

  11. Hi,

    Thanks for this detailed tutorial.

    I followed all the instruction in here but when i am trying to connect the UE i get the following error:
    from the Enodb:

    [S1AP][E][s1ap_eNB_task] Failed to find ue context associated with eNB ue s1ap id: 16398672

    from mme:

    | Current Status| Added since last display| Removed since last display |
    Connected eNBs| 1 | 0 | 0 |
    Attached UEs | 0 | 0 | 0 |
    Connected UEs | 0 | 1 | 1 |
    Default Bearers | 0 | 0 | 0 |
    S1-U Bearers | 0 | 0 | 0 |

    Any suggestion on what i did wrong?

    1. Dani,

      There is not enough data to make a accurate diagnostic.
      The most probable is the Radio link is poor, so the UE attaches, then loose link/re-attach/loose line …
      In this case, major bugs still exist in OAI that becomes confused like this: objects identifiers are not well managed (a lot of issues are related to race conditions inter-threads).

      If you send full logs, either on OAI mailing list or hereafter (a URL, please don’t copy thousands of lines in the blog)
      I will make a more accurate answer.

      Regards,
      Laurent

      1. Hi,

        I’ve met the same error with Dani just now, though I reinstall it for several times,the error still exist.I’m not able to find out whether it was caused by the codes or some steps I’ve missed when i was following your instructions.
        Could you please try it again when you are free, I’m really confused and upset now.thanks

        demo

    2. Hi.
      Have you resolved it?the error I met is the same with me ,if you have find a solution,could you teach me how to solve it.

      thanks

  12. Hi!

    I’ve followed the tutorial but when I’m trying to connect with a UE (Huawei E3372 Dongle) I’m getting these errors:

    eNB:
    [S1AP][E][s1ap_eNB_task] Failed to find ue context associated with eNB ue s1ap id: 420141

    mme:
    INFO NAS-EM ir-cn/src/nas/emm/sap/emm_recv.c:0786 EMMAS-SAP – Received Authentication Failure message

    Any ideas what am i doing wrong?

    I’ve uploaded the complete logs to pastebin:
    https://pastebin.com/LZC0ApTs # hss
    https://pastebin.com/8FsFa8yz # mme
    https://pastebin.com/96UBviAs # eNB

    Best regards,
    Daniel

    1. Hello Daniel,
      Checking the first log: hss.log, i see you didn’t apply the full tutorial: the hss starts to recompile all OPc.
      We offer this tuto, nevertheless we can’t debug each user specific configuration.
      Regards,
      Laurent

      1. Hi laurent,

        I think the output was due to Daniel canceled the note on op in hss.conf, but whatever, I got the same result (Authentication failure :mac failure).
        I’m sure I’ve input the correct imsi,key and OPc into the sim card. The phone I use to attach someone has already tested, then I’m confused.

        thanks

        demo

        1. Hi Daniel,

          I see in your trace: Entering nas_proc_ul_transfer_ind(), then emm_recv_authentication_failure()
          So, I believe the UE rejects the HSS authentication data.
          This occurs mainly because the OPc or the SQN is wrong.

          I don’t know which UICC/SIM you use, this could be tricky to debug (verify your OPc and SQN if you can).
          We decided to offer SIM cards for this purpose: we lost months to understand a small error like this one.

          Anyway, the radio attach is ok, IMSI is ok, the hss finds it in the DB, all the dialog is good.
          My understanding: the UE (probably the SIM) refuses data coming from the HSS.

          Regards,
          Laurent

          1. Hi!

            Thank you both for the detailed answers. It really seems like that my SIM OPc is wrong, I’m going to check that or try it with another SIM.

            Best regards,
            Daniel

        2. Hi Daniel,

          It might be caused by the sim card, I’m not sure.But Daniel has pointed it out clearly. I’ve bought the nano cards yesterday, maybe you can have a try as well.

          Regards,

          demo

  13. Thanks for the amazing job.
    Yet, I just encounter some problem. Everything work fine before I try to connect Nexus 5 to the eNodeB. run.mme breaks down and the error logs are:

    Assertion (0) failed!
    In mme_app_handle_s6a_update_location_ans() /home/lrf/workspace/openair-cn/src/mme_app/mme_app_location.c:115
    “ULR/ULA procedure returned non success\n”
    Will Intentionaly raise SEGFAULT to be catched by GDB!
    Obtained 5 stack frames.
    mme(display_backtrace+0x28) [0x507251]
    mme(mme_app_handle_s6a_update_location_ans+0x283) [0x4faef6]
    mme(mme_app_thread+0x130) [0x4f4e2d]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7feea6b016ba]
    /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7feea50c13dd]
    ./run_mme: line 87: 2403 Segmentation fault (core dumped) $SUDO mme `echo $exe_arguments` 2>&1

    Do you have any idea what is going wrong?

    1. Oh.. I managed to solve the problem. I should have modified the IMSI ofpdn table in hss database. Still, nexus 5 cannot connect to the eNobeB. No error log is shown.

      1. Hi Ruofeng
        I got exactly the same error like you. i already put the ismi is the pdn table in the data base but the error persists. do you solve this problem ? do you know another way to solve this problem apart update the pdn table in the data base

        1. Hi,
          I don’t have nexus 5, so i can’t reproduce it.
          But, we’ve got a problem that looks similar with another Android phone.
          Could you try the patch in our post that updates this one (the August 22nd version)?
          Laurent

  14. I found that saying yes to “Do you want to install asn1c rev 1516 patched? : no” fixed my problem with the “cannot stat” issue that other users reported. I bash -x ./build_mme and saw error complaining about missing asn.1 compiler.

  15. Hi,laurent
    first,thanks for your shareing.now i got a problem,i want to know what the address like MME_IPV4_ADDRESS_FOR_S11_MME = “127.0.11.1/8” in “mme.conf” for? Lots of people do not change the ip like this when they build mme/spgw. why we do not need to chang it. could you help me you? Thank you!

  16. Leaf,
    It changes the MME source IP address over S11 (to the S-GW)
    If you want to observe: wireshark => open loopback interface => filter “udp.port==2123”
    You’ll see the IP source changes according to the parameter

    Is it useful to change it?
    No, as long as the IP packets can be routed by Linux kernel
    I change it for simple and clear configuration: “my” MME has one single IP addr, it uses it on all it’s interfaces

    Regards,
    Laurent

Leave a Reply

Your email address will not be published. Required fields are marked *