OpenAirInterface 4G/LTE with LimeSDR_Mini

OS ubuntu 17.04

# apt-file search gtp.ko | grep lowlatency
linux-image-4.13.0-36-lowlatency: /lib/modules/4.13.0-36-lowlatency/kernel/drivers/net/gtp.ko
# apt install linux-image-4.13.0-36-lowlatency


# git clone
# apt-get install cmake g++ libpython-dev python-numpy swig
# mkdir build
# cd build
# cmake ..
# make -j4
# sudo make install
# sudo ldconfig #needed on debian systems
# SoapySDRUtil --info

# sudo apt-get install git g++ cmake libsqlite3-dev libi2c-dev libusb-1.0-0-dev
#install graphics dependencies
sudo apt-get install libwxgtk3.0-dev freeglut3-dev
# git clone
# cd LimeSuite
# cd build
# cmake ..

Download & Compile the eNB on 17.04
# git clone
# wget
# tar xf opencells-mods-20170710.tgz
# git clone
# cd openairinterface5g
# git checkout 08b8b3142df16831396a5283a015564ff56bf91c
# git apply ../opencells-mods/eNB.patch
# source oaienv
# ./cmake_targets/build_oai -I
# ./cmake_targets/build_oai -c -w LMSSDR --eNB -x

Download and patch EPC
# cd
# git clone
# cd openair-cn
# git checkout develop
# git apply opencells-mods/EPC.patch
# source oaienv; cd scripts
# ./build_hss -i

set your MySQL password and remember it!
Answer yes to install: freeDiameter 1.2.0
phpmyadminn choose apache, configure database for phpmyadmin with
dbconfig-common: yes, password: same as MySQL for simplicity

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? : no
Do you want to install libgtpnl ? : yes
wireshark permissions: as you prefer

# ./build_spgw -i

Do you want to install libgtpnl ? : no

Compile the EPC nodes
# cd ~/openair-cn; source oaienv; cd scripts
# ./build_hss
# ./build_mme
# ./build_spgw

# nano openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf

Change tx_gain 127 and rx_gain 160 je careful i am not sure it is necessary and it is max values

Change to this
////////// MME parameters:
mme_ip_address = ( { ipv4 = “”;
ipv6 = “192:168:30::17”;
active = “yes”;
preference = “ipv4”;


ENB_PORT_FOR_S1U = 2152; # Spec 2152

And this

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”;

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.

# nano /usr/local/etc/oai/spgw.conf,

your should set the interface that is connected to Internet, and,
to tell to the PGW to implement NAPT for the UE traffic


Change wlp2s0 with your interface

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

A HSS database in text is in: opencells-mods/opencells_db.sql

for phpmyadmin
# sudo ln -s /usr/share/phpmyadmin /var/www/html

10 users is network 208/92 (a French test network) are also created

# nano /usr/local/etc/oai/hss.conf
HSS Configure the password for MySQL set password as the password you created during MySQL installation

uncomment #OPERATOR_key = “11111111111111111111111111111111”; # OP key matching your database

# cd ~/openair-cn/scripts
# ./hss_db_import root linux oai_db ~/opencells-mods/opencells_db.sql

supposed your password is linux

program the Usim
apt-get install python-pyscard python-serial python-pip
pip install pytlv
to find ki matching you should k at startup of
# ./run_hss

to find opc
# ./ -o 11111111111111111111111111111111 -k 6874736969202073796D4B2079650A73

# sudo python –type=”sysmoUSIM-SJS1″ –mcc=208 –mnc=92 –imsi=208920100001108 –opc=777f0406a78d9598b0330d63f4c52199 –ki=6874736969202073796D4B2079650A73 –iccid=8988211000000227713 –pin-adm=40303607 –acc=0200

Change pin-adm=40303607 –acc=0200 with your own values

Running !!
# cd ~/openair-cn/scripts
# sudo ./run_hss
# sudo ./run_mme
# sudo ./run_spgw

# cd ~/openairinterface5g
# sudo -E targets/bin/lte-softmodem.Rel14 -O targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf –rf-config-file ~/trx-lms7002m/config-limeSDR/LimeSDR_Mini_v06.ini -d

The last puzzle piece with the lousy bursty throughput and those log errors:

[PHY][W][eNB 0, CC 0] frame 733, subframe 4, UE 0: ULSCH consecutive error count reached 20, triggering UL Failure
[MAC][I][UL_failure_indication] [eNB 0][UE 0/80e6] Frame 733 subframeP 4 Signaling UL Failure for UE 0 on CC_id 0 (timer 0)
[PHY][E]ERROR: Format 1A: rb_alloc (1ff) > RIV_max (144)

was partly solved by using the lte-softmodem -d switch Enable soft scope and L1 and L2 stats (Xforms), since it was built with the -x –xforms option, and partly by randomly moving the phone around and noticing there was a sweet spot where Firefox would download and install very fast.
Good luck


18 thoughts on “OpenAirInterface 4G/LTE with LimeSDR_Mini

      1. For the GSM, we have old base station like donate to our university, we open all the compenent and the amplifier is one module ! we will use it for limesdr-mini but for the 3G and 4G , search some solution! I see also schematic of amplifier 10W for sdr but it creating circuit like always expensive! i could send you the schematic but it’s on pdf not link and i don’t know how to upload something for your blog.


      1. you need resistor and condesator (smd) so you need also “soudure à air chaude” ! the TGF3015SM is just the CI of the amplifier, on datasheet you can see the other component for it! but it’s not so expensive than the amplifier. it’s just any basic smd component !

        Liked by 1 person

  1. See the datasheet and you have the minimal schematic! but the problem is you should well dimensionned the radiator. When the huawei amplifier run correctly, i will send on this blog my experimentation and explanation


  2. Bastien, have you been able to get around the “the error Failed to find ue context associated with eNB ue s1ap id” error and attach to OAI?


  3. why to not use but it’s for lte only. it’s high gain but it’s a boost not amplifier so it’s not robust of obstacle , Line of sight (or direct visibility). The popular antenna for sdr is even for the usrp


  4. For some reason, the UE just doesn’t see the eNB. With the regular version of LimeSDR I am able to see the eNB, but with Mini it doesn’t show up. Tried putting the UE up to the antenna, did not help.

    Liked by 1 person

  5. For mine, i can find the network but when i try connect i can’t !! hey Bastien , is possible that you send your logfile and indeed your configuration! i would like also ask you for the sql, what did you add on it!!!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s