OpenAirInterface LTE
Notes on a working OAI LTE project using a Samsung Galaxy S4 Mini, mainly pointers to build guides used and summary of obstacles encountered.
Result: Data transmission with an off the shelf cell phone up to 8Mbps (iperf) with very limited range using two antenna for tx and rx (proper duplexer project pending). That is, the phone must be experimentally positioned a less than a half meter from the LimeSDR and moved around until a good constellation display is found for best results.
Guides for installation:
[1]Main OAI page for setup with usrp device
[2]open-cells LimeSDR setup
[3]Recent (8/22/2017) all-in-one box build of OAI eNodeB and EPC components.
Hardware used:
Dell OptiPlex 9010 - quad core i7-3770 CPU @ 3.40GHz with USB3 support and hyperthreading turned off per OAI [4]recommendations
Bash script to turn off hyperthreading (/usr/local/bin/set-hyper-threading) from discussion [5].
Ubuntu 16.04 LTS Xenial - with low latency kernel
root@DellOptiPlex9010:~# uname -a Linux DellOptiPlex9010 4.13.0-36-lowlatency #40~16.04.1-Ubuntu SMP PREEMPT Sat Feb 17 00:18:34 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
The latest available lowlatency kernel can be found with a search for the kernel module gpt.ko that will be needed to run the gateway module
# 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
Watch out that that particular kernel does NOT become the primary boot image in grub.conf after an apt upgrate - or manually pick the kernel on startup, or change grub.conf to boot that particular image [6] - example /etc/default/grub:
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.13.0-36-lowlatency"
So now we have a platform with i7-3770, no hyperthreading and lowlatency ready for OAI LTE.
And off we go:
~/src/oai$ git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git Near 200MB cd openairinterface5g ~/src/oai/openairinterface5g$ source oaienv ~/src/oai/openairinterface5g$ ./build_oai -I --install-optional-packages <-- left this running in a screen, installs a bunch of pkgs -- hope it does not break my 2G stuff!
later ----
came home to find a question in the screen, about allowing non-root users to run wireshark packet capture - choose the not-recommended 'yes'
then fail on python ssl - had to fix with
python -m easy_install --upgrade pyOpenSSL
from [7]
re-run ./build_oai above and completed successfully
Next run
~/src/oai/openairinterface5g$ source oaienv Since I exited the screen with env set ~/src/oai/openairinterface5g$ ./cmake_targets/build_oai --eNB -w LMSSDR -c -C < ... > -- Build files have been written to: /home/chuck/src/oai/openairinterface5g/cmake_targets/lte_build_oai/build Compiling lte-softmodem Log file for compilation has been written to: /home/chuck/src/oai/openairinterface5g/cmake_targets/log/lte-softmodem.Rel14.txt lte-softmodem compiled Log file for compilation has been written to: /home/chuck/src/oai/openairinterface5g/cmake_targets/log/oai_lmssdrdevif.Rel14.txt oai_lmssdrdevif compiled liboai_device.so is linked to LMSSDR device library 10. Bypassing the Tests ...
More on build options:
A fellow in the discourse how-to-install-limesdr-on-openinterface-enodeb uses: ./build_oai -I --eNB -x -w LMSSDR
Add -x to enable xforms (soft scope), -w hardware EXMIMO, USRP, BLADERF, ETHERNET, LMSSDR, None (Default)
--eNB Makes the LTE softmodem -I Installs required packages such as LibXML, asn1.1 compiler, freediameter, ... <-- I did this seperately above
Above command had -c clean Erase all files to make a rebuild from start
-C clean-all Erase all files made by previous compilations, installations
The open-cells limesdr-installation used
./cmake_targets/build_oai -c -w LMSSDR --eNB --UE
for -c clean, -w hardware, --eNB and also --UE Makes the UE specific parts (ue_ip, usim, nvram) from the given configuration file -- default given config file is
/home/chuck/src/oai/openairinterface5g/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
What you end up with after that build is:
targets/bin/liboai_device.so -> targets/bin/liboai_lmssdrdevif.so.Rel14 targets/bin/liboai_lmssdrdevif.so.Rel14 targets/bin/lte-softmodem.Rel14
and any custom LimeSDR tweaks like setting external clock reference or printing confirmation of antenna uses go in
targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
plus it's just fun to read in itself with /usr/local/include/lime/LimeSuite.h open in another term. Of course rebuild lte-softmodem after and tweaks or experiments.