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 https://github.com/pothosware/SoapySDR 
# 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 https://github.com/myriadrf/LimeSuite 
# cd LimeSuite 
# cd build 
# cmake ..

Download & Compile the eNB on 17.04

# git clone https://github.com/myriadrf/trx-lms7002m 
# wget http://open-cells.com/d5138782a8739209ec5760865b1e53b0/opencells-mods-20170710.tgz 
# tar xf opencells-mods-20170710.tgz # git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git # 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 https://gitlab.eurecom.fr/oai/openair-cn.git (should have eurecom git account)
# 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

# ./auchss.py -o 11111111111111111111111111111111 -k 6874736969202073796D4B2079650A73
# sudo python pySim-prog.py --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

Exit mobile version