OpenAirInterface LTE: Difference between revisions
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
# apt install linux-image-4.13.0-36-lowlatency | # apt install linux-image-4.13.0-36-lowlatency | ||
</nowiki> | </nowiki> | ||
Beware if that particular kernel is no longer 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 [https://askubuntu.com/questions/216398/set-older-kernel-as-default-grub-entry] - example /etc/default/grub: | |||
<nowiki>GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.13.0-36-lowlatency"</nowiki> | <nowiki>GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.13.0-36-lowlatency"</nowiki> | ||
So now we have a platform with i7-3770, no hyperthreading and lowlatency ready for OAI LTE.<br> | So now we have a platform with i7-3770, no hyperthreading and lowlatency ready for OAI LTE.<br> |
Revision as of 17:48, 2 April 2018
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
Beware if that particular kernel is no longer 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.
Do Download and Patch EPC from [8]
Install 3rd party software for EPC
source oaienv cd scripts ./build_hss -i Installing mysql - root user password: Pa$$word <intentionally including example password> installs freeDiameter - auth like RADIUS https://en.wikipedia.org/wiki/Diameter_(protocol) installs apache, php -- for phpMyAdmin pick apache Configure database for phpmyadmin with dbconfig-common? Yes phpmyadmin password: Pa$$word
That was to install all the prereqs for hss - it will be actually build later, meanwhile prepare for
$ ./build_mme -i freeDiameter - no asn1c rev - no libgtpnl - yes hope this does not conflict with osmosgsn, ggsn GTP wireshark - done previously (non-root CAN run it)
$ ./build_spgw -i libftpnl - no this time
Next, actually compile them - just up-arrow and delete the -i
./build_hss '/home/chuck/src/oai/openair-cn/build/hss/build/oai_hss' -> '/usr/local/bin/oai_hss' oai_hss installed $ ls /usr/local/bin/oai_hss /usr/local/bin/oai_hss ./build_mme mme compiled '/home/chuck/src/oai/openair-cn/build/mme/build/mme' -> '/usr/local/bin/mme' mme installed auth_request compiled '/home/chuck/src/oai/openair-cn/build/mme/build/auth_request' -> '/usr/local/bin/auth_request' auth_request installed ./build_spgw spgw compiled '/home/chuck/src/oai/openair-cn/build/spgw/build/spgw' -> '/usr/local/bin/spgw' spgw installed
We are going to use this configuration:
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
I learned something about loopback lo interface here - you already have all 255^3 addresses available ready to use!
# ping 127.90.90.90 PING 127.90.90.90 (127.90.90.90) 56(84) bytes of data. 64 bytes from 127.90.90.90: icmp_seq=1 ttl=64 time=0.025 ms 64 bytes from 127.90.90.90: icmp_seq=2 ttl=64 time=0.032 ms
So backup and edit the config file openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.lmssdr.conf to use this:
mme_ip_address = ( { ipv4 = "127.0.0.20"; -- rest the same 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";
Here is a good discussion of the nodes and interfaces (S1-MME, S1-U, etc) to help visualize the interconnects [9]
Install This Configuration for EPC
in home ~ This uses the package d/l from [10]
sudo mkdir -p /usr/local/etc/oai sudo cp -rp ~/opencells-mods/config_epc/* /usr/local/etc/oai cd src/oai/openair-cn; source oaienv; cd scripts ./check_hss_s6a_certificate /usr/local/etc/oai/freeDiameter hss.OpenAir5G.Alliance HSS S6A: Did not find valid certificate in /usr/local/etc/oai/freeDiameter HSS S6A: generating new certificate in /usr/local/etc/oai/freeDiameter... Creating HSS certificate for user 'hss.OpenAir5G.Alliance' ... Certificate is to be certified until Feb 24 18:51:15 2019 GMT (365 days) Write out database with 1 new entries Data Base Updated /home/chuck/src/oai/openair-cn/scripts HSS S6A: Found valid certificate in /usr/local/etc/oai/freeDiameter
So that cert is good for ONE YEAR Warning if still using it then
# less /usr/local/etc/oai/freeDiameter/hss.cert.pem Validity Not Before: Feb 24 18:51:15 2018 GMT '''Not After : Feb 24 18:51:15 2019''' GMT ./check_mme_s6a_certificate /usr/local/etc/oai/freeDiameter mme.OpenAir5G.Alliance File /usr/local/etc/oai/freeDiameter/mme.cert.pem not found MME S6A: Did not find valid certificate in /usr/local/etc/oai/freeDiameter MME S6A: generating new certificate in /usr/local/etc/oai/freeDiameter... Creating MME certificate for user 'mme.OpenAir5G.Alliance' ... Certificate is to be certified until Feb 24 18:53:02 2019 GMT (365 days) Write out database with 1 new entries Data Base Updated /home/chuck/src/oai/openair-cn/scripts MME S6A: Found valid certificate in /usr/local/etc/oai/freeDiameter
Then in /usr/local/etc/oai/spgw.conf change SGI to YOUR Internet facing interface:
PGW_INTERFACE_NAME_FOR_SGI = "enp0s31f6"; to PGW_INTERFACE_NAME_FOR_SGI = "eno1"; This is already set: PGW_MASQUERADE_SGI = "yes";
Next discussion about MCC,MNC and headache getting an ebay special Galaxy S4Mini GT-I9195 [11] working on LTE with Sysmocom SIMS