LimeSDR installation

Tutorial to install LimeSDR USB instead of USRP in the setup described in:

OpenAir, single machine Ubuntu 17.04, after major EPC update

Considering LimeSDR is under development we will install all from source

Add Ubuntu packages required by SoapySDR and LimSDR

sudo apt-get install cmake g++ libpython-dev python-numpy swig git libsqlite3-dev libi2c-dev libusb-1.0-0-dev libwxgtk3.0-dev freeglut3-dev

Install SoapySDR

git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
git pull origin master
mkdir build && cd build
cmake ..
make -j4
sudo make install
sudo ldconfig

Install LimeSDR

git clone https://github.com/myriadrf/LimeSuite.git
cd LimeSuite
mkdir build && cd build
cmake ..
make -j4
sudo make install
sudo ldconfig
cd ../udev-rules/
sudo ./install.sh
# Download board firmware
sudo LimeUtil --update

Now, we can implement all the tuto made for USRP, changing a few parameters

Compile OpenAirInterface softmodem, as for USRP

./cmake_targets/build_oai -c -w LMSSDR --eNB --UE

To run, you need a config file specific for the LimeSDR board

./cmake_targets/lte_build_oai/build/lte-softmodem -d -O enb.conf --rf-config-file targets/ARCH/LMSSDR/LimeSDR_above_1p8GHz_1v4.ini

This config file is for 1v4 or 1v4s LimeSDR board revision (revision is written on the board).

The connector to use with this config file: RX1_H and TX1_2

I managed to attach a regular UE fdd band 7, but the throughput and stability is much poorer than my USRP.

I’ll try to make better radio configuration soon.

21 thoughts on “LimeSDR installation”

  1. Hi Laurent,

    Thanks for posting this and for your contributions to OAI. One note on above, we have had significantly performance with LimeSDR_above_1p8GHz.ini instead of the LimeSDR_above_1p8GHz_1v4.ini file with our v4 boards. Perhaps this will help with the throughput issue you reference above.

    -Joey

    1. Thanks Joey,

      Meanwhile, we worked also with Lime team: they improved a lot the calibration procedure 2 weeks ago.

      It is not yet perfect, but it is much better.
      I will publish another note, more complete with LTE R&S analyzer snapshots.

      There is a big Q/A on Myriad forum:
      https://discourse.myriadrf.org/t/something-wrong-with-calibration-procedure/1163

      My latest status is the Tx gain parameter is not stable across the possible RF frequency band: some bands Tx saturates (LTE DL signal) at gain=0.2, some other bands require gain=0.5 to have a decent outut power.

  2. Hi Laurent,

    Thank you for a very detailed guide.
    I have been able to setup everything using the guide “All in one OpenAirInterface, August 22nd”.

    Can you kindly share the .ini and enb.conf file?

    If I load the LimeSDR_above_1p8GHz.ini into LimeSUiteGUI the Tx is 1850MHz and Rx 1755MHz while in the enb.ban7.lmssdr.conf the DL is 2680MHz(LTE band 7). Do I need to change the .ini file or am I missing something?

    Regards,
    Ubaid

  3. Hi,
    since the new Update of the OAI packege (November 28th 2019) I can’t use the limeSDR.
    I use this: “./cmake_targets/build_oai -c -w LMSSDR –eNB –UE ” and get this Error

    oai_lmssdrdevif compilation failed
    build have failed

    Log file:
    [ 0%] Built target generate_T
    Scanning dependencies of target oai_lmssdrdevif
    [100%] Building CXX object CMakeFiles/oai_lmssdrdevif.dir/home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp.o
    /home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp: In function ‘int trx_lms_start(openair0_device*)’:
    /home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp:181:5: error: ‘LMS_EnableCalibCache’ was not declared in this scope
    LMS_EnableCalibCache(lms_device,false);
    ^~~~~~~~~~~~~~~~~~~~
    /home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp:181:5: note: suggested alternative: ‘LMS_EnableCache’
    LMS_EnableCalibCache(lms_device,false);
    ^~~~~~~~~~~~~~~~~~~~
    LMS_EnableCache
    /home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp: In function ‘int trx_lms_stop(openair0_device*)’:
    /home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp:280:1: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
    CMakeFiles/oai_lmssdrdevif.dir/build.make:62: recipe for target ‘CMakeFiles/oai_lmssdrdevif.dir/home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp.o’ failed
    make[3]: *** [CMakeFiles/oai_lmssdrdevif.dir/home/thales/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp.o] Error 1
    CMakeFiles/Makefile2:2327: recipe for target ‘CMakeFiles/oai_lmssdrdevif.dir/all’ failed
    make[2]: *** [CMakeFiles/oai_lmssdrdevif.dir/all] Error 2
    CMakeFiles/Makefile2:2339: recipe for target ‘CMakeFiles/oai_lmssdrdevif.dir/rule’ failed
    make[1]: *** [CMakeFiles/oai_lmssdrdevif.dir/rule] Error 2
    Makefile:918: recipe for target ‘oai_lmssdrdevif’ failed
    make: *** [oai_lmssdrdevif] Error 2

    Can someone help me please.

    1. Hi,
      Yes, this is reported in Lime API release note:
      LMS_EnableCalibCache() has been depracated because of confusing name, LMS_EnableCache() has been added to take its place.

      If you replace LMS_EnableCalibCache by LMS_EnableCache, it compiles.

      We would have to check again the LimeSDR RF quality with recent LimeSuite API
      Laurent

  4. Hi Laurent,

    together with my fellow students, we try to install the LimeSDR instead of USRP.

    The eNB connects to the MME successfully (seemingly). But after initialisation the eNB outputs the following:

    [PHY] prach_I0 = 0.0 dB
    [PHY] max_I0 15, min_I0 0
    [PHY] prach_I0 = 0.0 dB
    [PHY] max_I0 15, min_I0 0

    In the moment, we switched on the mobile device (switched off the airplane mode), the following output on the eNB occurs:

    Look at here: https://pastebin.com/UiLpxe0S

    After some of these messages, the UE is not connected and the output from the beginning is shown again.

    As Hard/Software, we use:
    – Ubuntu bionic 18.04.3 LTS
    – Linux 4.15.0-72-lowlatency
    – CPU: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz
    – LimeSDR v1_4s, connected to PC via USB3
    – the SIM bought from you, with untouched configuration

    Is there any Limesdr.conf we should/could use, instead of the default USRP.conf?
    Or is there anything else, that we could do, in order to successfully connect our UE?

    Thank you for your efforts.

    1. Hi,
      Your trace commented:
      [PHY] prach_I0 = 0.0 dB
      [PHY] max_I0 15, min_I0 0
      => quite low, maybe increase the Rx gain will help

      [PHY] [eNB 0/0][RAPROC] Frame 32, subframe 1 Initiating RA procedure with preamble 63, energy 10.4 dB, delay 144
      [PHY] fill_ulsch UE_id 0 nb_rb = 0
      [RRC] [FRAME 00034][eNB][MOD 00][RNTI 7cf1] Decoding UL CCCH 52.f5.96.da.4e.76 (0x55c4bcddc745)

      => the UE detected the eNB, decoded it, the information match with the SIM data
      => So, the UE emitted RACH to enter the network
      => the eNB detected and decoded the UE message

      [RRC] [FRAME 00034][eNB][MOD 00][RNTI 7cf1] Accept new connection from UE random UE identity (0xe7a46d592f000000) MME code 0 TMSI 0 cause 3
      [MAC] Added physicalConfigDedicated 0x7fa64c002d90 for 0.0
      [RRC] [FRAME 00034][eNB][MOD 00][RNTI 7cf1]CALLING RLC CONFIG SRB1 (rbid 1)
      add new uid is 0 7cf1

      [PDCP] [FRAME 00034][eNB][MOD 00][RNTI 7cf1][SRB 01] Action ADD LCID 1 (SRB id 1) configured with SN size 5 bits and RLC AM
      [RLC] [FRAME 00034][eNB][MOD 00][RNTI 7cf1] [SRB 1] rrc_rlc_add_rlc SRB
      [RLC] [FRAME 00034][eNB][MOD 00][RNTI 7cf1][SRB AM 01][CONFIGURE] max_retx_threshold 4 poll_pdu 4 poll_byte 65535 t_poll_retransmit 80 t_reordering 35 t_status_prohibit 0
      [MAC] generate_Msg4 ra->Msg4_frame SFN/SF: 35.2, frameP SFN/SF: 35.2 FOR eNB_Mod: 0
      [MAC] [eNB 0][RAPROC] CC_id 0 Frame 35, subframeP 2: Generating Msg4 with RRC Piggyback (RNTI 7cf1)

      => The eNB answers to the UE

      [PHY] fill_ulsch UE_id 0 nb_rb = 0
      [MAC] [eNB 0][PUSCH 6] CC_id 0 36.6 ULSCH in error in round 0, ul_cqi 155, UE_id 0, RNTI 7cf1
      [MAC] [eNB 0][PUSCH 6] CC_id 0 37.4 ULSCH in error in round 1, ul_cqi 155, UE_id 0, RNTI 7cf1

      => the eNB never decode the answer from the UE, it will be lost

      I think the problem is in the radio parameters and maybe in OAI power control
      When it emits RACH, the UE perform several trials increasing power in each trial, that can become maximum power
      So, the eNB decodes it at a time
      Later transmission power is managed, the algorithms are not that simple and probably OAI doesn’t implement it fully correctly.
      You can try to increase Rx gain.
      Another idea is to increase the output power the eNB declares to use, so the UE will estimate the channel losses are larger, therefore emit more power.

      Laurent

      1. Hi Laurent, thank your for your fast repsonse, it allowed us to continue our work immediately.

        We increased in the RU section both max_rxgain to 200, max_pdschReferenceSignalPower to -20, above in the component_carriers the rx_gain to 115 and pdsch_referenceSignalPower to -29. (This was a bit trial and error, because we don’t know exactly, what these properties do)

        This resulted in the following: The cellphone could seemingly establish a connection much faster and the phones displayed, that its connected to the eNB. But the logs of the eNB tells us, that the phone still loses its connection and then try to reconnect.

        Here, we’ve posted the complete eNB log: https://pastebin.com/amBDxjtZ
        And additionally here’s our adjusted LimeSDR.conf: https://pastebin.com/sjN2quwG

        1. Dear Jonas Klein,
          I was trying to follow your setup as you have done in your case. I am not able to get any network on my mobile. could you please suggest me which mobile you are using to get the network? is it necessary that the SIM card is inserted in the mobile? can we search the network without SIM card inserted in the mobile(though UE will not attach but still we can see the network)?
          can you please send the picture of your Limesdr antenas setup?
          Note: in my case Limesdr -usb is getting attached to EPC-core, and FX3 LED then becomes RED, is this a normal behavior?

          1. Hi,
            About SIM: scanning can be done without SIM in all phones,as all phone must be able to also perform emergency calls (without SIM card also)
            Laurent

  5. Hi dear laurent

    thanks for ur website
    in LIMESDR installation, there is no make file in master branch of github link,

    can u update it?

  6. Dear Laurent
    I’m using LimeSDR with a virtual machine for EPC and another virtual Machine for ENB and i followed ur tutorial( Thanks for your nice tutorial) when i get to Configuration file to set Ip address of MME for ENB configuration file
    I mean this https://files.fm/f/d6ash3td
    i got confused because there is no config file for Limesdr ( there is a config in : targets/ARCH/LMSSDR/LimeSDR_above_1p8GHz_1v4.ini but its not sth like usrp in this directory:
    ~/openairinterface5g/targets/PROJECTS/GENERIC-LTE-EPC/CON/enb.band7.tm1.25PRB.usrpb210.replay.conf)

    Can u help me on that? how can i set ip addresses on ENB conf file to interface with mme, hss, spgw ?

    Thanks alot

    1. Hi,

      .ini and .conf files
      The .ini file for LimeSDR is specific to the LMS7002D chip, it has no relation with OAI .conf files
      USing OAI with limeSDR require to pass the two parameter files -O for OAI and –rf-config-file for the LMS7002D configuration

      How to set IP@ for eNB, HSS, spgw, mme
      We made the tutorial “all in one” to offer the simplest configuration to start.
      If you make a IP network (in virtual machines or actual network), you need to create the NAPT translations, the IP routes, …
      I suggest you start in one machine, then move one piece (like the mme) by one pice to other machines and test each step.

      Regards,
      Laurent

  7. Hi Laurent,

    I’m getting errors when using limeSDR. I’m pretty sure something is off with my configuration file.
    eNB conf in use: https://pastebin.com/7BGB53zT
    Error Log: https://pastebin.com/xSzUQ5pZ
    Mostly the errors are about

    [PHY] problem receiving samples[PHY] rx_rf: Asked for 15360 samples, got -1 from SDR
    [PHY] rx_rf: rfdevice timing drift of -15360 samples (ts_off 4293953536)

    Can you please provide a sample enb.conf configuration file for limeSDR?

    Thanks

    1. Hi,
      Before this error ( Asked for 15360 samples, got -1 from SDR ), the LimeSDR tells it can’t implement the RF configuration.
      There is quite a lot of work to do with the LMS7002 chip configuration
      Laurent

  8. Hi Laurent,
    Everything this working. No errors, but I’m unable to see the eNB on my cell phone.
    Setup:
    OAI-RAN on a separate machine
    OAI-CN on a separate machine
    Radio: LimeSDR-mini
    Cell Phones: Nexus 6P and OnePlus 6
    Frequency Bands tested: Band1, Band7, Band20

    I do not see any errors when the radio is configured I can see eNB in the MME.

    Not sure what the problem is. I tried it with different MCC/MNC no luck.

    Thanks

  9. Hi Laurent,
    can you help me to solve my problem when I try to run OAI

    ./cmake_targets/lte_build_oai/build/lte-softmodem -d -O enb.conf –rf-config-file targets/ARCH/LMSSDR/LimeSDR_above_1p8GHz_1v4.ini
    [CONFIG] get parameters from libconfig enb.conf , debug flags: 0x00000000
    [LIBCONFIG] /home/theboel/openairinterface5g/common/config/libconfig/config_libconfig.c 352 file enb.conf – 0 – file I/O error

    [CONFIG] function config_libconfig_init returned -1
    [CONFIG] /home/theboel/openairinterface5g/common/config/config_load_configmodule.c 295 config module “libconfig” couldn’t be loaded

    —–Help for section config : 001 entries——
    –debugflags:
    lte-softmodem -O [config mode]
    debugflags can also be defined in the config_libconfig section of the config file
    debugflags: mask, 1->print parameters, 2->print memory allocations debug messages
    4->print command line processing debug messages
    ——————————————————————–

    [CONFIG] config_get, section log_config skipped, config module not properly initialized
    [LOG] init aborted, configuration couldn’t be performedlog init done
    Reading in command-line options
    [CONFIG] config_get, section (null) skipped, config module not properly initialized
    [CONFIG] config_get, section (null) skipped, config module not properly initialized
    [CONFIG] config_get, section loader skipped, config module not properly initialized
    [LOADER] configuration couldn’t be performed via config module, parameters set to default values
    [CONFIG] config_get, section loader.telnetsrv skipped, config module not properly initialized
    [LOADER] /home/theboel/openairinterface5g/common/utils/load_module_shlib.c 92 couldn’t retrieve config from section loader.telnetsrv
    [LOADER] library libtelnetsrv.so successfully loaded
    [CONFIG] config_get, section telnetsrv skipped, config module not properly initialized
    [TELNETSRV] Telnet server: module 0 = telnet added to shell
    Segmentation fault (core dumped)

    1. Hi,
      I think it is self explaining:
      [LIBCONFIG] /home/theboel/openairinterface5g/common/config/libconfig/config_libconfig.c 352 file enb.conf – 0 – file I/O error
      [CONFIG] function config_libconfig_init returned -1
      [CONFIG] /home/theboel/openairinterface5g/common/config/config_load_configmodule.c 295 config module “libconfig” couldn’t be loaded

      probably the file enb.conf doesn’t exist
      Laurent

Leave a Reply to laurent Cancel reply

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